capabilities: make the embedded YAML matrix the source of the support tables - #98
Conversation
… tables docs/capabilities.md was hand-edited Markdown, so its tiers, marks, and owner vocabulary could drift from the verdict reasons the engine emits and from the contract in docs/capabilities-contract.md, and no machine consumer could read it. pkg/capabilities embeds capabilities.yaml (53 rows across 7 areas) and exposes it as typed rows behind a small API. Loading validates the closed vocabularies (tier, mark, backend, owner) and the cross-field rules against the real verdict.Reasons(), so a row cannot name a reason the engine does not have or carry an owner outside the tier that allows one. A renderer emits the marked matrix tables and the summary counts between markers in docs/capabilities.md; `make gen-capabilities` regenerates them and a unit test fails when the checked-in document is stale or a marker is malformed. Regeneration against the current document is a no-op and the table cell text is unchanged. This completes step 1 of the capabilities contract; the contract doc, SAFETY.md periphery table, and go.mod (yaml.v3 promoted to a direct dependency) are updated to match.
…d as the default goal, and make table cells safe by construction
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
🤖 1/2 — correctness. Reviewed Mutation run: 18 mutants — 11 killed, 3 that cannot be written, 4 surviving The golden test is genuinely load-bearing; it killed five mutants on its own, including the two label maps, where a missing key would otherwise render an empty cell:
Three could not be written at all, which is worth naming because it is a stronger guarantee than a test: deleting the One survivor is an equivalent mutant rather than a gap: counting the summary from I also checked the summary correction independently. The generated line moves 1. Nothing pins that every area is rendered — an omission is invisible to the golden testDropping one area from The asymmetry is what makes this worth fixing rather than noting. Every mutant that writes wrong content into a region dies immediately, because Two concrete ways this lands:
The repo already has the right pattern for this one invariant family up. RF-7's 2. A bare carriage return reaches a cell
It is not academic — CommonMark treats a lone CR as a line ending, so a single 3.
|
|
🤖 2/2 — invariants, docs, and the dependency change. Invariants. This change classifies against
I also verified the one row-level modelling question I had rather than raising it. 35 rows refuse at both doors while carrying a single Forward-looking, for rollout step 2 rather than this PR. The row publishes Dependency change is clean. The Makefile claim is true. The Contract doc. The Leak check. Clean — the diff carries no internal hostnames, org names, or infrastructure detail, which matters here because the matrix is the most externally-read document in the repo. This review was generated by Claude Code (claude-opus-5). |
aparajon
left a comment
There was a problem hiding this comment.
🤖 Approving. The conversion is faithful — the seven tables are byte-identical to the pre-PR document, so the whole content diff is marker insertion plus a regenerated summary whose correction I verified by counting marks in the old file (18 ✅ / 19 🟡; the hand-written 17 / 20 was stale, and the tables were right).
Mutation run: 18 mutants, 11 killed, 3 that cannot be written because Go rejects the unused variable, 4 surviving. The golden test earns its place. Four findings, none blocking: the render list's area coverage is unpinned because an omission leaves a region untouched and input == output still holds (findings and the RF-7-shaped fix are in 1/2), plus a bare-CR gap, a validated-then-discarded online_safety_detail on No rows, and an untested KnownFields.
RF-7 is upheld and extended to a documentation surface; RF-6 agrees with the FK row; no new entry is owed, and the periphery classification is right.
This stamp was left by Claude Code (claude-opus-5).
|
🤖 Adversarial review response — created by Kiran's code review agent (Amp, Claude Opus 4.6) — pull/98, follow-up commit All four findings fixed: the partitioned-parent rows now carry the engine's own refusal reason, bare
Source: #98, scratch review |
…ities-ci-gate * origin/main: capabilities: make the embedded YAML matrix the source of the support tables (#98) verdict: classify every refusal with a typed class and owner (#97) fix(dbconn): strip explicit pg_catalog from pooled search_path (#93) # Conflicts: # Makefile # docs/capabilities-contract.md # docs/capabilities.md # pkg/capabilities/capabilities.go # pkg/capabilities/capabilities.yaml # pkg/capabilities/capabilities_test.go
…ities-subcommand * origin/main: capabilities: make the embedded YAML matrix the source of the support tables (#98) verdict: classify every refusal with a typed class and owner (#97) fix(dbconn): strip explicit pg_catalog from pooled search_path (#93) # Conflicts: # Makefile # docs/capabilities-contract.md # docs/capabilities.md # pkg/capabilities/capabilities.go # pkg/capabilities/capabilities.yaml # pkg/capabilities/capabilities_test.go
Make the embedded, validated YAML capability matrix the single source for the generated Markdown support tables.
Why
The support contract needs one typed representation that documentation and future machine consumers cannot drift away from. Until now
docs/capabilities.mdwas hand-edited, so a row could say one thing while the engine's verdict said another, and nothing would notice.What
pkg/capabilitiespackage and embeddedcapabilities.yamlmatrix (53 rows across seven areas).verdict.Reasons(); every error names the row ID, the field, and the offending value (row 21 (index-build-on-a-partitioned-parent): engine_path "native_as_is_" is not one of [...]).make gen-capabilities;.DEFAULT_GOAL := buildkeeps baremakebuilding the binary.TestCheckedInMarkdownIsGenerated, and refuse malformed marker layouts (missing, duplicated, or reversed) with a distinct error for each before anything is written.unsupported-partitioned-parentreason, pinned by test; the FK NOT VALID row matches the server-18 support that landed in main.Before / after
Example: a reviewer wonders which operations the engine refuses with
unsupported-partitioned-parent.A typo in the YAML shows the difference in the error too:
Refs: docs/capabilities-contract.md
🤖 Drafted with Amp (Claude Opus 4.6); reviewed and edited by the author.