Support-declaration Consistency Tests
Add a contract test that keeps the platform support declarations named by the roadmap Definition of Done in agreement: CLI help, the agent-customize provider registry, session-analysis platform loading, Harness report platform gating, and the host adapter matrix. This is roadmap P0 item A-06.
Traceability
- Spec ID: 2026-07-28-a06-support-declaration-consistency
- Story: roadmap.md TODO A-06
- Status: Implemented
Intent
The supported platform set (qoder, codex, claude, cursor, qwen, copilot) is declared independently in at least five places:
scripts/session-analysis.mjsandscripts/session-analysis/analyzer.mjshelp text andloadPlatformgates;scripts/agent-customize/providers/index.mjsPROVIDER_COLLECTORS;scripts/harness-analysis/report-run.mjsANALYZE_HELPand thereportPlatformwhitelist (whose rejection now names the supported set, matching the other gates);scripts/coding-agent-practices/asset-baseline.mjsprovider gate;docs/adapters/README.mdhost adapter matrix rows.
Nothing asserts these declarations agree. Adding or dropping a host in one owner silently leaves the others stale, so CLI help, error messages, and docs can advertise different platform sets. The roadmap Definition of Done requires that "CLI help, provider registry, session platforms, report platforms, and docs agree".
Acceptance
- AC-1: A test derives the platform list each surface declares — help output, registry keys, loader and gate error messages, and adapter matrix module paths — and asserts every list equals the canonical supported set.
- AC-2: The test exercises public routes only: the root facade CLI, the
scripts/session-analysis/index.mjsandscripts/agent-customize/providers/index.mjsimport surfaces, and the shipped docs file. No private helper is imported. - AC-3: Unsupported platform input keeps failing closed on each gated route, and the failure message names the full supported set.
- AC-4:
npm testpicks the test up automatically (defaultnode --testdiscovery undertest/).
Non-goals
- No change to which platforms are supported.
- No new shared runtime constant across modules; each capability keeps owning its own declaration, and the test only proves the declarations agree. The
reportPlatformwhitelist is extracted to a file-localREPORT_PLATFORMSconstant so its gate and error message share one source;ANALYZE_HELPkeeps its own prose list, which the contract test asserts separately. - No assertions on prose wording beyond the declared platform lists.
- Other commands that declare their own platform or provider lists (coding-agent-practices
inventoryandasset-integrity,agent-customize,agent-lint,evidence-bundle,task-loop-source,selection-profile) stay out of scope; the roadmap Definition of Done names only the surfaces above.
Plan
- Add
test/support-declarations.test.mjswith one canonicalSUPPORTED_PLATFORMSlist and set-equality helpers. - Extend
reportPlatforminscripts/harness-analysis/report-run.mjsso its rejection error names the full supported set, matching the session-analysis and asset-baseline gates, so the contract test can assert the declared list rather than only that an unsupported value is rejected. - Cover the five surfaces: session-analysis CLI help plus its platform gate, the exported
SESSION_ANALYSIS_HELP,harness analyzehelp plus its platform gate,PROVIDER_COLLECTORS,createAnalyzerrejection, the asset-baseline provider gate, and the adapter matrix module references. - Mark roadmap A-06 done.
Test Evidence
node --test test/support-declarations.test.mjsnode --test test/doc-link-graph.test.mjs