Skip to content

fix(ci): identify trusted uv downloader - #1008

Open
seonghobae wants to merge 11 commits into
mainfrom
codex/coverage-uv-retry
Open

fix(ci): identify trusted uv downloader#1008
seonghobae wants to merge 11 commits into
mainfrom
codex/coverage-uv-retry

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Set a fixed, non-caller-controlled User-Agent on the existing trusted uv opener.
  • Preserve the fixed HTTPS origin, no-proxy behavior, redirect rejection, bounded archive size, literal audited download sink, and SHA-256 verification.
  • Make archive-installer tests explicitly model the supported Linux x86_64 runner so the same contract can be exercised from local macOS development.
  • Harden workspace/output fail-closed behavior and diagnostics without making caller-controlled paths, redirect targets, headers, or integrity inputs authoritative.

Root cause

Central coverage-evidence can receive an upstream HTTP 403 when Python uses its default request identifier. The pinned archive succeeds through the same fixed trust boundary when the request carries the fixed organization identifier. No URL, redirect target, proxy, caller-supplied header, or integrity input becomes dynamic.

Exact current scope

Exact head: c34b367d0926af0f14a9186b0e8dd64dbeb06077
Protected base: main@6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba

The live protected-base diff is limited to four files:

  • scripts/ci/materialize_base_python_requirements.py
  • tests/test_materialize_base_python_requirements.py
  • tests/test_uv_redirect_boundary.py
  • tests/test_uv_workspace_fail_closed.py

The temporary branch-writing repair workflow is absent from the live diff. The current fourth file is a focused fail-closed regression for workspace/output handling, not a persistent workflow or downstream repository change.

Exact-head validation state

All merge evidence binds to exact head c34b367d0926af0f14a9186b0e8dd64dbeb06077; predecessor-head validation is diagnostic only.

Every currently visible exact-head repository workflow is terminal-success:

  • Trusted uv Materializer Quality CI;
  • Security Scan;
  • SAST Semgrep;
  • Scorecard PR;
  • OSV-Scanner PR;
  • SBOM Generation;
  • Secret Scan;
  • CodeQL PR; and
  • Python Security.

No queued, in-progress, failed, skipped-required, or action_required repository workflow remains on this exact head.

Review/protection gate

The exact-head checks are green, but this PR is not merge-ready yet. The formal review list still contains only a GHAS COMMENTED review; no qualifying independent non-author approval is recorded. Do not self-approve, use administrative bypass, or infer approval from automated check success. Normal branch protection, independent-approval, last-push, resolved-thread, and exact-head evidence requirements remain authoritative.

Downstream evidence and dependency order

This PR is the bounded control-plane prerequisite for central coverage/review reruns that have been failing before leaf-repository tests while materializing protected-base Python locks.

For ContextualWisdomLab/bandscope#783 at exact head 6f81f52c193c1e327d078eba7a2ea3bdbfbc87c2, repository-owned CI, build, release, SBOM, SAST, Bandit, secret-scan, security-audit, and Security Scan are terminal-success, while predecessor central coverage failed at trusted uv materialization with trusted uv archive download failed: HTTPError. That is the central downloader failure family corrected here, not a BandScope source finding.

Do not redispatch unchanged BandScope reviewer-agent work until this prerequisite reaches protected central main; exact-current-head central evidence generated before protected integration cannot prove that downstream repositories inherited the fix. After protected merge, rerun central coverage/review once for each then-current BandScope head that otherwise satisfies its repository gates. PR #790 remains a separate complementary lane for explicitly classified transient transport retries and broader materializer hardening; do not conflate a permanent identification/403 repair with retry semantics.

Summary by CodeRabbit

  • 개선 사항

    • 신뢰된 uv 다운로드 요청에 식별용 User-Agent가 추가되었습니다.
    • 설치 및 검증 과정이 지원되는 실행 환경에서 일관되게 동작하도록 개선되었습니다.
    • 출력 경로를 안전하게 처리하고, 경로 변경이나 심볼릭 링크 사용을 검증합니다.
    • 오류 메시지에 민감한 경로 및 인증 정보가 노출되지 않도록 개선되었습니다.
  • 테스트

    • 다운로드 요청 헤더, 출력 경로 보안, 오류 메시지의 민감 정보 보호 검증을 강화했습니다.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: fb7bc75a-253c-4381-aefa-7a71ebfb094e

📥 Commits

Reviewing files that changed from the base of the PR and between d14ad6c and c34b367.

📒 Files selected for processing (3)
  • scripts/ci/materialize_base_python_requirements.py
  • tests/test_materialize_base_python_requirements.py
  • tests/test_uv_workspace_fail_closed.py

📝 Walkthrough

Walkthrough

신뢰된 uv 요청에 고정된 ContextualWisdomLab-coverage/1.0 User-Agent를 추가했습니다. materialize()는 디스크립터 기반으로 출력 파일을 기록하고 디렉터리 교체를 검증합니다. workspace 오류 메시지의 민감한 값 노출도 제한했습니다.

Changes

신뢰된 uv materialization 변경

Layer / File(s) Summary
신뢰된 uv User-Agent 및 실행 테스트
scripts/ci/materialize_base_python_requirements.py, tests/test_uv_redirect_boundary.py, tests/test_materialize_base_python_requirements.py
urllib opener에 고정된 User-Agent를 설정했습니다. 관련 테스트는 Linux x86_64 실행 환경을 사용하고 opener 헤더를 검증합니다.
안전한 materialize 출력 처리
scripts/ci/materialize_base_python_requirements.py
출력 디렉터리와 파일을 심볼릭 링크를 따르지 않는 방식으로 열고 기록합니다. 기록 전후에 디렉터리 교체 여부를 검증합니다.
workspace 오류 및 경계 조건 검증
scripts/ci/materialize_base_python_requirements.py, tests/test_uv_workspace_fail_closed.py, tests/test_materialize_base_python_requirements.py
workspace 오류에서 파싱된 경로를 제거했습니다. 출력 디렉터리의 생성·교체 중 심볼릭 링크 공격과 기존 빈 디렉터리 처리를 검증합니다.

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

Merge Risk: ⚪ Minimal · up to c34b3

The change uses a fixed downloader identifier while preserving the existing trust and integrity boundaries. No actionable merge-blocking risk remains beyond completing the normal current-head checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant CI
  participant materialize
  participant output_directory
  participant output_files
  CI->>materialize: trusted uv 실행 및 materialize 호출
  materialize->>output_directory: 비심볼릭 디렉터리 열기
  materialize->>output_files: lock 파일과 manifest 기록
  materialize->>output_directory: 디렉터리 교체 여부 검증
  materialize-->>CI: 성공 또는 오류 반환
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 87.50% 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 제목은 신뢰된 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 codex/coverage-uv-retry

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.

@seonghobae
seonghobae marked this pull request as ready for review August 14, 2026 16:14

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review

Please review exact current head d14ad6ca0260eabf1373213e76e521b98a57e86b for the trusted uv downloader fix. Validate the fixed-origin/no-proxy/redirect-rejection/bounded-size/SHA-256 trust boundary and the Linux x86_64 fixture contract; do not reuse predecessor-head evidence or enable merge authority.

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review
@opencode-agent

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review

Review only exact current head d14ad6ca0260eabf1373213e76e521b98a57e86b against protected main@6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. This is the bounded central prerequisite that fixes trusted-uv archive HTTP 403 materialization by setting a fixed non-caller-controlled User-Agent while preserving the literal trusted HTTPS origin, no-proxy opener, redirect rejection, bounded archive size, SHA-256 verification, and supported Linux x86_64 installer contract. Exact-head Trusted uv Materializer Quality CI, Python Security, Security Scan, SAST Semgrep, CodeQL PR, Secret Scan, SBOM, Scorecard, and OSV-Scanner are terminal-success; there are currently zero inline review threads. Independently verify tests, 100% statement/branch coverage, public docstrings, trust-boundary invariants, current-head mergeability and branch protection. Do not reuse predecessor-head evidence or self/author approval. Publish a formal current-head review only if every required condition is satisfied; otherwise leave precise current-head blockers. Do not merge or bypass protection.

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review

Fresh exact-head retry for protected central prerequisite d14ad6ca0260eabf1373213e76e521b98a57e86b on main@6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. Review only this head. Verify the fixed non-caller-controlled User-Agent preserves the literal trusted HTTPS origin, no-proxy opener, redirect rejection, bounded archive size and SHA-256 pin, and verify the Linux x86_64 fixture plus the exact-head 100% owned statement/branch and public-docstring gates. Current exact-head Trusted uv Materializer Quality CI, Python Security, Security Scan, Semgrep, CodeQL, Secret Scan, SBOM, Scorecard and OSV workflows are terminal-success; review threads are empty. The protected branch requires two qualifying approvals and last-push approval; do not reuse older evidence, self/author approve, update the branch, merge, auto-merge, or bypass protection. Publish formal current-head reviews only when your independent contracts are satisfied; otherwise leave precise actionable blockers.

Copy link
Copy Markdown
Contributor Author

