test + ci: routing-consistency check, prepare-pages.mjs coverage, CI wiring (Phase 2 of #6) - #9
Merged
Conversation
security.md, writer.md, pc-doctor.md, npm-helper.md, build-helper.md, and deploy-helper.md legitimately omit `tools` (only declared when overriding the default toolset). Caught by CI on PR #9.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 2 of #6 ("Add test coverage for agent router/subagents"), following Phase 1 (#8, merged). Closes out the remaining checklist items from the issue.
What's in this PR
tests/routing-consistency.test.ts— the closest real equivalent to "router unit tests" for a prompt-file repo: cross-checksagents/orchestrator.md's "Agent Routing" table againstAGENTS.md's "Runtime Subagent Roster" table and against the actual files inagents/. Flags orphan agent files, missing files for declared IDs, and drift between the two docs. Includes a negative-case test asserting the retired taxonomy names (sisyphus,metis,momus, etc.) mentioned inAGENTS.md's naming note have no runtime file.tests/prepare-pages.test.ts— black-box integration tests for the one real executable script in the repo,scripts/prepare-pages.mjs. Copies the real script into an isolated temp sandbox and runs it as a subprocess against a fabricatedsite/directory, asserting on filesystem state and stdout/stderr for both the happy path (rename + 404 fallback copy) and the error path (missing build output → non-zero exit)..github/workflows/test.yml— new CI workflow runningbun teston every push tomainand on every pull request (onlydeploy.ymlexisted before this).Out of scope / follow-up
bun test --coverageoutput format is confirmed in CI."test": "bun test"topackage.json'sscripts— not required forbun testor the new CI workflow to work (bun auto-discovers*.test.ts), so left untouched rather than risk hand-editing a file whose exact current contents weren't independently re-verified in this session.Verification
Run
bun testfrom repo root: all schema, routing-consistency, and prepare-pages tests should pass against current repo content. CI will also run this automatically once merged.Related: #6