Repository navigation
refactor(targets): share the resolved target format vocabulary - #12165
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Low impact] The PR appears safe to merge; no blocking issues were found. SummaryMoves resolved target formats and their kinds into one shared domain table while preserving accepted inputs and saved-data rules.
No new actionable issues or security regressions found. The available Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
V[Shared format table] --> T[Archive and artifact target types]
V --> S[Snapshot format checks]
V --> L[Live target summaries]
V --> E[Evidence format list]
H[Four explicit caller hints] -. Must name known formats .-> V
H --> C[CLI and MCP open contract]
Reviews (3) · Last reviewed commit: "refactor(targets): share Evidence and ex..." · Reviewed by Greptile |
Summary
Resolved target kind, archive and artifact target unions, live summaries, and snapshot format admission draw from one domain format table. A type assertion ties the resolved target union to the table. Adding a format to one of these consumers now starts from the same owner.
This is the resolved-target step of #7478, informed by @Entrpi's prototype and the existing artifact-reader registry. The Evidence and caller-hint follow-up is included via #12168. Evidence-only formats stay with the Evidence contract, and the explicit hint list is typed against the resolved format registry.
Contract and boundary impact
The accepted target formats and advertised CLI and MCP schemas are unchanged. A rejected snapshot can list the expected formats in the new table order. Provider policy remains with provider adapters.
Validation performed
96 focused tests passed across target vocabulary, snapshot, Evidence subject, and raw input cases on Node 24.22.1.
npm run build:cached,npm run check:fast, andgit diff --checkpassed.Generated MCP catalog JSON and recorded per-profile catalog digests are byte-identical to current main. CLI command registration output was compared from the same builds.
The review follow-up checks that each existing format fixture has the canonical kind at compile time. The 43 target vocabulary tests and TypeScript typecheck passed on Node 24.22.1.
Updated the branch with fix(ci): keep dispatcher fixture exports aligned with runtime #12131 from main before running the full CI matrix. All 43 target vocabulary tests and TypeScript typecheck passed again on Node 24.22.1.
Combined head
65f8b11e32passed 113 focused tests,npm run check:fast, andgit diff --check. Builds of that head and main base61af8abeb6emitted byte-identical CLI command registrations, MCP catalog JSON, and per-profile catalog digests.Author readiness
Human owner: @morluto
Before merge
type(scope): outcome.