Skip to content

fix: keep cross-repo OpenCode evidence healthy - #939

Draft
seonghobae wants to merge 35 commits into
mainfrom
codex/fix-cross-repo-opencode-evidence
Draft

seonghobae wants to merge 35 commits into
mainfrom
codex/fix-cross-repo-opencode-evidence

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR repairs central cross-repository review evidence without weakening a gate.

  1. Trusted uv materialization preserves no-proxy/no-redirect operation, bounded download, pinned checksum, executable-version verification, and fail-closed archive/platform/integrity handling.
  2. Base requirements-lock discovery recognizes conventional requirements*.txt locks and direct .txt children of repository-relative requirements/ directories from the authenticated exact base commit while keeping lock validation separate from path eligibility.
  3. Cross-repository OpenCode evidence requires an exact-head formal review before tolerating unavailable optional commit-status publication and preserves formal PR review as authoritative.
  4. Bounded Strix pull-request scope uses only trusted static instruction text and bounded authenticated source material.

Existing test-first evidence

  • Strix repair run 31784776654 established the bounded-scope contract and passed the focused/complete central harness after repair.
  • Requirements discovery repair run 31787913977 established the missing requirements-lock paths before repair and then passed focused validation.
  • Central doctoring preserves those trust contracts; temporary repair workflows are absent from the production diff.

Downstream contradiction 1 — Inkspan #197: omitted repository-local dependency became a synthetic HIGH

Exact downstream evidence:

  • ContextualWisdomLab/inkspan#197 exact target head b13209ff9832c6ac0c8239b29e12720a9895eab4;
  • Strix required-workflow run 31906069281, attempt 2, job 95151082222;
  • changed production file office/src/inkspan_office/cli.py;
  • scanner finding HIGH Missing Safe Renderer Component Leading to Potential Office Document Rendering Vulnerabilities;
  • PoC claimed ModuleNotFoundError: No module named 'inkspan_office.safe_renderer' because the bounded workspace did not contain that unchanged dependency;
  • the exact same target head does contain office/src/inkspan_office/safe_renderer.py; repository CI 31906069634, Security Scan 31906069670, and SAST Semgrep 31906069692 all succeeded.

This is a central evidence contradiction: a deliberately omitted unchanged dependency was converted into a source vulnerability. Repair acceptance is a bounded trusted repository-local dependency closure from authenticated source identity, or an explicit context-insufficiency/abstention classification when scope omission prevents source-backed judgment. Do not broaden to an unbounded checkout, execute target code to discover imports, synthesize a clean result, or weaken the required gate. Add a regression shaped like cli.py -> .safe_renderer and preserve exact-head/source provenance.

Downstream contradiction 2 — Inkspan #246: scanner invented host authorization authority

Exact downstream evidence:

  • ContextualWisdomLab/inkspan#246 predecessor target head 9eebccbd95008d1ac25fec7bd730d92654d3cf07;
  • Strix run 31843901859, job 94906388922;
  • changed production file office/src/inkspan_office/safe_renderer.py;
  • scanner finding HIGH Path Traversal in write_office_document Function;
  • recommended remediation invented a library-owned base directory, defaulted it to the current working directory, and suggested a new base_directory parameter.

That proposed invariant conflicts with Inkspan's accepted authority boundary: write_office_document() publishes to a caller-selected path while the embedding host owns directory authorization, tenant path isolation, quotas, retention, encryption, and distribution. Central acceptance is to provide bounded authenticated authority/context when available or abstain/classify context insufficiency when exploitability depends on an authorization boundary absent from the scanned component. Preserve detection of genuine symlink/race/extension/publication failures; do not fabricate a host policy, mutate product code to satisfy scanner-authored authority, synthesize a clean result, or weaken Strix.

Downstream contradiction 3 — Inkspan #141: delegated DOCX hyperlink validation was omitted and reported as missing

Exact downstream evidence:

  • ContextualWisdomLab/inkspan#141 exact target head d1148b4980c689e1a1a0fb6e7dc092f17ac60225;
  • required-workflow run 31872469049, Strix job 94983150711;
  • scanner artifact 9244047394, digest sha256:d8252393e302cccf568d57b27bdffd7e6c86cfc55c3f10c3b3f34c0ef0d5bfbf;
  • finding MEDIUM Missing DOCX Input Validation in Inkspan Office Renderer Leading to Potential SSRF and Data Exfiltration;
  • finding claimed safe_renderer.py lacked DOCX-specific rich-run href validation and proposed duplicating a DOCX validator in that facade;
  • exact same target head safe_renderer.py delegates deterministic rendering to renderer.render_office_document() after facade-level cross-format safety checks;
  • exact same target head renderer.py already implements _validate_docx_hyperlink_target() with a 4096-character ceiling, printable-ASCII/backslash rejection, strict absolute HTTP(S) scheme/host checks, credential rejection, and invokes it from _add_docx_rich_paragraph() before creating the external relationship;
  • repository CI 31872470055, Security Scan 31872470056, and SAST Semgrep 31872470050 all succeeded on that exact head.

This is the same dependency-closure failure class as #197, but with a delegated security invariant rather than a missing import. The bounded workspace omitted the unchanged module that actually owns the validation, then the model interpreted omitted dependency context as missing product validation.

Central acceptance for this class:

  • add a regression shaped like safe_renderer.render_office_document -> renderer._render_docx -> _add_docx_rich_paragraph -> _validate_docx_hyperlink_target;
  • materialize only the bounded authenticated repository-local dependency/context closure needed to establish that delegated invariant, or classify the judgment as context-insufficient/abstain when the closure cannot be established safely;
  • preserve detection when the delegated validator is genuinely absent, bypassed, or weakened;
  • do not duplicate security validation in a facade solely to satisfy incomplete scanner context;
  • do not treat repository CI/SAST success as a substitute for Strix, synthesize a clean Strix verdict, execute target code for dependency discovery, or weaken the required gate.

Until this exact central contradiction is repaired and proven by downstream reruns, the affected historical Strix failures remain non-passing evidence but are not source-backed Inkspan vulnerabilities.

Current exact-head evidence

Current exact head remains 6213f1e9c64186c08cffb6df8cad1b3c6f47c2a6. Previous prose naming predecessor 38cb3b9c4dd9febc475ecdc2f71c0c354032be5c as current is superseded.

Fresh exact-head observations previously established Security Scan, OSV-Scanner PR, Hourly NVIDIA NIM Review Repair, Strix Changed Path Quality CI, Scorecard PR, SAST Semgrep, Secret Scan, Trusted uv Materializer Quality CI, and SBOM Generation success. Python Security and CodeQL PR were still queued at that observation and therefore non-passing. Formal review state included one current APPROVED review from cursor; older predecessor review evidence is not transferred.

Merge boundary

Live repository rules require two approving reviews, stale-review dismissal after push, latest-push approval by someone other than the pusher, and review-thread resolution. Merge only after the unchanged current head has every applicable exact-head workflow terminal-success, two qualifying independent approvals satisfying the latest-push condition, and no unresolved review thread. Do not push merely to retrigger approval, transfer predecessor evidence, weaken policy, or use administrator bypass.

Summary by CodeRabbit

  • 버그 수정

    • 교차 저장소 상태 게시 전 정확한 커밋의 공식 리뷰 상태를 확인합니다.
    • 보안 검사 제공자 장애나 증거 부족 시 성공으로 처리하지 않고 실패합니다.
    • 필수 검사 실행이 취소되거나 불필요하게 직렬 대기되지 않도록 개선했습니다.
    • Python 의존성 잠금 파일과 보안 검사 결과 검증을 강화했습니다.
  • 개선

    • 내부 PR 검사에 제한된 범위와 안내 지침을 적용합니다.
    • Strix 실행 시 샌드박스 기준과 오류 처리 방식을 명확히 했습니다.
    • SBOM 증명 및 보안 검증 절차를 보강했습니다.
  • 문서

    • 의존성 잠금, 리뷰 증거, 보안 검사 운영 기준을 문서화했습니다.

Open in Devin Review

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 479f4cd1-4c17-4a59-8118-97dd4235bf37

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

OpenCode는 정확한 PR HEAD의 공식 리뷰가 있을 때만 교차 저장소 상태 공개 생략을 허용합니다. Strix는 provider 장애를 실패로 처리합니다. 필수 큐 실행은 취소하지 않습니다. 내부 PR 지침 전달과 Base requirement lock 탐색 계약을 추가했습니다.

Changes

보안 증거와 CI 실행 계약

Layer / File(s) Summary
정확한 HEAD 리뷰 검증
.github/workflows/opencode-review-dispatch.yml, tests/test_opencode_agent_contract.py, tests/test_pr_review_autofix_nvidia_nim_contract.py
공식 OpenCode 리뷰의 작성자, 상태, PR_HEAD_SHA를 검증합니다. 검증 실패 시 종료 코드 1을 요구합니다.
필수 큐 실행 보존과 병렬화
.github/workflows/pr-review-merge-scheduler.yml, tests/test_required_workflow_queue_contract.py, tests/test_opencode_agent_contract.py, scripts/ci/test_strix_quick_gate.sh
cancel-in-progress: false를 사용합니다. 필수 작업의 순차 대기 검증을 병렬 실행 검증으로 변경합니다.
Strix provider 장애 하드 실패
.github/workflows/strix.yml, tests/test_required_workflow_queue_contract.py, tests/test_strix_nvidia_nim_not_found_fallback.py
provider 또는 backend 장애를 감지하면 중립 성공 대신 실패합니다. 관련 테스트는 불완전한 증거의 fail-closed 동작을 검증합니다.
내부 PR 지침 전달
scripts/ci/strix_quick_gate.sh, tests/test_strix_internal_scope_instruction_contract.py
내부 PR 범위에서만 정적 지침을 선택하고 환경변수와 --instruction 인자로 자식 Strix 프로세스에 전달합니다.
Base requirement lock 경로 검증
docs/doctoring/base-requirements-lock-discovery.md, tests/test_materialize_base_python_requirement_paths.py
저장소 상대 경로와 해시 고정 requirement lock 조건을 문서화합니다. 중첩 requirements 디렉터리의 파일 수집을 검증합니다.
운영 문서와 변경 기록 갱신
docs/doctoring/strix-bounded-pr-scope.md, docs/doctoring/cross-repo-opencode-evidence.md, CHANGELOG.md
Strix 범위와 fail-closed 조건, 교차 저장소 리뷰 증거 조건, 이번 계약 변경을 기록합니다.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: 🟡 Moderate · up to e1418

The PR changes cross-repository review evidence and workflow enforcement, but the current head still permits ambiguous reviewer-author acceptance and does not reliably verify the scheduler’s cancellation setting; together with the unresolved requirements-lock discovery concern, these concrete gate and dependency-discovery risks should be fixed or explicitly accepted before merge.

Possibly related PRs

Sequence Diagram(s)

sequenceDiagram
  participant Workflow as opencode-review-dispatch.yml
  participant ReviewsAPI as GitHub Reviews API
  participant StatusAPI as GitHub Status API
  Workflow->>ReviewsAPI: PR_HEAD_SHA의 리뷰 조회
  ReviewsAPI-->>Workflow: 공식 OpenCode 리뷰 상태 반환
  Workflow->>StatusAPI: 검증된 리뷰가 있을 때 상태 공개 생략
  Workflow-->>Workflow: 조회 실패 또는 불일치 시 exit 1
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 84.38% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 32 functions across 8 files. (4 skipped: 3 unsupported, 1 too large.)
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 교차 저장소 OpenCode 증거 수정이라는 PR의 주요 변경 사항을 간결하고 정확하게 설명합니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/fix-cross-repo-opencode-evidence

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-agent review

Perform a fresh read-only semantic review of exact current head 62497e56a6063074e47e8ff94bcbb951be030f25 against independently resolved live protected main 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. All nine exact-head quality/security/supply-chain workflows are now terminal-success, the PR is Ready and mergeable, no formal review exists, and zero review threads are unresolved.

Focus on the static fixed-URL/fixed-User-Agent uv request boundary, no-proxy/no-redirect behavior, bounded download/checksum/version enforcement, and the cross-repository OpenCode App status-publication guard. Verify that optional status publication cannot substitute for exact-head formal review or weaken branch protection. Review only; do not mutate, self-approve, enable auto-merge, or merge.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please perform a fresh read-only semantic review of exact current head f97b9a44201633d2a94bf73c6bb7fde900135553 against independently resolved live protected main 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. All nine exact-head quality/security/supply-chain workflows are terminal-success and zero review threads are unresolved.

Focus on the new fail-closed cross-repository status guard: unavailable github.token/OpenCode App commit-status publication may be skipped only after live target reviews prove an opencode-agent APPROVED or CHANGES_REQUESTED formal review bound to the exact head. Verify read failure, missing/stale review, author/state matching, cleanup, and that optional status evidence cannot replace formal review or branch protection. Review only; do not mutate, self-approve, enable auto-merge, or merge.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

head_sha='f97b9a44201633d2a94bf73c6bb7fde900135553'
base_sha='6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba'
repo='ContextualWisdomLab/.github'
pr_number='939'

echo '== Commit identity and ancestry =='
git cat-file -e "${head_sha}^{commit}"
git cat-file -e "${base_sha}^{commit}"
printf 'HEAD parent/base relationship: '
git merge-base --is-ancestor "$base_sha" "$head_sha" && echo yes || echo no
printf 'merge-base: '
git merge-base "$base_sha" "$head_sha"
printf 'checked-out HEAD: '
git rev-parse HEAD

echo '== Changed files and exact diff =='
git diff --name-status "$base_sha" "$head_sha"
git diff --unified=80 "$base_sha" "$head_sha" -- \
  .github/workflows/opencode-review-dispatch.yml \
  tests/test_opencode_agent_contract.py

echo '== Workflow outline and relevant control-flow context =='
ast-grep outline .github/workflows/opencode-review-dispatch.yml --items all || true
rg -n -C 12 --glob 'opencode-review-dispatch.yml' \
  'github\.token|opencode-app|commit.status|statuses|reviews|pulls|PR_HEAD_SHA|APPROVED|CHANGES_REQUESTED|exit 1|exit 0|repository_dispatch' \
  .github/workflows/opencode-review-dispatch.yml

echo '== Contract-test context =='
ast-grep outline tests/test_opencode_agent_contract.py --items all || true
rg -n -C 10 \
  'github\.token|opencode-app|commit.status|statuses|reviews|PR_HEAD_SHA|APPROVED|CHANGES_REQUESTED|exit.?1|exit.?0' \
  tests/test_opencode_agent_contract.py

echo '== Live PR identity, reviews, and check rollup =='
gh pr view "$pr_number" --repo "$repo" \
  --json number,state,isDraft,mergeable,headRefOid,baseRefOid,reviews,statusCheckRollup \
  --jq '{number,state,isDraft,mergeable,headRefOid,baseRefOid,reviews:[.reviews[]|{author:.author.login,state,commit:.commit.oid}],checks:[.statusCheckRollup[]|{name,conclusion,status,workflowName}]}'

Length of output: 161212


🏁 Script executed:

#!/bin/bash
set -euo pipefail

head_sha='f97b9a44201633d2a94bf73c6bb7fde900135553'
base_sha='6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba'
repo='ContextualWisdomLab/.github'
pr_number='939'

echo '== Commit ancestry =='
printf 'base ancestor of head: '
git merge-base --is-ancestor "$base_sha" "$head_sha" && echo yes || echo no
printf 'merge-base: '; git merge-base "$base_sha" "$head_sha"
printf 'current checkout: '; git rev-parse HEAD

echo '== Exact changed hunks: status-publication guard =='
git diff --unified=30 "$base_sha" "$head_sha" -- .github/workflows/opencode-review-dispatch.yml |
  sed -n '/Publish repository_dispatch OpenCode status/,+130p'

echo '== Exact changed hunks: regression contract =='
git diff --unified=30 "$base_sha" "$head_sha" -- tests/test_opencode_agent_contract.py |
  sed -n '1,260p'

echo '== Guard source with line numbers =='
nl -ba .github/workflows/opencode-review-dispatch.yml |
  sed -n '7828,7895p'

echo '== Exact-head Strix workflow runs =='
gh run list --repo "$repo" --workflow strix.yml --commit "$head_sha" --limit 20 \
  --json databaseId,event,status,conclusion,headSha,url,workflowName \
  --jq '.[] | {databaseId,event,status,conclusion,headSha,url,workflowName}'

