Skip to content

Move the ASTRAL and ModelTest-NG command builders out of Run.ts (#421) - #424

Merged
jtklein-agents merged 1 commit into
spec/419-split-command-building-out-of-run-tsfrom
421-move-the-astral-and-modeltest-ng-command-builders-out-of-run-ts
Nov 27, 2026
Merged

jtklein-agents merged 1 commit into
spec/419-split-command-building-out-of-run-tsfrom
421-move-the-astral-and-modeltest-ng-command-builders-out-of-run-ts

Conversation

@jtklein-agents

Copy link
Copy Markdown
Owner

Closes #421

Summary

The two small command builders, the command string and the settings-file text move out of Run.ts. The RAxML and RAxML-NG builders stay for the next ticket.

 src/app/store/
 ├── Run.ts                  # args / command / settingsFileContent getters stay, now delegate
+└── command/
+    ├── index.ts            # CmdArg, Platform, commandText, settingsText
+    ├── astral.ts           # AstralInput, astralArgs( run, platform )
+    ├── astral.test.ts
+    ├── modeltestNg.ts      # ModeltestNgInput, modeltestNgArgs( run, platform )
+    └── modeltestNg.test.ts
 get args()
-  usesAstral      -> this.astralArgs()
-  usesModeltestNg -> this.modeltestNgArgs()
+  usesAstral      -> astralArgs( this, { windows } )
+  usesModeltestNg -> modeltestNgArgs( this, { windows } )
   usesRaxmlNg     -> this.raxmlNgArgs()
   otherwise       -> this.raxmlArgs()

Builder bodies moved with this. replaced by run. and no other edit. No file under command/ imports Run, MobX or host.

The new builder tests overlap the command pins in Run.pins.test.ts / Run.pins.windows.test.ts on purpose: the ticket asks for one direct test per builder on a plain object, and the pins stay as the spec's safety net through Run.

Evidence

  • Before: builders only reachable through a Run store; command pins green.
    After: yarn verify passes, 78 files / 622 tests, no pin snapshot changed.
astralArgs( plain object, { windows: true } )       -> quoted paths
astralArgs( plain object, { windows: false } )      -> bare paths
modeltestNgArgs( plain object, { windows: true } )  -> quoted paths
modeltestNgArgs( plain object, { windows: false } ) -> bare paths

Merge Danger

Door: two-way

Move-only refactor into the spec's feature branch; revert restores the methods.

Blast Radius: commands

A wrong move would change the generated ASTRAL or ModelTest-NG command or the settings file text; the unchanged command pins cover the args.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@jtklein-agents
jtklein-agents merged commit 1a13b32 into spec/419-split-command-building-out-of-run-ts Nov 27, 2026
4 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.

1 participant