Skip to content

Split command building out of Run.ts - #531

Merged
jtklein merged 3 commits into
AntonelliLab:masterfrom
jtklein-agents:spec/419-split-command-building-out-of-run-ts
Nov 28, 2026
Merged

jtklein merged 3 commits into
AntonelliLab:masterfrom
jtklein-agents:spec/419-split-command-building-out-of-run-ts

Conversation

@jtklein-agents

Copy link
Copy Markdown
Contributor

Summary

The four command builders leave the Run page store and become plain functions, one file per binary. Command pins fix every generated argument list first; the move is proven by the pins not changing. No user-visible change.

 src/app/store/
-├── Run.ts                      # 1,699 lines: state, lifecycle and four command builders
+├── Run.ts                      # 942 lines: state and lifecycle; args/command/settingsFileContent call command/
+├── command/
+│   ├── index.ts                # commandArgs dispatch, commandText, settingsText, CmdArg
+│   ├── astral.ts               # astralArgs( run, platform )
+│   ├── modeltestNg.ts          # modeltestNgArgs( run, platform )
+│   ├── raxmlNg.ts              # raxmlNgArgs( run, platform )
+│   ├── raxml.ts                # raxmlArgs( run, platform )
+│   └── *.test.ts               # one direct test per builder, plain object, both platforms
+├── Run.pins.test.ts            # command pins, macOS/Linux host
+├── Run.pins.windows.test.ts    # same table, Windows host and paths
+└── __snapshots__/              # 61 pins per platform
 src/test/
+└── commandPins.ts              # the pin table

Each builder takes a narrow typed input listing only what it reads; Run satisfies it by passing itself. Builder bodies moved verbatim (this. → run.).

Per-ticket history: https://github.com/jtklein-agents/raxmlGUI/pulls?q=is%3Apr+base%3Aspec%2F419-split-command-building-out-of-run-ts

Evidence

  • Before: no test fixed a whole command; builders were only reachable through a full Run.
    After: 61 command pins per platform (8 RAxML and 6 RAxML-NG analyses × bare/full/alternate, ModelTest-NG, ASTRAL, command string and settings text).

  • Before: pins written against the builders inside Run.ts (first commit).
    After: both move commits leave the snapshots untouched:

    git log <pin commit>..HEAD -- src/app/store/__snapshots__
      → 0 commits
    
  • CI on the last ticket's pull request: eslint pass; e2e pass on macos-15, ubuntu-24.04 and windows-latest.

Merge Danger

Door: two-way

A revert restores the builders inside Run.ts; nothing persisted changes.

Blast Radius: commands

Every argument list sent to RAxML, RAxML-NG, ModelTest-NG and ASTRAL passes through the moved code. A slip would produce a wrong or failing analysis; the pins and e2e guard against it.

🤖 Generated with Claude Code

jtklein-agents and others added 3 commits November 27, 2026 23:15
One table of cases in src/test/commandPins.ts, run by two test files:
the host the test setup installs, and a Windows host with C: paths.
Each pin builds a real Run and snapshots run.args; run.command and
run.settingsFileContent are pinned once per binary.

Binaries the host's list lacks (ASTRAL, RAxML-NG on Windows, and a
PTHREADS-named RAxML-NG stand-in for the --threads branch) are added
to the list by the table.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
#424)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
raxmlNgArgs and raxmlArgs move to command/raxmlNg.ts and command/raxml.ts
with this. replaced by run. and no other edit. The args getter's dispatch
moves to commandArgs in command/index.ts. One direct test per builder runs
it on a plain object for both platforms.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
@jtklein
jtklein merged commit fc7d20b into AntonelliLab:master Nov 28, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants