D2: vendor config schema, all 12 entries, validator-as-test, consistency tests - #96
Merged
Merged
Conversation
…ncy tests
Implements docs/design/dialect-families.md D2: src/agentseam/data/vendors/schema.json
plus one data/vendors/<agent>.json per adapted agent, unused by the runtime yet (D3+
wires an engine onto this data). Verified W35's ACS vocabulary (ESCALATE/TRANSFORM/WARN)
is on main before writing the schema, per the brief's binding constraint.
Every entry is produced by tools/recount_vendor_config.py (a thin orchestrator over the
tools/recount/ package), which derives each field by executing or AST-reading the current
adapter and its D1 golden fixture rather than transcribing by hand:
- module constants (EVENT_MAP, DECISION_VOCABULARY, WRITE_TOOLS, ...) read directly
- parse()'s ordered field-fallback chains AST-walked (three vendors whose parse() does
not fit the generic ti.get(...)-or-chain shape get a small, cited override)
- each gate's grammar / honours_ask / honours_rewrite replayed straight out of the
frozen (payload -> stdout) wire truth D1 captured, cursor's five wire-name variants
of pre_tool included (its own golden fixture only exercises one)
- hook_config()'s wrapper shape and whether `matcher` does anything, same way
Family assignment and the marker-based `claims` table are the design's own stated
judgment calls (§2.2, §3.1), recorded as small tables and pinned by
tests/test_vendor_config_claims.py, which mutates a real claimed payload per declared
marker/client_type and replays claims().
Per-claim evidence (owner decision 2026-09-01, plan/agentseam-project.md in org-plan)
gives every claim group basis/date/test; schema validation fails a claim with none.
tools/validate_vendor_config.py is a small stdlib-only JSON Schema subset validator run
as a test, not a runtime cost, with a mutation pass (including one benign edit that must
still pass) per worker-protocol.md's mutation-testing discipline.
tests/test_vendor_config.py adds the §3.3 consistency tests (config gates are a subset of
the matrix's block-capable events; config_path agrees with the matrix -- which caught and
fixed a stale kimi_code config path in matrix.json) and answers both [h] hypotheses D2
carries: reject_probes stays at one named predicate against the ~3 budget, and PR #89's
tuple-restoring loader is order-safe for fields' order-sensitive chains.
Full suite + golden fixtures pass untouched (1319 passed, 4 skipped); ruff clean; no
version bump.
Signed-off-by: Claude <noreply@anthropic.com>
Binding constraint 1 required the schema and every entry to use the post-W35 ACS vocabulary (escalate/transform); the schema's own field names honours_ask, honours_rewrite, and rewrite_grammar carried the pre-ACS words instead, copied verbatim from docs/design/dialect-families.md's §3.2 worked example, which was drafted at W31 before ACS alignment was sequenced ahead of D2. Renamed everywhere: honours_ask -> honours_escalate, honours_rewrite -> honours_transform, rewrite_grammar -> transform_grammar, in schema.json, all 12 data/vendors/*.json entries (regenerated via tools/recount_vendor_config.py, not hand-edited), tools/recount/gates.py, and the design doc's worked example (with a one-line note on the naming convention). Vendor wire-word DATA (e.g. gemini_cli's own "ask" in verdicts.vocabulary/words) is untouched -- that is the literal word the vendor's dialect speaks on the wire, not agentseam's name for the concept. Added a mutation test confirming a typo'd honours_ask now fails schema validation loudly rather than silently passing. Golden fixtures byte-untouched; full suite green (1320 passed, 4 skipped); ruff clean; no version bump. Signed-off-by: Claude <noreply@anthropic.com>
open-coder-ai
marked this pull request as ready for review
September 1, 2026 09:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Implements wave D2 of
docs/design/dialect-families.md:src/agentseam/data/vendors/schema.jsonplus onedata/vendors/<agent>.jsonper adapted agent, a recount script, a stdlib-only validator run as a test, and the §3.3 consistency tests. The runtime does not read this data yet (D3+ wires an engine onto it) — this PR's correctness bar is "entries recount against the adapters" and "schema tests green," per the design's own D2 exit criteria.Verified W35's ACS vocabulary (
ESCALATE/TRANSFORM/WARNincontract.py) is onmainbefore writing a single schema word, per the brief's binding constraint.Recounted, not transcribed.
tools/recount_vendor_config.py(a thin orchestrator over thetools/recount/package) derives every field by executing or AST-reading the current adapter and its D1 golden fixture:EVENT_MAP,DECISION_VOCABULARY,WRITE_TOOLS, ...) read directlyparse()'s ordered field-fallback chains AST-walked (three vendors whoseparse()doesn't fit the genericti.get(...) or ...shape get a small, cited override)grammar/honours_ask/honours_rewritereplayed straight out of the frozen (payload → stdout) wire truth D1 captured — including cursor's five wire-name variants ofpre_tool, whose own golden fixture only exercises one (preToolUse); the other four are recounted by re-running the real dispatcher against the same frozen payload withhook_event_nameswappedhook_config()'s wrapper shape and whethermatcherdoes anything, the same wayFamily assignment and the marker-based
claimstable are the design's own stated judgment calls (§2.2, §3.1), recorded as small tables and pinned bytests/test_vendor_config_claims.py, which mutates a real claimed payload per declared marker/client_type and replaysclaims()— a wrong marker fails the test.Per-claim evidence (owner decision 2026-09-01,
plan/agentseam-project.mdin org-plan) gives every claim groupbasis/date/test; schema validation fails a claim with none.tools/validate_vendor_config.pyis a small stdlib-only JSON Schema subset validator (no new dependency), with a mutation pass — including one benign edit that must still pass — perworker-protocol.md's mutation-testing discipline.tests/test_vendor_config.pyadds the §3.3 consistency tests (config gates are a subset of the matrix's block-capable events;config_pathagrees with the matrix — which caught and fixed a stalekimi_codeconfig path inmatrix.json) and answers both[h]hypotheses D2 carries (§7):reject_probesstays at one named predicate (looks_like_claude_code) against the ~3-probe budget, and PR #89's tuple-restoring loader is order-safe forfields' order-sensitive chains.Claim check
MATRIXrow carries averifiedrecord — onlykimi_code'sconfigdisplay field changed (a stale path string), itsverifiedrecord is untouchedChecks
pytest -qpasses (1319 passed, 4 skipped, unchanged skip count)ruff check .andruff format --check .passdata/vendors/*.jsonadded topyproject.tomlpackage-data)git commit -s)Notes for the reviewer
matrix.json'skimi_code.configwas"config.toml", disagreeing with the adapter's realCONFIG_PATH("~/.kimi-code/config.toml") since before this PR. Fixed as a minimal, targeted correction needed to make the newconfig_pathagrees with the matrix test meaningful; regenerated the two affected example pages (examples/generated/README.md,kimi_code.md) to match.[h]about vscode_copilot's dual-casing (§7) is explicitly D3-scoped in the design ("decide in D3 with the fixtures open") and is untouched here.data/vendors/schema.json'sevidencemap is a deliberate, called-out exception to §3.1's "config may carry strings/booleans/ordered lists/flat maps" line — the schema's own description field says so, and it's the owner's 2026-09-01 addition, not part of the original §3 design.Generated by Claude Code