Skip to content

chore(ci): remove orphaned required-workflow-bootstrap job from dispatch workflow - #1489

Closed
seonghobae wants to merge 17 commits into
mainfrom
fix/hollow-path-opencode-dispatch-bootstrap
Closed

chore(ci): remove orphaned required-workflow-bootstrap job from dispatch workflow#1489
seonghobae wants to merge 17 commits into
mainfrom
fix/hollow-path-opencode-dispatch-bootstrap

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Summary

Fixes one confirmed hollow-path finding from the org-wide audit ("빈 깡통 경로" sweep).

Finding: required-workflow-bootstrap job (lines 27-31) in
.github/workflows/opencode-review-dispatch.yml only echoed
"OpenCode repository-dispatch review run materialized." and was never
referenced by any needs: clause anywhere in the file (verified: the only
other needs: clauses in the file are [validate-pr-metadata],
[validate-pr-metadata, coverage-source-tree], and
[validate-pr-metadata, coverage-evidence]).

Independent re-verification before touching anything:

  • This dispatch workflow triggers only on repository_dispatch — an
    already-trusted, non-PR context — unlike its sibling
    opencode-review.yml, which triggers on pull_request_target and whose
    matching required-workflow-bootstrap job (still present, still needed)
    resolves and pins the trusted workflow source before any real work runs
    (needs: [required-workflow-bootstrap] at line 217 there).
  • Per docs/org-required-workflow-rollout.md, the org ruleset's active
    required workflow paths
    list opencode-review.yml, not
    opencode-review-dispatch.yml — the stable branch-protection job names
    (required-workflow-bootstrap, coverage-source-tree,
    coverage-evidence, opencode-review) belong to that sibling file. The
    dispatch workflow is invoked downstream of it via repository_dispatch
    and is not itself a ruleset-gated entrypoint.
  • A required-workflow-bootstrap string also appears later in this file
    (in a jq self_check_filter list used to exclude the review pipeline's
    own check-run names from "peer checks" polling) — that reference is to
    the check-run name shared with the sibling workflow's job, not a needs:
    dependency on this local job, and is untouched by this change.
  • One existing test did pin the orphaned job's literal presence
    (tests/test_opencode_agent_contract.py::test_opencode_target_coverage_materializes_only_after_authorized_dispatch),
    which is itself part of the hollow-path artifact (a copy-paste that
    codified dead code). Updated it into a regression guard against
    reintroduction instead.

Confirmed real; removed the job.

Changes

  • .github/workflows/opencode-review-dispatch.yml: delete the orphaned
    required-workflow-bootstrap job (holds no required-check slot, gates
    nothing).
  • tests/test_opencode_agent_contract.py: replace the stale
    positive-presence assertions/slicing for that job with
    assert "required-workflow-bootstrap:" not in workflow.
  • tests/test_pr_review_autofix_nvidia_nim_contract.py: update the
    byte-for-byte REVIEW_DISPATCH_BLOB_SHA pin on this workflow file to its
    new git blob hash (also read by
    tests/test_opencode_rust_coverage_toolchain_contract.py).
  • CHANGELOG.md: [Unreleased] entry.

Test plan

All run from a clean isolated clone against this branch:

  • coverage run -m pytest tests -q && coverage report --show-missing — 2105 passed, 1 skipped, 21 subtests passed; scripts/ci stays at 100% coverage (untouched by this change).
  • interrogateRESULT: PASSED (minimum: 100.0%, actual: 100.0%).
  • bash scripts/ci/test_strix_quick_gate.shtest_strix_quick_gate: PASS.
  • python3 -c "yaml.safe_load(...)" on the edited workflow — parses, job list no longer contains required-workflow-bootstrap.

🤖 Generated with Claude Code


Generated by Claude Code

…tch workflow

