parity: enforce that a CLI flag name matches the API field / MCP arg it binds to #444
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Depends on
Reference
sixfold-space/madtea#444
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The naming rule (ADR 0016) is enforced by
internal/parity, but it does not catch a CLI flag whose NAME disagrees with the API field / MCP arg it actually binds to.--allow-ff-onlywas bound toallow_rebase_update("update a PR branch by rebase") and shipped through green CI until review caught it (#432, fixed under #443); the parity test never flagged the name-vs-binding mismatch.Ask
Extend
internal/parityso a CLI flag (and MCP arg) whose name does not match the API field / MCP arg it sets fails the gate. For each mapped flag, assert the flag's canonical name matches the JSON field / MCP arg it binds to, with the established short forms enumerated as explicit, sanctioned exceptions (e.g.--allow-mergemaps toallow_merge_commits,--allow-squashtoallow_squash_merge).Why
Machine-enforced, this catches the name-vs-behavior class for every contributor, with no reliance on catching it in review. It is the mechanical backstop for the audit in #441.
Acceptance
go test ./internal/parity/.Related
--allow-ff-only.