Source: Apr 2026 conventions audit
Problem
cc 3.1's prompt-cache stability relies on tools/list returning byte-identical bytes across sessions. A future PR could subtly change the output (a new `description` field, reordered properties, schema dialect bump) and silently invalidate every prompt-cache entry that includes the cc tool. There's no test catching this.
Fix
`tests/snapshot.test.ts` that:
- Spawns the bun MCP server via stdio
- Sends initialize + tools/list
- Hashes the response and compares to a checked-in fixture (`tests/fixtures/tools-list.sha256`)
- Fails on hash mismatch with a clear "regenerate fixture" message
Bonus
Also snapshot:
- `initialize` response (includes instructions field)
- A canonical `cc(action='check')` empty-state response
Acceptance criteria
Source: Apr 2026 conventions audit
Problem
cc 3.1's prompt-cache stability relies on tools/list returning byte-identical bytes across sessions. A future PR could subtly change the output (a new `description` field, reordered properties, schema dialect bump) and silently invalidate every prompt-cache entry that includes the cc tool. There's no test catching this.
Fix
`tests/snapshot.test.ts` that:
Bonus
Also snapshot:
Acceptance criteria