fix(nix): use C-only Wuffs dependency mirror - #3741
Conversation
|
@coderabbitai review |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (7)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe vendored Wuffs dependency now uses the pinned Suggested reviewers: Merge Risk: ⚪ Minimal · up to This updates the vendored Wuffs source to a pinned C-only mirror and synchronizes its dependency metadata and validation, addressing archive realization failures without an identified remaining merge risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. (6 skipped: 6 unsupported.)
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 |
|
✅ Action performedReview finished.
|
Greptile SummaryThis PR replaces libghostty-vt’s full Wuffs source archive with a commit-pinned C-only release mirror, synchronizes the Zig and Nix dependency metadata, and records the change as a removable local vendor patch.
Confidence Score: 5/5The PR appears safe to merge; the dependency metadata is internally consistent and the established Nix build path validates the pinned Git source. No actionable correctness, security, or repository-rule violations remain after checking the fetch implementation, Wuffs build layout, patch maintenance workflow, and regression coverage.
|
| Filename | Overview |
|---|---|
| scripts/test_vendor_libghostty_vt.py | Adds consistency checks ensuring all Wuffs metadata uses the pinned C-only mirror and updated hashes. |
| vendor/libghostty-vt/pkg/wuffs/build.zig.zon | Replaces the full Wuffs archive dependency with the commit-pinned C-release mirror. |
| vendor/libghostty-vt/build.zig.zon.nix | Updates generated Nix metadata to fetch and verify the Wuffs Git checkout. |
| vendor/libghostty-vt/build.zig.zon.json | Synchronizes the generated dependency URL, Zig package identity, and Nix content hash. |
| vendor/patches/libghostty-vt/0003-use-c-only-wuffs-mirror.patch | Captures the dependency migration as a reproducible local vendor patch. |
| vendor/libghostty-vt.patches.md | Documents the patch rationale, upstream status, verification commands, and removal condition. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
M[pkg/wuffs/build.zig.zon] --> G[Generated Zig and Nix metadata]
G --> F[fetchgit at pinned commit]
F --> H[Nix content-hash verification]
H --> Z[Zig package-hash verification]
Z --> C[Compile release/c/wuffs-v0.4.c]
Reviews (1): Last reviewed commit: "fix(nix): use C-only Wuffs dependency mi..." | Re-trigger Greptile
|
superseded by #3906 |
Issue
A Nix installation on macOS fails hash verification when ESET deletes an artificial malformed JPEG from the Wuffs dependency. This blocks
darwin-rebuild switchfor configurations that include Herdr.Problem
Herdr fetched the full Wuffs source archive even though libghostty-vt only compiles its released C sources. That archive includes a test JPEG which ESET identifies and removes before Nix verifies the restored output.
How did we fix it?
Herdr now fetches Wuffs' pinned C-only release mirror. The Zig manifest and generated Nix cache metadata use the same commit and hashes. The backport is tracked as a local libghostty-vt patch until the next vendor update includes the merged upstream change.
Verification
The regression test failed against the old full-archive entries and passes with the C-only pin. A clean Zig fetch produced the expected package hash, included
release/c/wuffs-v0.4.c, and excluded the flagged JPEG. Vendor tests, maintenance checks, Linux and Windows lint, and 3,271 of 3,274 Rust tests passed. Three unrelated host-sensitive tests still fail under this root Herdr harness: one permission test and two live-handoff tests.refs #3737