Skip to content

fix(cli): accept --runtime hermes_moa in the provider registry - #161

Open
eastagiletracker wants to merge 1 commit into
NyxFoundation:mainfrom
eastagiletracker:agile-board/cli-hermes-moa-runtime
Open

eastagiletracker wants to merge 1 commit into
NyxFoundation:mainfrom
eastagiletracker:agile-board/cli-hermes-moa-runtime

Conversation

@eastagiletracker

Copy link
Copy Markdown

This PR proposes fixing speca run --runtime hermes_moa being rejected by the CLI because its provider registry never picked up the hermes_moa runtime. We include this PR work along with a full history of your repo at https://eastagiletracker.com/projects/1000. You can sign in with your GitHub ID to claim ownership of the project.

What was wrong

scripts/orchestrator/runtime_registry.py registers hermes_moa (it is in the RuntimeId literal, in REGISTRY, and in run_phase.py --runtime choices), but PROVIDER_IDS in cli/src/lib/providers/registry.ts was never extended with it. Since speca run validates --runtime against that list before spawning, the Mixture-of-Agents runtime is unreachable from the CLI. Reproduced on main (d173893) with the built CLI from an empty workspace:

$ node cli/dist/cli.js run --runtime hermes_moa --phase 02c
speca run: unknown runtime 'hermes_moa'. Known runtimes: ... (the seven ids in PROVIDER_IDS, without hermes_moa)
exit=2

The drift test that exists to catch exactly this is red on main too, and it is what fails cli-ci on the open PR branches (for example the fix/review-verdict-vocabulary-132 run):

× provider id set > matches the Python runtime registry ids (parsed from the Python source)
  → expected [ …(7 ids) ] to deeply equal [ …(8 ids) ]
-   "hermes_moa",

The change

  • cli/src/lib/providers/registry.ts: append hermes_moa to PROVIDER_IDS (same order as the Python literal) and add its descriptor. Hermes owns the credential pool and the proxy, so, like the other CLI-managed runtimes, there is no speca-side env key to check; the "is hermes on PATH" probe stays in _probe_hermes_moa on the Python side.
  • cli/test/providers.registry.test.ts: hermes_moa joins the "needs no env credentials" cases.
  • cli/test/run.command.test.ts: new case asserting runRunCommand forwards runtime: "hermes_moa" into the spawn options without an "unknown runtime" error.

Purely additive: no existing id, descriptor, or default changes, so callers that pass any of the other runtimes (or none) behave exactly as before.

Red before green

With only the registry.ts change stashed (tests kept), three tests fail:

× provider id set > matches the Python runtime registry ids (parsed from the Python source)
× validateRuntime — CLI-managed providers > hermes_moa needs no env credentials
× runRunCommand — --runtime selection (#113) > forwards hermes_moa (registered in runtime_registry.py) into the spawn options

With the fix applied, cd cli && npx vitest run goes from 1 failed / 468 passed on main to 471 passed, 0 failed; npm run typecheck and npm run build are clean. No Python files changed (uv run python3 -m pytest tests/: 855 passed, 4 skipped before and after). The rebuilt CLI now hands --runtime hermes_moa to the orchestrator, which runs through to its normal phase dependency check in an empty workspace.

How this was managed

This work was tracked as a story at https://eastagiletracker.com/projects/1000/stories/1362395 on a board imported from this repo's issues and pull requests: https://eastagiletracker.com/projects/1000

board

If you'd rather not receive contributions like this, reply no-more-prs on this pull request and we won't open any further ones on your repositories.


Lawrence W. Sinclair
CEO / East Agile
linkedin.com/in/lwsinclair/
eastagile.com

runtime_registry.py added the hermes_moa runtime, but the CLI's
PROVIDER_IDS was never extended, so `speca run --runtime hermes_moa`
exited 2 with "unknown runtime" before spawning the orchestrator, and
the provider-id drift test in providers.registry.test.ts was red.

Hermes owns the credential pool and the proxy, so the CLI descriptor has
no env keys to check; the hermes-on-PATH probe stays on the Python side.
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