Skip to content

fix(coverage-evidence): materialize uv.lock-only repos so their offline coverage can run - #668

Merged
seonghobae merged 3 commits into
mainfrom
claude/cwlab-pr-audit-governance-1hdcp5
Aug 3, 2026
Merged

fix(coverage-evidence): materialize uv.lock-only repos so their offline coverage can run#668
seonghobae merged 3 commits into
mainfrom
claude/cwlab-pr-audit-governance-1hdcp5

Conversation

@seonghobae

@seonghobae seonghobae commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Rebased onto main at 9762ebd (post-#678/#674) and narrowed to a single component — the uv.lock materializer, which is the only part of the original PR not now superseded (see the disposition table on this PR; #678 landed the Zen reviewer that superseded the model-widening, and #674 superseded the fuzz-lock exclusion). This branch was force-pushed from 4 commits to 1.

Problem

The central coverage-evidence sandbox installs the hash-pinned Python locks the materializer extracts from the PR base commit, then runs each repo's pytest tests offline. Repositories managed entirely by uv expose only a uv.lock, so content-based discovery (from #657) found nothing — no dependencies install, the suite fails at import, coverage-evidence reports failure, and OpenCode posts REQUEST_CHANGES on every PR in that repo even when the repo's own CI is green.

Confirmed still-unfixed on current main: scripts/ci/materialize_base_python_requirements.py only discovers already-hash-pinned requirement files; it has no uv export path. Live impact: keyverse#32/#34/#37, newsdom-api#464, pg-llm-batch#17 are all blocked on this exact coverage-evidence: failure for their uv-managed services/account_unification / package trees.

Fix

When a base uv.lock is discovered, reconstruct it and its sibling pyproject.toml from the exact validated base SHA in an isolated temp dir and run uv export --frozen --no-emit-project --no-editable to produce a hash-pinned closure the #661 preflight installer consumes like any other lock. --frozen forbids lock mutation and network resolution; both inputs are read only from the base commit; it is best-effort (any failure skips the uv.lock exactly as before, so it cannot break an existing pipeline).

Verification (this exact head, in a clean venv with the CI lock)

  • coverage run -m pytest tests746 passed
  • coverage report (fail_under=100, source scripts/ci) → TOTAL 100%, exit 0
  • interrogate (fail-under=100, excl tests) → PASSED 100.0%, exit 0
  • Materializer touches only scripts/ci/materialize_base_python_requirements.py (+82/-5) and tests/test_materialize_base_python_requirements.py (+130); no contract-pinned workflow/prose files are changed, so there is zero drift against the fix(governance): finish sweep with Zen review fallback #678 candidate-string/contract updates now on main.

Scope / follow-up

Native-extension repos needing a maturin build of a compiled module (e.g. fast-mlsirm's _core) remain a separate, harder gap and are intentionally not addressed here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HdCssGnNMhKHNu3TXFstWH


Generated by Claude Code

Summary by CodeRabbit

  • 새 기능

    • 검증된 Python 기반 커밋에서 uv.lock을 해시가 고정된 requirements 잠금 파일로 생성합니다.
    • 오프라인 환경에서도 의존성 정보를 안전하게 내보낼 수 있습니다.
  • 버그 수정

    • 필수 도구나 입력 파일이 없거나 내보내기에 실패한 경우 잘못된 잠금 파일이 생성되지 않습니다.
    • 해시가 고정되지 않은 결과를 자동으로 제외합니다.
  • 테스트

    • 다양한 실패 상황과 성공적인 잠금 파일 생성 흐름을 검증했습니다.

@coderabbitai

coderabbitai Bot commented Jul 30, 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: 5 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: aac22286-51f8-4a42-9724-07e695247516

📥 Commits

Reviewing files that changed from the base of the PR and between eb7de34 and ad8322e.

📒 Files selected for processing (2)
  • scripts/ci/materialize_base_python_requirements.py
  • tests/test_materialize_base_python_requirements.py
📝 Walkthrough

Walkthrough

검증된 base 커밋에서 uv.lock과 인접한 pyproject.toml을 복원합니다. 오프라인·frozen uv export 결과를 해시 고정 requirements 파일로 materialize합니다. 입력 누락, 실행 실패, 해시 누락 결과는 건너뜁니다.

Changes

uv.lock materialization

Layer / File(s) Summary
uv export 실행 및 검증
scripts/ci/materialize_base_python_requirements.py, tests/test_materialize_base_python_requirements.py
임시 디렉터리에서 frozen·offline uv export를 실행합니다. 결과가 해시 고정인지 확인합니다.
uv.lock 후보 통합
scripts/ci/materialize_base_python_requirements.py, tests/test_materialize_base_python_requirements.py
기존 requirements 후보에 uv.lock을 추가합니다. Git 트리의 비-blob 항목은 건너뜁니다.
성공 및 실패 경로 검증
tests/test_materialize_base_python_requirements.py
성공한 export 결과의 materialization과 manifest 기록을 검증합니다. uv 부재, pyproject.toml 부재, export 실패, 해시 누락도 검증합니다.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Sequence Diagram(s)

sequenceDiagram
  participant BaseCommit
  participant Materializer
  participant TempDirectory
  participant uv
  participant Manifest
  Materializer->>BaseCommit: uv.lock과 pyproject.toml 조회
  BaseCommit-->>Materializer: 파일 내용 반환
  Materializer->>TempDirectory: 파일 복원
  Materializer->>uv: frozen·offline export 실행
  uv-->>Materializer: 해시 고정 requirements 반환
  Materializer->>Manifest: materialized uv.lock 기록
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 uv.lock 전용 저장소의 materialization을 추가해 오프라인 coverage를 실행하는 주요 변경을 정확히 요약합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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 claude/cwlab-pr-audit-governance-1hdcp5

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

@seonghobae seonghobae changed the title fix(review): materialize uv.lock-only repos so their offline coverage can run fix(review): materialize uv.lock-only repos + widen free reviewer model pool Jul 30, 2026
@seonghobae seonghobae changed the title fix(review): materialize uv.lock-only repos + widen free reviewer model pool fix(review): uv.lock materialization + free-model pool widening + exclude fuzz-only locks from coverage-evidence Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

Correction: drop the model-pool widening from this PR — it is counterproductive given #624

I filed the "widen the free reviewer model pool" part of this PR (append gpt-5-mini, o4-mini, mistral-ai/mistral-medium-2505, meta/llama-4-maverick-17b-128e-instruct-fp8, meta/llama-4-scout-17b-16e-instruct to OPENCODE_MODEL_CANDIDATES) before re-checking the source-of-truth issues. That was a mistake:

Recommendation: drop commit c547fbf (the model-pool widening + its test_opencode_agent_contract.py changes) from this branch and let #671 handle the provider migration. The other two components of this PR are unaffected and still valid on their own merits:

  1. uv.lock materializer — makes coverage-evidence run for uv-only repos (newsdom-api, pg-llm-batch).
  2. fuzz-only lock exclusion — stops the transient atheris wheel-availability failure from failing coverage-evidence on unrelated PRs.

I could not push the branch revision myself this session (the environment's Bash is classifier-blocked, so no git), hence flagging it here rather than force-pushing the drop. Whoever picks this up: rebase to keep only the materializer + fuzz-lock-exclusion commits, or split them into a fresh PR, and route the pool fix through #671.

Also worth a look while here: this PR's merge is refused with 405 "New changes require approval from someone other than the last pusher", which is the require_last_push_approval: true behavior that #454 (closed completed) set out to remove on ruleset 18156473 — that requirement appears to have regressed or was re-added.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Dedup update: two of this PR's three components are now superseded — reduce to the uv.lock materializer only

Re-checking the open PR set shows the provider-outage (#624) is being fixed correctly elsewhere, which supersedes most of this PR:

#668 component status superseded by
1. uv.lock materializer keep — unique nothing else materializes uv-only repos (uv.lock → hash-pinned closure); #674 does not cover this
2. model-pool widening (5 × github-models/*) drop — counterproductive (GitHub Models retired today per #624) #672 (NVIDIA NIM), #675 (keyless OmniRoute), #678 (OpenCode Zen opencode/gpt-5.6-terra) — the live providers
3. fuzz-lock exclusion at materialization drop — superseded #674 defers yanked/interpreter-incompatible locks at the installer (DEFERABLE_PREFLIGHT_FAILURES), which is more general and correctly handles that the sandbox reads the lock from the base SHA — a limitation my materialization-scoping shares

Recommendation: rebase this branch down to component 1 (uv.lock materializer) only, or split it into a fresh uv.lock-only PR, and let #672/#674/#675/#678 own the provider + preflight-resilience fixes. I can't do the rebase from this session (environment Bash is classifier-blocked), hence flagging for triage.

Note for the pool fix: #678's approach (bot-authored PR so a non-pusher OpenCode App review can satisfy ruleset 18156473's non-pusher-approval rule) is the correct mechanism to land a pipeline-fix past the very deadlock this PR hit with 405 — that path is not available to a human pusher, so #678 (not #668) is the one to drive to merge.


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Status update — the pipeline deadlock this PR was fighting is now resolved upstream.

#678 merged to main at 9762ebd (2026-07-30T21:27Z). It adds the paid OpenCode Zen gpt-5.6-terra reviewer as the lead pool model (keyed via OPENCODE_ZEN_API_KEY) and activates the */15 org sweep's auto-review + auto-merge. That restores opencode-review approval evidence org-wide after the GitHub Models retirement (#624), which is the root cause this PR's component 2 (model-widening) was trying to work around.

Disposition of this PR's three components against current main:

Component Status now
1. uv.lock materializer (uv-only repos' coverage-evidence) Unique / still needed — not addressed by #678 or #674; keeps newsdom-api#464, pg-llm-batch#17 unblockable.
2. Free-model pool widening (5 github-models/*) Superseded by #678. Those github-models candidates are sunset (#624); #678 leads with Zen instead.
3. Fuzz-only lock exclusion from coverage-evidence Superseded by #674 (defers yanked/interpreter-incompatible base locks at the installer, and correctly handles the base-SHA read that a repo-side pin bump can't self-heal).

Because #678 rewrote the exact OPENCODE_MODEL_CANDIDATES string and the test_opencode_agent_contract.py candidate list this PR also pins, this PR's contract test will now fail against main once it is updated onto the new base. Recommended action: rebase down to component 1 only (the uv.lock materializer) and drop components 2 and 3. That rework needs a local coverage run -m pytest tests + interrogate pass to re-verify the 100% gates, which I cannot execute in the current environment — so I am not pushing an unverified rebase. Flagging clearly rather than leaving a silently-broken PR for the sweep to merge.


Generated by Claude Code

@seonghobae
seonghobae force-pushed the claude/cwlab-pr-audit-governance-1hdcp5 branch from e8649ad to eace3df Compare July 30, 2026 21:40
@seonghobae seonghobae changed the title fix(review): uv.lock materialization + free-model pool widening + exclude fuzz-only locks from coverage-evidence fix(coverage-evidence): materialize uv.lock-only repos so their offline coverage can run Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

opencode-review failed at head eace3df, but the failure is not in this PR's diff — it is the org-wide model-pool outage, still unresolved.

From the failing run (30584655800) status step env:

OPENCODE_MODEL_POOL_OUTCOME: exhausted
COVERAGE_EVIDENCE_RESULT:    success

This is not fixable from this PR. The remaining blocker is org-side provisioning of a working reviewer provider — most likely the OPENCODE_ZEN_API_KEY org secret that #678's provider block reads via OPENCODE_API_KEY, or an equivalent (NVIDIA_NIM_API_KEY for #672, OMNIROUTE_API_BASE_URL for #675). Once one authenticates, re-running opencode-review on this exact head should produce approval evidence and the sweep can merge it. Flagging with logs rather than pushing a no-op change to an already-green diff.


Generated by Claude Code

… can run

The central coverage-evidence sandbox installs the hash-pinned Python locks the
materializer extracts from the PR base commit, then runs each repo's
`pytest tests` offline. Repositories managed entirely by uv expose only a
`uv.lock` (no `requirements*.txt` / `requirements.lock`), so the content-based
discovery from #657 finds nothing, no dependencies install, and the suite fails
at import (`ModuleNotFoundError`). coverage-evidence then reports `failure` and
OpenCode posts a deterministic REQUEST_CHANGES, permanently blocking every
uv-managed repo's PR queue even when the repo's own CI is green. Observed on
newsdom-api#464 and pg-llm-batch#17.

Fix: when a base `uv.lock` is discovered, reconstruct it and its sibling
`pyproject.toml` from the exact validated base SHA in an isolated temp dir and
run `uv export --frozen --no-emit-project` to produce a fully hash-pinned
dependency closure the existing #661 installer consumes like any other lock.
`--frozen` forbids lock mutation and network resolution, and both inputs are
read only from the base commit, so no PR-mutable content reaches uv and the
trust boundary is unchanged. It is best-effort: if `uv` is absent, the base
`pyproject.toml` is missing, the export fails, or its output is not fully
hash-pinned, the lock is skipped exactly as before, so this can never break an
otherwise-working build. Flat-layout and requirements-based repos are
unaffected.

Verification (against the real newsdom-api base tree): `uv.lock` ->
`requirements-000.txt` with 225 `--hash=` pins. Full suite: 710 passed;
scripts/ci line coverage 100% (materializer 114/114); interrogate 100%.

Scope: this covers uv.lock-only repos on runners where `uv` is available
(GitHub's ubuntu-latest ships it). Native-extension repos that need a maturin
build of a compiled module (e.g. fast-mlsirm's `_core`) remain a separate,
harder gap and are not addressed here.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HdCssGnNMhKHNu3TXFstWH
@seonghobae
seonghobae force-pushed the claude/cwlab-pr-audit-governance-1hdcp5 branch from eace3df to eb85631 Compare August 1, 2026 06:15
@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head refresh (2026-08-01 UTC): force-with-lease rebased the existing single-component fix onto central main at 2a83043; new exact head is eb85631.

Live reproduction from fast-mlsirm #380’s exact base f2b3793:

  • before this change, central run 30687167787 materialized 0 Python locks and failed collection with ModuleNotFoundError: No module named 'numpy' across 76 test modules
  • the refreshed materializer converts the base uv.lock to requirements-000.txt
  • output is hash-pinned and contains Python 3.14-compatible numpy==2.5.1
  • exact pip --dry-run --require-hashes --only-binary=:all: resolves that wheel successfully

Focused current-head validation:

  • python3 -m pytest -q tests/test_materialize_base_python_requirements.py tests/test_install_base_python_locks.py — 41 passed
  • Ruff — passed
  • git diff --check origin/main...HEAD — passed

No new implementation was created; this preserves and refreshes the existing #668 fix.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head audit found that the implementation and test described uv export as offline while only passing --frozen; uv exposes --offline separately, so the workflow did not actually enforce the claimed network boundary. Fixed in eb7de34 by adding --offline and a regression assertion. Local validation: focused 20 tests passed, full 802 tests passed in 84.40s, Ruff passed, and git diff --check passed. Previous head eb85631 has no queued/in-progress runs remaining.

@seonghobae
seonghobae enabled auto-merge (squash) August 1, 2026 06:44

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/ci/materialize_base_python_requirements.py`:
- Around line 109-149: Update _export_uv_lock around the _run_uv_export call to
catch FileNotFoundError and subprocess.TimeoutExpired, returning None for either
failure. Preserve the existing nonzero-return and hash-pinning checks so
transient uv availability or timeout failures fall back to the documented no-uv
behavior without propagating to base_hash_locks.
- Around line 82-107: Update _run_uv_export to accept the uv executable path
supplied by its caller and use that resolved path instead of the literal "uv";
add a finite subprocess.run timeout so a hung export returns control to the
best-effort skip logic. Preserve the existing export arguments, and update
_export_uv_lock plus test_run_uv_export_invokes_uv_with_frozen_offline_flags to
pass and assert the resolved path and timeout.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dd891e5c-6ee4-4105-bc8c-c9b3160cb41f

📥 Commits

Reviewing files that changed from the base of the PR and between 2a83043 and eb7de34.

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

Comment thread scripts/ci/materialize_base_python_requirements.py Outdated
Comment thread scripts/ci/materialize_base_python_requirements.py
@opencode-agent
opencode-agent Bot disabled auto-merge August 1, 2026 06:49
@seonghobae

Copy link
Copy Markdown
Contributor Author

Addressed both current-head CodeRabbit findings in ad8322e: _run_uv_export now receives the shutil.which-resolved executable, enforces a 120-second subprocess timeout, and _export_uv_lock degrades to None on OSError or subprocess.TimeoutExpired. Regression coverage asserts the resolved argv/timeout and reproduces both missing-executable and hung-process fallbacks. Validation: focused 22 tests passed, full 804 tests passed in 89.18s, full Ruff passed, and git diff --check passed. Both review threads are resolved; no non-completed runs remain on superseded heads eb7de34 or b920874. Added this PR to organization Project #1 as In Progress / Ops / dot-github.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head validation for ad8322e96a583c81e11058d98310ce947643fb89:

  • CodeGraph trace confirms base_hash_locks -> _export_uv_lock -> _run_uv_export consumes only uv.lock and sibling pyproject.toml read from the validated base commit.
  • The new head resolves the trusted uv executable once, invokes uv export --frozen --offline, bounds it to 120 seconds, and preserves the documented best-effort no-lock fallback on missing/hung process.
  • python3 -m pytest -q tests/test_materialize_base_python_requirements.py -> 22 passed.
  • Real fast-mlsirm ⚡ Bolt: 정규식 사전 컴파일을 통한 파싱 성능 최적화 #380 base PoC at f2b3793094ca1b53e1dc06ec3214354bfc5f4d41: materialized uv.lock as requirements-000.txt; the exported hash-pinned closure contains the three expected conditional numpy pins.
  • No source changes were made during this validation.

The previous OpenCode run targeted superseded head eb856311322be4cbaadb92a1a1fbdf0a72d0e252; only reviews and checks bound to this new head should count.

@seonghobae
seonghobae enabled auto-merge (squash) August 1, 2026 07:48
@opencode-agent

opencode-agent Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: ad8322e96a583c81e11058d98310ce947643fb89
  • Workflow run: 30690469943
  • Workflow attempt: 1
  • Gate result: APPROVE (exit 0)

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["CI script: materialize_base_python_requirements.py"]
  S1 --> I1["review and security gate shell path"]
  I1 --> R1["Review risk: CI script: materialize_base_python_requirements.py"]
  R1 --> V1["bash -n plus Strix self-test"]
  Evidence --> S2["Test: test_materialize_base_python_requirements.py"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test: test_materialize_base_python_requirements.py"]
  R2 --> V2["targeted test run"]
Loading

@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 reviewed the current-head bounded evidence and found no blocking issues.

Findings

No blocking findings.

Summary

Approval sufficiency: evidence affirmatively supports PR intent — scripts/ci/materialize_base_python_requirements.py now exports base uv.lock into hash-pinned closures so uv.lock-only repos can run offline coverage. Verification posture: focused hunks plus CodeGraph verbatim source trace inspected; direct PR-head file reads were denied by sandbox rules, so inlined CodeGraph source and focused hunks were used (source limitation, not a repository fact). Linter/static: no lint evidence supplied this run; not a blocker for this CLI-only diff. TDD/regression: tests/test_materialize_base_python_requirements.py adds skip-non-blob, happy uv export, uv absent, pyproject absent, export failure, and unpinned-output rejection. Coverage: Coverage execution evidence Result PASS — supported repository test suites passed. Docstring coverage: configured repository docstring gates passed or docstring coverage was advisory per Coverage execution evidence. DAG: base-to-head flowchart base_hash_locks -> _export_uv_lock -> _run_uv_export -> materialize -> offline coverage, reflecting head flow. PoC/execution: no OPENCODE_EXECUTION_RECEIPT present; verification rests on CodeGraph source trace, focused diff, and Coverage execution evidence PASS. DDD/domain: CI coverage-evidence domain; no domain model change. CDD/context: single-purpose materializer component, PR narrowed from three components to the uv.lock export path. Similar issues: consistent with prior base-lock trust commits (#644/#657/#661). Claim/concept check: 'uv export --frozen --offline --no-emit-project --no-editable' and 'no PR-mutable content reaches uv' confirmed from source trace (base SHA reads only). Standards search: no external standard dependency. Compatibility/convention: new identifiers _run_uv_export, _export_uv_lock, UV_EXPORT_TIMEOUT_SECONDS are multi-word idiomatic snake/SCREAMING case; no single-word or reserved names introduced. Breaking-change/backcompat: non-uv repos behave identically; uv.lock-only repos degrade to [] whenever export is unavailable or fails. Implementation completeness: both new functions fully implemented with docstrings; no placeholders. Performance: one bounded (120s) subprocess per uv.lock in an isolated temp dir. Developer experience: CLI interface and ::error:: annotation preserved; no interface churn. User experience: non-web surface — offline coverage gate now obtains installable closures for uv.lock-only repos where it previously materialized nothing. Visual/DOM: non-web change; no DOM/ARIA surface (CLI/CI output contract reviewed instead). Accessibility/i18n: no user-facing UI added; message style unchanged. Supply-chain/license: no new dependencies; stdlib plus runner-provided uv via shutil.which with None-degradation. Packaging: pyproject.toml present (requires-python >=3.10); test contract python3 -m pytest tests. Security/privacy: inputs read exclusively from the validated base commit via git show; uv runs --frozen --offline in an isolated temp dir; exported closure re-gated by _is_hash_pinned; no secrets, auth, or exposed identifiers. Changed files inspected: scripts/ci/materialize_base_python_requirements.py, tests/test_materialize_base_python_requirements.py.

Approval sufficiency: bounded evidence supplied affirmative approval evidence for changed files, coverage/docstring posture, risk surfaces, and current-head verification; approval is not based merely on the absence of known blockers.
Verification posture: CodeGraph evidence was initialized and bounded current-head evidence reviewed for changed-file evidence including scripts/ci/materialize_base_python_requirements.py, tests/test_materialize_base_python_requirements.py.
Linter/static: workflow/static review evidence is bounded by the current-head GitHub Checks gate and changed-file evidence.
TDD/regression: coverage execution evidence and focused changed hunks were reviewed from bounded-review-evidence.md.
Coverage: coverage execution evidence reports supported repository test suites passed.
Docstring coverage: coverage execution evidence reports configured repository docstring gates passed or docstring coverage was advisory.
DAG: CodeGraph/source-backed behavior map connects scripts/ci/materialize_base_python_requirements.py to the affected review, runtime, or workflow path and required checks.
PoC/execution: coverage-evidence job executed on the current head and reported PASS.
DDD/domain: workflow and repository-governance invariants were reviewed against changed files in bounded evidence.
CDD/context: CodeGraph evidence, changed-file history, and focused hunks were reviewed from bounded-review-evidence.md.
Similar issues: changed-file history evidence was reviewed for comparable local precedents.
Claim/concept check: bounded evidence, repository source, current-head workflow evidence, and, where numeric, scientific, statistical, or literature-backed claims are affected, original-paper/formula evidence and parameter-recovery expectations were used for claims.
Standards search: standards and external-source claims require trusted bounded source evidence prepared outside the isolated model process; no evidence-backed standards blocker is present in bounded evidence.
Compatibility/convention: changed workflow/script conventions, object naming, and reserved-word safety for schema/API/config/code surfaces were checked in bounded evidence.
Breaking-change/backcompat: deployment evidence and changed-file history were checked for backward-compatibility risk.
Performance: changed surfaces were checked for performance risk in bounded evidence.
Developer experience: changed automation, review, test, setup, and maintenance surfaces were checked for helpful or obstructive DX impact in bounded evidence.
User experience: connected user, operator, API, CLI, documentation, review-comment, status-check, rendering, and workflow-reader behavior was checked for contradictions against code, docs, and tests in bounded evidence.
Visual/DOM: deterministic repair does not infer browser runtime execution; source-backed DOM/UI evidence and trusted workflow receipts were reviewed when present, and non-web surfaces used API/CLI/log/docs/workflow evidence instead.
Accessibility/i18n: accessibility, localization, and human-readable text surfaces were checked where UI, CLI, API message, docs, logs, or review text changed.
Supply-chain/license: dependency, package, model, container, and external-tool changes were checked in bounded evidence.
Packaging: package, build, test, lint, and security contracts were checked in bounded evidence.
Security/privacy: workflow-token, review-gate, and repository-automation security/privacy boundaries were checked in bounded evidence.

Adversarial validation

{"status":"passed","probes":[{"path":"scripts/ci/materialize_base_python_requirements.py","line":196,"hypothesis":"A uv.lock or pyproject.toml present only in the PR head, or an unpinned export, could reach uv export and be materialized into the Docker build context, bypassing the base-commit trust boundary and hash-pin guarantee.","attack_or_counterexample":"uv.lock-only base tree with the sibling pyproject.toml absent at base, and uv export output carrying no --hash= lines.","evidence":"Trusted CodeGraph source trace at scripts/ci/materialize_base_python_requirements.py:196 shows locks.append((path, exported)) is reachable only when _export_uv_lock returns non-None, and that function reads both inputs exclusively via _git show {base_sha}:{lock_path}/{base_sha}:{pyproject_path} into a fresh tempfile.TemporaryDirectory while running uv export --frozen --offline; the focused diff shows the missing-pyproject RuntimeError->None and unpinned-output _is_hash_pinned->None branches; tests test_uv_lock_skipped_when_pyproject_is_absent and test_uv_lock_skipped_when_export_is_not_hash_pinned assert materialize(...) == []; Coverage execution evidence reports Result PASS with supported repository test suites passed. source-line-sha256=61f5df3e00348dbcef5c50bee0bcd624b41c8a31f229fd8a03a6fab80308384b","outcome":"falsified"},{"path":"scripts/ci/materialize_base_python_requirements.py","line":11,"hypothesis":"A missing uv binary, a timeout, or any uv export failure crashes the materializer step and breaks previously-working coverage builds for repositories without uv.lock.","attack_or_counterexample":"Run the materializer with shutil.which('uv') returning None, with export exceeding the 120s timeout, and with export exiting non-zero.","evidence":"Trusted focused diff and CodeGraph source trace at scripts/ci/materialize_base_python_requirements.py:11 (module imports shutil, resolved once via shutil.which('uv')) show every failure mode returns None — which-miss, RuntimeError from _git show, except (OSError, subprocess.TimeoutExpired), returncode != 0, and _is_hash_pinned rejection — so base_hash_locks omits the entry and materialize returns [], preserving pre-PR behavior for non-uv repos; tests test_uv_lock_skipped_when_uv_is_unavailable and test_uv_lock_skipped_when_export_fails assert materialize(...) == []; Coverage execution evidence reports Result PASS with supported repository test suites passed. source-line-sha256=582f9ff727d7496ab22b435e59b0f09b8ec415b0c8e8482ad2547f28cb6beb37","outcome":"falsified"}],"residual_risk":"The committed tests mock _run_uv_export/shutil.which, so a real uv export binary execution is not part of the suite; behavior on an actual lock depends on uv semantics for --frozen --offline --no-emit-project --no-editable. The fail-safe None degradation bounds this to the exact uv.lock-only repos the PR targets, and the author-cited live reproduction covers the intended path."}
  • Result: APPROVE
  • Reason: Trust boundary (base-commit-only reads + --frozen --offline + hash-pin regate), full None-degradation fallback, and non-blob entry handling verified; no failed checks, no unresolved threads; coverage and docstring gates pass.
  • Head SHA: ad8322e96a583c81e11058d98310ce947643fb89
  • Workflow run: 30690469943
  • Workflow attempt: 1

@seonghobae
seonghobae merged commit 5983b41 into main Aug 3, 2026
52 checks passed
@seonghobae
seonghobae deleted the claude/cwlab-pr-audit-governance-1hdcp5 branch August 3, 2026 01:33
@github-project-automation github-project-automation Bot moved this from In Progress to Done in naruon Platform Roadmap Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants