Skip to content

fix: accept --schema as a flag, per FAMILY.md clause 7 - #29

Merged
chaoz23 merged 1 commit into
mainfrom
fix/schema-flag
Aug 23, 2026
Merged

chaoz23 merged 1 commit into
mainfrom
fix/schema-flag

Conversation

@chaoz23

@chaoz23 chaoz23 commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Closes #23. First burn-down of the conformance baseline.

The defect

FAMILY.md clause 7 codifies --schema as a flag, and it binds every member class. table-kit had the capability only as a subcommand:

before
tablekit schema exit 0, valid JSON ✅
tablekit --schema exit 2, unknown 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/help and -V/--version before dispatching through COMMANDS, so every other leading --flag fell through to unknown-command.

The fix

A two-line alias normalising --schema to the existing subcommand. Verified:

  • tablekit --schema → exit 0, valid JSON
  • output byte-identical to tablekit schema
  • tablekit --not-a-real-flag → still exit 2 (the alias doesn't over-match)

Plus a regression test in tests/test_contracts.py asserting 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:

gate run result
fix + new baseline (this PR's pin) exit 0 ✅
fix + old baseline exit 1 — STALE BASELINE: tablekit/SCHEMA_NOT_FLAG no longer fires but is still waived

So 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

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>
@chaoz23
chaoz23 merged commit cdfae2f into main Aug 23, 2026
7 checks passed
@chaoz23
chaoz23 deleted the fix/schema-flag branch August 23, 2026 01:54
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.

[TK-009] --schema is a subcommand, not the flag clause 7 codifies

1 participant