fix: accept --schema as a flag, per FAMILY.md clause 7 - #29
Merged
Merged
Conversation
Clause 7 codifies `--schema` as a flag and binds it to every member class. table-kit had the capability only as a `schema` subcommand, so a fresh-context agent following the family contract verbatim issued `tablekit --schema` and was refused with exit 2. A differently-spelled surface does not discharge a clause that names the flag. main() special-cases only -h/--help/help and -V/--version before dispatching through COMMANDS, so any other leading --flag read as an unknown command. The alias normalises --schema to the existing subcommand; output is byte-identical and unknown flags are still rejected with exit 2. Also bumps the family-conformance job's srdcheck pin to 0fbc4b9d161a9ca7e378a73ad88421ff6b278af3, which is the first baseline that no longer waives SCHEMA_NOT_FLAG. Both changes must land together: the ratchet fails a waiver that no longer fires, so this repo fixed against the old pin would go red with STALE BASELINE. Verified both ways -- new baseline exit 0, old baseline exit 1 with the stale report. The three pre-existing srdcheck pins in this workflow are untouched; they serve different contract tests. Closes #23 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Closes #23. First burn-down of the conformance baseline.
The defect
FAMILY.mdclause 7 codifies--schemaas a flag, and it binds every member class. table-kit had the capability only as a subcommand:tablekit schematablekit --schemaunknown command '--schema'❌A fresh-context agent following the family contract verbatim — which is clause 7's acceptance condition — was refused. A differently-spelled surface doesn't discharge a clause that names the flag.
main()special-cases only-h/--help/helpand-V/--versionbefore dispatching throughCOMMANDS, so every other leading--flagfell through to unknown-command.The fix
A two-line alias normalising
--schemato the existing subcommand. Verified:tablekit --schema→ exit 0, valid JSONtablekit schematablekit --not-a-real-flag→ still exit 2 (the alias doesn't over-match)Plus a regression test in
tests/test_contracts.pyasserting both the flag works and that it matches the subcommand.Why the pin bump is in the same PR
This is the ratchet doing its job, and it constrains the change shape:
STALE BASELINE: tablekit/SCHEMA_NOT_FLAG no longer fires but is still waivedSo the waiver had to be removed first (chaoz23/srdcheck#87, merged) and the pin bumped here, in the same PR as the fix. Landing the fix alone would have reddened this repo's CI.
The three pre-existing srdcheck pins in this workflow are untouched — they serve different contract tests.
Remaining
table-kit's only other waived finding is
HONEST_LANE_OVERLOAD(#1). Everything else on the board is #24, #25, #26.🤖 Generated with Claude Code