test: scrub short-flag vocabulary collision #1009

Merged
pullings merged 1 commit from i/897-scrub-commit-qm into main 2026-08-27 17:14:23 +02:00
Owner

Refs frankenbit/release-toolkit#897.

Measured on current main 798a5b19cff3319d61e87139c50b00e09166fd03 before editing: exactly two git commit -qm occurrences in two Go test helpers:

  • internal/prep/push_failure_test.go:33
  • internal/prep/worktreestate_test.go:36

Both are test-only Git argument vectors. The scrub-first disposition is sufficient, so the matcher, built-in vocabulary, and allow-list are unchanged. The existing real-name positive and inverse controls remain in internal/register tests: the QM said matches, while the word-boundary inverse equomatic remains clean.

The two helpers now pass -q and -m as separate Git options. Post-edit measurement finds zero -qm matches.

Verification:

  • compact-form control: rt register-check --stdin -> rc 1, git commit -qm base is reported
  • scrubbed-form control: same command -> rc 0, git commit -q -m base is clean
  • real-name positive: the QM said -> rc 1
  • inverse substring: equomatic -> rc 0
  • default rt register-check: 0 register-drift hits
  • go test ./..., go vet ./..., go build ./...: pass
  • bats tests: 118/118 pass
  • rt fragment-check changelog.d: pass (existing unrelated warning retained)
Refs frankenbit/release-toolkit#897. Measured on current main `798a5b19cff3319d61e87139c50b00e09166fd03` before editing: exactly two `git commit -qm` occurrences in two Go test helpers: - `internal/prep/push_failure_test.go:33` - `internal/prep/worktreestate_test.go:36` Both are test-only Git argument vectors. The scrub-first disposition is sufficient, so the matcher, built-in vocabulary, and allow-list are unchanged. The existing real-name positive and inverse controls remain in `internal/register` tests: `the QM said` matches, while the word-boundary inverse `equomatic` remains clean. The two helpers now pass `-q` and `-m` as separate Git options. Post-edit measurement finds zero `-qm` matches. Verification: - compact-form control: `rt register-check --stdin` -> rc 1, `git commit -qm base` is reported - scrubbed-form control: same command -> rc 0, `git commit -q -m base` is clean - real-name positive: `the QM said` -> rc 1 - inverse substring: `equomatic` -> rc 0 - default `rt register-check`: 0 register-drift hits - `go test ./...`, `go vet ./...`, `go build ./...`: pass - `bats tests`: 118/118 pass - `rt fragment-check changelog.d`: pass (existing unrelated warning retained)
test: avoid register vocabulary collision in git helpers
All checks were successful
go-ci / lint + build + test (pull_request) Successful in 33s
register-check / register-drift check (pull_request) Successful in 8s
ac-closure-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 1m34s
register-check / check (pull_request) Successful in 0s
tests / workflow-schema (pull_request) Successful in 4s
tests / dated-examples (pull_request) Successful in 5s
tests / shellcheck (pull_request) Successful in 3s
workflow-parse-check / toolkit-self parse guard and controls (pull_request) Successful in 4s
workflow-parse-check / workflow parse and schema (pull_request) Successful in 5s
workflow-parse-check / check (pull_request) Successful in 0s
check-self-bootstrap / check (pull_request) Successful in 2m6s
manifest-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 1m52s
register-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 2m12s
tests / bats (pull_request) Successful in 2m21s
changelog-body-check / changelog body Cold-Read linter (pull_request) Successful in 4m30s
changelog-body-check / check (pull_request) Successful in 0s
ac-closure-check / ac-closure check (pull_request) Successful in 4m49s
ac-closure-check / check (pull_request) Successful in 0s
fragment-check / changelog fragment-kind (pull_request) Successful in 4m23s
fragment-check / check (pull_request) Successful in 0s
manifest-check / manifest-vs-tag consistency (pull_request) Successful in 4m13s
manifest-check / check (pull_request) Successful in 0s
check-self-bootstrap / check (push) Successful in 6s
tests / shellcheck (push) Successful in 30s
tests / bats (push) Successful in 1m1s
tests / dated-examples (push) Successful in 1m5s
tests / workflow-schema (push) Successful in 1m54s
go-ci / lint + build + test (push) Successful in 2m10s
release / decide + act (push) Successful in 2m49s
release / release (push) Successful in 0s
406c49a6b4
sentry approved these changes 2026-08-27 17:09:21 +02:00
sentry left a comment

Reviewed exact head 406c49a6b4 against base 798a5b19cf.

APPROVED. This is a correctly scoped fixture-only scrub: both former git commit -qm argument vectors now pass equivalent -q and -m arguments separately, preserving the Git behavior while removing the false register-check match. The matcher, built-in vocabulary, and allow-list are unchanged.

Reproduced at this head: compact git commit -qm base -> exit 1; separated git commit -q -m base -> exit 0; the QM said -> exit 1; equomatic -> exit 0. The exact tree contains no -qm occurrences. Focused/full Go tests, vet, build, Bats 118/118, and Forgejo CI 25/25 are green.

Reviewed exact head 406c49a6b40760be8b5adb5979f233b99d4b714c against base 798a5b19cff3319d61e87139c50b00e09166fd03. APPROVED. This is a correctly scoped fixture-only scrub: both former `git commit -qm` argument vectors now pass equivalent `-q` and `-m` arguments separately, preserving the Git behavior while removing the false register-check match. The matcher, built-in vocabulary, and allow-list are unchanged. Reproduced at this head: compact `git commit -qm base` -> exit 1; separated `git commit -q -m base` -> exit 0; `the QM said` -> exit 1; `equomatic` -> exit 0. The exact tree contains no `-qm` occurrences. Focused/full Go tests, vet, build, Bats 118/118, and Forgejo CI 25/25 are green.
sentry approved these changes 2026-08-27 17:12:20 +02:00
sentry left a comment

Reviewed exact head 406c49a6b4 against base 798a5b19cf.

APPROVED. This is a correctly scoped fixture-only scrub: both former git commit -qm argument vectors now pass equivalent -q and -m arguments separately, preserving the Git behavior while removing the false register-check match. The matcher, built-in vocabulary, and allow-list are unchanged.

Reproduced at this head: compact git commit -qm base -> exit 1; separated git commit -q -m base -> exit 0; the QM said -> exit 1; equomatic -> exit 0. The exact tree contains no -qm occurrences. Focused/full Go tests, vet, build, Bats 118/118, and Forgejo CI 25/25 are green.

Reviewed exact head 406c49a6b40760be8b5adb5979f233b99d4b714c against base 798a5b19cff3319d61e87139c50b00e09166fd03. APPROVED. This is a correctly scoped fixture-only scrub: both former `git commit -qm` argument vectors now pass equivalent `-q` and `-m` arguments separately, preserving the Git behavior while removing the false register-check match. The matcher, built-in vocabulary, and allow-list are unchanged. Reproduced at this head: compact `git commit -qm base` -> exit 1; separated `git commit -q -m base` -> exit 0; `the QM said` -> exit 1; `equomatic` -> exit 0. The exact tree contains no `-qm` occurrences. Focused/full Go tests, vet, build, Bats 118/118, and Forgejo CI 25/25 are green.
pullings deleted branch i/897-scrub-commit-qm 2026-08-27 17:14:23 +02:00
Sign in to join this conversation.
No description provided.