From abe31a6d4ac163a472d9df43ff62e93c8ada6d91 Mon Sep 17 00:00:00 2001 From: cndgrr <59120057+cndgrr@users.noreply.github.com> Date: Tue, 4 Aug 2026 15:56:55 +0000 Subject: [PATCH] test(labels): assert each guard row alone, not bundled with its sibling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The D3 guard loop passed the action path and its test path to derives in one call. derive_labels emits scope:guards when either matches, so any one of the six rows could be deleted with the case still green — three assertions standing in for six rows. Split into one assertion per path. Co-Authored-By: Claude Opus 5 (1M context) --- test/labels-scope.test.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/labels-scope.test.sh b/test/labels-scope.test.sh index cbedf99..5e1c437 100644 --- a/test/labels-scope.test.sh +++ b/test/labels-scope.test.sh @@ -148,10 +148,16 @@ EOF check "derive: RELEASES.md is scope:docs" 0 "[scope:docs]" derives 'RELEASES.md' check "derive: TRIAGE.md is scope:docs" 0 "[scope:docs]" derives 'TRIAGE.md' - # D3: three guard actions and their tests were in no block at all + # D3: three guard actions and their tests were in no block at all. Each of + # the six paths is asserted ALONE, never bundled with its sibling: a set + # holding both the action and its test derives scope:guards when either row + # matches, so one row could be deleted with the case still green — the six + # rows have to be six assertions to be six protections (#300 round). for guard in changelog-assembled docs-sync runner-isolated; do check "derive: actions/$guard is scope:guards" 0 "[scope:guards]" \ - derives "$(files "actions/$guard/$guard.sh" "test/$guard.test.sh")" + derives "actions/$guard/$guard.sh" + check "derive: $guard's test is scope:guards" 0 "[scope:guards]" \ + derives "test/$guard.test.sh" done # D4: lib/ is genuinely mixed, so the shared files wear both labels rather