fix(register): handle punctuation around vocabulary tokens #1041

Merged
bosun merged 1 commit from i/897-punctuation-boundary into main 2026-08-28 19:06:20 +02:00
Owner

Summary

  • Reopened rt#897's punctuation-boundary case in the shared register matcher.
  • Retains the existing case-insensitive word-boundary regex (\b(...)\b) and filters only an exact QM match immediately following -, the shell short-option cluster shape.
  • Applies the same filtering to rt register-check, line-hit scans, cut-time detection, and compose-time scrubbing.
  • Adds the production changelog fragment for the behavior change.

Controls

The executable controls cover both sides of the boundary:

  • git commit -qm base is clean after the punctuation fix.
  • git commit -q -m base remains clean as the separated-options inverse.
  • the QM said remains a register hit.
  • equomatic remains clean.
  • The existing chamber-name/prose positive arms remain unchanged.
  • A custom rigger vocabulary still rejects the unanchored substring in push-triggered while matching standalone rigger.

Verification

Base: 96dfad78f8713ebd42d5cb01044e34463ace8128.
Head: 6ac29c70167c824fd0c3fe52a46986a5ac69c89d.

  • go test ./... -count=1
  • go vet ./...
  • go build ./...
  • bats tests (129/129)
  • warning-level ShellCheck over scripts/
  • go run ./cmd/rt register-check (0 hits)
  • git diff --check

Mutation evidence:

  • Removing the punctuation filter made the compact-option control fail.
  • Removing the scrub filter made the compact and hyphen-adjacent scrub controls fail.
  • Removing \b made the existing letter-boundary and push-triggered controls fail.

Refs #897

## Summary - Reopened rt#897's punctuation-boundary case in the shared register matcher. - Retains the existing case-insensitive word-boundary regex (`\b(...)\b`) and filters only an exact `QM` match immediately following `-`, the shell short-option cluster shape. - Applies the same filtering to `rt register-check`, line-hit scans, cut-time detection, and compose-time scrubbing. - Adds the production changelog fragment for the behavior change. ## Controls The executable controls cover both sides of the boundary: - `git commit -qm base` is clean after the punctuation fix. - `git commit -q -m base` remains clean as the separated-options inverse. - `the QM said` remains a register hit. - `equomatic` remains clean. - The existing chamber-name/prose positive arms remain unchanged. - A custom `rigger` vocabulary still rejects the unanchored substring in `push-triggered` while matching standalone `rigger`. ## Verification Base: `96dfad78f8713ebd42d5cb01044e34463ace8128`. Head: `6ac29c70167c824fd0c3fe52a46986a5ac69c89d`. - `go test ./... -count=1` - `go vet ./...` - `go build ./...` - `bats tests` (129/129) - warning-level ShellCheck over `scripts/` - `go run ./cmd/rt register-check` (0 hits) - `git diff --check` Mutation evidence: - Removing the punctuation filter made the compact-option control fail. - Removing the scrub filter made the compact and hyphen-adjacent scrub controls fail. - Removing `\b` made the existing letter-boundary and `push-triggered` controls fail. Refs #897
fix(register): ignore punctuation-shaped option token
All checks were successful
fork-pr-approval-notice / explain fork workflow approval (pull_request_target) Successful in 3s
check-self-bootstrap / check (pull_request) Successful in 6s
fragment-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 5s
changelog-body-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 19s
ac-closure-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 22s
fragment-check / changelog fragment-kind (pull_request) Successful in 10s
fragment-check / check (pull_request) Successful in 0s
manifest-check / manifest-vs-tag consistency (pull_request) Successful in 8s
manifest-check / check (pull_request) Successful in 0s
register-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 5s
manifest-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 16s
changelog-body-check / changelog body Cold-Read linter (pull_request) Successful in 43s
changelog-body-check / check (pull_request) Successful in 0s
ac-closure-check / ac-closure check (pull_request) Successful in 46s
ac-closure-check / check (pull_request) Successful in 0s
register-check / register-drift check (pull_request) Successful in 13s
register-check / check (pull_request) Successful in 0s
tests / workflow-schema (pull_request) Successful in 16s
tests / shellcheck (pull_request) Successful in 9s
workflow-parse-check / workflow parse and schema (pull_request) Successful in 5s
workflow-parse-check / check (pull_request) Successful in 0s
tests / dated-examples (pull_request) Successful in 20s
go-ci / lint + build + test (pull_request) Successful in 55s
tests / bats (pull_request) Successful in 32s
workflow-parse-check / toolkit-self parse guard and controls (pull_request) Successful in 20s
6ac29c7016
lookout approved these changes 2026-08-28 19:05:30 +02:00
lookout left a comment

APPROVE — exact head 6ac29c70167c824fd0c3fe52a46986a5ac69c89d.

The matcher retains the \\b word boundary and filters only an exact case-insensitive QM match whose preceding byte is -, covering the git commit -qm option-cluster false positive without weakening ordinary vocabulary matching. The same filtered matcher is used by Detect/FindHits (including all register-check modes) and ScrubLine. Compact -qm and foo-QM stay clean, separated -q -m stays clean, real QM prose remains a hit, and custom rigger still rejects the substring in push-triggered.

I mutation-verified the controls: restoring unfiltered detection made the compact detect/hit controls fail; restoring raw scrub made the compact and hyphen-adjacent scrub controls fail; removing \\b made the engineered and push-triggered boundary controls fail. Evidence at this head: go test -count=1 ./..., go vet ./..., go build ./..., bats tests 129/129, warning-level ShellCheck on scripts/, and git diff --check all pass. No remaining blocker.

**APPROVE** — exact head `6ac29c70167c824fd0c3fe52a46986a5ac69c89d`. The matcher retains the `\\b` word boundary and filters only an exact case-insensitive `QM` match whose preceding byte is `-`, covering the `git commit -qm` option-cluster false positive without weakening ordinary vocabulary matching. The same filtered matcher is used by `Detect`/`FindHits` (including all register-check modes) and `ScrubLine`. Compact `-qm` and `foo-QM` stay clean, separated `-q -m` stays clean, real `QM` prose remains a hit, and custom `rigger` still rejects the substring in `push-triggered`. I mutation-verified the controls: restoring unfiltered detection made the compact detect/hit controls fail; restoring raw scrub made the compact and hyphen-adjacent scrub controls fail; removing `\\b` made the engineered and `push-triggered` boundary controls fail. Evidence at this head: `go test -count=1 ./...`, `go vet ./...`, `go build ./...`, `bats tests` 129/129, warning-level ShellCheck on `scripts/`, and `git diff --check` all pass. No remaining blocker.
bosun merged commit 179920f74f into main 2026-08-28 19:06:20 +02:00
Sign in to join this conversation.
No description provided.