From 6ea00516726ab626d740ad141eb126b1bc978fe9 Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Wed, 6 May 2026 15:42:46 -0400 Subject: [PATCH] fix(tests): add structural-regression-guard annotation for shebang assertion The shebang check added in #3105 falls under structural-regression-guard: the portability constraint (#!/usr/bin/env bash vs #!/bin/bash) cannot be caught at runtime on distros that have /bin/bash. Adding the annotation satisfies the adversarial review finding that new tests cannot use pending-migration-to-typed-ir as their exemption category. Co-Authored-By: Claude Sonnet 4.6 --- tests/bug-2136-sh-hook-version.test.cjs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/bug-2136-sh-hook-version.test.cjs b/tests/bug-2136-sh-hook-version.test.cjs index 5b9c693d5..cfd6a4db8 100644 --- a/tests/bug-2136-sh-hook-version.test.cjs +++ b/tests/bug-2136-sh-hook-version.test.cjs @@ -3,6 +3,13 @@ // "Prohibited: Raw Text Matching on Test Outputs". Per-file review may // reclassify some entries as source-text-is-the-product during migration. +// allow-test-rule: structural-regression-guard +// The shebang line must be `#!/usr/bin/env bash` (PATH-resolved) rather than +// `#!/bin/bash` for cross-distro portability (NixOS, minimal Alpine do not +// ship /bin/bash). This is an architectural constraint that cannot be verified +// by executing the hooks — they run fine with either shebang on distros that +// have /bin/bash, so only a source assertion catches a future regression. + /** * Regression tests for bug #2136 / #2206 *