Skip to content

Move the RAxML and RAxML-NG command builders out of Run.ts (#422) - #425

Merged
jtklein-agents merged 1 commit into
spec/419-split-command-building-out-of-run-tsfrom
422-move-the-raxml-and-raxml-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
422-move-the-raxml-and-raxml-ng-command-builders-out-of-run-ts

Conversation

@jtklein-agents

Copy link
Copy Markdown
Owner

Closes #422

Summary

The two large command builders and the dispatch move out of Run.ts. Run.ts now holds no command-building code.

 src/app/store/
 ├── Run.ts                  # args getter only calls commandArgs
 └── command/
-    ├── index.ts            # CmdArg, Platform, commandText, settingsText
+    ├── index.ts            # + PartitionInput, ConstraintInput, CommandInput, commandArgs
     ├── astral.ts
     ├── modeltestNg.ts
+    ├── raxmlNg.ts          # RaxmlNgInput, raxmlNgArgs( run, platform )
+    ├── raxmlNg.test.ts
+    ├── raxml.ts            # RaxmlInput, raxmlArgs( run, platform )
+    └── raxml.test.ts
 get args()
-  usesAstral      -> astralArgs( this, { windows } )
-  usesModeltestNg -> modeltestNgArgs( this, { windows } )
-  usesRaxmlNg     -> this.raxmlNgArgs()
-  otherwise       -> this.raxmlArgs()
+  return commandArgs( this, { windows } );

Builder bodies moved with this. replaced by run. and a two-space dedent, no other edit; comments moved with them. No file under command/ imports Run, MobX or host. CommandInput is a type intersection of the four builder inputs plus the three uses* flags.

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: both builders were Run methods; command pins green.
    After: yarn verify passes, 80 files / 626 tests, no pin snapshot changed.
  • Old and new bodies compared mechanically: raxmlNgArgs 197 lines, raxmlArgs 492 lines, zero differences.
raxmlNgArgs( plain object, { windows: true } )  -> quoted paths
raxmlNgArgs( plain object, { windows: false } ) -> bare paths
raxmlArgs( plain object, { windows: true } )    -> quoted paths
raxmlArgs( 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 RAxML or RAxML-NG command; the unchanged command pins cover every analysis on both platforms.

🤖 Generated with Claude Code

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-agents
jtklein-agents merged commit 966414f into spec/419-split-command-building-out-of-run-ts Nov 27, 2026
4 checks passed
@jtklein-agents
jtklein-agents deleted the 422-move-the-raxml-and-raxml-ng-command-builders-out-of-run-ts branch November 27, 2026 23:15
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