test: cover every primary workflow stage - #101
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d9437855f2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for (const stage of ["INITIAL", "SOL_REPLAN_WITH_LUNA"]) { | ||
| assert.deepEqual(topology(primary, stage, initialChildren[primary]), { evidenceGap: false, children: initialChildren[primary] }); |
There was a problem hiding this comment.
Derive child sets separately for each workflow stage
For Terra/Luna primaries in INITIAL, this supplies an unnecessary Sol child, and in SOL_REPLAN_WITH_LUNA it reuses the entire initial set even though that stage only requires Sol and Luna work, with matching-primary work inline. Because topology() merely filters the caller-provided list, these assertions accept stage-inactive children despite the production stage-required-spawn rule in lib/manifest.js:282-294, so a regression that spawns extra agents would still pass; define expected roles per primary and per stage instead.
Useful? React with 👍 / 👎.
| function finalReplyOwner(workflowState) { | ||
| return workflowState.primary_model; |
There was a problem hiding this comment.
Verify final reply ownership against the exported contract
This helper unconditionally returns the fixture's primary_model, so the new PASS and escalation assertions remain green even if the production primary authority rule or generated templates stop assigning the final reply to the primary. Since the commit is intended to add final-reply ownership coverage, derive the owner from contract.authorityRules or assert the relevant production rule directly rather than restating the expected result in a test-only function.
Useful? React with 👍 / 👎.
Summary
Validation
npm test— 93/93 passednpm run check— passedRelated: #98