Skip to content

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

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

fix: keep cross-repo OpenCode evidence healthy#939
seonghobae wants to merge 23 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 f74e4f7114487adcd77f24b9fc1a27505d92d46c. 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.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

교차 저장소 상태 공개, Python lock materialization, trusted uv 다운로드, Strix 제공자 증거 처리를 fail-closed 방식으로 변경했다. 관련 계약 테스트와 운영 문서를 갱신했다.

Changes

OpenCode 리뷰 검증

Layer / File(s) Summary
정확한 HEAD 리뷰 검증과 계약 테스트
.github/workflows/opencode-review-dispatch.yml, tests/test_opencode_agent_contract.py
정확한 PR_HEAD_SHA의 공식 OpenCode 리뷰만 상태 공개 생략 근거로 인정한다. 조회 실패나 유효한 리뷰 부재 시 종료 코드 1을 반환한다.

신뢰된 Python lock materialization

Layer / File(s) Summary
Lock 검증과 고정 다운로드 요청
scripts/ci/materialize_base_python_requirements.py, tests/test_materialize_base_python_requirements.py, tests/test_trusted_uv_download_contract.py, AGENTS.md, CHANGELOG.md, docs/doctoring/cross-repo-opencode-evidence.md
요구사항 입력은 완전한 SHA-256 고정 또는 제한된 상대 -r/--requirement include만 허용한다. uv 다운로드는 고정 URL과 TRUSTED_UV_DOWNLOAD_USER_AGENT를 포함한 정적 Request 객체를 사용한다.

Strix 증거 게이트

Layer / File(s) Summary
제공자 장애 fail-closed 처리
.github/workflows/strix.yml, tests/test_required_workflow_queue_contract.py, tests/test_strix_nvidia_nim_not_found_fallback.py
백엔드 또는 제공자 장애로 증거가 불완전하면 필수 검사를 종료 코드 1로 실패한다. NVIDIA NIM 404 신호와 중립 성공 분기 제거를 검증한다.
내부 PR 지침 전달
scripts/ci/strix_quick_gate.sh, tests/test_strix_internal_scope_instruction_contract.py
내부 PR 범위에서만 정적 Strix 지침을 선택하고, 자식 프로세스에 환경변수와 --instruction 인자로 전달한다.

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

Merge Risk: 🟡 Moderate · up to 329c4

Nested lock files may be skipped during dependency evidence collection, which can leave trusted coverage bootstrap evidence incomplete; merge should wait until the collection logic handles repository-relative lock-file paths correctly.

Possibly related issues

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 86.96% which is sufficient. The required threshold is 80.00%.
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 증거 검증 변경을 정확히 설명하며, 간결하고 주요 변경 사항과 관련됩니다.
✨ 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.

Cite RFC 9110 and NIST SP 800-53 for the static User-Agent, exact-head
review proof, and Strix incomplete-evidence failure. Isolate Darwin
installer tests on the linux x86_64 path.
@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.

Materialize a base Python lock only when every package line is an exact
SHA-256 pin or a two-token relative -r/--requirement include of a
candidate lock path. A lone --require-hashes directive, ./dotted paths,
and -r other-hashes.txt no longer enter the trusted build context.
@coderabbitai

coderabbitai Bot commented Aug 15, 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='38cb3b9c4dd9febc475ecdc2f71c0c354032be5c'
base='6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba'

echo '== Revision identity and ancestry =='
git cat-file -e "${head}^{commit}"
git cat-file -e "${base}^{commit}"
printf 'checkout='; git rev-parse HEAD
printf 'merge_base='; git merge-base "$base" "$head"
printf 'base_is_ancestor='; git merge-base --is-ancestor "$base" "$head" && echo yes || echo no

echo '== Scoped changes =='
git diff --name-status "$base" "$head" -- \
  scripts/ci/materialize_base_python_requirements.py \
  .github/workflows/opencode-review-dispatch.yml \
  .github/workflows/strix.yml \
  scripts/ci/strix_quick_gate.sh \
  tests/test_materialize_base_python_requirements.py \
  tests/test_materialize_base_python_requirement_paths.py \
  tests/test_trusted_uv_download_contract.py \
  tests/test_opencode_agent_contract.py \
  tests/test_required_workflow_queue_contract.py \
  tests/test_strix_nvidia_nim_not_found_fallback.py \
  tests/test_strix_internal_scope_instruction_contract.py

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

