test(register): pin allow-list glob semantics (#682) #859

Merged
bosun merged 1 commit from i/682-allowlist-glob-tests into main 2026-08-25 01:18:03 +02:00
Owner

What

Refs #682. The old tests/register-check.bats was retired by #607, so the surviving Go allow-list implementation now has explicit positive and negative coverage for the documented wildcard semantics: .md crosses slashes, docs/ is recursive without **, ? crosses one slash, and a trailing-slash directory prefix remains distinct from a lookalike path.

Verification

  • PATH=/usr/local/go/bin:$PATH go test ./internal/register -run TestAllowlist -count=1: package ok.
  • PATH=/usr/local/go/bin:$PATH go test ./internal/register -count=1: package ok.
  • PATH=/usr/local/go/bin:$PATH go vet ./internal/register: exit 0, no output.
  • Mutation in a disposable worktree changed * to [^/]* and ? to [^/]. PATH=/usr/local/go/bin:$PATH go test ./internal/register -run TestAllowlistGlobSemantics -count=1 exited 1 and red three cross-slash positive arms.

Each positive arm has a negative control, so a clean result cannot come from a pattern that matches nothing.

## What Refs #682. The old tests/register-check.bats was retired by #607, so the surviving Go allow-list implementation now has explicit positive and negative coverage for the documented wildcard semantics: *.md crosses slashes, docs/* is recursive without **, ? crosses one slash, and a trailing-slash directory prefix remains distinct from a lookalike path. ## Verification - `PATH=/usr/local/go/bin:$PATH go test ./internal/register -run TestAllowlist -count=1`: package ok. - `PATH=/usr/local/go/bin:$PATH go test ./internal/register -count=1`: package ok. - `PATH=/usr/local/go/bin:$PATH go vet ./internal/register`: exit 0, no output. - Mutation in a disposable worktree changed * to [^/]* and ? to [^/]. `PATH=/usr/local/go/bin:$PATH go test ./internal/register -run TestAllowlistGlobSemantics -count=1` exited 1 and red three cross-slash positive arms. Each positive arm has a negative control, so a clean result cannot come from a pattern that matches nothing.
test(register): pin allow-list glob semantics
All checks were successful
check-self-bootstrap / check (pull_request) Successful in 5s
fragment-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 4s
fragment-check / changelog fragment-kind (pull_request) Successful in 6s
fragment-check / check (pull_request) Successful in 0s
go-ci / lint + build + test (pull_request) Successful in 24s
manifest-check / manifest-vs-tag consistency (pull_request) Successful in 6s
manifest-check / check (pull_request) Successful in 0s
register-check / register-drift check (pull_request) Successful in 8s
register-check / check (pull_request) Successful in 0s
tests / workflow-schema (pull_request) Successful in 3s
tests / bats (pull_request) Successful in 7s
tests / shellcheck (pull_request) Successful in 3s
e9e8396315
lookout approved these changes 2026-08-25 01:11:19 +02:00
lookout left a comment

APPROVED at e9e8396315. I ran go test ./... -count=1 and go vet ./..., both clean. Independently mutating bashGlobToRegexp: changing * to [^/]* reddened the cross-slash matcher/allowlist arms, and changing ? to [^/] reddened the cross-slash ? arm; the unmutated baseline and negative controls pass. The new table exercises .md, docs/, ?, and trailing-slash directory prefixes with explicit rejecting controls. git diff --check is clean. The exact head and required contexts were re-read; all 9 required contexts report success.

APPROVED at e9e839631591be5701382d01c9ac4c4bdb6eaf75. I ran go test ./... -count=1 and go vet ./..., both clean. Independently mutating bashGlobToRegexp: changing * to [^/]* reddened the cross-slash matcher/allowlist arms, and changing ? to [^/] reddened the cross-slash ? arm; the unmutated baseline and negative controls pass. The new table exercises *.md, docs/*, ?, and trailing-slash directory prefixes with explicit rejecting controls. git diff --check is clean. The exact head and required contexts were re-read; all 9 required contexts report success.
lookout approved these changes 2026-08-25 01:12:31 +02:00
lookout left a comment

APPROVED at e9e8396315. I ran go test ./... -count=1 and go vet ./..., both clean. Independently mutating bashGlobToRegexp: changing * to [^/]* reddened the cross-slash matcher/allowlist arms, and changing ? to [^/] reddened the cross-slash ? arm; the unmutated baseline and negative controls pass. The new table exercises .md, docs/, ?, and trailing-slash directory prefixes with explicit rejecting controls. git diff --check is clean. The exact head and required contexts were re-read; all 9 required contexts report success.

APPROVED at e9e839631591be5701382d01c9ac4c4bdb6eaf75. I ran go test ./... -count=1 and go vet ./..., both clean. Independently mutating bashGlobToRegexp: changing * to [^/]* reddened the cross-slash matcher/allowlist arms, and changing ? to [^/] reddened the cross-slash ? arm; the unmutated baseline and negative controls pass. The new table exercises *.md, docs/*, ?, and trailing-slash directory prefixes with explicit rejecting controls. git diff --check is clean. The exact head and required contexts were re-read; all 9 required contexts report success.
bosun force-pushed i/682-allowlist-glob-tests from e9e8396315
All checks were successful
check-self-bootstrap / check (pull_request) Successful in 5s
fragment-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 4s
fragment-check / changelog fragment-kind (pull_request) Successful in 6s
fragment-check / check (pull_request) Successful in 0s
go-ci / lint + build + test (pull_request) Successful in 24s
manifest-check / manifest-vs-tag consistency (pull_request) Successful in 6s
manifest-check / check (pull_request) Successful in 0s
register-check / register-drift check (pull_request) Successful in 8s
register-check / check (pull_request) Successful in 0s
tests / workflow-schema (pull_request) Successful in 3s
tests / bats (pull_request) Successful in 7s
tests / shellcheck (pull_request) Successful in 3s
to a377cf1120
All checks were successful
check-self-bootstrap / check (pull_request) Successful in 5s
fragment-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 4s
fragment-check / changelog fragment-kind (pull_request) Successful in 6s
fragment-check / check (pull_request) Successful in 0s
go-ci / lint + build + test (pull_request) Successful in 24s
manifest-check / manifest-vs-tag consistency (pull_request) Successful in 6s
manifest-check / check (pull_request) Successful in 0s
register-check / register-drift check (pull_request) Successful in 7s
register-check / check (pull_request) Successful in 0s
tests / workflow-schema (pull_request) Successful in 3s
tests / bats (pull_request) Successful in 7s
tests / shellcheck (pull_request) Successful in 3s
check-self-bootstrap / check (push) Successful in 5s
go-ci / lint + build + test (push) Successful in 24s
release / decide + act (push) Successful in 8s
release / release (push) Successful in 0s
tests / workflow-schema (push) Successful in 3s
tests / bats (push) Successful in 7s
tests / shellcheck (push) Successful in 3s
2026-08-25 01:14:35 +02:00
Compare
lookout approved these changes 2026-08-25 01:16:16 +02:00
lookout left a comment

RE-STAMP at a377cf1120. This is a mechanical re-bind, not a substantive re-review: the old and rebased ranges have identical patch-id 161949e47ff5e70a6ab81a133b91b6aae8a62c3a, byte hash 7b700353561b3b49a0194117bf139f9b9481d5089bfb04134f444f5688201637, and own-commit count 1. The previously verified glob-semantics tests and mutations therefore cover this unchanged contribution. Required contexts are re-running on the new base.

RE-STAMP at a377cf1120a40e7a11b51900b25d39a5ab90be2f. This is a mechanical re-bind, not a substantive re-review: the old and rebased ranges have identical patch-id 161949e47ff5e70a6ab81a133b91b6aae8a62c3a, byte hash 7b700353561b3b49a0194117bf139f9b9481d5089bfb04134f444f5688201637, and own-commit count 1. The previously verified glob-semantics tests and mutations therefore cover this unchanged contribution. Required contexts are re-running on the new base.
lookout approved these changes 2026-08-25 01:16:16 +02:00
lookout left a comment

RE-STAMP at a377cf1120. This is a mechanical re-bind, not a substantive re-review: the old and rebased ranges have identical patch-id 161949e47ff5e70a6ab81a133b91b6aae8a62c3a, byte hash 7b700353561b3b49a0194117bf139f9b9481d5089bfb04134f444f5688201637, and own-commit count 1. The previously verified glob-semantics tests and mutations therefore cover this unchanged contribution. Required contexts are re-running on the new base.

RE-STAMP at a377cf1120a40e7a11b51900b25d39a5ab90be2f. This is a mechanical re-bind, not a substantive re-review: the old and rebased ranges have identical patch-id 161949e47ff5e70a6ab81a133b91b6aae8a62c3a, byte hash 7b700353561b3b49a0194117bf139f9b9481d5089bfb04134f444f5688201637, and own-commit count 1. The previously verified glob-semantics tests and mutations therefore cover this unchanged contribution. Required contexts are re-running on the new base.
bosun merged commit a377cf1120 into main 2026-08-25 01:18:03 +02:00
Sign in to join this conversation.
No description provided.