Skip to content

fix(ci): correct required-workflow-bootstrap job scope in strix quick gate test - #1505

Closed
seonghobae wants to merge 1 commit into
mainfrom
fix/strix-gate-test-bootstrap-job-scope
Closed

fix(ci): correct required-workflow-bootstrap job scope in strix quick gate test#1505
seonghobae wants to merge 1 commit into
mainfrom
fix/strix-gate-test-bootstrap-job-scope

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

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 in opencode-review.yml, which has always satisfied the actual invariant.

Root cause

scripts/ci/test_strix_quick_gate.sh's assert_opencode_review_uses_codegraph_and_contextual_orchestrator asserted that the required-workflow-bootstrap job in .github/workflows/opencode-review.yml has no if: 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:

awk '/^  required-workflow-bootstrap:$/,/^[^ ]/' "$bootstrap_file"

Job keys in this file are always 2-space indented, so /^[^ ]/ (a truly unindented line) never matches anywhere within the jobs: section. The awk range therefore never closes and silently pulls in every job defined after required-workflow-bootstrap too. The grep for if: inside that over-broad extraction then matched the unrelated, legitimate if: 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-bootstrap itself has zero if: 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.shPASS (previously failed with exactly the false-positive record_failure this fix removes).
  • coverage run -m pytest tests2125 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

… 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.
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor Author

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 docs/product-technical-gap-baseline.md. I've ported the equivalent fix into my own affected open PRs (#1500, and shortly #1502/#1503) the same way, since this check runs on plain pull_request: against each PR's own head branch rather than pull_request_target: against main.


Generated by Claude Code

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