Skip to content

fix(coverage): retry transient trusted uv downloads - #790

Open
seonghobae wants to merge 58 commits into
mainfrom
fix/trusted-uv-transient-download-retry
Open

fix(coverage): retry transient trusted uv downloads#790
seonghobae wants to merge 58 commits into
mainfrom
fix/trusted-uv-transient-download-retry

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Harden the organization-owned Python coverage bootstrap without weakening immutable-source or integrity boundaries.

  • retry only explicitly classified transient connection failures and HTTP 408, 425, 429, 500, 502, 503, or 504, with at most three total attempts and deterministic one- and two-second delays;
  • preserve the literal Astral HTTPS URL, no-proxy opener, redirect rejection, origin and port validation, bounded streaming download, SHA-256, archive-member, executable-size and version, frozen offline export, exact-pin/hash grammar, and workspace fail-closed checks;
  • resolve Git only through shutil.which("git", path=os.defpath) and require an absolute result;
  • create and open every generated-lock output component through descriptor-relative, no-follow operations;
  • pin output directories and files by device and inode, reject symlink and multiply linked destinations before mutation, require forward write progress, synchronize writes, and revalidate bindings before success; and
  • record the MSA boundary, rollback, incident evidence, and APA 7th references in docs/doctoring/.

Incidents and findings

Central OpenCode run 31002427460 for ContextualWisdomLab/newsdom-api#524 and run 31022108085 for ContextualWisdomLab/pg-llm-batch#53 failed while downloading the immutable uv archive before pull-request-controlled tests ran. A later download succeeded in the same operating window, supporting a bounded transient retry rather than a weakened integrity gate.

Exact-head central quality run 31042374323 exposed pull-request-controlled ambient PATH selection for Git. That path is now resolved only from os.defpath.

Exact-head Strix run 31076540331 identified a valid medium-severity time-of-check/time-of-use race between output-directory symlink inspection and creation. Test-first commit a1dcc679c1767f7e806793d7c0225a1342a9a875 captured the race and related output-binding attacks before descriptor-pinned remediation.

TDD and verification contract

Permanent tests cover the closed HTTP retry set, temporary and permanent transport classification, immutable request reuse, partial-read isolation, trusted Git resolution, intermediate and final output symlinks, output pathname removal and inode replacement, generated-file symlink and hard-link attacks, safe regular-file reruns, post-open path swaps, stalled writes, root-output rejection, Python compatibility, compilation, production docstrings, and 100% production statement and branch coverage.

Permanent PR scope is nine files:

  • .github/workflows/trusted-uv-materializer-quality-ci.yml;
  • CHANGELOG.md;
  • docs/doctoring/trusted-uv-transient-download-retry.md;
  • scripts/ci/materialize_base_python_requirements.py;
  • tests/test_materialize_output_directory_security.py;
  • tests/test_trusted_git_executable.py;
  • tests/test_trusted_uv_materializer_quality_workflow_contract.py;
  • tests/test_trusted_uv_portability_and_streaming.py; and
  • tests/test_trusted_uv_retry_documentation.py.

Exact-head merge contract

Current exact head: 7f72816b6fdc28c72a72c2c6c466cec4a241853f.
Current protected base: f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae.

Trusted uv Materializer Quality CI run 31080302934 belongs to predecessor head 7bf89d835c19e7d30a325fed65169aac8bdb6660; its 104 passing tests and 98% coverage diagnosis motivated exact missing-edge tests, but it is stale for merge acceptance. All predecessor-head workflow, status, review, and security evidence is stale. Exact-head quality, security, supply-chain, SBOM, Strix, CodeRabbit, OpenCode, Noema, and independent approval evidence must be collected again. Queued, pending, cancelled, skipped-required, absent, status-only, author-only, or stale-head results are not success.

Standards

The doctoring note records APA 7th references to RFC 9110, RFC 6585, RFC 8470, Python 3.14 urllib.error and os documentation, and the POSIX.1-2024 descriptor-relative file-opening contract.

Downstream effect

After this PR merges, exact-head OpenCode and Noema coverage review for pg-llm-batch#53 and NewsDOM #524 must be rerun. No prior failed or stale verdict is reused.

Merge acceptance

Merge only when a qualifying independent non-author approval is anchored to exact head 7f72816b6fdc28c72a72c2c6c466cec4a241853f, every required exact-head check and security gate succeeds, no valid unresolved finding remains, and branch protection permits merge without administrative bypass.

Summary by CodeRabbit

  • 개선 사항

    • 신뢰된 uv 다운로드가 일시적인 네트워크 오류와 지정된 HTTP 오류에 한해 최대 3회까지 자동 재시도됩니다.
    • TLS 인증서 오류, 영구적인 서버 오류, 리디렉션 및 콘텐츠 검증 실패는 즉시 중단됩니다.
    • 다운로드 출처, 요청 시간 제한, 응답 크기 및 부분 다운로드 폐기 규칙이 강화되었습니다.
    • Git 실행 파일을 시스템 기본 경로에서만 확인해 안전하지 않은 실행을 방지합니다.
    • 생성 파일 출력은 심볼릭 링크를 따라가지 않는 디렉터리·파일 디스크립터에 고정되고, inode 변경과 다중 링크 대상을 실패 폐쇄합니다.
  • 문서

    • 재시도 정책, 오류 분류, 출력 경계, 운영 경계 및 복구 절차를 문서화했습니다.

@coderabbitai

coderabbitai Bot commented Aug 5, 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: 15 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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: 6de37e15-90e8-4c0e-9a36-9a3d505a70b9

📥 Commits

Reviewing files that changed from the base of the PR and between 592596e and d48e035.

📒 Files selected for processing (6)
  • .github/workflows/trusted-uv-materializer-quality-ci.yml
  • CHANGELOG.md
  • docs/doctoring/trusted-uv-transient-download-retry.md
  • scripts/ci/materialize_base_python_requirements.py
  • tests/test_materialize_output_directory_security.py
  • tests/test_trusted_uv_portability_and_streaming.py
📝 Walkthrough

Walkthrough

Trusted uv 다운로드에 제한된 재시도와 오류 분류를 추가했습니다. Git 실행 파일은 운영체제 기본 경로의 절대 경로만 사용합니다. 회귀 테스트, 문서 계약, 변경 감시 및 품질 게이트를 갱신했습니다.

Changes

신뢰된 부트스트랩 경계

Layer / File(s) Summary
uv 다운로드 재시도 정책
scripts/ci/materialize_base_python_requirements.py, tests/test_trusted_uv_portability_and_streaming.py, docs/doctoring/trusted-uv-transient-download-retry.md, CHANGELOG.md, tests/test_trusted_uv_retry_documentation.py
허용된 HTTP 상태와 일시적 네트워크 오류만 최대 3회 재시도합니다. 재시도 간격은 1초와 2초입니다. 영구 오류, TLS 오류, 검증 실패 및 부분 응답은 즉시 실패합니다.
절대 Git 실행 경계
scripts/ci/materialize_base_python_requirements.py, tests/test_trusted_git_executable.py
Git을 os.defpath에서 조회한 절대 경로로만 실행합니다. 경로가 없거나 상대 경로이면 RuntimeError를 발생시킵니다.
품질 게이트 계약 갱신
.github/workflows/trusted-uv-materializer-quality-ci.yml, tests/test_trusted_uv_materializer_quality_workflow_contract.py
Git 실행 파일 테스트를 pull request 및 push 감시 경로, 전체 테스트 목록, 컴파일 검사 목록에 추가합니다.

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