Consumer evidence: ContextualWisdomLab/bandscope#783 exact head 164e6f2e7d8deec07d885d2ef00a0f684bc6ef47 is blocked by the same central trusted-uv materialization failure. OpenCode dispatch run 31852305206 reached coverage-evidence, then failed in Measure test and docstring evidence; the check annotation is Could not materialize base Python locks: trusted uv archive download failed: HTTPError. BandScope's repository-local exact-head CI, Security Scan, security-audit, SAST, Bandit, secret scan, SBOM, build-baseline, and release gates are green, so this central bootstrap failure is the remaining review-evidence prerequisite rather than a BandScope source failure.

After this prerequisite reaches protected main, rerun BandScope #783's central OpenCode review on the unchanged exact head. Do not reuse the existing CHANGES_REQUESTED, predecessor-run coverage evidence, or any pre-merge validation as approval evidence.

Copy link
Copy Markdown
Contributor Author

@opencode-agent

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review
@opencode-agent

@seonghobae
seonghobae enabled auto-merge (squash) August 15, 2026 05:55

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review @opencode-agent

Please perform fresh independent review of exact current head d14ad6ca0260eabf1373213e76e521b98a57e86b against protected main. Repository quality, security, SAST, SBOM, Scorecard, OSV, and CodeQL checks on this exact head are terminal-success; CodeRabbit reports no actionable findings. This request does not authorize branch mutation or merge. A formal qualifying non-author approval must still satisfy branch protection and last-push requirements.

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review
Please review exact current head d14ad6ca0260eabf1373213e76e521b98a57e86b only. Verify the trusted uv downloader root-cause fix, test evidence, security boundary, and merge-readiness against protected main. Do not rely on predecessor-head evidence.

Copy link
Copy Markdown
Contributor Author

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

Please review exact head d14ad6ca0260eabf1373213e76e521b98a57e86b. The trusted downloader now sends only a fixed, repository-owned User-Agent while retaining the literal Astral HTTPS URL, disabled proxies, redirect rejection, bounded streaming, pinned SHA-256, fixed archive member, and executable-version verification. All deterministic, security, supply-chain, and trusted-materializer workflows are terminal-success on this head.

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

@seonghobae I will review the exact current head d14ad6ca0260eabf1373213e76e521b98a57e86b. I will check the trusted downloader trust boundary and the Linux x86_64 fixture contract.

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

@coderabbitai review

Please review exact head d14ad6ca0260eabf1373213e76e521b98a57e86b, especially the fixed User-Agent trust boundary, no-proxy/no-redirect behavior, platform-test simulation, and whether caller-controlled headers or download destinations can cross the trusted uv materializer boundary.

Copy link
Copy Markdown
Contributor Author

@opencode-agent review

Review-only exact-head request for d14ad6ca0260eabf1373213e76e521b98a57e86b. Do not mutate, approve as author, merge, dismiss reviews, change protected settings, or alter reviewer credentials.

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

expected_head='d14ad6ca0260eabf1373213e76e521b98a57e86b'
base='6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba'

echo '== checked-out commit =='
git rev-parse HEAD
git status --short
git cat-file -e "${expected_head}^{commit}"
git cat-file -e "${base}^{commit}"
printf '\n== exact commit check ==\n'
test "$(git rev-parse HEAD)" = "$expected_head" && echo 'HEAD matches requested commit' || echo 'HEAD DOES NOT match requested commit'

printf '\n== changed files and diff ==\n'
git diff --name-status "$base" "$expected_head"
git diff --find-renames --find-copies --check "$base" "$expected_head"
git diff --find-renames --find-copies --unified=80 "$base" "$expected_head" -- \
  scripts/ci/materialize_base_python_requirements.py \
  tests/test_materialize_base_python_requirements.py \
  tests/test_uv_redirect_boundary.py

printf '\n== source outlines ==\n'
ast-grep outline scripts/ci/materialize_base_python_requirements.py --items all || true
ast-grep outline tests/test_materialize_base_python_requirements.py --items all || true
ast-grep outline tests/test_uv_redirect_boundary.py --items all || true

printf '\n== trusted downloader declarations, calls, and test references ==\n'
rg -n -C 5 -e 'TRUSTED_UV|urlopen|build_opener|ProxyHandler|HTTPRedirectHandler|addheaders|User-Agent|user-agent|sha256|MAX_|platform\.system|platform\.machine|_use_supported_trusted_uv_runner' \
  scripts/ci/materialize_base_python_requirements.py \
  tests/test_materialize_base_python_requirements.py \
  tests/test_uv_redirect_boundary.py

printf '\n== repository-wide direct references to trusted downloader symbols ==\n'
rg -n -C 3 -e '\bTRUSTED_UV_[A-Z0-9_]+\b|\b_download_trusted_uv\b|\b_install_trusted_uv\b|\btrusted_uv\b' \
  -g '*.py' .

