Skip to content

test + ci: routing-consistency check, prepare-pages.mjs coverage, CI wiring (Phase 2 of #6) - #9

Merged
NicoGenti merged 4 commits into
mainfrom
feature/0006-phase2-routing-and-scripts
Aug 31, 2026
Merged

NicoGenti merged 4 commits into
mainfrom
feature/0006-phase2-routing-and-scripts

Conversation

@NicoGenti

Copy link
Copy Markdown
Owner

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-checks agents/orchestrator.md's "Agent Routing" table against AGENTS.md's "Runtime Subagent Roster" table and against the actual files in agents/. 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 in AGENTS.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 fabricated site/ 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 running bun test on every push to main and on every pull request (only deploy.yml existed before this).

Out of scope / follow-up

  • README coverage badge — left for a separate small PR once bun test --coverage output format is confirmed in CI.
  • Adding "test": "bun test" to package.json's scripts — not required for bun test or 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 test from 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

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.
@NicoGenti
NicoGenti merged commit 2c840ce into main Aug 31, 2026
1 check passed
@NicoGenti
NicoGenti deleted the feature/0006-phase2-routing-and-scripts branch August 31, 2026 13:55
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