Possibly related issues

Possibly related PRs

  • ContextualWisdomLab/.github#743 — 동일한 materializer 코드와 trusted uv 다운로드 테스트를 수정하며, 현재 변경은 해당 보안 로직에 제한된 일시 오류 재시도를 추가합니다.

Sequence Diagram(s)

sequenceDiagram
  participant Materializer
  participant urllib.request
  participant uv archive
  Materializer->>urllib.request: 고정 HTTPS URL과 타임아웃으로 요청
  urllib.request-->>Materializer: 응답 또는 분류된 오류
  Materializer->>Materializer: 허용된 오류만 1초 또는 2초 후 재시도
  Materializer->>uv archive: 응답 크기와 checksum 검증
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 95.45% 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 제목은 일시적인 trusted uv 다운로드 재시도라는 PR의 주요 변경 사항을 간결하고 명확하게 설명합니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/trusted-uv-transient-download-retry

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review Please independently review exact current head 53c6a1ca22c53e50b3752ec95c068984360be0b2 after exact-head checks complete. Verify the fixed literal Astral origin, disabled proxies, redirect/final-port rejection, bounded short-read accumulation, three-attempt transient-only retry policy, permanent-error fail-closed behavior, bounded diagnostics, SHA/archive/version/offline-export invariants, 100% statement/branch/docstring evidence, and absence of temporary write workflows. Submit APPROVE only if no blocker remains.

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Rate Limit Exceeded

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

@seonghobae
seonghobae enabled auto-merge (squash) August 5, 2026 12:50

@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-head review found two validity gaps against issue #786's accepted retry boundary. Please fix test-first before merge and rerun every current-head gate.

  1. TRUSTED_UV_RETRYABLE_HTTP_STATUS omits HTTP 425, although the accepted issue contract explicitly includes 425 Too Early. Add a failing parameterized regression covering the exact closed retry set {408, 425, 429, 500, 502, 503, 504} and prove permanent statuses still fail immediately.

  2. except (urllib.error.URLError, OSError) retries every wrapped transport exception. That includes ssl.SSLCertVerificationError/ssl.SSLError and generic local OSError failures, contrary to the contract that certificate verification and other permanent failures never retry. Classify only provably transient connection reset/refused/aborted, timeout, network/host unreachable, and temporary DNS (EAI_AGAIN) failures. Fail certificate, non-temporary DNS, malformed reason, and unclassified OSError immediately with bounded class/status-only diagnostics.

Permanent regressions should prove: TLS certificate verification performs one attempt and zero sleeps; temporary DNS and connection reset retry; non-temporary DNS does not; every retry reuses the literal trusted URL and exact timeout; and partial bytes from a failed read are discarded before the next attempt. Keep the current no-proxy, no-redirect, origin, size, SHA-256, archive-member, version, offline-export, 100% statement/branch coverage, and public-docstring gates unchanged. Update CHANGELOG and doctoring to enumerate the exact retry set and TLS/DNS exclusions.

@opencode-agent
opencode-agent Bot disabled auto-merge August 5, 2026 13:03
@seonghobae
seonghobae marked this pull request as draft August 5, 2026 13:31
@coderabbitai

coderabbitai Bot commented Aug 6, 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'
base='f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae'
head='9ad4322be89b2387a706de610eaaabdeb99e74c4'

printf '%s\n' '== Requested commit and pull request identity =='
printf 'checked-out HEAD: '; git rev-parse HEAD
printf 'requested head: '; git rev-parse "$head"
printf 'requested base: '; git rev-parse "$base"
git merge-base --is-ancestor "$base" "$head" && echo 'requested base is an ancestor of requested head'
gh pr view 790 --repo "$repo" --json headRefOid,baseRefOid,reviewDecision \
  --jq '{headRefOid,baseRefOid,reviewDecision}'

printf '%s\n' '== Exact-range file scope =='
git diff --name-status "$base" "$head"

printf '%s\n' '== Requested-head production source structure =='
git show "${head}:scripts/ci/materialize_base_python_requirements.py" > /tmp/materialize_base_python_requirements.py
ast-grep outline /tmp/materialize_base_python_requirements.py --items all

printf '%s\n' '== Requested-head retry, integrity, and Git controls =='
nl -ba /tmp/materialize_base_python_requirements.py | sed -n '35,365p'

printf '%s\n' '== Exact-range source, test, workflow, and documentation diff =='
git diff --no-ext-diff --unified=36 "$base" "$head" -- \
  scripts/ci/materialize_base_python_requirements.py \
  tests/test_trusted_git_executable.py \
  tests/test_trusted_uv_portability_and_streaming.py \
  tests/test_trusted_uv_materializer_quality_workflow_contract.py \
  tests/test_trusted_uv_retry_documentation.py \
  .github/workflows/trusted-uv-materializer-quality-ci.yml \
  docs/doctoring/trusted-uv-transient-download-retry.md \
  CHANGELOG.md

printf '%s\n' '== Requested-head retry and malformed-reason regression contract =='
git show "${head}:tests/test_trusted_uv_portability_and_streaming.py" |
  nl -ba | sed -n '1,500p'

printf '%s\n' '== Requested-head trusted Git regression contract =='
git show "${head}:tests/test_trusted_git_executable.py" |
  nl -ba | sed -n '1,240p'

printf '%s\n' '== Requested-head quality workflow =='
git show "${head}:.github/workflows/trusted-uv-materializer-quality-ci.yml" |
  nl -ba | sed -n '1,250p'

printf '%s\n' '== Exact-range workflow additions, deletions, and write-capability candidates =='
git diff --name-status "$base" "$head" -- .github/workflows
git diff --diff-filter=A --name-only "$base" "$head" -- .github/workflows
git diff --diff-filter=D --name-only "$base" "$head" -- .github/workflows
fd -H -t f -e yml -e yaml .github/workflows | sort | while IFS= read -r file; do
  if rg -q -i '^\s*permissions:|contents:\s*write|pull-requests:\s*write|issues:\s*write|actions:\s*write|workflow_dispatch|workflow_run' "$file"; then
    printf '\n-- %s --\n' "$file"
    rg -n -i -C 2 '^\s*permissions:|contents:\s*write|pull-requests:\s*write|issues:\s*write|actions:\s*write|workflow_dispatch|workflow_run' "$file"
  fi
done

printf '%s\n' '== Exact-head non-successful check runs =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | select(.status != "completed" or .conclusion != "success") | {name,status,conclusion,app:(.app.slug),head_sha,details_url}]'

printf '%s\n' '== Exact-head Strix check runs =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | select((.name + " " + .app.slug) | test("strix"; "i")) | {name,status,conclusion,app:(.app.slug),head_sha,details_url}]'

