fix(coverage-evidence): materialize uv.lock-only repos so their offline coverage can run - #668
fix(coverage-evidence): materialize uv.lock-only repos so their offline coverage can run#668seonghobae wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 16 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Comment |
Correction: drop the model-pool widening from this PR — it is counterproductive given #624I filed the "widen the free reviewer model pool" part of this PR (append
Recommendation: drop commit
I could not push the branch revision myself this session (the environment's Also worth a look while here: this PR's merge is refused with Generated by Claude Code |
Dedup update: two of this PR's three components are now superseded — reduce to the uv.lock materializer onlyRe-checking the open PR set shows the provider-outage (#624) is being fixed correctly elsewhere, which supersedes most of this PR:
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 Note for the pool fix: #678's approach (bot-authored PR so a non-pusher OpenCode App review can satisfy ruleset Generated by Claude Code |
|
Status update — the pipeline deadlock this PR was fighting is now resolved upstream. #678 merged to Disposition of this PR's three components against current
Because #678 rewrote the exact 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
e8649ad to
eace3df
Compare
|
From the failing run (30584655800) status step env:
This is not fixable from this PR. The remaining blocker is org-side provisioning of a working reviewer provider — most likely the Generated by Claude Code |
Rebased onto
mainat9762ebd(post-#678/#674) and narrowed to a single component — theuv.lockmaterializer, 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-evidencesandbox installs the hash-pinned Python locks the materializer extracts from the PR base commit, then runs each repo'spytest testsoffline. Repositories managed entirely by uv expose only auv.lock, so content-based discovery (from #657) found nothing — no dependencies install, the suite fails at import,coverage-evidencereportsfailure, and OpenCode postsREQUEST_CHANGESon 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.pyonly discovers already-hash-pinned requirement files; it has nouv exportpath. Live impact: keyverse#32/#34/#37, newsdom-api#464, pg-llm-batch#17 are all blocked on this exactcoverage-evidence: failurefor their uv-managedservices/account_unification/ package trees.Fix
When a base
uv.lockis discovered, reconstruct it and its siblingpyproject.tomlfrom the exact validated base SHA in an isolated temp dir and runuv export --frozen --no-emit-project --no-editableto produce a hash-pinned closure the #661 preflight installer consumes like any other lock.--frozenforbids lock mutation and network resolution; both inputs are read only from the base commit; it is best-effort (any failure skips theuv.lockexactly 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 tests→ 746 passedcoverage report(fail_under=100, sourcescripts/ci) → TOTAL 100%, exit 0interrogate(fail-under=100, excltests) → PASSED 100.0%, exit 0scripts/ci/materialize_base_python_requirements.py(+82/-5) andtests/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 onmain.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