printf '\n== PR metadata, current head, checks, and review state ==\n'
gh pr view 1008 --repo ContextualWisdomLab/.github \
  --json number,url,headRefOid,baseRefOid,mergeStateStatus,reviewDecision,isDraft,author,reviews,statusCheckRollup \
  --jq '{number,url,headRefOid,baseRefOid,mergeStateStatus,reviewDecision,isDraft,author:(.author.login),reviews:[.reviews[]|{author:(.author.login),state,commit:(.commit.oid // null)}],checks:[.statusCheckRollup[]|{name,conclusion,status}]}'

Length of output: 110503


🏁 Script executed:

#!/bin/bash
set -euo pipefail

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

echo '== complete trusted downloader and installer implementation =='
sed -n '160,320p' scripts/ci/materialize_base_python_requirements.py

echo '== exact trusted-download contract tests =='
sed -n '1,260p' tests/test_trusted_uv_download_contract.py
sed -n '1,180p' tests/test_trusted_uv_portability_and_streaming.py
sed -n '1,120p' tests/conftest.py

echo '== all urlopen call sites and trusted opener invocations =='
rg -n -C 4 '\burllib\.request\.urlopen\s*\(|\b_install_trusted_uv_url_opener\s*\(' -g '*.py' .

echo '== public function call sites that could supply download inputs =='
rg -n -C 3 '\b_download_trusted_uv_archive\s*\(|\b_install_trusted_uv\s*\(' -g '*.py' \
  -g '!tests/**' .

echo '== exact-head GitHub check runs =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" \
  --jq '.check_runs[] | {name,conclusion,status,details_url,started_at,completed_at,app:.app.slug}' \
  | jq -s

echo '== required status checks and branch protection =='
gh api "repos/${repo}/branches/main/protection" \
  --jq '{required_status_checks,required_pull_request_reviews,required_linear_history,required_conversation_resolution,enforce_admins}' \
  || true

echo '== PR mergeability and exact-head reviews =='
gh api "repos/${repo}/pulls/1008" \
  --jq '{head_sha:.head.sha,base_sha:.base.sha,mergeable,mergeable_state,merge_commit_sha,review_comments,comments,requested_reviewers:[.requested_reviewers[].login]}'
gh api "repos/${repo}/pulls/1008/reviews" \
  --jq '[.[] | {user:.user.login,state,commit_id,submitted_at,body}]'

Length of output: 54342


@seonghobae Reviewed exact head d14ad6ca0260eabf1373213e76e521b98a57e86b against main@6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba.

I found no actionable code findings.

The downloader uses one literal Astral HTTPS URL. It accepts no caller-controlled URL, header, or destination input. The dedicated opener disables proxies, rejects redirects, and sets only the fixed ContextualWisdomLab-coverage/1.0 User-Agent.

The existing boundary controls remain in place. They include final-origin validation, bounded streaming, pinned SHA-256 verification, fixed regular-member extraction, executable-size validation, Linux x86_64 gating, and exact uv version verification.

The updated installer tests explicitly simulate Linux x86_64. The existing contract tests also cover the literal network sink, rejection of dynamic Request construction, bounded short reads, and unsupported platforms before network access.

GitHub reports that the head is mergeable but currently blocked with REVIEW_REQUIRED and no submitted reviews. The exact-head check list includes successful later strix, coverage, and security runs. An older failed strix run remains in the check history. I could not inspect branch-protection details because the GitHub integration returned HTTP 403.

I did not approve, merge, or modify the branch.

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

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

Pull request was converted to draft

@seonghobae
seonghobae marked this pull request as ready for review August 15, 2026 09:45
@seonghobae
seonghobae enabled auto-merge (squash) August 15, 2026 09:46

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review Please independently review exact head d14ad6ca0260eabf1373213e76e521b98a57e86b. Verify the fixed trusted-download origin, no-proxy and redirect rejection, bounded archive and SHA-256 checks, fixed non-caller-controlled User-Agent, platform contract tests, and current-head quality/security evidence.

Copy link
Copy Markdown
Contributor Author

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

This bounded prerequisite addresses the observed trusted-uv HTTP 403 failure without widening the download origin, proxy, redirect, size, checksum, credential, reviewer, or merge boundary. Exact-head deterministic security and supply-chain workflows are terminal-success; auto-merge is armed subject to normal protection.

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

Review read-only. Do not update the branch, synthesize author approval, weaken protection, or merge outside the normal protected path.

@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='1008'
head='d14ad6ca0260eabf1373213e76e521b98a57e86b'
base='6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba'

echo '== exact revision =='
printf 'checked-out: '; git rev-parse HEAD
printf 'requested head exists: '; git cat-file -t "${head}^{commit}"
printf 'requested base exists: '; git cat-file -t "${base}^{commit}"
test "$(git rev-parse HEAD)" = "$head" && echo 'HEAD_MATCHES=true' || echo 'HEAD_MATCHES=false'
git status --short

echo '== changed files and whitespace check =='
git diff --name-status "$base" "$head"
git diff --check "$base" "$head"
git diff --unified=100 "$base" "$head" -- \
  scripts/ci/materialize_base_python_requirements.py \
  tests/test_materialize_base_python_requirements.py \
  tests/test_uv_redirect_boundary.py

echo '== source and test structure =='
ast-grep outline scripts/ci/materialize_base_python_requirements.py --items all
ast-grep outline tests/test_materialize_base_python_requirements.py --items all
ast-grep outline tests/test_uv_redirect_boundary.py --items all

echo '== trusted downloader implementation =='
rg -n -C 12 \
  'TRUSTED_UV|_download_trusted_uv|_install_trusted_uv|urlopen|build_opener|ProxyHandler|HTTPRedirectHandler|addheaders|sha256|MAX_|platform\.system|platform\.machine' \
  scripts/ci/materialize_base_python_requirements.py

echo '== related tests and uses =='
rg -n -C 6 \
  'TRUSTED_UV|_download_trusted_uv|_install_trusted_uv|urlopen|build_opener|ProxyHandler|HTTPRedirectHandler|addheaders|User-Agent|sha256|MAX_|platform\.system|platform\.machine|_use_supported_trusted_uv_runner' \
  tests/test_materialize_base_python_requirements.py tests/test_uv_redirect_boundary.py
rg -n -C 3 \
  '\b_download_trusted_uv_archive\s*\(|\b_install_trusted_uv\s*\(|\b_install_trusted_uv_url_opener\s*\(' \
  -g '*.py' -g '!tests/**' .

echo '== PR metadata and exact-head checks =='
gh pr view "$pr" --repo "$repo" \
  --json headRefOid,baseRefOid,mergeStateStatus,reviewDecision,isDraft,author,statusCheckRollup \
  --jq '{headRefOid,baseRefOid,mergeStateStatus,reviewDecision,isDraft,author:(.author.login),checks:[.statusCheckRollup[]|{name,status,conclusion}]}'
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" \
  --jq '[.check_runs[] | {name,status,conclusion,app:.app.slug,completed_at}]'
gh api "repos/${repo}/pulls/${pr}/reviews" \
  --jq '[.[] | {user:.user.login,state,commit_id,submitted_at}]'

Length of output: 116283


@seonghobae Reviewed exact head d14ad6ca0260eabf1373213e76e521b98a57e86b against main@6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba.

I found no actionable code findings.

The trusted downloader keeps a literal Astral HTTPS URL at the network sink. It accepts no caller-controlled URL, header, or destination. The opener disables proxies, rejects redirects, and sets only the fixed ContextualWisdomLab-coverage/1.0 User-Agent.

The archive boundary still validates the final HTTPS origin and port. It still enforces bounded streaming, SHA-256 verification, fixed regular-member extraction, and executable-size limits. The installer still rejects non-Linux-x86_64 hosts and verifies the exact uv 0.12.1 output.

The updated installer tests explicitly simulate Linux x86_64. The redirect-boundary test verifies the fixed opener headers and the no-proxy/no-redirect handlers.

Merge readiness is blocked. GitHub reports mergeStateStatus: BLOCKED and reviewDecision: REVIEW_REQUIRED. The exact-head check-run list also contains a failed strix run completed at 2026-08-15T10:29:16Z. Resolve or supersede that failed exact-head check under the repository’s required-check policy before treating this PR as merge-ready.

I did not approve, update, merge, or change protection settings.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@opencode-agent review current exact head d14ad6ca0260eabf1373213e76e521b98a57e86b. Review the complete three-file trusted-uv downloader repair and publish a formal GitHub review verdict anchored to this SHA. Verify that the fixed non-caller-controlled User-Agent closes the observed 403 without broadening the fixed HTTPS/no-proxy/no-redirect/bounded-download/SHA-256 trust boundary, and that the Linux x86_64 test simulation cannot weaken production runner checks. All observed exact-head security and supply-chain workflows are terminal-success.

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review review current exact head d14ad6ca0260eabf1373213e76e521b98a57e86b after primary OpenCode evidence is available. Treat this as the central prerequisite for downstream coverage-evidence recovery; require exact-head source, security, and trust-boundary evidence rather than predecessor status.

Copy link
Copy Markdown
Contributor Author

@opencode-agent review current exact head 46087bc58dad07cf9521d275fc4eb5e12885cd9f. Review the complete four-file current-head prerequisite diff and publish a formal GitHub review verdict anchored to this SHA after exact-head checks are terminal. Verify the fixed non-caller-controlled User-Agent preserves the fixed HTTPS/no-proxy/no-redirect/bounded-download/SHA-256 boundary and that the added Git subprocess regression proves ambient GIT_DIR cannot redirect exact-base reads. Predecessor-head evidence at d14ad6c is historical only.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review exact current head 2f5e6056fb7d99f30e9ad87be57ca78d836fba3e. The downstream naruon#1195 central coverage failure is reproducibly Could not materialize base Python locks: trusted uv archive download failed: HTTPError; this PR is the bounded prerequisite. Do not treat predecessor-head results as current evidence.

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/.github'
pr='1008'
head='2f5e6056fb7d99f30e9ad87be57ca78d836fba3e'

echo '== Exact commit identity =='
printf 'checked-out HEAD: '; git rev-parse HEAD
printf 'requested commit: '; git rev-parse "${head}^{commit}"
test "$(git rev-parse HEAD)" = "$head" && echo 'HEAD_MATCHES_REQUESTED=true' || echo 'HEAD_MATCHES_REQUESTED=false'
git status --short

echo '== Pull request metadata =='
gh pr view "$pr" --repo "$repo" \
  --json number,headRefOid,baseRefOid,mergeStateStatus,reviewDecision,isDraft,author \
  --jq '{number,headRefOid,baseRefOid,mergeStateStatus,reviewDecision,isDraft,author:.author.login}'

base="$(gh pr view "$pr" --repo "$repo" --json baseRefOid --jq '.baseRefOid')"
echo "base=${base}"

echo '== Changed files and diff checks =='
git diff --name-status "$base" "$head"
git diff --check "$base" "$head"
git diff --find-renames --unified=100 "$base" "$head"

echo '== Changed Python file structure =='
git diff --name-only "$base" "$head" -- '*.py' | while IFS= read -r file; do
  [ -n "$file" ] && ast-grep outline "$file" --items all
done

echo '== Trusted downloader implementation and related tests =='
rg -n -C 10 \
  'TRUSTED_UV|_download_trusted_uv|_install_trusted_uv|urlopen|build_opener|ProxyHandler|HTTPRedirectHandler|addheaders|User-Agent|sha256|MAX_|platform\.system|platform\.machine|GIT_DIR' \
  scripts tests -g '*.py'

echo '== Trusted downloader external call sites =='
rg -n -C 4 \
  '\b(_download_trusted_uv_archive|_install_trusted_uv|_install_trusted_uv_url_opener)\s*\(' \
  -g '*.py' -g '!tests/**' .

echo '== Exact-head check runs and reviews =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" \
  --jq '[.check_runs[] | {name,status,conclusion,app:.app.slug,completed_at}]'
gh api "repos/${repo}/pulls/${pr}/reviews" \
  --jq '[.[] | {user:.user.login,state,commit_id,submitted_at}]'

Length of output: 202411


🏁 Script executed:

#!/bin/bash
set -euo pipefail

log='/tmp/coderabbit-shell-logs/shell-output-NHn2gH'
repo='ContextualWisdomLab/.github'
pr='1008'
head='2f5e6056fb7d99f30e9ad87be57ca78d836fba3e'

echo '== Prior exact identity and metadata =='
rg -n -A12 -B2 '^== Exact commit identity ==|^== Pull request metadata ==|^base=|^HEAD_MATCHES' "$log" || true

echo '== Prior changed-file summary =='
rg -n -A80 -B2 '^== Changed files and diff checks ==' "$log" || true

base="$(gh pr view "$pr" --repo "$repo" --json baseRefOid --jq '.baseRefOid')"
echo '== Current identity and changed paths =='
printf 'HEAD='; git rev-parse HEAD
printf 'BASE='; printf '%s\n' "$base"
git diff --name-status "$base" "$head"
git diff --stat "$base" "$head"
git diff --check "$base" "$head"

echo '== Compact current diff =='
git diff --unified=20 "$base" "$head"

echo '== Focused boundary-test source =='
sed -n '1,160p' tests/test_uv_redirect_boundary.py
sed -n '1,180p' tests/test_trusted_uv_download_contract.py
sed -n '1,130p' tests/test_trusted_uv_portability_and_streaming.py
sed -n '1,100p' tests/test_materialize_base_python_requirements.py
sed -n '1,290p' scripts/ci/materialize_base_python_requirements.py

echo '== Current exact-head PR state =='
gh pr view "$pr" --repo "$repo" \
  --json headRefOid,baseRefOid,mergeStateStatus,reviewDecision,statusCheckRollup \
  --jq '{headRefOid,baseRefOid,mergeStateStatus,reviewDecision,checks:[.statusCheckRollup[]|{name,status,conclusion}]}'
gh api "repos/${repo}/pulls/${pr}/reviews" \
  --jq '[.[] | {user:.user.login,state,commit_id,submitted_at}]'

Length of output: 55095


@seonghobae I reviewed only commit 2f5e6056fb7d99f30e9ad87be57ca78d836fba3e.

I found blocking issues.

  1. Critical — Remove .github/workflows/repair-pr-1008-git-environment.yml.
    The workflow grants contents: write on Line 15. It edits production files, creates a commit, and pushes to codex/coverage-uv-retry on Lines 56-152. A PR-controlled workflow must not mutate the reviewed branch. Put the intended Git-environment repair in the committed source and tests. Do not use a self-modifying workflow.

  2. High — The new Git-environment regression test does not match the reviewed implementation.
    tests/test_materialize_git_environment.py expects materializer._git() to ignore ambient GIT_DIR. However, scripts/ci/materialize_base_python_requirements.py still calls subprocess.run() without an isolated env. The intended _trusted_git_environment() implementation exists only as text inside the workflow. The test should fail on this exact head.

The fixed User-Agent remains repository-owned. The source and tests preserve the literal HTTPS URL, disabled proxies, redirect rejection, bounded reads, SHA-256 verification, and Linux x86_64 gate.

GitHub reports BLOCKED and REVIEW_REQUIRED. The exact-head quality and security checks were still queued during this review. Therefore, merge readiness is not established.

I did not approve, merge, or modify the branch.

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

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

The temporary branch-writing repair workflow and unrelated Git-environment test are absent from the final protected-base diff. The candidate is now the bounded three-file trusted-downloader change: fixed organization User-Agent plus supported-runner test modeling, while preserving the fixed HTTPS origin, no-proxy behavior, redirect rejection, size bound, audited sink, and SHA-256 verification. All current-head checks have restarted; no formal approval exists yet.

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

Review read-only. Preserve reviewer identity, credential separation, exact-head binding, and branch protection. Do not mutate, self-approve, weaken gates, or merge outside the protected path.

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

Copy link
Copy Markdown
Contributor Author

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

Review exact head 5e73836229250e247433e3f3dd372f4881fe2edf. Verify that trusted uv archive requests use only the fixed origin-derived User-Agent, redirects retain the same non-secret header, URLs/tokens are never interpolated into the header, invalid platform/archive inputs still fail closed, response-size and checksum validation remain unchanged, and the three-file diff introduces no permission, credential, merge-authority, or runtime dependency change. Submit a formal exact-head verdict.

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

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review

Please review the exact current head 5e73836229250e247433e3f3dd372f4881fe2edf. Treat predecessor-head checks/reviews as historical; require exact-head terminal checks, current-source findings only, and formal review evidence.

Copy link
Copy Markdown
Contributor Author

@opencode-agent review exact current head 5e73836

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review exact current head 5e73836

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review Review exact head 5e73836229250e247433e3f3dd372f4881fe2edf as the bounded central prerequisite for downstream AppGuardrail SAST review evidence. Verify the fixed non-caller-controlled User-Agent, literal fixed HTTPS sink, no-proxy and no-redirect opener, bounded archive size, SHA-256 integrity, Linux x86_64 boundary tests, exact three-file scope, empty thread set, and current-head workflow conclusions. Formally approve only if the unchanged head satisfies the protected-main contract; do not reuse predecessor evidence.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review exact current head 5e73836229250e247433e3f3dd372f4881fe2edf. Review only the protected-base three-file delta and the fixed-origin trusted uv download boundary; report any still-valid actionable finding against this head.

Copy link
Copy Markdown
Contributor Author

@opencode-agent Review exact current head 5e73836229250e247433e3f3dd372f4881fe2edf after its current-head coverage and security workflows complete. Submit a formal APPROVE only if the three-file fixed-identifier downloader repair preserves the fixed origin, no-proxy/no-redirect boundary, bounded bytes, checksum verification, and current-head test evidence; otherwise identify a concrete source-level blocker.

@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='1008'
head='5e73836229250e247433e3f3dd372f4881fe2edf'
expected_base='6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba'

echo '== Exact revision =='
printf 'checked-out HEAD: '; git rev-parse HEAD
printf 'requested HEAD: '; git rev-parse "${head}^{commit}"
printf 'requested base: '; git rev-parse "${expected_base}^{commit}"
test "$(git rev-parse HEAD)" = "$head" && echo 'HEAD_MATCHES_REQUESTED=true' || echo 'HEAD_MATCHES_REQUESTED=false'
git status --short

echo '== Pull request metadata =='
gh pr view "$pr" --repo "$repo" \
  --json headRefOid,baseRefOid,mergeStateStatus,reviewDecision,isDraft,author \
  --jq '{headRefOid,baseRefOid,mergeStateStatus,reviewDecision,isDraft,author:.author.login}'

base="$(gh pr view "$pr" --repo "$repo" --json baseRefOid --jq '.baseRefOid')"
printf 'resolved PR base: %s\n' "$base"

echo '== Protected-base changed paths and diff =='
git diff --name-status "$base" "$head"
git diff --check "$base" "$head"
git diff --unified=80 "$base" "$head" -- \
  scripts/ci/materialize_base_python_requirements.py \
  tests/test_materialize_base_python_requirements.py \
  tests/test_uv_redirect_boundary.py

echo '== Changed-file structures =='
ast-grep outline scripts/ci/materialize_base_python_requirements.py --items all
ast-grep outline tests/test_materialize_base_python_requirements.py --items all
ast-grep outline tests/test_uv_redirect_boundary.py --items all

echo '== Trusted downloader implementation =='
sed -n '150,340p' scripts/ci/materialize_base_python_requirements.py

echo '== Related contract and boundary tests =='
fd -t f -e py . tests | sort | while IFS= read -r file; do
  if rg -q 'TRUSTED_UV|_download_trusted_uv|_install_trusted_uv|_install_trusted_uv_url_opener' "$file"; then
    echo "--- $file"
    rg -n -C 5 'TRUSTED_UV|_download_trusted_uv|_install_trusted_uv|_install_trusted_uv_url_opener|User-Agent|addheaders|ProxyHandler|HTTPRedirectHandler|platform\.system|platform\.machine|sha256|MAX_' "$file"
  fi
done

echo '== Non-test downloader call sites =='
rg -n -C 5 '\b(_download_trusted_uv_archive|_install_trusted_uv|_install_trusted_uv_url_opener)\s*\(' \
  -g '*.py' -g '!tests/**' .

echo '== Exact-head checks and review state =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" \
  --jq '[.check_runs[] | {name,status,conclusion,app:.app.slug,completed_at}]'
gh api "repos/${repo}/pulls/${pr}/reviews" \
  --jq '[.[] | {user:.user.login,state,commit_id,submitted_at}]'

Length of output: 78770


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/.github'
head='5e73836229250e247433e3f3dd372f4881fe2edf'

echo '== Structural trusted-download contract =='
sed -n '1,220p' tests/test_trusted_uv_download_contract.py
echo '== Streaming and platform contract =='
sed -n '1,150p' tests/test_trusted_uv_portability_and_streaming.py
echo '== Redirect and coverage contract =='
sed -n '1,120p' tests/test_uv_redirect_and_coverage_contract.py

echo '== Header assignment and downloader request construction references =='
rg -n -C 5 'TRUSTED_UV_USER_AGENT|addheaders|urllib\.request\.Request|urlopen\s*\(' \
  scripts/ci/materialize_base_python_requirements.py tests -g '*.py'

echo '== Failed strix check metadata =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" \
  --jq '.check_runs[] | select(.name == "strix") | {id,name,status,conclusion,details_url,output,started_at,completed_at}'

Length of output: 20990


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/.github'
check_run_id='95007835293'

gh api "repos/${repo}/check-runs/${check_run_id}/annotations?per_page=100" \
  --jq '.[] | {path,start_line,end_line,annotation_level,message,title,raw_details}'

Length of output: 550


@seonghobae Reviewed exact head 5e73836229250e247433e3f3dd372f4881fe2edf against main@6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba.

I found no actionable source finding in the requested three-file delta.

The downloader uses one literal Astral HTTPS URL. It does not accept a caller-controlled URL, Request, header, or destination. The opener disables proxies, rejects redirects, and sets only the fixed ContextualWisdomLab-coverage/1.0 User-Agent.

The existing size bound, final-origin validation, SHA-256 pin, archive-member validation, executable-size check, and exact-version check remain unchanged. The Linux x86_64 test fixture changes test attributes only. The production platform gate still fails before network access on unsupported runners.

Merge readiness is not established. The exact-head strix check failed, and several exact-head checks remain queued. The strix annotation reports only a generic exit-code failure at .github, Line 547. It does not identify a defect in the reviewed delta.

I did not approve, modify, or merge the pull request.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@opencode-agent

Please review the exact current head, focusing on the fixed-origin/no-proxy/no-redirect trusted-download boundary, immutable checksum verification, platform/architecture handling, and whether any caller-controlled input can influence request headers, URL selection, cache identity, or executable selection.

Comment thread .github/workflows/repair-pr-1008-strix-findings.yml Fixed
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