printf '%s\n' '== Exact-head non-successful workflow runs =='
gh api "repos/${repo}/actions/runs?head_sha=${head}&per_page=100" --paginate \
  --jq '[.workflow_runs[] | select(.status != "completed" or .conclusion != "success") | {id,name,status,conclusion,head_sha,html_url}]'

printf '%s\n' '== Exact-head required workflow summaries =='
gh api "repos/${repo}/actions/runs?head_sha=${head}&per_page=100" --paginate \
  --jq '[.workflow_runs[] | select((.name | test("Trusted uv Materializer Quality CI|CodeQL|Python Security|SAST|Security Scan|Secret Scan|Scorecard|OSV|SBOM|Strix"; "i"))) | {id,name,status,conclusion,head_sha}] | sort_by(.name)'

printf '%s\n' '== Unresolved pull-request review threads =='
gh api graphql \
  -F owner='ContextualWisdomLab' -F name='.github' -F number=790 \
  -f query='query($owner:String!,$name:String!,$number:Int!){repository(owner:$owner,name:$name){pullRequest(number:$number){reviewThreads(first:100){nodes{isResolved path line comments(first:1){nodes{author{login} body}}}}}}}' \
  --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]'

Length of output: 8426


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/.github'
base='f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae'
head='9ad4322be89b2387a706de610eaaabdeb99e74c4'

printf '%s\n' '== Requested-head trusted downloader and Git implementation =='
git show "${head}:scripts/ci/materialize_base_python_requirements.py" |
  sed -n '35,365p'

printf '%s\n' '== Retry and malformed-reason regression assertions =='
git show "${head}:tests/test_trusted_uv_portability_and_streaming.py" |
  rg -n -C 5 '425|SSLCertVerificationError|Certificate|EAI_NONAME|EAI_AGAIN|malformed|unclassified|partial|after 3 attempts|sleep|calls|diagnostic|reason'

printf '%s\n' '== Complete requested-head portability and streaming test contract =='
git show "${head}:tests/test_trusted_uv_portability_and_streaming.py" |
  sed -n '1,500p'

printf '%s\n' '== Requested-head trusted Git regression contract =='
git show "${head}:tests/test_trusted_git_executable.py" |
  sed -n '1,240p'

printf '%s\n' '== Requested-head quality workflow =='
git show "${head}:.github/workflows/trusted-uv-materializer-quality-ci.yml" |
  sed -n '1,250p'

printf '%s\n' '== Exact-range workflow changes =='
git diff --name-status "$base" "$head" -- .github/workflows
printf '%s\n' 'added workflow files:'
git diff --diff-filter=A --name-only "$base" "$head" -- .github/workflows
printf '%s\n' 'deleted workflow files:'
git diff --diff-filter=D --name-only "$base" "$head" -- .github/workflows

printf '%s\n' '== Current workflow files with privileged trigger or declared write capability =='
fd -H -t f -e yml -e yaml .github/workflows | sort | while IFS= read -r file; do
  if rg -q -i '^\s*permissions:|contents:\s*write|pull-requests:\s*write|issues:\s*write|actions:\s*write|workflow_dispatch|workflow_run' "$file"; then
    printf '\n-- %s --\n' "$file"
    rg -n -i -C 2 '^\s*permissions:|contents:\s*write|pull-requests:\s*write|issues:\s*write|actions:\s*write|workflow_dispatch|workflow_run' "$file"
  fi
done

printf '%s\n' '== Exact-head non-successful check runs =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | select(.status != "completed" or .conclusion != "success") | {name,status,conclusion,app:(.app.slug),head_sha,details_url}]'

printf '%s\n' '== Exact-head Strix check runs =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | select((.name + " " + .app.slug) | test("strix"; "i")) | {name,status,conclusion,app:(.app.slug),head_sha,details_url}]'

printf '%s\n' '== Exact-head non-successful workflow runs =='
gh api "repos/${repo}/actions/runs?head_sha=${head}&per_page=100" --paginate \
  --jq '[.workflow_runs[] | select(.status != "completed" or .conclusion != "success") | {id,name,status,conclusion,head_sha,html_url}]'

printf '%s\n' '== Exact-head required workflow summaries =='
gh api "repos/${repo}/actions/runs?head_sha=${head}&per_page=100" --paginate \
  --jq '[.workflow_runs[] | select((.name | test("Trusted uv Materializer Quality CI|CodeQL|Python Security|SAST|Security Scan|Secret Scan|Scorecard|OSV|SBOM|Strix"; "i"))) | {id,name,status,conclusion,head_sha}] | sort_by(.name)'

printf '%s\n' '== Unresolved pull-request review threads =='
gh api graphql \
  -F owner='ContextualWisdomLab' -F name='.github' -F number=790 \
  -f query='query($owner:String!,$name:String!,$number:Int!){repository(owner:$owner,name:$name){pullRequest(number:$number){reviewThreads(first:100){nodes{isResolved path line comments(first:1){nodes{author{login} body}}}}}}}' \
  --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]'

Length of output: 51196


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/.github'
head='9ad4322be89b2387a706de610eaaabdeb99e74c4'

printf '%s\n' '== Current workflow files with privileged trigger or declared write capability =='
find .github/workflows -type f \( -name '*.yml' -o -name '*.yaml' \) -print | sort | while IFS= read -r file; do
  if rg -q -i '^\s*permissions:|contents:\s*write|pull-requests:\s*write|issues:\s*write|actions:\s*write|workflow_dispatch|workflow_run' "$file"; then
    printf '\n-- %s --\n' "$file"
    rg -n -i -C 2 '^\s*permissions:|contents:\s*write|pull-requests:\s*write|issues:\s*write|actions:\s*write|workflow_dispatch|workflow_run' "$file"
  fi
done

printf '%s\n' '== Exact-head non-successful check runs =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | select(.status != "completed" or .conclusion != "success") | {name,status,conclusion,app:(.app.slug),head_sha,details_url}]'

printf '%s\n' '== Exact-head Strix check runs =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | select((.name + " " + .app.slug) | test("strix"; "i")) | {name,status,conclusion,app:(.app.slug),head_sha,details_url}]'

printf '%s\n' '== Exact-head non-successful workflow runs =='
gh api "repos/${repo}/actions/runs?head_sha=${head}&per_page=100" --paginate \
  --jq '[.workflow_runs[] | select(.status != "completed" or .conclusion != "success") | {id,name,status,conclusion,head_sha,html_url}]'

printf '%s\n' '== Exact-head required workflow summaries =='
gh api "repos/${repo}/actions/runs?head_sha=${head}&per_page=100" --paginate \
  --jq '[.workflow_runs[] | select((.name | test("Trusted uv Materializer Quality CI|CodeQL|Python Security|SAST|Security Scan|Secret Scan|Scorecard|OSV|SBOM|Strix"; "i"))) | {id,name,status,conclusion,head_sha}] | sort_by(.name)'

printf '%s\n' '== Unresolved pull-request review threads =='
gh api graphql \
  -F owner='ContextualWisdomLab' -F name='.github' -F number=790 \
  -f query='query($owner:String!,$name:String!,$number:Int!){repository(owner:$owner,name:$name){pullRequest(number:$number){reviewThreads(first:100){nodes{isResolved path line comments(first:1){nodes{author{login} body}}}}}}}' \
  --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]'

