Skip to content

test(gitops): guard cases mutate a fixture, not the live request (DRF-72) - #85

Merged
EurusDevSec merged 1 commit into
mainfrom
hoang/drf-72-guard-fixture
Nov 25, 2026
Merged

EurusDevSec merged 1 commit into
mainfrom
hoang/drf-72-guard-fixture

Conversation

@EurusDevSec

Copy link
Copy Markdown
Owner

Follow-up F3 from window P5-L3-20261125-01 (docs/evidence/p5/P5-T4.2_L3_WINDOW_20261125.md §10).

Problem: gitops/tests/check_guards.sh mutated the live request gitops/requests/tenant-a-docs-qa.yaml. PR #81 deleted the live requests for the sandbox recreate, so the gitops CI failed with FileNotFoundError, although check.sh passed.

Change:

  • New fixture gitops/tests/fixtures/request-tenant-a.yaml, a copy of the valid tenant-a request. check.sh does not scan gitops/tests/, so Argo CD never syncs this file.
  • Each case copies the fixture into the temp tree under the live file's name. The duplicate request and .yml cases read the fixture.
  • New baseline check: the unchanged copy with the fixture must pass check.sh, or the guard run stops with FAIL. Without it, a broken fixture could let a case fail for the wrong rule.

Checked locally:

  1. Real tree: baseline PASS, RESULT: PASS (77 guard cases …).
  2. Copy without the two live requests (the PR chore(p5): remove both docs-qa requests for the Deny recreate (DRF-71) #81 state): baseline PASS, 77 cases PASS.
  3. Copy with a broken fixture (docs--qa): baseline FAIL, RESULT: FAIL, rc 1.
  4. gitops/check.sh: PASS.

The guard test logic changed, so Codex review is recommended (false-PASS risk).

…-72)

check_guards.sh used gitops/requests/tenant-a-docs-qa.yaml as its mutation
fixture, so the PR that deleted the live requests in window
P5-L3-20261125-01 (PR #81) turned CI red with FileNotFoundError. The cases
now copy gitops/tests/fixtures/request-tenant-a.yaml into the temp tree
under the live file's name, and a baseline check requires the unchanged
copy with the fixture to pass check.sh before any case runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings November 25, 2026 07:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@EurusDevSec
EurusDevSec merged commit 010c49b into main Nov 25, 2026
3 checks passed
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.

2 participants