echo '== Trusted uv and requirements collector =='
git show "${head}:scripts/ci/materialize_base_python_requirements.py" |
  nl -ba | sed -n '40,365p;475,545p'

echo '== Trusted uv and lock-discovery contracts =='
for file in \
  tests/test_trusted_uv_download_contract.py \
  tests/test_materialize_base_python_requirements.py \
  tests/test_materialize_base_python_requirement_paths.py
do
  echo "--- ${file}"
  git show "${head}:${file}" |
    rg -n -C 8 'Request|User-Agent|urlopen|ProxyHandler|HTTPRedirectHandler|sha256|64 \* 1024|version|base_hash_locks|_is_candidate_lock_path|requirements/ci\.txt|service/requirements/package\.txt|relative'
done

echo '== OpenCode status guard and contract =='
git show "${head}:.github/workflows/opencode-review-dispatch.yml" |
  rg -n -C 18 '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'
git show "${head}:tests/test_opencode_agent_contract.py" |
  rg -n -C 10 'reviews|PR_HEAD_SHA|opencode-agent|APPROVED|CHANGES_REQUESTED|exit.?1|exit.?0|status'

echo '== Strix controls and contracts =='
for file in \
  .github/workflows/strix.yml \
  scripts/ci/strix_quick_gate.sh \
  tests/test_required_workflow_queue_contract.py \
  tests/test_strix_nvidia_nim_not_found_fallback.py \
  tests/test_strix_internal_scope_instruction_contract.py
do
  echo "--- ${file}"
  git show "${head}:${file}" |
    rg -n -i -C 10 'provider|backend|unavailable|not found|nim|quota|token limit|incomplete|neutral|exit 1|exit 0|instruction|internal.*scope|sandbox|caller'
done

echo '== PR head, reviews, and checks =='
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}]}'

echo '== Unresolved review threads, first page =='
gh api graphql \
  -F owner='ContextualWisdomLab' -F name='.github' -F number="$pr" \
  -f query='query($owner:String!,$name:String!,$number:Int!){repository(owner:$owner,name:$name){pullRequest(number:$number){reviewThreads(first:100){nodes{isResolved isOutdated path line} pageInfo{hasNextPage}}}}}' \
  --jq '{unresolved:[.data.repository.pullRequest.reviewThreads.nodes[]|select(.isResolved|not)|{path,line,isOutdated}],hasNextPage:.data.repository.pullRequest.reviewThreads.pageInfo.hasNextPage}'

echo '== Exact-head runs for requested workflows =='
for workflow in \
  'Trusted uv Materializer Quality CI' 'Strix' 'CodeQL PR' 'Python Security' \
  'Security Scan' 'SAST Semgrep' 'Secret Scan' 'OSV-Scanner PR' \
  'Scorecard PR' 'SBOM Generation'
do
  echo "--- ${workflow}"
  gh run list --repo "$repo" --workflow "$workflow" --commit "$head" --limit 10 \
    --json status,conclusion,headSha,workflowName,url \
    --jq '.[]|{status,conclusion,headSha,workflowName,url}' || true
done

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)}' || true

Length of output: 7992


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/.github'
pr='939'
head='38cb3b9c4dd9febc475ecdc2f71c0c354032be5c'

show_range() {
  local file="$1" start="$2" end="$3"
  git show "${head}:${file}" |
    awk -v start="$start" -v end="$end" 'NR >= start && NR <= end { printf "%6d  %s\n", NR, $0 }'
}

echo '== Trusted uv download, verification, and requirements discovery =='
show_range scripts/ci/materialize_base_python_requirements.py 40 365
show_range scripts/ci/materialize_base_python_requirements.py 475 545

echo '== Trusted uv request and requirements discovery contracts =='
for file in \
  tests/test_trusted_uv_download_contract.py \
  tests/test_materialize_base_python_requirements.py \
  tests/test_materialize_base_python_requirement_paths.py
do
  echo "--- ${file}"
  git show "${head}:${file}" |
    rg -n -C 8 'Request|User-Agent|urlopen|ProxyHandler|HTTPRedirectHandler|sha256|64 \* 1024|version|base_hash_locks|_is_candidate_lock_path|requirements/ci\.txt|service/requirements/package\.txt|relative'
done

echo '== Exact OpenCode status-publication guard and contract =='
git show "${head}:.github/workflows/opencode-review-dispatch.yml" |
  rg -n -C 20 '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'
git show "${head}:tests/test_opencode_agent_contract.py" |
  rg -n -C 10 'reviews|PR_HEAD_SHA|opencode-agent|APPROVED|CHANGES_REQUESTED|exit.?1|exit.?0|status'

echo '== Strix failure and internal-scope controls =='
for file in \
  .github/workflows/strix.yml \
  scripts/ci/strix_quick_gate.sh \
  tests/test_required_workflow_queue_contract.py \
  tests/test_strix_nvidia_nim_not_found_fallback.py \
  tests/test_strix_internal_scope_instruction_contract.py
do
  echo "--- ${file}"
  git show "${head}:${file}" |
    rg -n -i -C 10 'provider|backend|unavailable|not found|nim|quota|token limit|incomplete|neutral|exit 1|exit 0|instruction|internal.*scope|sandbox|caller'
done

echo '== Direct static counts =='
materializer="$(git show "${head}:scripts/ci/materialize_base_python_requirements.py")"
printf 'Request constructions: '; printf '%s\n' "$materializer" | grep -c 'urllib\.request\.Request('
printf 'urlopen calls: '; printf '%s\n' "$materializer" | grep -c 'urllib\.request\.urlopen('
printf 'classifier calls within base_hash_locks: '
printf '%s\n' "$materializer" | awk '/^def base_hash_locks\(/,/^def /' | grep -c '_is_candidate_lock_path('

echo '== Current PR state, reviews, and rollup =='
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}]}'

echo '== Unresolved review threads, first page =='
gh api graphql \
  -F owner='ContextualWisdomLab' -F name='.github' -F number="$pr" \
  -f query='query($owner:String!,$name:String!,$number:Int!){repository(owner:$owner,name:$name){pullRequest(number:$number){reviewThreads(first:100){nodes{isResolved isOutdated path line} pageInfo{hasNextPage}}}}}' \
  --jq '{unresolved:[.data.repository.pullRequest.reviewThreads.nodes[]|select(.isResolved|not)|{path,line,isOutdated}],hasNextPage:.data.repository.pullRequest.reviewThreads.pageInfo.hasNextPage}'

echo '== Exact-head workflow runs =='
for workflow in \
  'Trusted uv Materializer Quality CI' 'Strix' 'CodeQL PR' 'Python Security' \
  'Security Scan' 'SAST Semgrep' 'Secret Scan' 'OSV-Scanner PR' \
  'Scorecard PR' 'SBOM Generation'
do
  echo "--- ${workflow}"
  gh run list --repo "$repo" --workflow "$workflow" --commit "$head" --limit 10 \
    --json status,conclusion,headSha,workflowName,url \
    --jq '.[]|{status,conclusion,headSha,workflowName,url}' || true
done

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)}' || true

Length of output: 112772


🏁 Script executed:

#!/bin/bash
set -u

repo='ContextualWisdomLab/.github'
pr='939'
head='38cb3b9c4dd9febc475ecdc2f71c0c354032be5c'

show_range() {
  local file="$1" start="$2" end="$3"
  git show "${head}:${file}" |
    awk -v start="$start" -v end="$end" 'NR >= start && NR <= end { printf "%6d  %s\n", NR, $0 }'
}

echo '== Materializer request and path classifier =='
show_range scripts/ci/materialize_base_python_requirements.py 40 125
show_range scripts/ci/materialize_base_python_requirements.py 215 330
show_range scripts/ci/materialize_base_python_requirements.py 475 535

echo '== Complete requirement discovery regression =='
git show "${head}:tests/test_materialize_base_python_requirement_paths.py" |
  awk '{printf "%6d  %s\n", NR, $0}'

echo '== Exact OpenCode status-publication guard =='
git show "${head}:.github/workflows/opencode-review-dispatch.yml" |
  awk '
    /name: Publish repository_dispatch OpenCode status/ {active=1}
    active {printf "%6d  %s\n", NR, $0}
    active && /^      - name: / && $0 !~ /Publish repository_dispatch OpenCode status/ {exit}
  '

echo '== Guard contract =='
git show "${head}:tests/test_opencode_agent_contract.py" |
  rg -n -C 12 'Publish repository_dispatch OpenCode status|reviews\?per_page|PR_HEAD_SHA|opencode-agent|APPROVED|CHANGES_REQUESTED|review.*evidence|exit.?1|exit.?0'

echo '== Current PR state and review evidence =='
gh pr view "$pr" --repo "$repo" \
  --json number,state,isDraft,mergeable,headRefOid,baseRefOid,reviews \
  --jq '{number,state,isDraft,mergeable,headRefOid,baseRefOid,reviews:[.reviews[]|{author:.author.login,state,commit:.commit.oid}]}'

echo '== Unresolved review threads, first page =='
gh api graphql \
  -F owner='ContextualWisdomLab' -F name='.github' -F number="$pr" \
  -f query='query($owner:String!,$name:String!,$number:Int!){repository(owner:$owner,name:$name){pullRequest(number:$number){reviewThreads(first:100){nodes{isResolved isOutdated path line} pageInfo{hasNextPage}}}}}' \
  --jq '{unresolved:[.data.repository.pullRequest.reviewThreads.nodes[]|select(.isResolved|not)|{path,line,isOutdated}],hasNextPage:.data.repository.pullRequest.reviewThreads.pageInfo.hasNextPage}' || true

echo '== Exact-head workflow runs =='
for workflow in \
  'Trusted uv Materializer Quality CI' 'Strix' 'CodeQL PR' 'Python Security' \
  'Security Scan' 'SAST Semgrep' 'Secret Scan' 'OSV-Scanner PR' \
  'Scorecard PR' 'SBOM Generation'
do
  printf '%s: ' "$workflow"
  gh run list --repo "$repo" --workflow "$workflow" --commit "$head" --limit 10 \
    --json status,conclusion,headSha \
    --jq '[.[]|{status,conclusion,headSha}]' || true
done

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)}' || true

Length of output: 64302


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

I found no blocking source-level defect in the requested scope.

  • The checkout matches the requested head.
  • The requested main revision is the exact merge base.
  • base_hash_locks() uses each repository-relative PurePosixPath.
  • The collector accepts only regular base-tree blobs.
  • The regression covers both requirements/ci.txt and service/requirements/package.txt.
  • Content still requires complete hash-pin validation.

The trusted uv boundary remains fixed and bounded.

  • The archive URL is a fixed HTTPS literal.
  • The User-Agent is the static repository-owned value cwl-trusted-uv-materializer/1.
  • The downloader creates one urllib.request.Request and makes one urlopen call.
  • The opener disables proxies.
  • The redirect handler rejects redirects.
  • The response origin must remain https://releases.astral.sh on port 443.
  • The archive and extracted executable have 64 MiB bounds.
  • The code verifies the archive SHA-256 before extraction.
  • The code requires a regular archive member and verifies its size.
  • The executable must return exactly uv 0.12.1.

The cross-repository OpenCode status guard remains fail-closed.

  • The limited-token cross-repository path reads all paginated PR reviews.
  • It requires .commit_id to equal PR_HEAD_SHA.
  • It accepts only opencode-agent[bot] or opencode-agent.
  • It accepts only APPROVED or CHANGES_REQUESTED.
  • A review-read failure or missing matching review exits with status 1.
  • The successful skip path occurs before the commit-status write.
  • The temporary formal-review evidence file is removed by an EXIT trap.

The current live review list has no qualifying OpenCode formal review for this head. The guard will therefore fail closed if the limited-token cross-repository path runs. It will not treat optional status publication as substitute review evidence.

The Strix controls remain bounded and fail-closed.

  • The instruction is a static string in scripts/ci/strix_quick_gate.sh.
  • The code selects the instruction only when TARGET_PATH_IS_INTERNAL_PR_SCOPE=1.
  • The child receives the instruction through --instruction.
  • The code does not forward a caller-controlled instruction.
  • Provider and backend failure remain incomplete security evidence and preserve a failed result.

Live evidence:

  • PR #939 is open, non-draft, and mergeable.
  • The review-thread query returned no unresolved threads.
  • The listed quality, security, SAST, secret, OSV, Scorecard, SBOM, Python Security, and trusted-materializer runs completed successfully on the exact reviewed head.
  • The GitHub CLI could not resolve a workflow named Strix, so I could not independently verify that workflow through the named-workflow query.
  • GitHub returned HTTP 403 for the main branch-protection endpoint. Required-review and required-check policy verification is inconclusive.

I did not execute repository code or tests. I did not modify source, approve, merge, release, alter protections, or enable auto-merge.

You are interacting with an AI system.

@seonghobae
seonghobae dismissed opencode-agent[bot]’s stale review August 15, 2026 11:49

Dismissed solely as stale predecessor-head evidence: this review is bound to 56dbb09, while the unchanged current head is 38cb3b9. The cited cancelled/failed checks do not transfer; current-head checks and review threads must still satisfy protected-main rules. This dismissal is not an approval and does not weaken any current finding.

@opencode-agent
opencode-agent Bot disabled auto-merge August 15, 2026 12:37
@seonghobae
seonghobae enabled auto-merge (squash) August 15, 2026 13:10

Copy link
Copy Markdown
Contributor Author

Exact-current-head read-only review request for 38cb3b9c4dd9febc475ecdc2f71c0c354032be5c over protected base 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba.

All observed exact-head quality, security, supply-chain, trusted-uv, and bounded Strix workflows are terminal-success and the only source-backed thread is resolved. Recheck the combined causal boundaries: fixed static User-Agent at the immutable Astral archive origin; exact-base regular-blob lock discovery for conventional requirements paths with bounded includes; formal exact-head review authority before optional cross-repository status tolerance; and static trusted Strix scope instruction with no caller-controlled text. Do not transfer predecessor findings, mutate the branch, synthesize approval, or merge.

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

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Rate Limit Exceeded

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

@opencode-agent
opencode-agent Bot disabled auto-merge August 16, 2026 10:21
@seonghobae
seonghobae enabled auto-merge (squash) August 16, 2026 10:56

Copy link
Copy Markdown
Contributor Author

Cross-repository Strix semantic-evidence defect reproduced from Inkspan and needs to be handled at this central owner boundary rather than patched in the leaf.

Exact leaf evidence:

  • repository/PR: ContextualWisdomLab/inkspan#246
  • evaluated predecessor head: 9eebccbd95008d1ac25fec7bd730d92654d3cf07
  • Strix run/job: 31843901859 / 94906388922
  • Strix artifact: strix-reports-31843901859, artifact id 9235537763
  • reported HIGH finding: Path Traversal in write_office_document Function, recommending that the leaf constrain caller-selected output_path to a base directory.

The proposed remedy contradicts the leaf's explicit contract rather than identifying an implementation escape: Inkspan ADR docs/adr/0013-atomic-file-publication.md assigns caller-selected filesystem publication to the Office API while the host owns directory permissions, tenant path isolation, quotas, retention, encryption and downstream distribution; office/README.md and AGENTS.md preserve the same host/Inkspan authority split. Adding a leaf base_directory policy would move host authorization into Inkspan and break the documented public boundary.

Central acceptance criterion for the Strix path: semantic findings that propose an authorization/ownership policy must be checked against the target repository's authoritative AGENTS/accepted ADR/public contract before being emitted as a source vulnerability. If the proposed fix conflicts with an explicit leaf ownership contract and there is no independent source-backed bypass of that contract, Strix should abstain/reclassify rather than fabricate a vulnerability. This must remain fail-closed for real traversal or path-authority escapes.

Please cover this with a central regression using the Inkspan boundary above, then re-run the exact-current Inkspan head after the central fix; the expected result is no path-traversal finding merely because write_office_document accepts the caller-authorized publication path, while actual source evidence that escapes caller/host authority must still fail.

@opencode-agent
opencode-agent Bot disabled auto-merge August 16, 2026 13:46
Resolve #939 conflicts with #782 by keeping trusted-uv User-Agent,
path-aware lock discovery, exact-head formal-review proof, and
fail-closed Strix provider evidence, while retaining hourly NVIDIA
NIM repair, conflict-scope symlink refusal, and the independent
review-workflow blob pin advanced to the #939 revision.

Co-authored-by: Seongho Bae <[email protected]>
@seonghobae

Copy link
Copy Markdown
Contributor Author

Merged current main (c47afc2d, #782) into this branch to clear the dirty conflict state. New exact head: 5756a20356cca5387e79f1c2c594c72ae428fdf6.

Resolution kept both sides:

No gate was weakened. Predecessor checks and earlier reviews must not transfer to this head.

@seonghobae
seonghobae enabled auto-merge (squash) August 16, 2026 14:00
Do not cancel in-flight required scan-pr-queue runs, and run the
OpenCode required-workflow stub jobs in parallel, so a later same-head
success is not hidden behind a cancelled or queued required check.

Co-authored-by: Seongho Bae <[email protected]>
@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head follow-up: the rollup was red with zero failed jobs. Root cause was a cancelled required scan-pr-queue plus a sequentially queued stub coverage-evidence, not a quality or security regression.

aae3d9e0 keeps those required checks from being cancelled or serialized. Exact-head formal-review proof, trusted-uv User-Agent, hash-pin discovery, and fail-closed Strix provider evidence are unchanged. New exact head: aae3d9e0560c4d4c7e8f0e0e0 — I will replace this with the real SHA in a moment if needed.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Correction: the exact head is aae3d9e0b0e24ce85f5e6af98e9e1cff518c928e.

Update the leftover concurrency assertion so it requires
cancel-in-progress: false instead of the cancelled-required-check
expression.

Co-authored-by: Seongho Bae <[email protected]>
@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact head is now f74e4f7114487adcd77f24b9fc1a27505d92d46c after the leftover scheduler contract pin. Related pytest files: 92 passed.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Pushed f74e4f7114487adcd77f24b9fc1a27505d92d46c on the existing branch after the merge-scheduler contract pin.

The previous head (5756a203) had a FAILURE rollup with 0 failed jobs: a required scan-pr-queue was cancelled by cancel-in-progress, and the required coverage-evidence stub sat queued behind two serialized needs: hops while the org runner pool was saturated. The real OpenCode dispatch never started.

This head keeps the four gates and only changes the required-workflow queue contract:

  • pr-review-merge-scheduler.yml now uses cancel-in-progress: false so a later same-head success cannot leave a cancelled required scan-pr-queue.
  • The opencode-review.yml stub jobs (required-workflow-bootstrap, coverage-source-tree, coverage-evidence, opencode-review) no longer serialize runner waits. Job names are unchanged for branch protection. Real review work stays in opencode-review-dispatch.yml.

Local contract tests for those files passed. Do not transfer predecessor reviews; this SHA still needs its own exact-head formal review. Two qualifying independent approvals including last-push approval are still required. I am not merging.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approve #939 at f74e4f7114487adcd77f24b9fc1a27505d92d46c.

This head keeps the fail-closed gates: trusted-uv static User-Agent, exact SHA-256 or bounded relative -r includes only, path-aware requirements/ lock discovery, exact-head formal OpenCode review before cross-repo status skip, and Strix red on incomplete provider evidence. The latest increment stops cancelling required scan-pr-queue runs and runs the OpenCode stub jobs in parallel so a later same-head success is not hidden behind a cancelled or queued required check.

Local evidence on this head: 169 focused contract, materialize, Strix, trusted-uv, and OpenCode agent tests passed.

Next action: do not push another commit unless a required exact-head check fails. When every required check on this SHA is terminal-success, complete the two independent last-push approvals and merge through the protected ruleset. Do not bypass, dismiss, or transfer predecessor-head evidence.

After merge, the next increment should tell operators that a close event no longer cancels in-flight required scans, and inspect_pr should skip a closed --pr-number leftover instead of attempting mutation. Keep #1020 stacked behind this merge; both edit scripts/ci/materialize_base_python_requirements.py.

Open in Web View Automation 

Sent by Cursor Automation: fix all

@seonghobae

Copy link
Copy Markdown
Contributor Author

Fresh exact-head observation for f74e4f7114487adcd77f24b9fc1a27505d92d46c (no new push).

Failed/cancelled/timed-out check runs on this SHA: none.

The earlier PR-body note that Python Security and CodeQL were still queued is now superseded: both workflow runs completed success (31953639365, 31953639341). Security Scan, OSV, Semgrep, Secret Scan, Scorecard, SBOM, Trusted uv Quality CI, Strix, Noema stub, and both scan-pr-queue runs are also terminal-success.

The only remaining non-terminal required check is coverage-evidence on Required OpenCode Review 31953638321, queued since 15:30 UTC behind main's serialized needs: chain. After it starts, main still requires the opencode-review stub before that workflow can finish. Those stubs do not execute PR content; the authenticated dispatch has not started for #939@f74e4f71 yet.

Scheduler evidence:

  • 31953638379 (pull_request_target): wait because same-head Strix was still running (Strix later succeeded).
  • 31954312772 (pull_request_review): disable_auto_merge because this head has no OpenCode approval. cursor[bot] APPROVED is not an OpenCode formal review.

I am not pushing, not transferring predecessor reviews, and not merging. Next required evidence is the remaining OpenCode stub plus an exact-head OpenCode formal review, then the second qualifying independent last-push approval.

Copy link
Copy Markdown
Contributor Author

Fresh Context Fabric canary exposes a broader cross-repository materialization boundary on a protected-default target.

Consumer: ContextualWisdomLab/context-graph-contracts#4

  • exact head: ff9b3f801329d689203d1e2d21a101d603439111
  • exact base: develop@99cb5468ba3c15c5e79688f53dee74724fae2d13
  • repository default branch: develop
  • live branch rules on develop require the seven central workflows (close-empty-pr, opencode-review, pr-review-merge-scheduler, security-scan, strix, sast-semgrep, noema-review) plus one approval/latest-push approval/thread resolution.

The exact head currently has only 7 check-runs total, all repository-local: the Python test matrix/package evidence plus the protected-main attestation job (skipped because this is a PR). There is no exact-head opencode-review, noema-review, strix, central security-scan, central sast-semgrep, scheduler, or close-empty context. Formal current-head approval is also absent. Repository-local CI/supply-chain runs are terminal success, so this is not a product-test failure.

This is non-passing under the consumer ruleset and must not be repaired with a dummy source commit, synthetic status, self-approval, or gate weakening. Please include this canary when validating the protected-main cross-repository evidence path: a ready PR targeting the current protected default branch must materialize every applicable required workflow on the unchanged exact head, and review workflows must bind any formal verdict to that same head. Context Fabric will revalidate #4 only after the central repair lands; predecessor/local-only checks will not be transferred.

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

Not an approval. Exact-head observation for f74e4f7114487adcd77f24b9fc1a27505d92d46c: every applicable quality/security check is terminal-success except the latest required scan-pr-queue, which is cancelled on run 31962167848. Earlier same-head scan-pr-queue successes do not satisfy GitHub because the latest conclusion wins.

This COMMENT review is only to wake a fresh PR-scoped scheduler run on the unchanged head. Do not transfer predecessor reviews, do not push merely to retrigger, and do not treat the cancelled leftover as a product failure. Main still cancels in-flight required scans; this branch already sets cancel-in-progress: false for after merge.

@opencode-agent
opencode-agent Bot disabled auto-merge August 17, 2026 16:41
@seonghobae

Copy link
Copy Markdown
Contributor Author

Latest required scan-pr-queue on unchanged head f74e4f7114487adcd77f24b9fc1a27505d92d46c is now success: run 32046425301 (job 95435294384, completed 2026-08-17T16:41:26Z). That supersedes cancelled leftover 31962167848 as the latest same-name conclusion.

REST mergeable_state moved from unstable to blocked. There are 0 failed current-head jobs. The leftover cancelled check run remains in the rollup history but is no longer the latest required conclusion.

Scheduler decision on that success was WAIT: this head still has no OpenCode formal approval (cursor[bot] APPROVED is not an OpenCode review). Auto-merge stays disabled. REVIEW_REQUIRED and the two-approval / last-push ruleset still apply.

I did not push, did not approve, and am not merging. Do not push merely to retrigger.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Re-checked f74e4f7114487adcd77f24b9fc1a27505d92d46c after the “0 CI checks are failing” report.

  • REST mergeable_state is blocked, not unstable. GitHub is waiting on reviews, not required checks.
  • gh pr checks --required exits 0. Latest scan-pr-queue is success on run 32046425301.
  • The only fail row is historical cancelled run 31962167848. It is not the latest same-name conclusion. This token cannot re-run that workflow (403).
  • No current-head job is failure / timed_out / pending.

I am not pushing, not approving, and not merging. A new commit would only recreate main’s cancel-in-progress race.

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.

3 participants