Length of output: 29293


@seonghobae I completed a new read-only review of exact head 9ad4322be89b2387a706de610eaaabdeb99e74c4 against base f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae.

I cannot approve this head.

The exact-head Strix gate failed.

  • Check: strix
  • Workflow: Strix Security Scan ContextualWisdomLab/.github#790@9ad4322be89b2387a706de610eaaabdeb99e74c4
  • Run: 31076540331
  • Result: failure

The required exact-head workflow summary also reports this Strix run as failed. The merge scheduler cancellation is separate. It does not change the Strix result.

I found no source-level blocker in the requested controls:

  • The retry set is limited to 408, 425, 429, 500, 502, 503, and 504.
  • The retry loop uses three total attempts and delays of 1.0 and 2.0 seconds.
  • TLS, certificate, permanent DNS, malformed URLError.reason, and unclassified OSError failures fail closed.
  • The downloader uses the literal Astral URL and fixed timeout for every attempt.
  • Failed attempts discard partial response bytes.
  • Diagnostics expose bounded type, status, errno, and attempt data.
  • Git resolution uses shutil.which("git", path=os.defpath) and rejects missing or relative paths.
  • The quality workflow has permanent pull_request and push triggers, read-only contents permission, complete branch coverage, docstring enforcement, and compilation checks.
  • The range contains eight files. It adds and deletes no workflow file.
  • The duplicate malformed-reason regression is consolidated without loss of the fail-closed contract.
  • No unresolved review thread exists.

A successful Strix result for this exact head is required before approval.

You are interacting with an AI system.

@opencode-agent
opencode-agent Bot disabled auto-merge August 6, 2026 07:16

Copy link
Copy Markdown
Contributor Author

Exact-head review-only request for 7f72816b6fdc28c72a72c2c6c466cec4a241853f against protected base f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae.

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

Do not update the branch or merge. Validate the descriptor-relative no-follow output path walk, inode binding checks, symlink and hard-link fail-closed behavior, write-progress and fsync contract, closed transport retry classifier, trusted Git resolution, 100% production statement and branch coverage, production docstrings, exact-head security and supply-chain checks, and all unresolved feedback. Any predecessor-head review or workflow evidence is stale.

@coderabbitai

coderabbitai Bot commented Aug 6, 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'
base='f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae'
head='7f72816b6fdc28c72a72c2c6c466cec4a241853f'

printf '%s\n' '== Commit and pull request identity =='
printf 'checked-out HEAD: '; git rev-parse HEAD
printf 'requested head: '; git rev-parse "$head"
printf 'requested base: '; git rev-parse "$base"
git merge-base --is-ancestor "$base" "$head" && echo 'base is an ancestor of requested head'
gh pr view 790 --repo "$repo" --json headRefOid,baseRefOid,reviewDecision,statusCheckRollup \
  --jq '{headRefOid,baseRefOid,reviewDecision,statusCheckRollup:[.statusCheckRollup[]|{name,status,conclusion,detailsUrl}]}'

printf '%s\n' '== Exact-range file scope =='
git diff --name-status "$base" "$head"

printf '%s\n' '== Changed Python source structure =='
git diff --name-only "$base" "$head" -- 'scripts/**/*.py' | while IFS= read -r file; do
  [ -n "$file" ] || continue
  printf '\n-- %s --\n' "$file"
  git show "${head}:${file}" > "/tmp/$(basename "$file")"
  ast-grep outline "/tmp/$(basename "$file")" --items all
done

printf '%s\n' '== Descriptor-relative output and trusted-download controls =='
git show "${head}:scripts/ci/materialize_base_python_requirements.py" |
  nl -ba |
  sed -n '1,460p'

printf '%s\n' '== Changed regression-test references =='
git diff --name-only "$base" "$head" -- 'tests/**/*.py' | while IFS= read -r file; do
  [ -n "$file" ] || continue
  printf '\n-- %s --\n' "$file"
  git show "${head}:${file}" | rg -n -C 4 \
    'openat|dir_fd|O_NOFOLLOW|lstat|fstat|inode|st_ino|symlink|hard.?link|link\(|fsync|write|partial|retry|HTTPError|URLError|SSLError|gaierror|which\("git"|defpath|coverage|docstring' \
    || true
done

printf '%s\n' '== Exact changed workflow files =='
git diff --name-status "$base" "$head" -- .github/workflows
git diff --no-ext-diff --unified=24 "$base" "$head" -- .github/workflows

printf '%s\n' '== Current workflow write-capability candidates =='
fd -H -t f -e yml -e yaml .github/workflows | sort | while IFS= read -r file; do
  if rg -q -i '^\s*permissions:|contents:\s*write|pull-requests:\s*write|issues:\s*write|actions:\s*write|workflow_dispatch|workflow_run' "$file"; then
    printf '\n-- %s --\n' "$file"
    rg -n -i -C 2 '^\s*permissions:|contents:\s*write|pull-requests:\s*write|issues:\s*write|actions:\s*write|workflow_dispatch|workflow_run' "$file"
  fi
done

printf '%s\n' '== Exact-head non-successful check runs =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | select(.status != "completed" or .conclusion != "success") | {name,status,conclusion,app:(.app.slug),head_sha,details_url}]'

printf '%s\n' '== Exact-head security and supply-chain check runs =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | select((.name + " " + .app.slug) | test("codeql|security|semgrep|secret|osv|scorecard|sbom|strix|trusted uv|coderabbit"; "i")) | {name,status,conclusion,app:(.app.slug),head_sha,details_url}] | sort_by(.name)'

printf '%s\n' '== Exact-head non-successful workflow runs =='
gh api "repos/${repo}/actions/runs?head_sha=${head}&per_page=100" --paginate \
  --jq '[.workflow_runs[] | select(.status != "completed" or .conclusion != "success") | {id,name,status,conclusion,head_sha,html_url}]'

printf '%s\n' '== Unresolved review threads =='
gh api graphql \
  -F owner='ContextualWisdomLab' -F name='.github' -F number=790 \
  -f query='query($owner:String!,$name:String!,$number:Int!){repository(owner:$owner,name:$name){pullRequest(number:$number){reviewThreads(first:100){nodes{isResolved path line comments(first:1){nodes{author{login} body}}}}}}}' \
  --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]'

Length of output: 15961


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/.github'
base='f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae'
head='7f72816b6fdc28c72a72c2c6c466cec4a241853f'

printf '%s\n' '== Output-path security implementation =='
git show "${head}:scripts/ci/materialize_base_python_requirements.py" |
  sed -n '540,710p'

printf '%s\n' '== Retry and trusted Git implementation =='
git show "${head}:scripts/ci/materialize_base_python_requirements.py" |
  sed -n '40,370p'

printf '%s\n' '== Output-path security regression contract =='
git show "${head}:tests/test_materialize_output_directory_security.py" |
  sed -n '1,460p'

printf '%s\n' '== Retry and trusted Git regression contracts =='
git show "${head}:tests/test_trusted_uv_portability_and_streaming.py" |
  sed -n '1,500p'
git show "${head}:tests/test_trusted_git_executable.py" |
  sed -n '1,240p'

printf '%s\n' '== Quality workflow contract =='
git show "${head}:.github/workflows/trusted-uv-materializer-quality-ci.yml" |
  sed -n '1,260p'
git show "${head}:tests/test_trusted_uv_materializer_quality_workflow_contract.py" |
  sed -n '1,360p'

printf '%s\n' '== Exact workflow changes =='
git diff --name-status "$base" "$head" -- .github/workflows
git diff --diff-filter=A --name-only "$base" "$head" -- .github/workflows
git diff --diff-filter=D --name-only "$base" "$head" -- .github/workflows

printf '%s\n' '== Current workflow write-capability candidates =='
find .github/workflows -type f \( -name '*.yml' -o -name '*.yaml' \) -print | sort | while IFS= read -r file; do
  if rg -q -i '^\s*permissions:|contents:\s*write|pull-requests:\s*write|issues:\s*write|actions:\s*write|workflow_dispatch|workflow_run' "$file"; then
    printf '\n-- %s --\n' "$file"
    rg -n -i -C 2 '^\s*permissions:|contents:\s*write|pull-requests:\s*write|issues:\s*write|actions:\s*write|workflow_dispatch|workflow_run' "$file"
  fi
done

printf '%s\n' '== Exact-head incomplete or failed check runs =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | select(.status != "completed" or (.conclusion != "success" and .conclusion != "skipped" and .conclusion != "neutral")) | {name,status,conclusion,app:(.app.slug),head_sha,details_url}]'

printf '%s\n' '== Exact-head required security and supply-chain checks =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | select((.name + " " + .app.slug) | test("codeql|security|semgrep|secret|osv|scorecard|sbom|strix|trusted uv|coderabbit|coverage"; "i")) | {name,status,conclusion,app:(.app.slug),head_sha,details_url}] | sort_by(.name)'

printf '%s\n' '== Exact-head incomplete or failed workflow runs =='
gh api "repos/${repo}/actions/runs?head_sha=${head}&per_page=100" --paginate \
  --jq '[.workflow_runs[] | select(.status != "completed" or .conclusion != "success") | {id,name,status,conclusion,head_sha,html_url}]'

printf '%s\n' '== Unresolved pull-request review threads =='
gh api graphql \
  -F owner='ContextualWisdomLab' -F name='.github' -F number=790 \
  -f query='query($owner:String!,$name:String!,$number:Int!){repository(owner:$owner,name:$name){pullRequest(number:$number){reviewThreads(first:100){nodes{isResolved path line comments(first:1){nodes{author{login} body}}}}}}}' \
  --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]'

Length of output: 85624


@seonghobae I cannot approve exact head 7f72816b6fdc28c72a72c2c6c466cec4a241853f yet.

I found no source-level blocker in the requested controls.

  • The output-path code uses descriptor-relative os.open(..., dir_fd=...) calls with os.O_NOFOLLOW.
  • It validates device and inode bindings for directories and files.
  • It rejects symlinked path components, symlinked destination files, non-regular files, and hard-linked files.
  • It checks that every os.write call makes progress.
  • It calls os.fsync before it validates the final file binding.
  • The regression suite covers path replacement, removal, symlinks, hard links, write failure, and descriptor cleanup.
  • The retry classifier remains closed to the defined HTTP statuses, temporary DNS, timeouts, and listed transport errnos.
  • TLS, certificate, permanent DNS, malformed URLError.reason, and unclassified local failures fail closed.
  • Git resolution uses shutil.which("git", path=os.defpath) and requires an absolute executable.
  • The quality workflow defines 100% branch coverage, production docstring enforcement, compilation, and Python 3.10 compatibility.
  • The changed quality workflow has contents: read. The range adds no workflow file.
  • No unresolved review thread exists.

Two exact-head gates are incomplete:

  • coverage-evidence is queued in Required OpenCode Review run 31080458009.
  • strix is in_progress in Strix Security Scan run 31080458088.

These gates are required for the requested coverage and security evidence. I will not approve until both complete successfully on this same head.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review exact current head 6aca76c7028406985b67ce65fdcd24d9d8034be9. The malformed string URLError.reason contract is consolidated in the canonical portability test, the duplicate temporary test file was removed, all direct exact-head quality/security workflows are green, and no review thread remains unresolved. Preserve the bounded diagnostic policy: arbitrary exception text must not be published.

Copy link
Copy Markdown
Contributor Author

@opencode-agent

Review-only exact-head request for 6aca76c7028406985b67ce65fdcd24d9d8034be9; do not update branches or merge. Validate the closed transient classifier, descriptor-pinned output boundary, trusted Git resolution, malformed URLError.reason fail-closed behavior, exact-head tests, 100% statement/branch coverage, and production docstrings.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/.github'
base='f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae'
head='6aca76c7028406985b67ce65fdcd24d9d8034be9'

printf '%s\n' '== Exact pull request identity and range =='
printf 'checked-out HEAD: '; git rev-parse HEAD
printf 'requested HEAD: '; git rev-parse "$head"
printf 'base: '; git rev-parse "$base"
git merge-base --is-ancestor "$base" "$head" && echo 'base is an ancestor of requested head'
gh pr view 790 --repo "$repo" --json headRefOid,baseRefOid,reviewDecision \
  --jq '{headRefOid,baseRefOid,reviewDecision}'
git diff --name-status "$base" "$head"

printf '%s\n' '== Production source outline =='
git show "${head}:scripts/ci/materialize_base_python_requirements.py" >/tmp/materialize_base_python_requirements.py
ast-grep outline /tmp/materialize_base_python_requirements.py --items all

printf '%s\n' '== Retry classification and bounded diagnostics implementation =='
nl -ba /tmp/materialize_base_python_requirements.py | sed -n '130,350p'
rg -n -C 8 \
  'URLError|reason|diagnostic|str\(|repr\(|HTTPError|SSLError|gaierror|OSError|errno|attempt|retry|sleep' \
  /tmp/materialize_base_python_requirements.py

printf '%s\n' '== Canonical retry regression test =='
git show "${head}:tests/test_trusted_uv_portability_and_streaming.py" \
  | nl -ba | sed -n '1,520p'

printf '%s\n' '== Exact changes for retry tests and workflow =='
git diff --no-ext-diff --unified=32 "$base" "$head" -- \
  scripts/ci/materialize_base_python_requirements.py \
  tests/test_trusted_uv_portability_and_streaming.py \
  tests/test_trusted_uv_retry_documentation.py \
  .github/workflows/trusted-uv-materializer-quality-ci.yml

printf '%s\n' '== Exact-range workflow additions and deletions =='
git diff --name-status "$base" "$head" -- .github/workflows
git diff --diff-filter=A --name-only "$base" "$head" -- .github/workflows
git diff --diff-filter=D --name-only "$base" "$head" -- .github/workflows

printf '%s\n' '== Exact-head incomplete or failed checks =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | select(.status != "completed" or (.conclusion != "success" and .conclusion != "skipped" and .conclusion != "neutral")) | {name,status,conclusion,app:(.app.slug),head_sha,details_url}]'

printf '%s\n' '== Exact-head required check summary =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | select((.name + " " + .app.slug) | test("trusted uv|codeql|python security|semgrep|security scan|secret scan|scorecard|osv|sbom|strix|coderabbit|coverage"; "i")) | {name,status,conclusion,app:(.app.slug),head_sha}] | sort_by(.name)'

printf '%s\n' '== Exact-head incomplete or failed workflow runs =='
gh api "repos/${repo}/actions/runs?head_sha=${head}&per_page=100" --paginate \
  --jq '[.workflow_runs[] | select(.status != "completed" or .conclusion != "success") | {id,name,status,conclusion,head_sha,html_url}]'

printf '%s\n' '== Unresolved pull request review threads =='
gh api graphql \
  -F owner='ContextualWisdomLab' -F name='.github' -F number=790 \
  -f query='query($owner:String!,$name:String!,$number:Int!){repository(owner:$owner,name:$name){pullRequest(number:$number){reviewThreads(first:100){nodes{isResolved path line comments(first:1){nodes{author{login} body}}}}}}}' \
  --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]'

Length of output: 7719


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/.github'
base='f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae'
head='6aca76c7028406985b67ce65fdcd24d9d8034be9'
source_file='/tmp/materialize_base_python_requirements.py'

git show "${head}:scripts/ci/materialize_base_python_requirements.py" >"$source_file"

printf '%s\n' '== Retry classification and bounded diagnostics implementation =='
sed -n '175,305p' "$source_file"
printf '%s\n' '== Bounded-diagnostic call sites =='
grep -n -C 8 -E 'URLError|reason|diagnostic|str\(|repr\(|HTTPError|SSLError|gaierror|OSError|errno|attempt|retry|sleep' "$source_file" || true

printf '%s\n' '== Canonical retry regression contract =='
git show "${head}:tests/test_trusted_uv_portability_and_streaming.py" |
  sed -n '1,520p'

printf '%s\n' '== Retry documentation regression contract =='
git show "${head}:tests/test_trusted_uv_retry_documentation.py" |
  sed -n '1,260p'

printf '%s\n' '== Exact diff for malformed-reason test consolidation =='
git diff --no-ext-diff --unified=36 "$base" "$head" -- \
  tests/test_trusted_uv_portability_and_streaming.py \
  tests/test_trusted_uv_retry_documentation.py \
  scripts/ci/materialize_base_python_requirements.py

printf '%s\n' '== Quality workflow and workflow scope =='
git show "${head}:.github/workflows/trusted-uv-materializer-quality-ci.yml" |
  sed -n '1,260p'
git diff --name-status "$base" "$head" -- .github/workflows
git diff --diff-filter=A --name-only "$base" "$head" -- .github/workflows
git diff --diff-filter=D --name-only "$base" "$head" -- .github/workflows

printf '%s\n' '== Exact-head incomplete or failed checks =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | select(.status != "completed" or (.conclusion != "success" and .conclusion != "skipped" and .conclusion != "neutral")) | {name,status,conclusion,app:(.app.slug),head_sha,details_url}]'

printf '%s\n' '== Exact-head required check summary =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | select((.name + " " + .app.slug) | test("trusted uv|codeql|python security|semgrep|security scan|secret scan|scorecard|osv|sbom|strix|coderabbit|coverage"; "i")) | {name,status,conclusion,app:(.app.slug),head_sha}] | sort_by(.name)'

printf '%s\n' '== Exact-head incomplete or failed workflow runs =='
gh api "repos/${repo}/actions/runs?head_sha=${head}&per_page=100" --paginate \
  --jq '[.workflow_runs[] | select(.status != "completed" or .conclusion != "success") | {id,name,status,conclusion,head_sha,html_url}]'

printf '%s\n' '== Unresolved pull request review threads =='
gh api graphql \
  -F owner='ContextualWisdomLab' -F name='.github' -F number=790 \
  -f query='query($owner:String!,$name:String!,$number:Int!){repository(owner:$owner,name:$name){pullRequest(number:$number){reviewThreads(first:100){nodes{isResolved path line comments(first:1){nodes{author{login} body}}}}}}}' \
  --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]'

Length of output: 84795


@seonghobae I reviewed exact head 6aca76c7028406985b67ce65fdcd24d9d8034be9 against base f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae.

I found no source-level blocker in the malformed URLError.reason handling.

  • The canonical regression is in tests/test_trusted_uv_portability_and_streaming.py.
  • A string-valued URLError.reason fails on the first attempt.
  • The failure message contains URLError only.
  • The regression verifies that the arbitrary text "malformed" is not published.
  • _transport_failure_root() only unwraps URLError.reason when the reason is a BaseException.
  • The non-retry diagnostic uses type(root).__name__. It does not use arbitrary exception text.
  • No unresolved pull request review thread exists.
  • The quality, security, and supply-chain checks shown for this SHA are successful or neutral.

I cannot approve yet.

The exact-head strix check is still in_progress.

  • Workflow: Strix Security Scan ContextualWisdomLab/.github#790@6aca76c7028406985b67ce65fdcd24d9d8034be9
  • Run: 31082364831

A completed successful Strix result for this same SHA is required before approval.

⚠️ 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

@cwl-noema-review

Independently review exact current head 6aca76c7028406985b67ce65fdcd24d9d8034be9; focus on fail-closed transport classification, output-path TOCTOU resistance, supply-chain integrity, and bounded non-leaking diagnostics. Do not mutate the branch or merge.

@seonghobae
seonghobae enabled auto-merge (squash) August 6, 2026 07:55

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review

Review-only request for exact head 6aca76c7028406985b67ce65fdcd24d9d8034be9 against exact base f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae; do not mutate the branch or merge. The previously pending exact-head Strix gate is now complete and successful, alongside Trusted uv Materializer Quality CI, CodeQL, Python Security, SAST Semgrep, Security Scan, Secret Scan, OSV-Scanner, Scorecard, SBOM, and CodeRabbit status. All review threads are resolved. Independently validate the closed transient classifier, descriptor-pinned output path, trusted absolute Git resolution, bounded non-leaking diagnostics, 100% production statement/branch coverage, and production docstrings. Submit a formal GitHub APPROVE only if no blocker remains; do not reuse predecessor-head evidence.

@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-head security blocker on 851eb95ae8f595fceb11e15803df6c992680aefb: the new Strix classifier is not fail-closed and must not be used to neutralize a security gate in its current form.

SEMANTIC_NONFINDING deliberately contains **ID:** vuln-0001, **Severity:** HIGH, and **CVSS:** 7.3, yet test_semantic_nonfinding_requires_consistent_no_finding_sections requires the classifier to return True. The production classifier does not reject vulnerability IDs, severity labels, or nonzero CVSS scores; it only rejects a small set of location/endpoint/CVE patterns. This directly contradicts the module contract that an internally inconsistent security claim remains blocking and would convert explicit high-severity scanner metadata into success based on free-text phrases.

Do not bypass or reinterpret a failed Strix result this way. Fix test-first by requiring any vulnerability/finding identifier, severity other than an explicit clean value, nonzero or malformed CVSS, concrete weakness/CWE/GHSA/advisory marker, exploitability statement, or contradictory metadata to remain blocking. Prefer removing this classifier entirely unless the trusted default-branch Strix workflow has a documented, independently reviewed need for it; it is currently not referenced by .github/workflows/strix.yml, so these two added files are dead security-sensitive scope rather than a remediation. Do not count the current CodeRabbit status or any predecessor Strix result as approval, and regenerate every exact-head gate after resolving this finding.

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review

Read-only independent review request for exact current head d48e035000e436b06aa44b7fe8d06b6ae6300fe8 against exact base f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae; do not mutate the branch or merge. The transient semantic-Strix classifier and one-shot branch writer were fully removed, and the resulting tree is identical to predecessor clean head 6aca76c7028406985b67ce65fdcd24d9d8034be9, but predecessor evidence is not reusable. Validate the exact-head closed retry classifier, descriptor-pinned output path, trusted Git resolution, bounded diagnostics, 100% production statement/branch coverage, and all current GitHub/security gates including Strix. Submit a formal GitHub APPROVE only if every required check is completed successfully on this exact head and no blocker remains.

Copy link
Copy Markdown
Contributor Author

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

Please independently review exact current head d48e035000e436b06aa44b7fe8d06b6ae6300fe8 against exact base f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae. The predecessor-head semantic Strix-classifier scope identified as unsafe has been removed; the current nine-file diff contains only the trusted-uv materializer, its immutable quality workflow, deterministic tests, changelog, and operator doctoring. Current-head Trusted uv Materializer Quality CI, CodeQL, Python Security, SAST, Security Scan, Secret Scan, OSV, Scorecard, SBOM, and CodeRabbit status are successful, and review threads are resolved. Verify the closed transient retry set, fail-closed TLS/DNS classification, trusted absolute Git resolution, descriptor-pinned output creation, exact coverage/docstring evidence, and absence of temporary write-capable workflows. Submit APPROVE only if no exact-head blocker remains; do not mutate the branch or reuse predecessor-head evidence.

Copy link
Copy Markdown
Contributor Author

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

Review-only request for exact current head d48e035000e436b06aa44b7fe8d06b6ae6300fe8 against protected base f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae. Do not mutate the branch or merge. Verify that the superseded Strix semantic-classifier files are absent, the trusted-uv retry classifier remains closed and fail-closed, output traversal/writes are descriptor-pinned, every current-head quality/security/supply-chain workflow and CodeRabbit status is successful, and no unresolved thread remains. Submit a formal APPROVED review only when independent non-author approval is warranted.

@coderabbitai

coderabbitai Bot commented Aug 6, 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'
base='f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae'
head='d48e035000e436b06aa44b7fe8d06b6ae6300fe8'

printf '%s\n' '== Exact commit and pull request identity =='
printf 'checked-out HEAD: '; git rev-parse HEAD
printf 'requested head: '; git rev-parse "$head"
printf 'requested base: '; git rev-parse "$base"
git merge-base --is-ancestor "$base" "$head" && echo 'requested base is an ancestor of requested head'
gh pr view 790 --repo "$repo" --json headRefOid,baseRefOid,reviewDecision \
  --jq '{headRefOid,baseRefOid,reviewDecision}'

printf '%s\n' '== Exact-range file scope =='
git diff --name-status "$base" "$head"

printf '%s\n' '== Superseded Strix semantic-classifier paths in requested tree and range =='
git ls-tree -r --name-only "$head" | rg -i 'strix|semantic.*classif|classif.*semantic' || true
git diff --name-status "$base" "$head" | rg -i 'strix|semantic.*classif|classif.*semantic' || true

printf '%s\n' '== Trusted downloader, diagnostics, Git, and descriptor-pinned output implementation =='
git show "${head}:scripts/ci/materialize_base_python_requirements.py" |
  nl -ba | sed -n '35,760p'

printf '%s\n' '== Exact-range regression and quality-workflow contracts =='
for file in \
  tests/test_trusted_uv_portability_and_streaming.py \
  tests/test_trusted_git_executable.py \
  tests/test_materialize_output_directory_security.py \
  tests/test_trusted_uv_materializer_quality_workflow_contract.py \
  .github/workflows/trusted-uv-materializer-quality-ci.yml
do
  printf '\n-- %s --\n' "$file"
  git show "${head}:${file}" | nl -ba | sed -n '1,560p'
done

printf '%s\n' '== Workflow changes and write-capability candidates at requested head =='
git diff --name-status "$base" "$head" -- .github/workflows
git diff --diff-filter=A --name-only "$base" "$head" -- .github/workflows
git diff --diff-filter=D --name-only "$base" "$head" -- .github/workflows
git ls-tree -r --name-only "$head" .github/workflows | while IFS= read -r file; do
  content=$(git show "${head}:${file}")
  if printf '%s\n' "$content" | rg -q -i '^\s*permissions:|contents:\s*write|pull-requests:\s*write|issues:\s*write|actions:\s*write|workflow_dispatch|workflow_run'; then
    printf '\n-- %s --\n' "$file"
    printf '%s\n' "$content" | rg -n -i -C 2 \
      '^\s*permissions:|contents:\s*write|pull-requests:\s*write|issues:\s*write|actions:\s*write|workflow_dispatch|workflow_run'
  fi
done

printf '%s\n' '== Exact-head incomplete or failed check runs =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | select(.status != "completed" or (.conclusion != "success" and .conclusion != "skipped" and .conclusion != "neutral")) | {name,status,conclusion,app:(.app.slug),head_sha,details_url}]'

printf '%s\n' '== Exact-head required quality, security, and supply-chain check runs =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | select((.name + " " + .app.slug) | test("trusted uv|codeql|python security|semgrep|security scan|secret scan|scorecard|osv|sbom|strix|coderabbit|coverage"; "i")) | {name,status,conclusion,app:(.app.slug),head_sha,details_url}] | sort_by(.name)'

printf '%s\n' '== Exact-head incomplete or failed workflow runs =='
gh api "repos/${repo}/actions/runs?head_sha=${head}&per_page=100" --paginate \
  --jq '[.workflow_runs[] | select(.status != "completed" or .conclusion != "success") | {id,name,status,conclusion,head_sha,html_url}]'

printf '%s\n' '== Unresolved pull-request review threads =='
gh api graphql \
  -F owner='ContextualWisdomLab' -F name='.github' -F number=790 \
  -f query='query($owner:String!,$name:String!,$number:Int!){repository(owner:$owner,name:$name){pullRequest(number:$number){reviewThreads(first:100){nodes{isResolved path line comments(first:1){nodes{author{login} body}}}}}}}' \
  --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]'

Length of output: 5727


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/.github'
base='f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae'
head='d48e035000e436b06aa44b7fe8d06b6ae6300fe8'

printf '%s\n' '== Exact-range Strix semantic-classifier references and file operations =='
git diff --no-ext-diff --unified=4 "$base" "$head" -- \
  ':!scripts/ci/materialize_base_python_requirements.py' |
  rg -n -i -C 3 'semantic.{0,20}classif|classif.{0,20}semantic|strix' || true
git diff --name-status "$base" "$head" |
  rg -i 'strix|semantic|classif' || true

printf '%s\n' '== Semantic-classifier references remaining in requested tree =='
git grep -n -i -E 'semantic.{0,20}classif|classif.{0,20}semantic' "$head" -- . \
  || true

printf '%s\n' '== Trusted downloader, bounded diagnostics, trusted Git, and output-path implementation =='
git show "${head}:scripts/ci/materialize_base_python_requirements.py" |
  sed -n '35,780p'

printf '%s\n' '== Focused retry, diagnostics, Git, and output-path symbols =='
git show "${head}:scripts/ci/materialize_base_python_requirements.py" |
  grep -n -E -C 10 \
    'HTTPError|URLError|SSLError|Certificate|gaierror|EAI_|errno|retry|attempt|sleep|diagnostic|which\("git"|os\.defpath|O_NOFOLLOW|dir_fd|lstat|fstat|st_ino|st_dev|os\.write|fsync' \
  || true

printf '%s\n' '== Regression contracts =='
for file in \
  tests/test_trusted_uv_portability_and_streaming.py \
  tests/test_trusted_git_executable.py \
  tests/test_materialize_output_directory_security.py \
  tests/test_trusted_uv_materializer_quality_workflow_contract.py \
  tests/test_trusted_uv_retry_documentation.py
do
  printf '\n-- %s --\n' "$file"
  git show "${head}:${file}" | sed -n '1,620p'
done

printf '%s\n' '== Requested-head quality workflow =='
git show "${head}:.github/workflows/trusted-uv-materializer-quality-ci.yml" |
  sed -n '1,320p'

printf '%s\n' '== Exact-range workflow changes =='
git diff --name-status "$base" "$head" -- .github/workflows
git diff --no-ext-diff --unified=28 "$base" "$head" -- .github/workflows

printf '%s\n' '== Requested-head workflows with privileged trigger or declared write permission =='
git ls-tree -r --name-only "$head" .github/workflows | while IFS= read -r file; do
  if git show "${head}:${file}" |
    grep -q -i -E '^[[:space:]]*permissions:|contents:[[:space:]]*write|pull-requests:[[:space:]]*write|issues:[[:space:]]*write|actions:[[:space:]]*write|workflow_dispatch|workflow_run'; then
    printf '\n-- %s --\n' "$file"
    git show "${head}:${file}" |
      grep -n -i -E -C 2 \
        '^[[:space:]]*permissions:|contents:[[:space:]]*write|pull-requests:[[:space:]]*write|issues:[[:space:]]*write|actions:[[:space:]]*write|workflow_dispatch|workflow_run'
  fi
done

printf '%s\n' '== Exact-head incomplete or failed check runs =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | select(.status != "completed" or (.conclusion != "success" and .conclusion != "skipped" and .conclusion != "neutral")) | {name,status,conclusion,app:(.app.slug),head_sha,details_url}]'

printf '%s\n' '== Exact-head quality, security, supply-chain, Strix, and CodeRabbit checks =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | select((.name + " " + .app.slug) | test("trusted uv|codeql|python security|semgrep|security scan|secret scan|scorecard|osv|sbom|strix|coderabbit|coverage"; "i")) | {name,status,conclusion,app:(.app.slug),head_sha,details_url}] | sort_by(.name)'

printf '%s\n' '== Exact-head incomplete or failed workflow runs =='
gh api "repos/${repo}/actions/runs?head_sha=${head}&per_page=100" --paginate \
  --jq '[.workflow_runs[] | select(.status != "completed" or .conclusion != "success") | {id,name,status,conclusion,head_sha,html_url}]'

printf '%s\n' '== Unresolved pull-request review threads =='
gh api graphql \
  -F owner='ContextualWisdomLab' -F name='.github' -F number=790 \
  -f query='query($owner:String!,$name:String!,$number:Int!){repository(owner:$owner,name:$name){pullRequest(number:$number){reviewThreads(first:100){nodes{isResolved path line comments(first:1){nodes{author{login} body}}}}}}}' \
  --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]'

Length of output: 112701


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/.github'
head='d48e035000e436b06aa44b7fe8d06b6ae6300fe8'

printf '%s\n' '== Current pull request identity and review decision =='
gh pr view 790 --repo "$repo" \
  --json headRefOid,baseRefOid,reviewDecision,reviews \
  --jq '{headRefOid,baseRefOid,reviewDecision,reviews:[.reviews[]|{author:.author.login,state,commit_id:.commit.id,submitted_at}]}'

printf '%s\n' '== Exact-head CodeRabbit check runs =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | select((.name + " " + .app.slug + " " + .app.name) | test("coderabbit|code rabbit"; "i")) | {name,status,conclusion,app:(.app.slug),app_name:.app.name,head_sha,details_url}]'

printf '%s\n' '== Exact-head CodeRabbit commit statuses =='
gh api "repos/${repo}/commits/${head}/status" \
  --jq '[.statuses[] | select((.context + " " + (.creator.login // "")) | test("coderabbit|code rabbit"; "i")) | {context,state,creator:(.creator.login),target_url,description}]'

printf '%s\n' '== Exact-head reviews and comments from CodeRabbit =='
gh api "repos/${repo}/pulls/790/reviews?per_page=100" --paginate \
  --jq '[.[] | select((.user.login // "") | test("coderabbit"; "i")) | {user:.user.login,state,commit_id,submitted_at,body}]'

Length of output: 8460


@seonghobae I completed an independent, read-only review of exact head d48e035000e436b06aa44b7fe8d06b6ae6300fe8 against f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae.

I found no blocker.

  • The pull request head and base match the requested commits.
  • The base is an ancestor of the head.
  • No superseded Strix semantic-classifier reference remains in the requested tree.
  • The range changes nine files. It changes one workflow. That workflow has contents: read. The range adds no workflow file.
  • The retry classifier is closed to HTTP 408, 425, 429, 500, 502, 503, and 504, EAI_AGAIN, timeouts, and the explicit transient transport errno set.
  • TLS and certificate failures, permanent DNS failures, malformed URLError.reason values, and unclassified local errors fail after one attempt.
  • Diagnostics use bounded status, type, errno, and attempt data. They do not include arbitrary exception text.
  • Each retry uses the fixed literal Astral URL and fixed timeout. Failed attempts discard partial response bytes.
  • The download path retains no-proxy handling, redirect rejection, final origin and port validation, read bounds, checksum validation, archive validation, version validation, and frozen offline export controls.
  • Git resolution uses shutil.which("git", path=os.defpath) and rejects missing or relative results.
  • Output creation uses descriptor-relative operations with O_NOFOLLOW. It validates device and inode bindings, rejects symlinks and multiply linked files, checks write progress, and fsyncs files and the output directory.
  • The quality workflow defines Python 3.10 compatibility, 100% production statement and branch coverage, 100% production docstrings, and compilation checks.
  • Exact-head quality, security, supply-chain, and Strix checks completed successfully. No exact-head workflow run is incomplete or failed.
  • The exact-head CodeRabbit commit status is successful. Its status description reports Review rate limited.
  • No unresolved review thread exists.

[approve]

You are interacting with an AI system.

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.

1 participant