Skip to content

fix: reject unknown DEFINITION keys — strict at parser and schema (confirmation-pass-1 chair ruling) - #50

Merged
silversurfer562 merged 4 commits into
mainfrom
claude/awesome-bassi-2e6268
Aug 20, 2026
Merged

fix: reject unknown DEFINITION keys — strict at parser and schema (confirmation-pass-1 chair ruling)#50
silversurfer562 merged 4 commits into
mainfrom
claude/awesome-bassi-2e6268

Conversation

@silversurfer562

Copy link
Copy Markdown
Member

Chair ruling (2026-08-20)

The confirmation-pass-1 ledger's design-question item (frozen ledger ~/.attune/reports/roundtable/confirmation-pass-1-ledger-2026-08-20.md): unknown DEFINITION keys were silently ignored. Chair ruled strict rejection, both layers (options presented: strict / documented forward-compat / warn-list; sub-ruling: tighten the MCP schema too, not parser-only).

The defect

form_from_dict read only the keys it knew — {"id": "n", "type": "number", "maximun": 10} built a bound-less number field and collect_form_response(form, {"n": 99999}) validated clean. Same for regired, recomended, arbitrary keys, field-level and top-level. PR #37 closed this class on the ANSWER side only; the MCP inputSchema lacked additionalProperties: false so the SDK gate waved strays through too.

The fix

  • bridge.pyform_from_dict names every unrecognized top-level and field-level key (unknown definition key '...', mirroring fix: validate defaults, name fold collisions, reject unknown answer keys (pilot review) #37's answer-side wording). Recognized sets (_DEFINITION_TOP_KEYS / _DEFINITION_FIELD_KEYS) track exactly what the parsers read; the documented label/questions aliases stay accepted.
  • mcp_server.py_field_schema and _form_schema declare additionalProperties: false. The aliases were never usable over stdio anyway (the schema already requires text/fields), so this breaks nothing that worked.
  • Ratchettest_field_schema_matches_parser_key_set pins advertised-schema keys == parser key set (∪ label), so the mirrored schema and the strict parser cannot drift apart.
  • Regression tests include the exact ledger repro; CHANGELOG entry notes the D3 mirror obligation: attune-ai's schema mirror must pick up additionalProperties at the next release-gated re-sync.

684 tests green, ruff clean, rebased on main @ 7aca61b.

🤖 Generated with Claude Code

…P schemas (confirmation-pass-1 chair ruling)

Chair ruling 2026-08-20 (confirmation-pass-1 ledger): strict rejection,
both layers. A typo'd field key ('maximun': 10) silently built a
bound-less field that validated any answer clean; #37 covered the
answer side only.

- form_from_dict names every unrecognized top-level and field-level
  key ('unknown definition key ...'), aliases label/questions kept
- _field_schema/_form_schema declare additionalProperties: false
  (D3 mirror to attune-ai picks this up at next release-gated re-sync)
- parity ratchet test: advertised schema keys == parser key set
- regression tests incl. the exact ledger repro; CHANGELOG entry

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@silversurfer562
silversurfer562 force-pushed the claude/awesome-bassi-2e6268 branch from a96a667 to 4b4a890 Compare August 20, 2026 13:17
@silversurfer562
silversurfer562 merged commit 14e9bcf into main Aug 20, 2026
7 checks passed
@silversurfer562
silversurfer562 deleted the claude/awesome-bassi-2e6268 branch August 20, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant