fix(ci): correct required-workflow-bootstrap job scope in strix quick gate test - #1505
fix(ci): correct required-workflow-bootstrap job scope in strix quick gate test#1505seonghobae wants to merge 1 commit into
Conversation
… gate test assert_opencode_review_uses_codegraph_and_contextual_orchestrator's awk range `/^ required-workflow-bootstrap:$/,/^[^ ]/` never terminates in this file, since job keys are always 2-space indented and no truly-unindented line exists anywhere in the jobs: section. This silently pulled every job after required-workflow-bootstrap into the "must have no if:" check, tripping on an unrelated, legitimate if: condition on a later job's step and failing this required check on every open .github-repo PR. required-workflow-bootstrap itself has always had zero if: conditions -- only the test's own job-scoping was broken. Replace the range with an explicit state machine that starts at the bootstrap job header and stops at the next 2-space-indented job key. Verified: `bash scripts/ci/test_strix_quick_gate.sh` now passes (previously failed with exactly the false-positive record_failure this fix removes); full suite (2125 passed, 1 skipped, 21 subtests) and `git diff --check` clean.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Closing as duplicate of #1506, opened independently and concurrently by another session investigating the same live failure. #1506 is more complete: same root cause and functionally-equivalent fix (an awk state machine instead of an unbounded range), plus it also ports the same patch into the other PRs it was already blocking (#1476, #1484, #1488, #1489) and documents the finding in Generated by Claude Code |
Impact
This bug is currently failing the
exact-head-path-policy/Strix quick-gate required check on every open PR in this repository (confirmed live on.github#1500,#1502,#1503). It is a bug purely in the test's own job-scoping logic, not inopencode-review.yml, which has always satisfied the actual invariant.Root cause
scripts/ci/test_strix_quick_gate.sh'sassert_opencode_review_uses_codegraph_and_contextual_orchestratorasserted that therequired-workflow-bootstrapjob in.github/workflows/opencode-review.ymlhas noif:condition on any step — a real trust-boundary invariant: this required-workflow entrypoint must never depend on event-payload fields.It isolated that job's YAML block with:
Job keys in this file are always 2-space indented, so
/^[^ ]/(a truly unindented line) never matches anywhere within thejobs:section. The awk range therefore never closes and silently pulls in every job defined afterrequired-workflow-bootstraptoo. The grep forif:inside that over-broad extraction then matched the unrelated, legitimateif: github.event.action != 'closed'step condition on a completely different job (opencode-review-target, which reasonably skips requesting a review on an already-closed PR).required-workflow-bootstrapitself has zeroif:conditions and always has — confirmed by isolating just that job's real block. Only the test's own scoping was broken.Fix
Replace the range pattern with an explicit awk state machine that starts printing at the bootstrap job header and stops at the next 2-space-indented job key, so it correctly isolates only that job's own steps.
Verification
bash scripts/ci/test_strix_quick_gate.sh→ PASS (previously failed with exactly the false-positiverecord_failurethis fix removes).coverage run -m pytest tests→ 2125 passed, 1 skipped, 21 subtests passed, no regressions.bash -n scripts/ci/test_strix_quick_gate.sh→ clean.git diff --check→ clean.Notes for reviewers
Given this blocks required checks on every currently open PR in this repository (including this one, self-referentially, until it merges), bypass-merge is available per the standing operating directive once independently re-verified — but normal review is also fine since the fix is narrowly scoped to test logic only.
Generated by Claude Code