echo '== Current branch-protection requirements =='
gh api "repos/${repo}/branches/main/protection" \
  --jq '{required_status_checks,required_pull_request_reviews,required_linear_history,allow_force_pushes,allow_deletions}' \
  || true

Length of output: 13167


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/.github'
head_sha='f97b9a44201633d2a94bf73c6bb7fde900135553'

echo '== Current exact-head Strix runs =='
gh run list --repo "$repo" --workflow strix.yml --commit "$head_sha" --limit 20 \
  --json databaseId,event,status,conclusion,headSha,url,workflowName \
  --jq '.[] | {databaseId,event,status,conclusion,headSha,url,workflowName}'

echo '== Branch protection: required checks and reviews =='
gh api "repos/${repo}/branches/main/protection" |
  jq '{
    required_status_check_contexts: (.required_status_checks.contexts // []),
    strict_required_status_checks: (.required_status_checks.strict // null),
    required_approving_review_count: (.required_pull_request_reviews.required_approving_review_count // 0),
    dismiss_stale_reviews: (.required_pull_request_reviews.dismiss_stale_reviews // false),
    require_code_owner_reviews: (.required_pull_request_reviews.require_code_owner_reviews // false),
    require_last_push_approval: (.required_pull_request_reviews.require_last_push_approval // false),
    enforce_admins: (.enforce_admins.enabled // false)
  }'

echo '== Current live PR review and check state =='
gh pr view 939 --repo "$repo" --json headRefOid,reviews,statusCheckRollup \
  --jq '{
    head: .headRefOid,
    reviews: [.reviews[] | {author:.author.login,state,commit:.commit.oid}],
    active_or_non_success_checks: [
      .statusCheckRollup[]
      | select(.status != "COMPLETED" or ((.conclusion // "") | ascii_upcase | IN("SUCCESS","SKIPPED","NEUTRAL") | not))
      | {name,status,conclusion,workflowName}
    ]
  }'

Length of output: 2589


@seonghobae I completed the read-only semantic review of f97b9a44201633d2a94bf73c6bb7fde900135553 against 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba.

I found no source-level defect in the new cross-repository status-publication guard.

  • The base commit is the exact merge base of the reviewed head.
  • The guard reads all paginated PR reviews.
  • A skipped cross-repository status requires a review with the exact PR_HEAD_SHA.
  • The guard accepts only opencode-agent[bot] or opencode-agent.
  • The guard accepts only APPROVED or CHANGES_REQUESTED.
  • Review API read failure, missing review evidence, stale review evidence, wrong author, and wrong state fail with exit 1.
  • The temporary review-evidence file is removed by the EXIT trap.
  • A verified formal review exits before the optional commit-status write. The status skip does not create substitute approval evidence.

The regression contract checks the required guard structure and failure path. It is static coverage. It does not execute mocked API failure or review-payload cases.

Live verification is incomplete:

  • The exact-head Strix Security Scan run 31549269071 is still in_progress.
  • PR #939 has no formal reviews.
  • GitHub returned HTTP 403 for the main branch-protection endpoint. I could not independently verify the required-review and required-check policy.

Therefore, the statement that all exact-head checks are terminal-success is not supported by the live data. I did not approve, merge, enable auto-merge, or modify repository state.

I applied the existing exact-current-head evidence rule during this review.


🧠 Learnings used
Learnt from: seonghobae
Repo: ContextualWisdomLab/.github PR: 0
File: :0-0
Timestamp: 2026-08-05T13:44:10.007Z
Learning: For PR `#782`, only successful checks associated with the exact current head are valid merge evidence. Do not treat queued, in-progress, cancelled, predecessor-head, temporary-workflow, or administrative-bypass results as passing evidence. Before a formal approval, verify that the direct security and supply-chain workflows, the permanent hourly NVIDIA NIM contract, current-head reviews, unresolved-thread checks, and an independent approval have completed successfully.

Learnt from: CR
Repo: ContextualWisdomLab/.github PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-07-29T06:47:25.581Z
Learning: Applies to opencode.jsonc : All reviewer agents in `opencode.jsonc` must keep `"edit": "deny"`; reviewers must never implement changes.
⚠️ Action not completed

Already reviewed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

@opencode-agent review

Perform a fresh read-only semantic review of exact current head ac5665148bb113f92e97d2fc49a729bca2f050b5 against independently resolved live protected main 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. All nine exact-head quality, security, and supply-chain workflows are terminal-success and zero review threads are unresolved.

Review the fail-closed exact-head formal-review guard and the subsequent Strix outage-gate changes as one current tree. Keep source-review evidence distinct from workflow/provider evidence. Do not mutate, self-approve, enable auto-merge, dismiss reviews, weaken gates, or merge.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review
@opencode-agent review
@cwl-noema-review review

Review exact current head ac5665148bb113f92e97d2fc49a729bca2f050b5 only. All nine exact-head quality, security, and supply-chain workflows are terminal-success. Validate the stable User-Agent bootstrap boundary and the cross-repository commit-status limitation: a formal exact-head review must remain authoritative, status publication may be optional only after live review verification, and review lookup failure or missing approval must fail closed. Review only; do not mutate, merge, release, or alter protections.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/.github'
pr='939'
head='ac5665148bb113f92e97d2fc49a729bca2f050b5'
base='6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba'

echo '== Exact commit identity =='
git cat-file -e "${head}^{commit}"
git cat-file -e "${base}^{commit}"
printf 'checked-out head: '; git rev-parse HEAD
printf 'base is ancestor: '; git merge-base --is-ancestor "$base" "$head" && echo yes || echo no
printf 'merge base: '; git merge-base "$base" "$head"

echo '== Changed files =='
git diff --name-status "$base" "$head"

echo '== Focused exact diff =='
git diff --unified=45 "$base" "$head" -- \
  scripts/ci/materialize_base_python_requirements.py \
  tests/test_trusted_uv_download_contract.py \
  .github/workflows/opencode-review-dispatch.yml \
  tests/test_opencode_agent_contract.py

echo '== Python module outline =='
ast-grep outline scripts/ci/materialize_base_python_requirements.py --items all || true

echo '== Trusted uv request and enforcement context =='
rg -n -C 14 --glob 'materialize_base_python_requirements.py' \
  'TRUSTED_UV_DOWNLOAD|Request\(|urlopen\(|ProxyHandler|HTTPRedirectHandler|timeout|read\(|sha256|checksum|version|extract' \
  scripts/ci/materialize_base_python_requirements.py

echo '== Trusted uv contract context =='
ast-grep outline tests/test_trusted_uv_download_contract.py --items all || true
rg -n -C 10 \
  'Request|urlopen|User-Agent|TRUSTED_UV_DOWNLOAD|ProxyHandler|HTTPRedirectHandler|timeout|sha256|version' \
  tests/test_trusted_uv_download_contract.py

echo '== Status-publication guard context =='
rg -n -C 16 --glob 'opencode-review-dispatch.yml' \
  'Publish repository_dispatch OpenCode status|github\.token|opencode-app|reviews|PR_HEAD_SHA|opencode-agent|APPROVED|CHANGES_REQUESTED|exit 1|exit 0|statuses|commit.status' \
  .github/workflows/opencode-review-dispatch.yml

echo '== Status-guard contract context =='
rg -n -C 10 \
  'github\.token|opencode-app|reviews|PR_HEAD_SHA|opencode-agent|APPROVED|CHANGES_REQUESTED|exit.?1|exit.?0|status' \
  tests/test_opencode_agent_contract.py

echo '== Live PR exact-head state =='
gh pr view "$pr" --repo "$repo" \
  --json number,state,isDraft,mergeable,headRefOid,baseRefOid,reviews,statusCheckRollup \
  --jq '{
    number,state,isDraft,mergeable,headRefOid,baseRefOid,
    reviews:[.reviews[]|{author:.author.login,state,commit:.commit.oid}],
    checks:[.statusCheckRollup[]|{name,status,conclusion,workflowName,headSha}]
  }'

echo '== Branch protection, if readable =='
gh api "repos/${repo}/branches/main/protection" \
  --jq '{
    required_status_checks: (.required_status_checks // null),
    required_pull_request_reviews: (.required_pull_request_reviews // null),
    enforce_admins: (.enforce_admins.enabled // null)
  }' || echo 'Branch-protection query was unavailable.'

Length of output: 156484


🏁 Script executed:

#!/bin/bash
set -euo pipefail

head='ac5665148bb113f92e97d2fc49a729bca2f050b5'
base='6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba'

echo '== Checkout and ancestry =='
printf 'checkout='; git rev-parse HEAD
printf 'merge_base='; git merge-base "$base" "$head"
printf 'base_ancestor='; git merge-base --is-ancestor "$base" "$head" && echo yes || echo no

echo '== Changed paths at exact revisions =='
git diff --name-status "$base" "$head"

echo '== Exact trusted uv diff =='
git diff --unified=25 "$base" "$head" -- \
  scripts/ci/materialize_base_python_requirements.py \
  tests/test_trusted_uv_download_contract.py

echo '== Exact trusted uv implementation =='
git show "${head}:scripts/ci/materialize_base_python_requirements.py" |
  nl -ba |
  sed -n '/TRUSTED_UV_DOWNLOAD/,/^[[:space:]]*def /p'

echo '== Exact trusted uv contract functions =='
git show "${head}:tests/test_trusted_uv_download_contract.py" |
  nl -ba |
  sed -n '/test_urlopen_receives_one_static_release_request/,/^[[:space:]]*def /p'

echo '== Exact status guard diff =='
git diff --unified=28 "$base" "$head" -- \
  .github/workflows/opencode-review-dispatch.yml \
  tests/test_opencode_agent_contract.py |
  sed -n '/Publish repository_dispatch OpenCode status/,+180p'

echo '== Exact status guard implementation =='
git show "${head}:.github/workflows/opencode-review-dispatch.yml" |
  nl -ba |
  sed -n '7828,7918p'

echo '== Exact status guard contract =='
git show "${head}:tests/test_opencode_agent_contract.py" |
  nl -ba |
  sed -n '1997,2053p'

Length of output: 12650


🏁 Script executed:

#!/bin/bash
set -euo pipefail

head='ac5665148bb113f92e97d2fc49a729bca2f050b5'
base='6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba'

numbered_range() {
  start="$1"
  end="$2"
  awk -v start="$start" -v end="$end" 'NR >= start && NR <= end { printf "%6d  %s\n", NR, $0 }'
}

echo '== Trusted uv downloader and enforcement =='
git show "${head}:scripts/ci/materialize_base_python_requirements.py" |
  numbered_range 55 285

echo '== Trusted uv request contract =='
git show "${head}:tests/test_trusted_uv_download_contract.py" |
  numbered_range 1 180

echo '== Exact cross-repository status guard =='
git show "${head}:.github/workflows/opencode-review-dispatch.yml" |
  numbered_range 7828 7918

echo '== Exact cross-repository status contract =='
git show "${head}:tests/test_opencode_agent_contract.py" |
  numbered_range 1997 2053

echo '== Strix exact diff and contracts =='
git diff --unified=30 "$base" "$head" -- \
  .github/workflows/strix.yml \
  tests/test_required_workflow_queue_contract.py \
  tests/test_strix_nvidia_nim_not_found_fallback.py

Length of output: 48876


@seonghobae I completed a read-only semantic review of exact head ac5665148bb113f92e97d2fc49a729bca2f050b5 against 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba.

I found no blocking source-level defect.

  • The checked-out commit matches the requested head.
  • The requested base is the exact merge base.

Trusted uv bootstrap

  • The request URL is a fixed HTTPS literal.
  • The request uses the fixed User-Agent value cwl-trusted-uv-materializer/1.
  • The code creates one static urllib.request.Request.
  • The code passes that request to one urlopen call.
  • The opener disables proxies.
  • The redirect handler rejects every redirect.
  • The response URL must remain https://releases.astral.sh on port 443.
  • The archive download has a 64 MiB bound.
  • The archive SHA-256 is checked before extraction.
  • The extracted executable has a 64 MiB bound.
  • The executable version must equal uv 0.12.1.
  • The static contract verifies the request URL and the fixed User-Agent.

Cross-repository commit-status limitation

  • When only github-token or opencode-app is available for a cross-repository target, the workflow reads the full paginated review history.
  • The skip path requires an OpenCode review bound to the exact PR_HEAD_SHA.
  • The accepted authors are opencode-agent[bot] and opencode-agent.
  • The accepted formal-review states are APPROVED and CHANGES_REQUESTED.
  • A review lookup failure exits with status 1.
  • Missing, stale, wrong-author, or wrong-state review evidence exits with status 1.
  • The temporary review-evidence file is removed through the EXIT trap.
  • The successful skip path exits before any commit-status write. It does not create substitute review evidence.
  • The regression contract covers the guard structure and both failure and skip paths.

Strix outage gate

  • Provider or backend unavailability now leaves the required Strix check failed.
  • The workflow no longer converts incomplete provider evidence into a neutral success.

Live evidence

  • PR #939 is open, mergeable, and points to the reviewed head.
  • The observed rollup contains terminal successful quality and security checks. Administrative cancellation checks are skipped.
  • The live review list is empty. Therefore, the live PR does not currently provide formal-review evidence.
  • GitHub returned HTTP 403 for the main branch-protection endpoint. I could not independently verify required-review or required-check policy.

I applied the existing exact-current-head evidence rule during this review. I did not modify repository state, approve, merge, release, dismiss reviews, or change protections.


🧠 Learnings used
Learnt from: seonghobae
Repo: ContextualWisdomLab/.github PR: 0
File: :0-0
Timestamp: 2026-08-05T13:44:10.007Z
Learning: For PR `#782`, only successful checks associated with the exact current head are valid merge evidence. Do not treat queued, in-progress, cancelled, predecessor-head, temporary-workflow, or administrative-bypass results as passing evidence. Before a formal approval, verify that the direct security and supply-chain workflows, the permanent hourly NVIDIA NIM contract, current-head reviews, unresolved-thread checks, and an independent approval have completed successfully.

You are interacting with an AI system.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Exact-current-head read-only review request for ac5665148bb113f92e97d2fc49a729bca2f050b5 against protected main@6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba.

This is now the canonical repair after closing superseded #943. Review the combined causal boundaries: fixed-origin static User-Agent for trusted uv bootstrap; proof of an exact-head formal OpenCode review before tolerating unavailable cross-repository status publication; and fail-closed Strix behavior when provider evidence is incomplete. Nine directly observed exact-head hosted workflows, including Trusted uv Materializer Quality CI, are terminal-success and no inline thread exists.

Do not transfer #943 evidence, update this branch, synthesize author approval, neutralize missing security evidence, or bypass protection.

@seonghobae
seonghobae enabled auto-merge (squash) August 12, 2026 10:46

Copy link
Copy Markdown
Contributor Author

Canonical exact-current-head review dispatch for ac5665148bb113f92e97d2fc49a729bca2f050b5 over protected main@6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba.

Review the combined root-cause repair only: fixed-origin static User-Agent for the trusted uv bootstrap; exact-head formal-review proof before tolerating unavailable cross-repository commit-status publication; and fail-closed Strix provider evidence. Trusted uv Materializer Quality CI, CodeQL PR, Python Security, Security Scan, SAST Semgrep, Secret Scan, OSV-Scanner PR, Scorecard PR, and SBOM Generation are terminal-success on this exact head. No review thread exists. #943 is historical and its evidence does not transfer.

Keep this request read-only. Do not update the branch, synthesize author approval, merge, release, neutralize missing security evidence, or weaken protection.

@coderabbitai review
@opencode-agent review
@cwl-noema-review review
@strix review

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Rate Limit Exceeded

@seonghobae have exceeded the limit for the number of chat messages per hour. Please wait 31 minutes and 25 seconds before sending another message.

Copy link
Copy Markdown
Contributor Author

@opencode-agent review
@cwl-noema-review review
@coderabbitai review

Review exact current head ac5665148bb113f92e97d2fc49a729bca2f050b5 against protected main@6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. This is the canonical combined repair after superseded #943 was closed. Validate: the fixed Astral archive request has one static repository-owned User-Agent while preserving literal URL, no-proxy/no-redirect, bounded bytes, checksum/member/version checks; cross-repository commit-status publication may be skipped only after the target PR API proves a formal OpenCode APPROVED or CHANGES_REQUESTED review anchored to the exact head, with review-fetch/missing-review paths failing closed; and Strix provider/backend unavailability remains failed incomplete security evidence, never a neutral success. All nine observed exact-head hosted workflows are terminal-success and there are no inline threads. Review only; do not mutate, merge, release, or bypass protections.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Rate Limit Exceeded

@seonghobae have exceeded the limit for the number of chat messages per hour. Please wait 29 minutes and 5 seconds before sending another message.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Reviewed. CHANGELOG + APA 7th doctoring for User-Agent pin, exact-head review proof before skipping cross-repo status, and fail-closed Strix outage. Local suite 976 passed x2. Auto-merge armed.

@opencode-agent opencode-agent 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.

Pull request overview

OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.

Findings

1. HIGH Current-head GitHub Checks - Fix failed required checks before approval

  • Problem: Failed same-head checks remain for 56dbb09ec79e2d4bb2df3ef6e84edb57ecf5783e.
  • Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
  • Fix: Read and fix the failed check logs below, then rerun the current-head checks.
  • Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.

Failed checks:

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow (2 files)"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow (2 files)"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file (2 files)"]
  S2 --> I2["repository behavior"]
  I2 --> R2["Review risk: Changed file (2 files)"]
  R2 --> V2["required checks"]
  Evidence --> S3["Docs: cross-repo-opencode-evidence.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> R3["Review risk: Docs: cross-repo-opencode-evidence.md"]
  R3 --> V3["docs review"]
  Evidence --> S4["CI script: materialize_base_python_requirements.py"]
  S4 --> I4["review and security gate shell path"]
  I4 --> R4["Review risk: CI script: materialize_base_python_requirements.py"]
  R4 --> V4["bash -n plus Strix self-test"]
  Evidence --> S5["Test (5 files)"]
  S5 --> I5["regression suite"]
  I5 --> R5["Review risk: Test (5 files)"]
  R5 --> V5["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

github-advanced-security[bot]

This comment was marked as resolved.

github-advanced-security[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review current head a0b48d2, including the trusted uv bootstrap, exact-head formal-review authority, and bounded Strix sandbox-scope guidance.

Copy link
Copy Markdown
Contributor Author

Fresh downstream coverage-evidence owner-path evidence from ContextualWisdomLab/nonnest2#84:

  • current consumer head: d75babd1fd7814a045f8538d8e9e4a16872d03fb on master@807f80c6a0b1f1d362eb9f398264de298bdd6b1c;
  • current protected-base semantic diff is limited to .jules/sentinel.md, R/icci.R, R/vuongtest.R, tests/testthat/test-input-validation.R;
  • historical OpenCode coverage failures occurred on heads 727f62b7497b8b14f62a8e9049ca3a9baa4d4028, 19607c6087284ec787af47490650a4140650215a, and 3d8848c97db6a2d132dbcb01923b401bbd6821f9 before the current head;
  • repository-owned R-CMD-check on predecessor 19607c... succeeded, while the central coverage sandbox failed before executing the suite because package imports such as CompQuadForm, mvtnorm, lavaan, and sandwich were unavailable. That predecessor result is historical only; it demonstrates the environment/closure failure class, not current-head GREEN.

Owner acceptance for the central lane: reproduce with an R package whose declared package imports are not present in the source-only review sandbox; classify missing unchanged dependency/runtime closure separately from a source test failure; materialize only a bounded authenticated dependency environment or emit a typed non-passing/deferred evidence state that cannot be mistaken for product test failure. Keep exact-head binding and fail closed—do not synthesize PASS from repository CI, install mutable sibling source, broaden network access, or weaken the approval prerequisite. After protected integration, rerun unchanged nonnest2#84 exact head (or its then-current descendant) and require actual test collection/execution plus the configured coverage/docstring contract before OpenCode approval.

seonghobae commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Fleet read-only evidence for the central workflow owner; no .github source/ref/PR-state was modified by this fleet writer.

Fresh cross-repository observation shows a broad required-check queue, so this is now a work-conservation/runner-admission acceptance item rather than a lane-local wait:

  • html4tree#594@e7722b203ff9cbfc5217f7cd4ff2ef12d8295ba1: CI 33835519645, Security 33835519718, SAST 33835519620, OSV 33835520315, Scorecard 33835519614 all remain queued.
  • nonnest2#123@389e346ee4e166d57c92bba8a024d331fb67dacd: R-CMD-check 33837262379, Security 33837262360, OSV 33837262650, Scorecard 33837262390 queued; SAST 33837262403 pending.
  • pg-erd-cloud#1073@7132575d1b776baa9993f432476a467d0e641934: CI 33837426021, Security 33837425996, SAST 33837426012, OSV 33837426274, Scorecard 33837425986 all queued.
  • xtrmLLMBatchPython#294@c5911436b6703217108089e68bd09e96e68ff59b: eleven pull-request workflows are simultaneously queued, including CI 33837774494, Security 33837774658, SAST 33837774709, OSV 33837775296, Scorecard 33837774563, plus both A2Z Compliance Check 33837774472 and A2Z Compliance Check (legacy) 33837774649.

The xtrm specimen also exposes a concrete duplicate-trigger candidate rather than just aggregate queue pressure: protected develop contains .github/workflows/a2z-compliance.yml (name A2Z Compliance Check, PR+push+weekly) and .github/workflows/validate-compliance.yml (name A2Z Compliance Check (legacy), PR+push+daily). The legacy workflow invokes validate_tasks.sh; repository A2Z documentation still says that script is integrated into CI, so deletion without moving that contract would be wrong. Treat this as a consolidation finding: preserve the script's valid enforcement/receipt semantics in one canonical/thin-caller path, then remove the duplicate legacy trigger rather than running both on every PR.

This does not by itself prove that the organization-wide 60-job ceiling is the cause. Please diagnose central admission/runner/concurrency telemetry before changing workflow semantics. Exact owner acceptance:

  1. distinguish GitHub-hosted concurrency/account ceiling, self-hosted runner starvation, reusable-workflow serialization, environment/concurrency-group blocking, and Actions service delay from source failures;
  2. if central workflow fan-out or redundant trigger topology is consuming the ceiling, add a deterministic regression for one logical PR/head causing only the intended central jobs and remove duplicate trigger paths at the canonical reusable owner rather than in consumers;
  3. keep cancel-in-progress semantics per workflow correctness: do not reintroduce cancellation where a CANCELLED required conclusion poisons the same-head rollup, but use safe cancellation/deduplication for non-required superseded work where it cannot leave a false required failure;
  4. prove RED→GREEN with queue/admission evidence on at least the exact heads above, then immutable .github release/consumer SHA propagation if reusable workflow behavior changes;
  5. no no-op retrigger, gate weakening, synthetic PASS, or consumer-local workaround.

Current #939 head observed by fleet is 4e3bfba5c87a70575ac64accbfe0b88ff6cac949; the PR body still contains older prose naming 6213f1e... as current in one section, so owner should keep exact-head traceability code-current while repairing the queue path.

Copy link
Copy Markdown
Contributor Author

Fresh downstream exact-head evidence to feed the central review/re-dispatch owner path:

  • consumer: ContextualWisdomLab/aFIPC#160@ba1a5e14c5080f74c02f5ea7917abd21b6f4c93b
  • historical exact-head Strix run/job: 33091065111 / 98583703578
  • central workflow source used by that run: .github@17052a7ca3c16db90932a4d6036b43165ddee418
  • failure class: the run selected direct provider/model fallbacks (nvidia_nim/..., openrouter/free, openai-direct/gpt-5.4); observed provider outcomes were NVIDIA 429/404, OpenRouter 502, and OpenAI 429 insufficient quota, so no authoritative Strix vulnerability evidence was produced.

Current .github/main is already materially newer and its Strix smoke contract now requires exactly contextual-orchestrator/orchestrator/free, with zero direct provider/model fallback. Therefore the remaining downstream problem is evidence regeneration, not an aFIPC source workaround.

Owner acceptance:

  1. Re-dispatch/reconcile Strix and any coupled model-backed required review for the unchanged aFIPC exact head through the current canonical central workflow; do not require a consumer no-op commit/push.
  2. Preserve orchestrator/free + gateway-only routing; no NVIDIA/OpenRouter/OpenAI direct selectors, paid fallback, provider/group/model hard-code, or consumer secrets.
  3. If the gateway/capability is unavailable, keep the required check fail-closed with typed infrastructure/capability evidence and route that defect to contextual-orchestrator; never synthesize PASS/neutral evidence.
  4. Preserve exact-head/source provenance and all actual security findings. A fresh terminal result must identify the current central workflow/source identity and the unchanged consumer head.
  5. Do not weaken required reviews/checks or treat the old provider-fallback failure as an aFIPC vulnerability.

I left .github source/refs/PR state untouched under its dedicated writer lease and moved the writable aFIPC PR back to Draft until current-head central evidence exists.

Copy link
Copy Markdown
Contributor Author

Fleet read-only owner-path evidence — do not treat this as a leaf-source failure.

Downstream target: ContextualWisdomLab/newsdom-api#791@10b85cce7b12b6c11d4a9817cba200fb1918e841, protected base develop@e06b1f3fb10903569124af011da213951e6e2473.

After a real source/test/docs descendant, every newly materialized exact-head hosted gate remained non-terminal on a fresh reread: tests 33908836843 queued, codeql 33908836910 queued, ClusterFuzzLite 33908836854 queued, container-image 33908836836 queued, Security Scan 33908836822 queued, SAST 33908837011 pending, CodeQL PR 33908836983 queued, Scorecards 33908836920 queued. The consumer PR remains Draft and no predecessor GREEN is being transferred.

Owner RED: an authenticated, mergeable consumer exact head can materialize all required runs yet obtain no terminal exact-head build/security evidence, so repository-local source correctness cannot advance to protected merge/release evidence.

Owner GREEN acceptance: on the unchanged target SHA above, central scheduling/materialization must progress through runner assignment and exact checkout to terminal results (or a typed fail-closed infrastructure conclusion identifying the causal control-plane limitation). Preserve required checks and exact-head provenance; do not solve this with leaf no-op commits, blind reruns, gate weakening, synthetic PASS, or provider/model fallback. If the current central branch has intervened, adopt it and prove the repair with the same immutable downstream SHA before claiming the queue class fixed.

Copy link
Copy Markdown
Contributor Author

Blocked on a policy contradiction, not a merge mechanic — not resolving it unilaterally

This PR is dirty against main. I resolved the mechanical parts of a sibling PR today and started on this one, then stopped: one of the five conflicts is a direct, deliberate disagreement about the same setting, and picking either side silently discards a decision someone made on purpose.

The contradiction

.github/workflows/pr-review-merge-scheduler.yml, concurrency:

value stated reason
this PR cancel-in-progress: false "scan-pr-queue is a required check. Cancelling an in-flight same-head run leaves a CANCELLED required conclusion that stays in the rollup after a later success, so the PR looks failed with zero failed jobs."
main (current) cancel-in-progress: ${{ github.event_name == 'pull_request_target' || github.event_name == 'pull_request_review' || github.event_name == 'repository_dispatch' }} "scheduler cancels stale PR/review/manual queue scans instead of accumulating merge/update attempts"

Both sides carry contract tests asserting their version — scripts/ci/test_strix_quick_gate.sh and tests/test_required_workflow_queue_contract.py::test_merge_scheduler_does_not_cancel_required_queue_scans here, and the mirrored assertions on main. So this is not drift; each was written to be enforced.

Both failure modes are real, and today's measurements confirm both

This is what stopped me, because the day's evidence supports each side:

  • This PR's concern is confirmed, not theoretical. FAILED_CHECK_CONCLUSIONS (scripts/ci/pr_review_merge_scheduler_core.py:343) counts CANCELLED alongside FAILURE. So a cancelled required check genuinely does block the scheduler, and genuinely does produce "red PR, zero failed jobs" — I verified exactly that shape on fix: retry Strix provider tool protocol failures #933 today: 22 check runs, 20 cancelled, 2 skipped, zero failure, rollup success, and an automated triage pass read it as a real CI failure.
  • main's direction fights the larger problem. The org is at ~55/60 running jobs, and 62% of cancelled jobs had not been assigned a runner — so their cancellation costs nothing real while their accumulation costs queue depth. Under the review livelock, not cancelling is expensive.

main's version carries no comment acknowledging the cancelled-conclusion failure mode — I checked the whole file. So I cannot tell whether that tradeoff was accepted deliberately or simply not known when the conditional landed. That distinction decides the resolution, and I do not have it.

Why I am not just picking one

Resolving toward main re-opens a false-red mode that this PR exists to close, on a required check, across every repository. Resolving toward this PR re-opens unbounded scan accumulation into a queue that is already saturated. Neither is a merge conflict in the ordinary sense — the text overlap is incidental to a genuine design disagreement, and a clean-looking resolution would bury it.

The likely correct answer is neither as written: cancel to protect the queue and stop a cancelled required conclusion from persisting as a false red. That is a change to the gate's semantics, not a conflict resolution.

What would unblock this

A direction on one question: was the cancelled-conclusion cost accepted when the conditional landed on main, or overlooked? If accepted, I will resolve toward main and close this PR's concern as knowingly traded away. If overlooked, the two need reconciling as their own change and this PR should rebase behind it.

The other four conflicts here are mechanical and I will take them with whichever direction is chosen — including a REVIEW_DISPATCH_BLOB_SHA pin where, as on #1187, neither side is correct and the value must be recomputed from the merged workflow.

One methodology note

I picked this PR because it measured as small: 5 conflicts, 76 conflicted lines, zero unresolved review threads. Line count turned out to be a poor proxy for difficulty — the smallest hunk in the set was the one carrying a policy decision, while a 2,900-line conflict elsewhere was mostly mechanical. Worth remembering when triaging conflicts by size.


Generated by Claude Code

seonghobae and others added 2 commits September 6, 2026 02:13
Five conflicts. Main's side taken throughout, because this branch's central
change — `cancel-in-progress: false` on the merge scheduler — is against a file
main has since rewritten and a design main deliberately replaced:

  merge-base 07d9ec2 (2026-09-04)
  main's delta to .github/workflows/pr-review-merge-scheduler.yml: +36 / -785
  the conditional came from 26cfc33, "ci(scheduler): stop required-check
  completion fanout" (#1840)

This branch's rationale — a CANCELLED required `scan-pr-queue` stays red in the
rollup after a later same-head success — is real, but #1840 is main's answer to
that class and it is the newer one. The matching pins in
`scripts/ci/test_strix_quick_gate.sh` and `tests/test_opencode_agent_contract.py`
follow the same choice.

`tests/test_required_workflow_queue_contract.py` also went to main's side: this
branch's `test_close_empty_pr_metadata_lookup_retries_and_fails_open` reads
`.github/workflows/close-empty-pr.yml`, which main deleted after moving that
cleanup into the scheduler's existing metadata-only job — the exact change
main's replacement test records.

REVIEW_DISPATCH_BLOB_SHA recomputed against the merged dispatch workflow:
c03c5ae…

Two repairs the conflict markers did not surface:

- `tests/test_opencode_agent_contract.py` — four assertions referencing
  `concurrency_match` auto-merged in from this branch while the block that
  defined that name went to main's side, leaving undefined names (caught by
  `ruff --select F821`). Main's version of that test ends before them, so they
  were removed with it.

- `tests/test_required_workflow_queue_contract.py` — the automatic merge built a
  chimera of `test_merge_scheduler_uses_native_auto_merge_after_required_checks`:
  main's `def` line with this branch's body asserting `cancel-in-progress:
  false`. The branch does not contain that test at all (it renamed it), so no
  conflict was raised. Restored main's function verbatim.

Verified against this branch's unmerged head, comparing failure names rather
than counts — which mattered here, since a first pass showed 1 failed on both
sides while having swapped which test failed:

  unmerged head   1 failed, 2780 passed
  after merge     0 failed, 2897 passed
  introduced: 0   fixed: 1
    (test_opencode_bootstrap_required_checks_do_not_serialize_runner_waits)

coverage 100%, interrogate 100%, `ruff check --select F821` clean, zero
conflict markers.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

@opencode-agent opencode-agent 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.

Pull request overview

OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.

Findings

1. HIGH Current-head GitHub Checks - Fix failed required checks before approval

  • Problem: Failed same-head checks remain for 0db992904dd4be91e1faae01bab3a6ff8ba01e3d.
  • Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
  • Fix: Read and fix the failed check logs below, then rerun the current-head checks.
  • Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.

Failed checks:

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: opencode-review-dispatch.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: opencode-review-dispatch.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["Workflow: strix.yml"]
  S2 --> I2["GitHub Actions review job"]
  I2 --> R2["Review risk: Workflow: strix.yml"]
  R2 --> V2["actionlint plus required checks"]
  Evidence --> S3["Repository file: CHANGELOG.md"]
  S3 --> I3["repository behavior"]
  I3 --> R3["Review risk: Repository file: CHANGELOG.md"]
  R3 --> V3["required checks"]
  Evidence --> S4["Docs: base-requirements-lock-discovery.md (3 files)"]
  S4 --> I4["operator or user guidance"]
  I4 --> R4["Review risk: Docs: base-requirements-lock-discovery.md (3 files)"]
  R4 --> V4["docs review"]
  Evidence --> S5["CI script: strix_quick_gate.sh"]
  S5 --> I5["review and security gate shell path"]
  I5 --> R5["Review risk: CI script: strix_quick_gate.sh"]
  R5 --> V5["bash -n plus Strix self-test"]
  Evidence --> S6["CI script: test_strix_quick_gate.sh"]
  S6 --> I6["review and security gate shell path"]
  I6 --> R6["Review risk: CI script: test_strix_quick_gate.sh"]
  R6 --> V6["bash -n plus Strix self-test"]
  Evidence --> S7["Test: test_materialize_base_python_requirement_paths.py (4 files)"]
  S7 --> I7["regression suite"]
  I7 --> R7["Review risk: Test: test_materialize_base_python_requirement_paths.py (4 files)"]
  R7 --> V7["targeted test run"]
Loading

Copy link
Copy Markdown
Contributor Author

Fresh production canary from .github#2106@611ccd73460ab0188e0085956ade6180bb28a91a belongs to this bounded/authenticated Strix scope owner rather than #1563's attempt-completion semantics.

Required Strix run 34742109546, job 103684345530 completed a real 4547s scan. The scanner reported real baseline findings in scripts/ci/pingora_edge_policy.py and scripts/ci/contextual_orchestrator_review_policy.py, but neither path is in GitHub's actual seven-file PR delta for #2106. The gate logged Unable to compute PR merge base; falling back to direct base/head diff and later classified the result as Strix finding intersects files changed in this pull request.

Source inspection explains the attribution failure: load_pull_request_changed_files() currently populates both CHANGED_FILES and PULL_REQUEST_CHANGED_FILES from the same merge-base/direct-diff fallback. Therefore merely switching the final block_changed loop to the second array would not repair the production case. A direct-diff fallback may be useful as bounded scan context, but it cannot become authoritative PR-authorship evidence when merge-base/provenance is unavailable.

Acceptance for this lane:

  • obtain an authenticated exact-PR changed-file inventory (GitHub PR-files identity or an equivalently authenticated/materialized receipt) and make only that inventory authoritative for block_changed;
  • keep broader bounded support/dependency context available to the scanner and preserve baseline findings from that context;
  • if authoritative changed-file identity cannot be proved, fail closed as scope/evidence integrity or context-insufficient — do not relabel support/context findings as PR-source findings and do not synthesize GREEN;
  • regression: actual changed file A + unchanged vulnerable support file B + unavailable/stale merge-base. B remains auditable evidence but must not become block_changed; the same finding located in authenticated A must still block.

This is consistent with #939's existing immutable changed-file/source-material boundary and its prior rule that omitted/bounded context must not be converted into fabricated source vulnerability claims. No new PR is needed. Current #939 head is 0db992904dd4be91e1faae01bab3a6ff8ba01e3d; fresh comparison to protected main@64f483db9d052322c65bcdf1675d66138156f306 is diverged 35 ahead / 93 behind from merge base fe827e133e7d867015d088777553e22736344c55, so preserve its valid delta and reconcile ordinary/non-force before implementation/review evidence can authorize merge.

Copy link
Copy Markdown
Contributor Author

Production RED: Strix PR-source attribution must not reuse scan-context diff

Fresh protected main@64f483db9d052322c65bcdf1675d66138156f306 still initializes both CHANGED_FILES and PULL_REQUEST_CHANGED_FILES from the same local git diff inside load_pull_request_changed_files(). When base...head cannot establish the merge base, the gate falls back to direct base..head and then copies that fallback result into both arrays. The later SARIF gate therefore cannot distinguish support/dependency files present only because the bounded scan context widened from files the PR actually changed.

Production canary remains .github#2106@611ccd73460ab0188e0085956ade6180bb28a91a: required Strix run 34742109546 reported baseline findings in support files outside #2106's seven-path product delta after fallback scope expansion. Preserve the findings, but do not attribute them to the PR unless they intersect an authenticated GitHub PR changed-file receipt.

Acceptance for this owner:

  • obtain the authoritative PR changed-file set from live authenticated GitHub PR metadata/API (complete pagination/count or fail closed), bound to the already-admitted repository/PR/base/head tuple;
  • keep a separate, possibly wider bounded scan-context/dependency set for scanner materialization;
  • block_changed may use only the authoritative PR changed-file set;
  • if the authoritative set is incomplete/unavailable, do not silently substitute merge-base/direct-diff scope; fail closed or classify attribution unavailable;
  • regression: a support file included by scan-context fallback but absent from the authenticated PR changed set may still produce a finding, but must not become block_changed; an actual changed-file finding must still fail closed.

Keep this PR Draft until current protected-main reconciliation is done; do not duplicate the contract into #1563 or the BandScope leaf.

Copy link
Copy Markdown
Contributor Author

@OpenCode repair this existing canonical PR only if codex/fix-cross-repo-opencode-evidence is still at exact head 0db992904dd4be91e1faae01bab3a6ff8ba01e3d. First read/adopt intervening protected main@64f483db9d052322c65bcdf1675d66138156f306; preserve the current #939 semantic delta with an ordinary non-force reconciliation—no rebase, force-push, squash reconstruction, gate weakening, or new micro-PR.

Then implement the production RED from .github#2106@611ccd73460ab0188e0085956ade6180bb28a91a, Strix run 34742109546 / job 103684345530: load_pull_request_changed_files() currently fills both CHANGED_FILES and PULL_REQUEST_CHANGED_FILES from the same merge-base/direct-diff fallback, so support/context files can be misattributed as PR-authored findings.

Required fix:

  • separate the bounded scanner/context file set from the authoritative PR changed-file receipt;
  • obtain the authoritative set from authenticated GitHub PR Files metadata/API with complete pagination/count validation, bound to repository + PR number + live base SHA + live head SHA already admitted by the workflow;
  • do not silently fall back to local merge-base/direct diff for PULL_REQUEST_CHANGED_FILES; if the authenticated receipt is unavailable/incomplete/stale, fail closed as attribution/scope evidence unavailable;
  • block_changed may use only the authenticated PR changed set, while broader support/dependency files remain available to Strix and their findings remain auditable;
  • reuse or extract the existing proven GitHub changed-file pagination contract already present in protected main (for example noema_review_gate.fetch_changed_files() / Pingora changed-file pagination) instead of introducing another inconsistent parser where practical;
  • add a test-first production-shaped regression: actual changed file A + vulnerable support file B included only by fallback/context. B's finding is preserved but must not become block_changed; the same finding in authenticated A must block. Include stale/mismatched head/base and incomplete pagination/count fail-closed cases.

Run the focused RED→GREEN tests, bash -n, the complete scripts/ci/test_strix_quick_gate.sh harness and applicable repository quality/security checks on the resulting exact head. Warnings/deprecations require causal repair, not suppression. Return the exact new head and first causal failure or GREEN evidence. Keep the PR Draft after source succession; predecessor checks/reviews do not transfer.

Copy link
Copy Markdown
Contributor Author

@opencode-agent repair

Repair this existing canonical PR only if codex/fix-cross-repo-opencode-evidence is still exact head 0db992904dd4be91e1faae01bab3a6ff8ba01e3d. The previous repair instruction used an ambiguous agent mention; this one deliberately targets the repository OpenCode agent.

First read and adopt intervening protected main@64f483db9d052322c65bcdf1675d66138156f306. Reconcile by an ordinary two-parent/non-force merge while preserving every still-valid #939 semantic delta. Do not rebase, force-push, squash-reconstruct, close the PR, weaken a gate, or create a new micro-PR.

Production RED remains .github#2106@611ccd73460ab0188e0085956ade6180bb28a91a, Strix run 34742109546 / job 103684345530: scan-support/context files can enter the bounded scanner workspace through merge-base/direct-diff fallback and are then incorrectly treated as PR-authored because CHANGED_FILES and PULL_REQUEST_CHANGED_FILES share the same local-diff authority.

Implement one authenticated changed-file authority for merge blocking:

  • bind the complete paginated GitHub PR Files receipt to repository + PR number + live base SHA + live head SHA;
  • use that authenticated set as the only block_changed attribution authority;
  • keep the broader bounded dependency/support context available to Strix, but separate from PR-authored identity;
  • fail closed as attribution-evidence-unavailable on incomplete pagination/count, stale base/head, API failure, or identity mismatch; never silently substitute local git diff for authorship attribution;
  • regression: vulnerable support file present only in scan context => finding preserved but not block_changed; same finding in authenticated PR-changed file => fail closed;
  • reuse/extract the existing Noema/Pingora paginated changed-file contract instead of introducing a second parser when practical.

After reconciliation/fix, run focused Strix contracts plus the repository full Python suite with deprecations as errors, py_compile/compileall as applicable, git diff --check, and report the exact new head/parents. Keep the PR Draft until fresh hosted checks and independent review settle.

Copy link
Copy Markdown
Contributor Author

@opencode-agent repair

The exact branch guard still holds at 0db992904dd4be91e1faae01bab3a6ff8ba01e3d, but the previous repair request named a now-stale protected-main tip. Re-read live protected main@d6cf5726cebfd031d0d11989b6fa34aab43452d0 before writing. Current comparison is 35 ahead / 94 behind from merge-base fe827e133e7d867015d088777553e22736344c55; preserve every still-valid #939 delta and all 94 intervening protected-main changes through ordinary two-parent/non-force reconciliation. Do not rebase, force-push, squash-reconstruct, close, weaken gates, or open another micro-PR.

The production RED remains present on the current protected tip: scripts/ci/strix_quick_gate.sh::load_pull_request_changed_files() still appends the same local diff result into both CHANGED_FILES and PULL_REQUEST_CHANGED_FILES. Therefore a support/dependency file admitted only to the wider scanner context can still be misattributed as PR-authored when block_changed is evaluated. .github#2106@611ccd73460ab0188e0085956ade6180bb28a91a, Strix run 34742109546 / job 103684345530, remains the production-shaped canary.

Implement test-first on the reconciled current tree:

  • keep scanner/context files and authoritative PR-authored files as distinct data sets;
  • derive PR-authored files only from authenticated GitHub PR Files metadata/API, with complete pagination/count validation and binding to repository + PR number + admitted live base SHA + admitted live head SHA;
  • if that authenticated receipt is unavailable, incomplete, or stale, fail closed as attribution/scope evidence unavailable; never substitute merge-base/direct-diff output for authorship;
  • keep broader support/dependency files available to Strix and preserve their findings for audit, but block_changed may intersect only the authenticated PR-authored set;
  • reuse/extract the existing scripts/ci/noema_review_gate.py::fetch_changed_files()/Pingora pagination contract where practical instead of creating a third inconsistent parser;
  • RED/GREEN fixtures must cover actual changed file A + vulnerable support-only file B, B finding preserved but not block_changed, the same finding on authenticated A still blocking, pagination/count incompleteness, and stale/mismatched base/head.

Run the focused regressions, bash -n, complete scripts/ci/test_strix_quick_gate.sh, and applicable repository quality/security suites on the resulting exact head. Keep this PR Draft after source movement; predecessor checks/reviews do not transfer. Return the new exact head and the first causal RED if any gate remains non-green.

Copy link
Copy Markdown
Contributor Author

Intervening protected-main delta arrived after the repair instruction: live main is now 78393ea901efc0d57b35dd1e383e473425b7c1da via #2163, two commits ahead of the d6cf5726... snapshot. Read/adopt it rather than treating it as a race. The delta changes CHANGELOG.md, docs/adr/0003-contextual-orchestrator-vendored-free-zdr.md, scripts/ci/contextual_orchestrator_review_sidecar.sh, and tests/test_contextual_orchestrator_review_sidecar_contract.py; only CHANGELOG.md overlaps the current #939 semantic diff, so preserve both changelog lineages explicitly during ordinary reconciliation. The authenticated PR-files attribution RED/acceptance contract in the immediately preceding repair request is unchanged. Re-read live main again immediately before creating any merge/source commit; no force/rebase.

Copy link
Copy Markdown
Contributor Author

@opencode-agent fix

Work only on canonical PR #939, and only if codex/fix-cross-repo-opencode-evidence is still exact head 0db992904dd4be91e1faae01bab3a6ff8ba01e3d. Re-read live protected main immediately before writing; at this dispatch it is 78393ea901efc0d57b35dd1e383e473425b7c1da, 96 commits ahead of merge-base fe827e133e7d867015d088777553e22736344c55. Do not create a successor/micro-PR unless ordinary reconciliation is mechanically impossible.

First ordinary/non-force reconcile protected main into the existing branch. Preserve still-valid #939 regressions/docs; when an old overlapping code delta is already superseded by protected main, keep the newer protected implementation rather than resurrecting stale code. Do not rebase, force-push, squash-reconstruct, close, weaken gates, or self-approve.

Then repair the verified Strix attribution defect test-first on the reconciled tree. scripts/ci/strix_quick_gate.sh::load_pull_request_changed_files() currently derives both scan-context CHANGED_FILES and merge-blocking PULL_REQUEST_CHANGED_FILES from the same local git diff. Production canary: .github#2106@611ccd73460ab0188e0085956ade6180bb28a91a, Strix run 34742109546 / job 103684345530, where support/dependency context was misattributed as PR-authored.

Acceptance:

  • scanner/support context and PR-authored identity are separate sets;
  • block_changed uses only a complete authenticated GitHub PR Files receipt, bound to target repository + PR number + live base SHA + live head SHA;
  • validate pagination/count completeness and revalidate live PR base/head identity before accepting the receipt;
  • missing/incomplete/stale/API-failed attribution evidence fails closed; never substitute merge-base/direct-diff output for authorship;
  • support-only vulnerable file remains reported/auditable but is not block_changed; the same finding in an authenticated PR-changed file still blocks;
  • add RED→GREEN regressions for support-only vs authored finding, incomplete pagination/count, stale base/head, and repository/PR identity mismatch;
  • reuse/extract the existing Noema/Pingora changed-file pagination contract where practical instead of a third inconsistent parser.

Run focused tests, full scripts/ci/test_strix_quick_gate.sh, bash -n, applicable Python suite with deprecations treated as errors, compile checks, and git diff --check. Keep PR Draft after source movement. Report exact new head, both merge parents, and first remaining causal RED; predecessor checks/reviews do not transfer.

Copy link
Copy Markdown
Contributor Author

Control-plane correction for the preceding request: current protected scripts/ci/agent_mention_router.py treats @opencode-agent as a review-only dispatch (agent-mention-opencode); trailing words such as fix or repair are not parsed as source-mutation commands. Therefore comment 5653800694 is an exact repair specification/review request only and MUST NOT be counted as source-writer invocation or repair progress. Source progress for #939 remains zero until this branch actually moves from 0db992904dd4be91e1faae01bab3a6ff8ba01e3d through an ordinary/non-force current-main reconciliation and the authenticated PR-files attribution RED→GREEN is committed. Do not repeat mention-only requests to simulate progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: operations Operability, observability, readiness, SLO, backup, or retention bug Something isn't working merge: urgent-review Central or critical pull request requiring immediate review attention priority: critical Immediate blocker, P0, urgent deadlock, or critical incident status: blocked Blocked by conflict, dependency, or required prerequisite type: bug Defect or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants