Skip to content

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

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

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

    • sends the fixed static cwl-trusted-uv-materializer/1 User-Agent to the fixed Astral archive URL;
    • retains no-proxy/no-redirect operation, bounded download, pinned checksum, and executable-version verification; and
    • keeps archive, checksum, platform, and executable mismatches fail-closed.
  2. Base requirements-lock discovery

    • recognizes conventional requirements*.txt locks and direct .txt children of repository-relative requirements/ directories;
    • evaluates candidates only from regular blobs in the authenticated exact base commit;
    • validates complete hash pins and bounded relative includes independently of path eligibility; and
    • exports eligible uv.lock files only through the separately verified trusted-uv path.
  3. Cross-repository OpenCode evidence

    • requires an exact-head formal review before tolerating unavailable optional commit-status publication;
    • preserves the formal PR review as the authoritative verdict; and
    • fails closed when review or peer security evidence is absent.
  4. Bounded Strix pull-request scope

    • passes a static trusted --instruction only when the gate created the internal changed-file scope;
    • explains that /workspace/<workspace_subdir> is the complete authorized target and the runner host path is intentionally absent in the sandbox;
    • directs Strix to inspect mounted workflow, shell, Python, and configuration content for actionable vulnerabilities; and
    • never forwards caller-controlled instruction text.

Test-first evidence

  • Strix repair run 31784776654 wrote the failing bounded-scope contract, applied the trusted static instruction, passed shell syntax, focused regression, and the complete scripts/ci/test_strix_quick_gate.sh harness, then removed its temporary workflows.
  • Requirements discovery repair run 31787913977 demonstrated the missing requirements/ci.txt and service/requirements/package.txt paths before the change, replaced the basename-only collector predicate, passed the focused regression, compileall, and git diff --check, then removed its temporary workflow.
  • docs/doctoring/strix-bounded-pr-scope.md and docs/doctoring/base-requirements-lock-discovery.md preserve both trust contracts and recovery evidence.
  • Current exact head: 38cb3b9c4dd9febc475ecdc2f71c0c354032be5c.
  • The production diff contains no temporary repair workflow, and the actionable CodeRabbit thread is resolved with exact-head evidence.

Merge boundary

Do not transfer predecessor checks or earlier OpenCode change requests. Merge only after every exact-head workflow is terminal-success, the unchanged current head receives the two qualifying independent approvals required by the protected ruleset including last-push approval, and every review thread remains resolved. Auto-merge or direct merge may execute only through the normal protected ruleset; no bypass or review dismissal is requested.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 9 minutes

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

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ba70f32b-c23b-4fca-ad9f-78bb9a88e38d

📥 Commits

Reviewing files that changed from the base of the PR and between 329c496 and 38cb3b9.

📒 Files selected for processing (4)
  • docs/doctoring/base-requirements-lock-discovery.md
  • docs/doctoring/strix-bounded-pr-scope.md
  • scripts/ci/materialize_base_python_requirements.py
  • tests/test_materialize_base_python_requirement_paths.py
📝 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 증거 변경을 정확히 설명하지만, UV 및 Strix 변경 사항은 포함하지 않습니다.
✨ 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.
@seonghobae
seonghobae marked this pull request as ready for review August 14, 2026 09:25

Copy link
Copy Markdown
Contributor Author

@coderabbitai review current head 0d90922, including nested requirements/ path discovery, trusted uv materialization, exact-head formal-review authority, and bounded Strix sandbox guidance.

Copy link
Copy Markdown
Contributor Author

@opencode-agent

@seonghobae
seonghobae enabled auto-merge (squash) August 14, 2026 09:26
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Rate Limit Exceeded

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

@opencode-agent
opencode-agent Bot disabled auto-merge August 14, 2026 10:14

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review exact current head 38cb3b9c4dd9febc475ecdc2f71c0c354032be5c only. The prior requirements-path finding is addressed and resolved; all exact-head repository workflows are terminal-success. Do not transfer predecessor-head findings or approvals.

@coderabbitai

coderabbitai Bot commented Aug 14, 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 '== Commit identity and ancestry =='
git cat-file -e "${head}^{commit}"
git cat-file -e "${base}^{commit}"
printf 'checkout='; 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 paths on requested commit range =='
git diff --name-status "$base" "$head"

echo '== Requirements collector diff =='
git diff --unified=45 "$base" "$head" -- \
  scripts/ci/materialize_base_python_requirements.py \
  tests/test_materialize_base_python_requirements.py

echo '== Requirements collector structure and relevant implementation =='
ast-grep outline scripts/ci/materialize_base_python_requirements.py --items all || true
rg -n -C 14 \
  '_is_candidate_lock_path|base_hash_locks|requirements|rglob|glob|relative_to|candidate\.name' \
  scripts/ci/materialize_base_python_requirements.py

echo '== Requirements collector regression tests =='
ast-grep outline tests/test_materialize_base_python_requirements.py --items all || true
rg -n -C 12 \
  'base_hash_locks|_is_candidate_lock_path|requirements/ci\.txt|service/requirements/package\.txt|nested|relative' \
  tests/test_materialize_base_python_requirements.py

echo '== Trusted uv boundary context at requested commit =='
git show "${head}:scripts/ci/materialize_base_python_requirements.py" |
  nl -ba | sed -n '55,290p'

echo '== Live PR identity, 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,headSha}]
  }'

echo '== Unresolved review threads =='
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 endCursor }
      }
    }
  }
}' \
  --jq '{
    unresolved: [.data.repository.pullRequest.reviewThreads.nodes[]
      | select(.isResolved | not)
      | {path,line,isOutdated}],
    hasNextPage: .data.repository.pullRequest.reviewThreads.pageInfo.hasNextPage
  }' || echo 'Review-thread query unavailable.'

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 unavailable.'

Length of output: 54837


🏁 Script executed:

#!/bin/bash
set -euo pipefail

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

echo '== New end-to-end requirements-path regression contract =='
fd -a '^test_materialize_base_python_requirement_paths\.py$' tests -x sh -c '
  echo "--- $1"
  awk "{printf \"%6d  %s\\n\", NR, \$0}" "$1"
' sh {}

echo '== Exact collector implementation =='
git show "${head}:scripts/ci/materialize_base_python_requirements.py" |
  awk 'NR >= 83 && NR <= 185 || NR >= 483 && NR <= 535 { printf "%6d  %s\n", NR, $0 }'

echo '== Exact trusted-uv network and verification boundary =='
git show "${head}:scripts/ci/materialize_base_python_requirements.py" |
  awk 'NR >= 56 && NR <= 360 { printf "%6d  %s\n", NR, $0 }'

echo '== Current PR identity, review evidence, and check 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,headSha}]
  }'

echo '== Unresolved review threads =='
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 'Review-thread query unavailable.'

echo '== Branch-protection policy, 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 unavailable.'

Length of output: 36879


🏁 Script executed:

#!/bin/bash
set -euo pipefail

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

echo '== Exact current cross-repository status-publication guard =='
git show "${head}:.github/workflows/opencode-review-dispatch.yml" |
  awk '
    /Publish repository_dispatch OpenCode status/ {show=1}
    show {printf "%6d  %s\n", NR, $0}
    show && /^(  [^[:space:]]|jobs:|name:)/ && NR > start + 1 {exit}
  '

echo '== Exact current Strix outage handling =='
git show "${head}:.github/workflows/strix.yml" |
  awk '
    /provider|backend|NIM|unavailable|exit 1|exit 0|incomplete|failure/i {
      low=NR-10; high=NR+18
    }
    {lines[NR]=$0}
    END {
      for (n=1; n<=NR; n++) {
        if (n>=low && n<=high) printf "%6d  %s\n", n, lines[n]
      }
    }
  ' || true

echo '== Exact-head runs for named quality, security, and supply-chain workflows =='
for workflow in \
  'Trusted uv Materializer Quality CI' \
  '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 20 \
    --json databaseId,status,conclusion,headSha,event,displayTitle,url,workflowName \
    --jq '.[] | {databaseId,status,conclusion,headSha,event,workflowName,displayTitle,url}' \
    || echo "Workflow query unavailable: ${workflow}"
done

Length of output: 21095


🏁 Script executed:

#!/bin/bash
set -euo pipefail

head='38cb3b9c4dd9febc475ecdc2f71c0c354032be5c'

echo '== Exact Strix provider/backend failure handling =='
git show "${head}:.github/workflows/strix.yml" |
  rg -n -i -C 18 \
    'provider|backend|unavailable|not found|nim|quota|token limit|incomplete|neutral|exit 1|exit 0|security evidence'

echo '== Exact Strix failure contracts =='
for file in \
  tests/test_required_workflow_queue_contract.py \
  tests/test_strix_nvidia_nim_not_found_fallback.py
do
  echo "--- ${file}"
  git show "${head}:${file}" |
    rg -n -i -C 10 \
      'provider|backend|unavailable|not found|nim|neutral|exit 1|exit 0|incomplete|fail'
done

Length of output: 92475


@seonghobae I completed a read-only semantic review of exact commit 38cb3b9c4dd9febc475ecdc2f71c0c354032be5c.

I found no blocking source-level defect.

  • The checked-out commit matches the requested commit.
  • Protected main@6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba is the merge base.
  • The prior requirements-path defect is addressed.
  • base_hash_locks() now passes the full repository-relative PurePosixPath to _is_candidate_lock_path().
  • The new end-to-end regression creates a base repository and verifies collection of:
    • requirements/ci.txt
    • service/requirements/package.txt
  • The path predicate still requires a direct .txt child of a requirements directory.
  • Content must still pass the independent hash-pin validation.

The trusted uv bootstrap remains bounded and fixed.

  • The request uses the fixed Astral HTTPS URL.
  • The request uses the static repository-owned User-Agent.
  • The opener disables proxies.
  • The redirect handler rejects redirects.
  • The archive and executable reads have 64 MiB bounds.
  • The archive SHA-256 is verified before extraction.
  • The executable must report exactly uv 0.12.1.

The cross-repository status guard remains fail-closed.

  • It paginates the target PR review history.
  • It requires a formal OpenCode review for the exact PR_HEAD_SHA.
  • It accepts only opencode-agent[bot] or opencode-agent.
  • It accepts only APPROVED or CHANGES_REQUESTED.
  • A failed review lookup, absent review, stale review, wrong author, or wrong state exits with status 1.
  • The optional status-publication skip occurs only after this verification.
  • The skip path does not create substitute review evidence.

The Strix provider-failure gate remains fail-closed.

  • Backend and provider unavailability preserve the failed result.
  • The workflow does not convert incomplete evidence into a neutral success.
  • The NVIDIA NIM 404 contract requires LiteLLM and NVIDIA context on the same log line.
  • The regression contract verifies that provider failure remains failed even when scan output reports findings.

Live exact-head evidence is consistent with the request.

  • The PR is open and mergeable.
  • No unresolved review threads were returned.
  • All nine named quality, security, and supply-chain workflows completed successfully on 38cb3b9c4dd9febc475ecdc2f71c0c354032be5c.
  • I did not use cancelled, skipped, neutral, or predecessor-head entries as passing evidence.
  • I did not transfer predecessor-head reviews or approvals.

GitHub returned HTTP 403 for the main branch-protection endpoint. I could not independently verify the protected-branch policy.

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


🧠 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: seonghobae
Repo: ContextualWisdomLab/.github PR: 0
File: :0-0
Timestamp: 2026-08-14T08:06:07.468Z
Learning: For ContextualWisdomLab/.github PR `#789`, a cancelled security or supply-chain check does not count as evidence. A manually re-run replacement check remains pending until it reaches terminal success on the exact current PR head. Predecessor-head check results, findings, and approvals do not transfer.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review

Re-review exact current head 38cb3b9c4dd9febc475ecdc2f71c0c354032be5c against protected main@6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. All current-head hosted workflows are terminal-success and every review thread is resolved. Review only the final production diff: trusted fixed-origin uv materialization, repository-relative requirements lock discovery, exact-head formal review authority, and bounded Strix internal scope. Do not update the branch, merge, dismiss reviews, reuse predecessor evidence, or synthesize approval. Submit a formal approval only if no valid current-head finding remains.

@seonghobae
seonghobae enabled auto-merge (squash) August 14, 2026 12:53

Copy link
Copy Markdown
Contributor Author

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

Review only exact current head 38cb3b9c4dd9febc475ecdc2f71c0c354032be5c against live protected main@6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. All ten directly observed exact-head hosted workflows are terminal-success. The prior CodeRabbit requirements-directory finding is repaired and its thread resolved; temporary repair workflows are absent. Predecessor OpenCode CHANGES_REQUESTED was check/run-attempt evidence and does not transfer. Re-review the current combined trusted-uv User-Agent, base-lock discovery, exact-head formal-review status-publication guard, and bounded Strix scope semantics read-only. Do not mutate source, synthesize approval, weaken security evidence, or merge.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

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

echo '== Commit 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 changed paths =='
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 structure =='
ast-grep outline scripts/ci/materialize_base_python_requirements.py --items all || true

echo '== Trusted uv and requirements discovery controls =='
git show "${head}:scripts/ci/materialize_base_python_requirements.py" |
  nl -ba | sed -n '55,310p;465,555p'

echo '== Trusted uv and requirements-path 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 =='
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'

echo '== OpenCode guard regression contract =='
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'
done

echo '== Live PR identity, reviews, and check 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,headSha}]
  }'

echo '== Unresolved review threads =='
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 'Review-thread query unavailable.'

echo '== Main protection policy, if visible =='
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 unavailable.'

Length of output: 7869


🏁 Script executed:

#!/bin/bash
set -euo pipefail

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

echo '== Trusted uv and requirements discovery controls =='
git show "${head}:scripts/ci/materialize_base_python_requirements.py" |
  awk 'NR >= 40 && NR <= 320 || NR >= 475 && NR <= 540 {printf "%6d  %s\n", NR, $0}'

echo '== Trusted uv and requirements-path 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 =='
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'

echo '== OpenCode guard regression contract =='
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'
done

echo '== Live PR identity, reviews, and check 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,headSha}]
  }'

echo '== Unresolved review threads =='
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 'Review-thread query unavailable.'

echo '== Main protection policy, if visible =='
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 unavailable.'

Length of output: 120271


🏁 Script executed:

#!/bin/bash
set -euo pipefail

head='38cb3b9c4dd9febc475ecdc2f71c0c354032be5c'

echo '== Trusted uv implementation =='
git show "${head}:scripts/ci/materialize_base_python_requirements.py" |
  awk 'NR >= 40 && NR <= 315 {printf "%6d  %s\n", NR, $0}'

echo '== Requirements lock discovery implementation =='
git show "${head}:scripts/ci/materialize_base_python_requirements.py" |
  awk 'NR >= 475 && NR <= 535 {printf "%6d  %s\n", NR, $0}'

echo '== Requirements discovery regressions =='
git show "${head}:tests/test_materialize_base_python_requirement_paths.py" |
  awk '{printf "%6d  %s\n", NR, $0}'
git show "${head}:tests/test_materialize_base_python_requirements.py" |
  rg -n -C 8 \
    'base_hash_locks|_is_candidate_lock_path|requirements/ci\.txt|service/requirements/package\.txt|relative'

echo '== Trusted uv request-boundary contract =='
git show "${head}:tests/test_trusted_uv_download_contract.py" |
  awk '{printf "%6d  %s\n", NR, $0}'

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

echo '== OpenCode guard static 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 '== Direct structural checks =='
materializer="$(git show "${head}:scripts/ci/materialize_base_python_requirements.py")"
printf 'static Request constructions: '
printf '%s\n' "$materializer" | grep -c 'urllib\.request\.Request('
printf 'urlopen calls: '
printf '%s\n' "$materializer" | grep -c 'urllib\.request\.urlopen('
printf 'candidate classifier calls in base_hash_locks: '
printf '%s\n' "$materializer" | awk '/^def base_hash_locks\(/,/^def /' | grep -c '_is_candidate_lock_path('

guard="$(git show "${head}:.github/workflows/opencode-review-dispatch.yml)"
printf 'guard review endpoint occurrences: '
printf '%s\n' "$guard" | awk '/name: Publish repository_dispatch OpenCode status/,/^      - name: /' | grep -c '/pulls/.*reviews'
printf 'guard exact-head predicate occurrences: '
printf '%s\n' "$guard" | awk '/name: Publish repository_dispatch OpenCode status/,/^      - name: /' | grep -c 'PR_HEAD_SHA'

Length of output: 71843


🏁 Script executed:

#!/bin/bash
set -euo pipefail

head='38cb3b9c4dd9febc475ecdc2f71c0c354032be5c'

echo '== Trusted uv executable-version enforcement =='
git show "${head}:scripts/ci/materialize_base_python_requirements.py" |
  awk 'NR >= 302 && NR <= 360 {printf "%6d  %s\n", NR, $0}'

echo '== Version-enforcement contract references =='
git show "${head}:tests/test_materialize_base_python_requirements.py" |
  rg -n -C 8 \
    'TRUSTED_UV_VERSION|version|uv 0\.12\.1|_install_trusted_uv|_verified_uv_binary'

Length of output: 18382


@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 base is the exact merge base.
  • The prior requirements-directory defect is repaired.
  • base_hash_locks() passes each full repository-relative PurePosixPath to _is_candidate_lock_path().
  • The new end-to-end contract verifies both requirements/ci.txt and service/requirements/package.txt.
  • The classifier limits path-based eligibility to direct .txt children of a requirements directory.
  • The independent complete hash-pin validation remains required.