The required-workflow-bootstrap job in opencode-review-dispatch.yml only
echoed a materialization message and was never referenced by any needs:
clause in the file. It looks copy-pasted from the real trust-boundary
bootstrap job in the sibling pull_request_target-triggered
opencode-review.yml, but this workflow fires only on repository_dispatch
(an already-trusted, non-PR context) and is not itself a path the org
required-workflow ruleset targets, so that pattern's reason for existing
does not apply here.

Update the two byte-for-byte blob-hash pins on this workflow file
(tests/test_pr_review_autofix_nvidia_nim_contract.py,
tests/test_opencode_rust_coverage_toolchain_contract.py reads the same
constant) and the contract test that had pinned the orphaned job's
presence, replacing it with a regression guard against its reintroduction.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Gs7KmNvH75nxz1sL8mKjw
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 54 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 9193ee5a-9d2c-4103-b428-878a315159ac

📥 Commits

Reviewing files that changed from the base of the PR and between 5768f2b and f918bac.

📒 Files selected for processing (7)
  • .github/workflows/opencode-review-dispatch.yml
  • CHANGELOG.md
  • docs/product-technical-gap-baseline.md
  • tests/test_noema_removed_file_context.py
  • tests/test_noema_review_gate.py
  • tests/test_opencode_agent_contract.py
  • tests/test_pr_review_autofix_nvidia_nim_contract.py

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.

Resolve conflicts from concurrent hollow-path audit PRs that merged to
main since this PR was opened.

# Conflicts:
#	CHANGELOG.md
@seonghobae
seonghobae marked this pull request as ready for review August 31, 2026 08:29

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

Ports the identical fix from #1506 into this branch. This PR's
exact-head-path-policy check runs its own head-branch copy of
scripts/ci/test_strix_quick_gate.sh (plain `pull_request` trigger in
strix-changed-path-quality-ci.yml, not pull_request_target), so the
pre-existing main-branch bug is not fixed here just by #1506 merging
into main -- it needs porting into this branch directly.

Root cause: assert_opencode_review_uses_codegraph_and_contextual_orchestrator
extracted the required-workflow-bootstrap job block from
opencode-review.yml with awk '/^  required-workflow-bootstrap:$/,/^[^ ]/'.
Every job key in that workflow is indented 2 spaces (never column 0), so
the end pattern never matched until EOF, sweeping an unrelated `if:`
line from a later job (added by already-merged PR #1497) into the
"block" and failing the assertion on unrelated content.

Fixed by using an explicit state flag so the end pattern
(`^  [A-Za-z0-9_-]+:`) is only tested starting on the line after the
start match, correctly bounding the block to just its own lines.

See #1506 for the full root-cause writeup
and validation against origin/main.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Gs7KmNvH75nxz1sL8mKjw

Copy link
Copy Markdown
Contributor Author

exact-head-path-policy failure: pre-existing main bug, now fixed on this branch too

This PR's exact-head-path-policy check (Strix Changed Path Quality CI) started failing today, but not because of anything in this PR's own diff.

Root cause: scripts/ci/test_strix_quick_gate.sh's assert_opencode_review_uses_codegraph_and_contextual_orchestrator extracted the required-workflow-bootstrap: job block from .github/workflows/opencode-review.yml with awk '/^ required-workflow-bootstrap:$/,/^[^ ]/'. Every job key in that workflow is indented 2 spaces, never column 0, so the /^[^ ]/ end pattern never matched until EOF — the "block" captured was actually the rest of the entire jobs section. An already-merged, unrelated commit (4a5dfd8, PR #1497) added a step-level if: line inside a later, different job; the broken awk swept it into this job's "block" and the assertion wrongly failed. Reproduced identically against unmodified origin/main before any change.

Trigger-type check: .github/workflows/strix-changed-path-quality-ci.yml's exact-head-path-policy job runs on plain pull_request: (not pull_request_target:) and explicitly checks out github.event.pull_request.head.sha — i.e. it runs this PR's own branch copy of test_strix_quick_gate.sh, not main's. So merging the root-cause fix into main alone would not resolve this PR's check.

Root-cause fix: #1506 (targets main, full write-up and validation there).

What I did here: ported the identical one-line awk fix onto this branch directly (commit b00e374), validated from a clean isolated clone: bash scripts/ci/test_strix_quick_gate.shtest_strix_quick_gate: PASS (was FAIL before the fix); coverage run -m pytest tests -q → 2125 passed, 1 skipped, 21 subtests; coverage report --show-missing → 100% on scripts/ci/; interrogate → 100%; bash -n clean.

A re-run of the failed check should now pass.

🤖 Generated with Claude Code


Generated by Claude Code

devin-ai-integration[bot]

This comment was marked as resolved.

grep -q exits on first match and closes its end of the pipe; if the
upstream awk is still writing a large block, it gets SIGPIPE (141).
Under `set -o pipefail` that non-zero awk status wins over grep's real
0, so `if pipeline; then` sees the pipeline as failed even though grep
found a genuine match — silently missing e.g. a forbidden `if:` key or
a fenced-diff marker that should have failed the check.

Ports the same-file fix from PR #1506 to this branch's two call sites
(required-workflow-bootstrap job-block check; opencode review
REQUEST_CHANGES fenced-diff check). This branch already carried
#1506's awk job-block-boundary correction, so only the grep -q removal
was needed here.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Gs7KmNvH75nxz1sL8mKjw
devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Contextual-Orchestrator와 관계한 것들을 같이 손보든 어쩌든 해결하세요. Bypass merge 필요하면 가능 (chicken and eggs 상황이라면) + NVIDIA NIM 만 쓰는 건 허용하지 않아요. Contextual-Orchestrator를 쓰세요. Timeout은 적어도 3시간으로 잡으세요. 120초 같은 건 당황스럽군요. Opencode와 Noema 는 Coderabbitai 및 Devin 수준으로 실제로 리뷰를 하게 하시오. Strix도 보안 리뷰를 꼼꼼하게 하도록 하시오. 특히 보안 리뷰는 전체 코드로 수행하는 것입니다. Contextual-Orchestrator는 실시간으로 빠르면서 능력이 좋은 모델에 요청을 보내어 시간을 당기시오. @opencode-agent 라고 부르면 호출되는 기능도 인터넷 가이드에는 /oc 라고 나와있기 때문에 이 점도 확인해 보는 게 좋겠습니다.

Resolves the merge conflict in scripts/ci/test_strix_quick_gate.sh by
keeping main's required_workflow_bootstrap_has_if() helper, which fixes
both the awk job-block boundary bug and the grep -q/pipefail SIGPIPE
false-negative bug (superseding this branch's inline awk|grep -q form).

main's #1533 (repository_dispatch head_sha warn-and-proceed instead of
hard-fail) and this PR's own required-workflow-bootstrap job removal
both land cleanly in opencode-review-dispatch.yml. Two follow-on fixes
were needed to match the merged file's actual content, since the repair
already applied to main is not itself merged there yet:

- REVIEW_DISPATCH_BLOB_SHA in test_pr_review_autofix_nvidia_nim_contract.py
  updated to the merged file's actual blob hash (git hash-object), which
  is unique to this branch (job removal + #1533 combined).
- test_opencode_privileged_review_security_boundaries_are_fail_closed
  (test_opencode_agent_contract.py) updated to pin #1533's warn-and-proceed
  head_sha invariant instead of the pre-#1533 hard-fail assertion:
  base_ref/base_sha/head_ref stay hard-fail exact matches, head_sha is
  explicitly excluded from the mismatches set, and the warning path is
  asserted present.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Gs7KmNvH75nxz1sL8mKjw

Copy link
Copy Markdown
Contributor Author

Current-main revalidation confirms this hollow path still exists on protected main@2436454e3a969a282b5edc7303a485ccd37c3e9f: tests/test_opencode_agent_contract.py still requires required-workflow-bootstrap: in opencode-review-dispatch.yml, so the no-op dispatch job was not absorbed elsewhere. This branch is stale from 1186a9f4.... Please merge current protected main into the existing branch non-destructively (no rebase/force), re-derive the current workflow blob SHA rather than retaining any predecessor pin, preserve the current dispatch security/timeout changes from #1507/#1499, and keep the effective change limited to deleting the orphan job plus updating the exact contract/pin and changelog. Re-run full central coverage, docstrings, YAML/shell contract, and exact-head reviews.

…ode-dispatch-bootstrap

# Conflicts:
#	tests/test_opencode_agent_contract.py
#	tests/test_pr_review_autofix_nvidia_nim_contract.py
devin-ai-integration[bot]

This comment was marked as resolved.

claude and others added 3 commits September 1, 2026 07:21
Protected main regressed to 99% scripts/ci coverage after #1546 added
live_head_matches, a no-active/no-stale fall-through in
prepare_autofix_slot, and an "already queued or running" wait branch
to pr_review_fix_scheduler.py without covering them, while the
pre-existing inspect_pr conflicted-draft/conflicted-unauthorized
returns and pr_review_merge_scheduler.py's
fetch_workflow_names_by_check_suite_rest pagination/filtering/
permission-denied paths stayed untested. Every PR rebasing onto main
inherits this via the coverage-evidence required check regardless of
its own diff. Test-only change; no production code touched.
Adds a dated traceability entry for the coverage gap this PR closes:
root cause (#1546's uncovered additions plus the older #1547/#1551/
#1554 gap, neither of which merged or transfers evidence here), the
fix and its verification, the resolved Devin false-positive on
sub-clause coverage, and the known pre-existing SIGPIPE test flake
left unremediated as out of scope.
Raise scoped docstring coverage for the newly added scheduler REST regression helpers to 100% without changing test behavior or production code.

Copy link
Copy Markdown
Contributor Author

noema-review failed on the current head (a470f298) with Noema reviewed line 1 is not an exact changed-side line — the same intentional anti-hallucination fail-closed guard in validate_substantive_verdict (scripts/ci/noema_review_gate.py) confirmed correct on multiple prior PRs this window (contextual-orchestrator#960, .github#958). Not a bug in this PR's diff; a stochastic imprecise line citation from the review model. Re-ran the failed job once (run 33469415993) for a fresh sampled pass.


Generated by Claude Code


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

This hollow-path removal is still required on protected main@5686de41660d51a7a7f22b8840dfa6ccfe5ff3f1: current tests/test_opencode_agent_contract.py still positively pins the dispatch workflow's orphan required-workflow-bootstrap echo job. @opencode-agent converge on current main without reviving predecessor review code. Merge #1567's live coverage branch as the quality prerequisite, retarget this PR to that parent, then re-derive the removal from the current opencode-review-dispatch.yml: delete only the unreferenced repository-dispatch bootstrap job, update the current contract from positive-presence to negative-reintroduction guard, and recompute every exact blob pin against the resulting current workflow bytes. Preserve #1546 exact-head reviewer lifecycle and do not alter the real required-workflow-bootstrap job in sibling .github/workflows/opencode-review.yml, which remains ruleset-facing and required. Add/update dated baseline/CHANGELOG traceability and run full 100% coverage/docstrings + Strix quick-gate. Fresh exact-head OpenCode/Noema review only after the current-main workflow pin is stable.

…ode-dispatch-bootstrap

# Conflicts:
#	tests/test_pr_review_autofix_nvidia_nim_contract.py
…rest-and-live-head' into fix/hollow-path-opencode-dispatch-bootstrap

Copy link
Copy Markdown
Contributor Author

Converged on current main (5686de41) non-destructively — the negative-reintroduction guard (assert "required-workflow-bootstrap:" not in workflow in tests/test_opencode_agent_contract.py) was already the shape of this PR's contract-test change from before, so the merge just needed the usual REVIEW_DISPATCH_BLOB_SHA pin recomputation (only conflict, resolved). Confirmed post-merge: the orphaned required-workflow-bootstrap job stays removed from opencode-review-dispatch.yml, the sibling opencode-review.yml's real, ruleset-required required-workflow-bootstrap job is untouched, and the one surviving required-workflow-bootstrap string in the file is exactly the documented self_check_filter check-run-name reference, not a job or needs: clause.

Also merged #1567's branch (post-#1546 scheduler coverage-gap fix) as the coverage prerequisite, since it hasn't landed on main yet.

Validated on the new head (d528a9f4): coverage run -m pytest tests -q → 2251 passed, 1 skipped, 21 subtests (one test_scheduler_wake_reuses_trusted_receipt_predicate SIGPIPE flake on the first attempt, clean on re-run — same known pre-existing flake documented on #1567); coverage report → 100%; interrogate → 100.0%; bash scripts/ci/test_strix_quick_gate.shtest_strix_quick_gate: PASS.

@opencode-agent please review the new exact head d528a9f4; no predecessor evidence should transfer.


Generated by Claude Code


Generated by Claude Code

RCA: the #1567 exact-head Hourly NVIDIA NIM Review Repair run failed in test_scheduler_wake_reuses_trusted_receipt_predicate with exit 141. The production block pipes jq JSON into gh api --input -, while the test fake exited without reading stdin. Under pipefail that can SIGPIPE jq. Reuse the already RED/GREEN-verified #1569 fixture blob and drain stdin before recording the fake dispatch. This makes #1567 self-contained so the central 100% coverage repair no longer depends on a separate PR that itself inherits the coverage failure.

Copy link
Copy Markdown
Contributor Author

The repeated "Hourly cadence, immutable source, NIM credential, and conflict scope" failures on this head were the test_scheduler_wake_reuses_trusted_receipt_predicate SIGPIPE flake, now root-caused: #1567's branch picked up a fix for it (69481751, drains stdin in the fake gh dispatches shim so it can't race the production jq | gh api --input - pipeline under pipefail) — cherry-picked just that commit here rather than merging #1567's current branch wholesale, since it has since also picked up #1491's unrelated CodeGraph removal, which would have widened this PR's diff beyond its own scope.

Stress-tested in isolation (20/20 clean) and validated on the new head (0be68ade): coverage run -m pytest tests -q → 2251 passed, 1 skipped, 21 subtests (no flake this run); coverage report → 100%; interrogate → 100.0%; REVIEW_DISPATCH_BLOB_SHA pin unaffected.


Generated by Claude Code


Generated by Claude Code

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

Devin Review

Comment thread tests/test_opencode_required_verdict_regression.py
…ode-dispatch-bootstrap

# Conflicts:
#	CHANGELOG.md
#	docs/product-technical-gap-baseline.md
Merging current main pulled in #1587 (free-pool admission filtering)
and #1564 (merge-base-anchored deleted-file review evidence), both of
which left pre-existing tests referencing removed/renamed names or
excluded fixtures broken. Port the same fix already opened as its own
dedicated PR (#1598) rather than widening this PR's own scope:

- tests/test_contextual_orchestrator_review_policy.py: swap the stale
  "openai" free-pool fixture to "bytez" in
  test_build_catalog_applies_account_cap and
  test_build_catalog_respects_limit.
- tests/test_noema_review_gate.py: rename fetch_changed_file_paths
  call sites to fetch_changed_files with (path, status) tuples; accept
  the new changed_files parameter in build_review_context mocks; drop
  the two CodeGraph-only assertions/tests for the removed function.
- tests/test_noema_removed_file_context.py: rewrite against the real
  run() JSON-per-line contract, fetch_merge_base_sha's SHA validation,
  and fetch_file_content_at_ref; add direct coverage for the
  malformed-input and empty-content branches #1564 introduced.

Full suite: 2318 passed, 100% branch coverage, 100% docstrings.
…ee-pool fixture fix)

# Conflicts:
#	tests/test_contextual_orchestrator_review_policy.py
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