test(coverage): simulate Linux x86_64 in trusted-uv installer tests - #960
test(coverage): simulate Linux x86_64 in trusted-uv installer tests#960seonghobae wants to merge 4 commits into
Conversation
Installer verification, cache, and cleanup coverage was unreachable on macOS because the production gate rejects non-Linux runners first. Pin platform and machine only in those unit tests; the portability contract still fail-closes unsupported hosts before any download.
|
@cwl-noema-review please review this current head. Installer verification tests now pin linux/x86_64 so local full-suite coverage is 100%; production still fail-closes unsupported runners. |
|
Warning Review limit reached
Next review available in: 109 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. 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 (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Clear the process-cached installer after the Linux x86_64 monkeypatch so version verification is measured on the simulated runner, not a stale host-architecture miss.
Debian-style runners report amd64 or AMD64 for the same userspace the pinned uv-x86_64-unknown-linux-gnu archive targets. Normalize the machine label and fail-closed only for a different ISA.
Materialize a base Python lock only when every package line is an exact SHA-256 pin or a two-token relative -r/--requirement include of a candidate lock path. A lone --require-hashes directive, ./dotted paths, and -r other-hashes.txt no longer enter the trusted build context.
There was a problem hiding this comment.
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
1d8e6208e575540ec2f0819be39bd711dc902905. - 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:
- Bandit (Python SAST) check run: cancelled (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274510/job/94493379649)
- Close Empty PR/close-empty: CANCELLED (https://github.com/ContextualWisdomLab/.github/actions/runs/31713269881/job/94491461708)
- CodeQL PR/Detect CodeQL languages: CANCELLED (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274512/job/94491476062)
- Detect CodeQL languages check run: cancelled (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274512/job/94491476062)
- Detect Python check run: cancelled (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274510/job/94491476706)
- OSV-Scanner PR/osv-scan / osv-scan: CANCELLED (https://github.com/ContextualWisdomLab/.github/actions/runs/31713275009/job/94491478711)
- Python 3.10 compatibility contract check run: cancelled (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274599/job/94491476955)
- Python 3.14 full quality gate check run: cancelled (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274599/job/94491476904)
- Python Security/Bandit (Python SAST): CANCELLED (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274510/job/94493379649)
- Python Security/Detect Python: CANCELLED (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274510/job/94491476706)
- Python Security/pip-audit (Python dependency audit): CANCELLED (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274510/job/94493379095)
- SAST Semgrep/Semgrep (multi-language SAST): CANCELLED (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274446/job/94491476163)
- SBOM Generation/generate-sbom: CANCELLED (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274522/job/94491476207)
- Scorecard PR/Scorecard: CANCELLED (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274506/job/94491476229)
- Scorecard check run: cancelled (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274506/job/94491476229)
- Secret Scan/gitleaks (secret scan): CANCELLED (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274408/job/94491476124)
- Security Scan/dependency-review: CANCELLED (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274444/job/94491476504)
- Security Scan/osv-scan: CANCELLED (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274444/job/94491476536)
- Security Scan/scorecard: CANCELLED (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274444/job/94491476518)
- Security Scan/trivy-fs: CANCELLED (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274444/job/94491476435)
- Semgrep (multi-language SAST) check run: cancelled (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274446/job/94491476163)
- Strix Changed Path Quality CI/exact-head-path-policy: CANCELLED (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274496/job/94491476368)
- Trusted uv Materializer Quality CI/Python 3.10 compatibility contract: CANCELLED (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274599/job/94491476955)
- Trusted uv Materializer Quality CI/Python 3.14 full quality gate: CANCELLED (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274599/job/94491476904)
- close-empty check run: cancelled (https://github.com/ContextualWisdomLab/.github/actions/runs/31713269881/job/94491461708)
- coverage-source-tree check run: cancelled (https://github.com/ContextualWisdomLab/.github/actions/runs/31713269924/job/94493398729)
- dependency-review check run: cancelled (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274444/job/94491476504)
- exact-head-path-policy check run: cancelled (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274496/job/94491476368)
- generate-sbom check run: cancelled (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274522/job/94491476207)
- gitleaks (secret scan) check run: cancelled (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274408/job/94491476124)
- osv-scan / osv-scan check run: cancelled (https://github.com/ContextualWisdomLab/.github/actions/runs/31713275009/job/94491478711)
- osv-scan check run: cancelled (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274444/job/94491476536)
- pip-audit (Python dependency audit) check run: cancelled (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274510/job/94493379095)
- required-workflow-bootstrap check run: cancelled (https://github.com/ContextualWisdomLab/.github/actions/runs/31713269924/job/94491461945)
- scorecard check run: cancelled (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274444/job/94491476518)
- trivy-fs check run: cancelled (https://github.com/ContextualWisdomLab/.github/actions/runs/31713274444/job/94491476435)
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (4 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (4 files)"]
R1 --> V1["required checks"]
Evidence --> S2["Docs: trusted-uv-lock-materialization.md"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: trusted-uv-lock-materialization.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"]
OpenCode Review Overview
Pull request overviewOpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed. Findings1. HIGH Current-head GitHub Checks - Fix failed required checks before approval
Failed checks:
Changed-File Evidence Mapflowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file (4 files)"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file (4 files)"]
R1 --> V1["required checks"]
Evidence --> S2["Docs: trusted-uv-lock-materialization.md"]
S2 --> I2["operator or user guidance"]
I2 --> R2["Review risk: Docs: trusted-uv-lock-materialization.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"]
|
|
Returned to Draft because this test-only portability slice carries production materializer and governance changes beyond its stated scope. The useful change should be limited to a test helper that simulates Linux x86_64 only inside the installer verification cases, while preserving production fail-closed behavior on unsupported runners. Head After the authoritative materializer branch lands, rebuild this as a minimal test-only follow-up against protected |
Summary
Five installer verification tests called
_install_trusted_uv()without pinning the runner. On macOS they raisedsupports only linux x86_64 runnersbefore version, cache, or cleanup coverage ran, so the local full suite could not reach 100%._simulate_linux_x86_64_runner()pinssys.platformandplatform.machine()only in those unit tests.Test plan
pytest tests/test_materialize_base_python_requirements.py tests/test_trusted_uv_portability_and_streaming.py— 42 passedpytest tests— 977 passed, 100% statements/branches, interrogate 100%