The trusted uv boundary remains fixed and bounded.

  • The downloader creates one urllib.request.Request.
  • The request uses the fixed Astral HTTPS URL.
  • The request uses TRUSTED_UV_DOWNLOAD_USER_AGENT with the fixed value cwl-trusted-uv-materializer/1.
  • The process-wide opener disables proxies.
  • The redirect handler rejects all redirects.
  • The response origin must remain https://releases.astral.sh on port 443.
  • The archive has a 64 MiB read bound.
  • SHA-256 validation occurs before archive extraction.
  • The executable member must be regular and no larger than 64 MiB.
  • The executable length must match the archive metadata.
  • The installer requires exit status 0 and exact output uv 0.12.1.

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

  • The limited-token cross-repository path reads all paginated target-PR reviews.
  • The path requires .commit_id to equal PR_HEAD_SHA.
  • The path accepts only opencode-agent[bot] or opencode-agent.
  • The path accepts only APPROVED or CHANGES_REQUESTED.
  • A review read failure exits with status 1.
  • Missing, stale, wrong-author, and wrong-state evidence exits with status 1.
  • The EXIT trap removes temporary review evidence.
  • The successful skip exits before any status write.
  • Optional status publication cannot create substitute formal-review evidence.

The returned live review list has no formal OpenCode review bound to 38cb3b9c4dd9febc475ecdc2f71c0c354032be5c. The predecessor CHANGES_REQUESTED review does not satisfy the exact-head condition. If the limited-token cross-repository path occurs now, the guard fails instead of skipping publication.

The Strix controls remain fail-closed.

  • Provider or backend failure keeps the required check failed.
  • The workflow does not convert incomplete provider evidence into neutral success.
  • The NVIDIA NIM 404 classifier requires LiteLLM, NVIDIA NIM, and 404 evidence on one log line.
  • The static internal-scope instruction is selected only for an internally generated PR scope.
  • The child process receives that fixed instruction through --instruction.

Live evidence:

  • PR #939 is open and mergeable.
  • The review-thread query returned no unresolved threads.
  • The rollup includes successful quality, security, and supply-chain checks.
  • I did not count skipped, cancelled, or neutral entries as successful evidence.
  • The returned rollup does not provide a per-check head SHA. It cannot independently prove exact-head association for each check.
  • GitHub returned HTTP 403 for main branch protection. Required-check and required-review policy verification is inconclusive.

I did not run repository code or tests. I did not modify repository state, approve, merge, release, dismiss reviews, or change protections.

⚠️ Action not completed

Review rate limited.

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 @cwl-noema-review

Review exact unchanged head 38cb3b9c4dd9febc475ecdc2f71c0c354032be5c against protected main@6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. Every current pull-request workflow visible for this head is terminal-success, including Trusted uv Materializer Quality CI, Strix, CodeQL, Python Security, Security Scan, Semgrep, Secret Scan, OSV, Scorecard, and SBOM. Re-evaluate the current source and submit only a head-bound formal verdict; do not reuse predecessor review state or bypass protection.

@seonghobae
seonghobae marked this pull request as draft August 15, 2026 10:57
auto-merge was automatically disabled August 15, 2026 10:57

Pull request was converted to draft

@seonghobae
seonghobae marked this pull request as ready for review August 15, 2026 10:58
@seonghobae
seonghobae enabled auto-merge (squash) August 15, 2026 11:27

Copy link
Copy Markdown
Contributor Author

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

Review exact head 38cb3b9c4dd9febc475ecdc2f71c0c354032be5c. All current-head workflow runs are terminal with no queued, cancelled, or failed run in the latest inventory, and every inline thread is resolved. Verify the fixed-origin trusted-uv User-Agent, base-owned bounded requirements-lock discovery, exact-head formal-review authority before optional status tolerance, and the static non-caller-controlled Strix instruction that constrains internal PR scope. Submit a fresh formal exact-head verdict; do not reuse predecessor-head cancelled-check evidence.

@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 5 minutes and 45 seconds before sending another message.

Copy link
Copy Markdown
Contributor Author

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

This head is the prerequisite for the bounded Strix tool-protocol fallback in #933. It supplies a trusted static instruction for internally-created changed-file scope, keeps host paths and caller-controlled instructions out of the sandbox, expands exact-base requirements-lock discovery only to repository-relative regular blobs, and preserves fail-closed cross-repository OpenCode evidence. Every currently observed exact-head hosted quality, security, SAST, secret, OSV, Scorecard, SBOM, Python Security, Strix changed-path, and trusted-materializer workflow is terminal-success; all review threads are resolved. Auto-merge is armed subject to fresh qualifying independent approvals and the protected-main ruleset.

Review this exact head only. Preserve reviewer identities and credential separation; do not mutate the branch, synthesize author approval, weaken protection, or merge.

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

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants