Export remaining Context response contracts and verified examples
Most Context actions had a generated input schema but only a broad object/prose success response. Export a named response reference and actual 200/202 status for all 30 supported actions, retaining the completed evidence and catalog-planning contracts. Add source-derived input/output examples for the other 26 actions, including ingestion, planning/execution, identity review, release cases and briefs.
This changes contract definitions, producer output, tests and generated fixtures only. Runtime handlers, validation, flags, database calls, grants and collection/spending paths are unchanged. Flexible persisted JSON remains flexible. Request contracts exclude the withheld claim token, evidence URLs can be null as the SQL permits, unavailable snapshots withhold payloads, and verification responses acknowledge queued work rather than completion. Existing public aliases/raw plan IDs are untouched.
Validation: 585 tests passed across 94 files; 8 explicit local/live tests skipped. New examples call actual HTTP/MCP processors with synthetic auth/storage and mocked dispatch, validate their own response models/statuses and compare every frozen published example. Native fetch is fenced off. Missing required fields, withheld-payload/capability errors, authentication denial, disabled verification and historical scalar/array JSON are covered. A wrong read_execution response mapping failed at that action's test and was restored. Full lint and the actual Marketing companion producer's --check pass. Direct whole-project TypeScript has the same 211 errors as the accepted baseline in the reused local dependencies, with no new errors; clean CI remains required.
Source definitions come from API return paths/validators/types and the existing database projections (source pin 5f21d18a668a28b6906ea5aa0821dba8d8ad9906), not an assumption that migrations are applied. Independent review caught an overly narrow nullable URL declaration; it is corrected and exercised by a null-URL example. Final exact-head review is pending. No application/customer/provider/database call, paid job, production flag change or hosted acceptance is claimed.
Tracks only the remaining original Mono #329 response/example criteria. Docs owns the Marketing/retained Docs companions and source pins. Both API fixture copies are included here. Coordinator retains final guarded merge and release ordering; #361/client/provider authority and CLI publication remain separate.
Summary by cubic
Exports named success response models and actual HTTP status codes for all 30 Context actions, with source-verified example inputs and outputs for the 26 actions that previously had no concrete response contract.
- Adds response schemas and status codes per action in
lib/context/contracts/and wires them into the published catalog fixture. - Adds tests that run each example through the real HTTP and MCP processors with synthetic auth/storage and mocked dispatch, validating status, schema, and the frozen fixture.
- Runtime handlers, validation, flags, database calls, grants, and collection/spending paths are unchanged; persisted JSON stays flexible, request records exclude
claim_token, unavailable snapshots returnnullpayloads, and verification responses acknowledge queued work only. - Constrains public plan modules and brief documents to reachable source outputs, and covers regression checks for missing fields, withheld-payload errors, auth denial, disabled verification flags, and historical flexible JSON.