Skip to content

fix(ci): correct strix quick-gate opencode fuzz support-file case pattern - #1499

Draft
seonghobae wants to merge 3 commits into
mainfrom
claude/keen-rubin-toifyw
Draft

fix(ci): correct strix quick-gate opencode fuzz support-file case pattern#1499
seonghobae wants to merge 3 commits into
mainfrom
claude/keen-rubin-toifyw

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Summary

  • copy_required_scope_support_files() in scripts/ci/strix_quick_gate.sh matched fuzz/fuzz_opencode_normalize_output.py — a dead/orphaned duplicate fuzz target (it called a nonexistent extract_json_object function) — instead of the real, live fuzz target fuzz/fuzz_opencode_review_normalize_output.py, which actually imports and exercises scripts/ci/opencode_review_normalize_output.py and is referenced by .clusterfuzzlite/Dockerfile and tests/test_fuzz_targets.py.
  • Net effect: a PR that changed only fuzz/fuzz_opencode_review_normalize_output.py never set include_opencode_normalizer=1, so scripts/ci/opencode_review_normalize_output.py was not copied into the Strix scan scope for that PR, even though the fuzz target imports it (from scripts.ci import opencode_review_normalize_output as normalizer).
  • Fixed the case pattern to reference the correct filename.
  • Added regression coverage in scripts/ci/test_strix_quick_gate.sh: a new pr-changed-scope-includes-opencode-normalizer scenario asserts that when the only changed file is fuzz/fuzz_opencode_review_normalize_output.py, scripts/ci/opencode_review_normalize_output.py is present in the materialized PR scan scope.

Verification

  • Traced include_opencode_normalizer downstream to confirm build_pull_request_scope_dir() is the actual mechanism that determines what Strix scans for a PR (it's the function that materializes TARGET_PATH for the scan), so this was a real, functional gap and not just cosmetic.
  • Confirmed extract_json_object does not exist anywhere in scripts/ci/opencode_review_normalize_output.py, corroborating that the old-named fuzz file was already dead/broken.
  • Confirmed no existing test in scripts/ci/test_strix_quick_gate.sh exercised this specific case arm before this change.

Test plan

  • bash scripts/ci/test_strix_quick_gate.sh — full suite passes (test_strix_quick_gate: PASS), including the new pr-changed-scope-includes-opencode-normalizer scenario.
  • coverage run -m pytest tests — 2117 passed, 1 skipped.
  • coverage report --show-missing — 100% (branch coverage, scripts/ci).
  • interrogate — 100% docstring coverage.

Generated by Claude Code

…tern

copy_required_scope_support_files() matched the dead
fuzz/fuzz_opencode_normalize_output.py duplicate (calls a nonexistent
extract_json_object) instead of the real, live fuzz target
fuzz/fuzz_opencode_review_normalize_output.py, which imports
scripts/ci/opencode_review_normalize_output.py. A PR touching only the
real fuzz target never got the normalizer module copied into the
Strix scan scope. Add regression coverage for this case arm.
@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

opencode-review check is failing — not caused by this PR's diff

The required opencode-review check fails closed because the opencode-review-dispatch.yml run for this PR's head (e5e181a3490d0b823c5689a8225a628962de0dca) errors at its "Publish repository_dispatch OpenCode status" step:

Publishing OpenCode repository_dispatch status context opencode-review for ContextualWisdomLab/.github at e5e181a3490d0b823c5689a8225a628962de0dca with state=... using opencode-app token.
gh: Resource not accessible by integration (HTTP 403)

The opencode-app GitHub App installation token doesn't have commit-status write permission for a same-repository (ContextualWisdomLab/.github targeting itself) POST /repos/{repo}/statuses/{sha} call. This reproduces identically and deterministically on every recent PR against this repo I checked (#789, #1176, #1198, #1276, #1420, #1438, #1452, #1460), going back many hours before this PR existed — it is a pre-existing, org-wide infra/credential issue in the central review dispatch pipeline, not something introduced by this PR's 2-file diff.

A fix already exists: ContextualWisdomLab/.github#1227 ("fix(opencode): use same-repo status credential") root-causes and fixes exactly this — swap to the job-scoped github.token for same-repo commit-status publication instead of the cross-repo opencode-app token. It isn't merged yet (currently has a merge conflict and a status: needs-update label). I can't port this fix into this PR's own branch to any effect: opencode-review-dispatch.yml is pull_request_target-trusted content that this workflow explicitly checks out from main at dispatch time (not from this PR's head), so the fix has to land on main via #1227 before this check can pass here. I'll keep this PR watched and re-check once #1227 (or an equivalent fix) merges.


Generated by Claude Code

seonghobae and others added 2 commits September 1, 2026 07:19
exact-head-path-policy fails on this PR's own head not because of this
PR's diff, but because of a pre-existing bug on main in
test_strix_quick_gate.sh: the awk range /^  required-workflow-bootstrap:$/,/^[^ ]/
never finds its end pattern (every job key is indented 2 spaces, never
column 0), so it captures the rest of the jobs section instead of just
that job. A legitimate, unrelated if: added elsewhere in
opencode-review.yml by PR #1497 gets swept into the captured block and
trips the "must not depend on required-workflow event payload fields"
assertion.

This check runs on plain pull_request (not pull_request_target) against
each PR's own head, so the base-branch fix in #1506 doesn't propagate
here automatically; porting the same fix directly is what makes this
PR's own check pass. Ports the exact fix from
#1506.

Copy link
Copy Markdown
Contributor Author

exact-head-path-policy failure fixed by porting an upstream fix

After the merge-scheduler brought this branch current with main, the exact-head-path-policy check (Strix Changed Path Quality CI) started failing with:

FAIL: opencode required workflow bootstrap must not depend on required-workflow event payload fields

Root cause traced to scripts/ci/test_strix_quick_gate.sh's required-workflow-bootstrap: job-block extraction: awk '/^ required-workflow-bootstrap:$/,/^[^ ]/' never finds its end pattern (every job key in opencode-review.yml is indented 2 spaces, never column 0), so it captures the rest of the jobs section instead of just that job. A legitimate, unrelated if: added elsewhere in the file by #1497 gets swept in and trips the assertion. I reproduced this identically against unmodified origin/main before touching anything, confirming it's not caused by this PR's diff.

ContextualWisdomLab/.github#1506 already root-causes and fixes exactly this. Its description notes exact-head-path-policy runs on plain pull_request (not pull_request_target) against each PR's own head — so unlike the earlier opencode-review credential issue, this one does need porting directly into this branch to take effect (merging #1506 to main alone wouldn't fix this PR's own check). Ported the identical fix and pushed (0974a045), validated locally first: test_strix_quick_gate: PASS, coverage run -m pytest tests 2126 passed/1 skipped, 100% coverage, 100% docstrings — matching #1506's own reported numbers.


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