Skip to content

test(contract): guard release.yaml reusable-target rules with a negative fixture#18

Merged
NWarila merged 1 commit into
mainfrom
fix/s1-release-fixtures
May 29, 2026
Merged

test(contract): guard release.yaml reusable-target rules with a negative fixture#18
NWarila merged 1 commit into
mainfrom
fix/s1-release-fixtures

Conversation

@NWarila
Copy link
Copy Markdown
Owner

@NWarila NWarila commented May 29, 2026

Finding S1 (adversarial alignment re-audit)

PR #17 added runner content-rules requiring release.yaml to call the org
reusable-release-please (NWarila/.github) and the framework
reusable-release-evidence (NWarila/packer-framework-template) by 40-hex SHA,
and forbidding local ./reusable-release-* copies — but added no bad-*
fixture
exercising the FAIL path. The good fixture only covers the PASS path
(via the inherited real release.yaml), so a regression pointing release.yaml
at a local/wrong-owner reusable would not be caught by run_contract_tests.py.

Change

  • Add tests/fixtures/contract/bad-release-local-reusables/ (single-file
    release.yaml overlay that calls ./ local reusables) — mirrors
    terraform-runner-template.
  • Add its EXPECTED_BAD_CONTRACT_FAILURES entry pinning all three rules:
    release-please required, release-evidence required, and the local-copy
    forbidden marker (stricter than the sibling, which omits the evidence marker).
  • Allowlist the fixture in the deny-all .gitignore.

Verification (local, origin/main worktree)

  • python tools/run_contract_tests.pyEXIT 0, contract summary: 10 passed, 0 failed
    (was 9); bad-release-local-reusables detected as expected-failure.
  • python tools/check_template_contract.py --type templateEXIT 0, 28 passed, 0 failed.
  • Raw validator output confirms all three release rules fire on the bad fixture.

No production workflow changed; this only adds negative test coverage for an
existing, correct contract rule.

🤖 Generated with Claude Code

…ive fixture

PR #17 added runner content-rules requiring release.yaml to call the org
release-please (NWarila/.github) and framework release-evidence
(NWarila/packer-framework-template) reusables by SHA and forbidding local
copies, but added no bad-* fixture exercising the FAIL path. The good fixture
only covers the PASS path (via the inherited real release.yaml), so a
regression pointing release.yaml at a local/wrong-owner reusable would not be
caught by the suite.

Add bad-release-local-reusables (mirrors terraform-runner-template) + an
EXPECTED_BAD_CONTRACT_FAILURES entry pinning all three rules: release-please
required, release-evidence required, and the ./reusable-release-* local copy
forbidden. Allowlist the fixture in the deny-all .gitignore. Contract suite:
10 passed, 0 failed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@NWarila NWarila merged commit bf45c20 into main May 29, 2026
10 checks passed
@NWarila NWarila deleted the fix/s1-release-fixtures branch May 29, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant