Repository navigation
fix(cache): tolerate opaque (non-hash) upstream NAR URLs - #1331
Conversation
|
Warning Review limit reached
More reviews will be available in 22 minutes and 14 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR tolerates opaque (non-hash-named) upstream NAR URLs by adding a nullable ChangesOpaque upstream URL support
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
Code Review
This pull request introduces support for preserving and using opaque (non-hash-named) upstream NAR URLs (such as Cachix UUID NARs) by adding an upstream_url field to the NarInfo schema and database migrations. It updates URL parsing to fallback to the NarHash for local storage keys while preserving the original path for upstream fetches. Feedback suggests optimizing setNarInfoUpstreamURL by removing the unnecessary transaction block for a single atomic UPDATE statement.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
This is a well-structured and thorough PR. The dual-key approach — using A few observations and questions:
The test coverage looks solid, especially Overall this looks like a correct and well-tested fix for a real production issue. Nice work! 🎉 To reply, just mention @dosu. Docs are dead. Just use Dosu. |
When an upstream narinfo's URL: field is not hash-named (e.g. cachix serves nar/<uuidv4>.nar.zst), ParseURL rejected it as an "invalid nar hash" and the whole narinfo fetch aborted with HTTP 500. Nix treats a 500 as a hard error (worse than a 404), so this broke substitution for every affected path once a fleet proxied a cachix-backed cache. The Nix binary-cache protocol treats the narinfo URL: field as an opaque path relative to the cache root, so a pull-through proxy must tolerate non hash-named URLs rather than reject them. Decouple ncps's storage key from the upstream URL string: - pkg/nar: add ParseUpstreamURL(u, fallbackHash). Hash-named URLs behave exactly like ParseURL; opaque URLs preserve the original path for the upstream GET (new opaquePath field, used only by JoinURL) and key local storage off fallbackHash (the narinfo NarHash). Adds IsOpaque, OpaquePath and WithOpaquePath. - ent: add nullable narinfos.upstream_url, persisting the opaque upstream path so the NAR can be re-fetched from upstream after local eviction. - cache: pullNarInfo parses via ParseUpstreamURL (NarHash-derived key), re-serves the NAR under ncps's own hash-named URL, and persists the opaque path. lookupOriginalNarURL restores it for re-fetch; lookupPreferredUpstreamURL is made opaque-aware for CDC. The hash-named fast path is unchanged, so this is purely additive. Fixes bryandph/ncps#1 Co-Authored-By: Claude Opus 4.8 <[email protected]>
7f70307 to
21ed918
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pkg/cache/cache.go (1)
3756-3778:⚠️ Potential issue | 🟠 Major | ⚡ Quick winMake
upstream_urlpersistence part of the narinfo write.
storeInDatabasecommits the rewritten ncps-localnarInfo.URLfirst, thensetNarInfoUpstreamURLruns in a second transaction and its failure is only logged. For opaque upstreams, that leaves a durable narinfo row without the only path needed to re-fetch the NAR after local eviction, so future substitution can fall back to a URL the upstream does not actually serve.🤖 Prompt for 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. In `@pkg/cache/cache.go` around lines 3756 - 3778, The narinfo write currently calls c.storeInDatabase(ctx, hash, narInfo) and then separately calls c.setNarInfoUpstreamURL(ctx, hash, upstreamNarPath), so a failure persisting upstreamNarPath can leave a durable narinfo without the opaque upstream; change the implementation so persistence of upstreamNarPath is included in the same database transaction as storeInDatabase (e.g., extend or modify storeInDatabase to accept the upstreamNarPath or add a transactional helper that calls both operations together), ensuring that when upstreamNarPath != "" the code writes narInfo and the upstream URL atomically (use the existing c.storeInDatabase and c.setNarInfoUpstreamURL symbols or a new helper to perform both in one transaction and surface errors instead of only logging them).
🤖 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 `@migrations/sqlite/20260605033958_add_narinfo_upstream_url.sql`:
- Around line 31-43: The Down migration is dropping non-existent temporary
tables `new_nar_files` and `new_narinfos`; instead update the rollback to target
the live tables and indexes that were created/renamed in Up — drop or rename the
`nar_files` and `narinfos` tables (not `new_*`) and drop the indexes
`narfile_last_accessed_at`, `narfile_hash_compression_query`,
`narinfo_last_accessed_at`, and `narinfo_hash` against those live tables so the
Down properly reverses the Up operations in
migrations/sqlite/20260605033958_add_narinfo_upstream_url.sql.
---
Outside diff comments:
In `@pkg/cache/cache.go`:
- Around line 3756-3778: The narinfo write currently calls
c.storeInDatabase(ctx, hash, narInfo) and then separately calls
c.setNarInfoUpstreamURL(ctx, hash, upstreamNarPath), so a failure persisting
upstreamNarPath can leave a durable narinfo without the opaque upstream; change
the implementation so persistence of upstreamNarPath is included in the same
database transaction as storeInDatabase (e.g., extend or modify storeInDatabase
to accept the upstreamNarPath or add a transactional helper that calls both
operations together), ensuring that when upstreamNarPath != "" the code writes
narInfo and the upstream URL atomically (use the existing c.storeInDatabase and
c.setNarInfoUpstreamURL symbols or a new helper to perform both in one
transaction and surface errors instead of only logging them).
🪄 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
Run ID: 24ba05c3-0f21-45a6-b386-e5a7945d29c2
⛔ Files ignored due to path filters (3)
migrations/mysql/atlas.sumis excluded by!**/*.summigrations/postgres/atlas.sumis excluded by!**/*.summigrations/sqlite/atlas.sumis excluded by!**/*.sum
📒 Files selected for processing (16)
ent/migrate/schema.goent/mutation.goent/narinfo.goent/narinfo/narinfo.goent/narinfo/where.goent/narinfo_create.goent/narinfo_update.goent/runtime.goent/schema/narinfo.gomigrations/mysql/20260605034000_add_narinfo_upstream_url.sqlmigrations/postgres/20260605033958_add_narinfo_upstream_url.sqlmigrations/sqlite/20260605033958_add_narinfo_upstream_url.sqlpkg/cache/cache.gopkg/cache/cache_test.gopkg/nar/url.gopkg/nar/url_test.go
There was a problem hiding this comment.
♻️ Duplicate comments (1)
migrations/sqlite/20260605033958_add_narinfo_upstream_url.sql (1)
31-43:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winFix invalid SQLite
Downmigration table targets.The
Upmigration renamesnew_narinfos→narinfos(line 11) andnew_nar_files→nar_files(line 23). Therefore,Downmust drop the live tables (narinfosandnar_files), not the temporarynew_*tables that no longer exist afterUpcompletes. As written, the rollback will fail with "table does not exist" errors.🔧 Suggested fix
-- +goose Down -- reverse: create index "narfile_last_accessed_at" to table: "nar_files" DROP INDEX `narfile_last_accessed_at`; -- reverse: create index "narfile_hash_compression_query" to table: "nar_files" DROP INDEX `narfile_hash_compression_query`; --- reverse: create "new_nar_files" table -DROP TABLE `new_nar_files`; +-- reverse: rename "new_nar_files" to "nar_files" +DROP TABLE `nar_files`; -- reverse: create index "narinfo_last_accessed_at" to table: "narinfos" DROP INDEX `narinfo_last_accessed_at`; -- reverse: create index "narinfo_hash" to table: "narinfos" DROP INDEX `narinfo_hash`; --- reverse: create "new_narinfos" table -DROP TABLE `new_narinfos`; +-- reverse: rename "new_narinfos" to "narinfos" +DROP TABLE `narinfos`;Based on learnings: "For goose-style SQL migrations in this repository, ensure every migration includes both a forward (
-- +goose Up) section and a rollback (-- +goose Down) section … It does NOT permit omittingDownrollback blocks or removing rollback logic."🤖 Prompt for 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. In `@migrations/sqlite/20260605033958_add_narinfo_upstream_url.sql` around lines 31 - 43, The Down block is dropping the temporary tables new_narinfos/new_nar_files which no longer exist after the Up rename; update the rollback to target the live tables and their indexes instead: replace DROP TABLE `new_narinfos` and DROP TABLE `new_nar_files` with DROP TABLE `narinfos` and DROP TABLE `nar_files`, and ensure the DROP INDEX calls remove the corresponding indexes on narinfos (`narinfo_last_accessed_at`, `narinfo_hash`) and nar_files (`narfile_last_accessed_at`, `narfile_hash_compression_query`) so the Down reverses the Up rename/creation correctly.
🤖 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.
Duplicate comments:
In `@migrations/sqlite/20260605033958_add_narinfo_upstream_url.sql`:
- Around line 31-43: The Down block is dropping the temporary tables
new_narinfos/new_nar_files which no longer exist after the Up rename; update the
rollback to target the live tables and their indexes instead: replace DROP TABLE
`new_narinfos` and DROP TABLE `new_nar_files` with DROP TABLE `narinfos` and
DROP TABLE `nar_files`, and ensure the DROP INDEX calls remove the corresponding
indexes on narinfos (`narinfo_last_accessed_at`, `narinfo_hash`) and nar_files
(`narfile_last_accessed_at`, `narfile_hash_compression_query`) so the Down
reverses the Up rename/creation correctly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b14a9479-5d18-4008-b192-955f32668aa5
⛔ Files ignored due to path filters (3)
migrations/mysql/atlas.sumis excluded by!**/*.summigrations/postgres/atlas.sumis excluded by!**/*.summigrations/sqlite/atlas.sumis excluded by!**/*.sum
📒 Files selected for processing (16)
ent/migrate/schema.goent/mutation.goent/narinfo.goent/narinfo/narinfo.goent/narinfo/where.goent/narinfo_create.goent/narinfo_update.goent/runtime.goent/schema/narinfo.gomigrations/mysql/20260605034000_add_narinfo_upstream_url.sqlmigrations/postgres/20260605033958_add_narinfo_upstream_url.sqlmigrations/sqlite/20260605033958_add_narinfo_upstream_url.sqlpkg/cache/cache.gopkg/cache/cache_test.gopkg/nar/url.gopkg/nar/url_test.go
✅ Files skipped from review due to trivial changes (6)
- migrations/mysql/20260605034000_add_narinfo_upstream_url.sql
- ent/migrate/schema.go
- ent/narinfo.go
- ent/narinfo_update.go
- ent/narinfo_create.go
- ent/mutation.go
🚧 Files skipped from review as they are similar to previous changes (7)
- ent/runtime.go
- ent/schema/narinfo.go
- ent/narinfo/narinfo.go
- pkg/nar/url_test.go
- pkg/nar/url.go
- ent/narinfo/where.go
- pkg/cache/cache.go
* origin/main: fix(cdc): heal orphaned mid-chunking NAR state via migration-lock liveness (kalbasit#1317) chore(deps): update codecov/codecov-action action to v7 (kalbasit#1340) feat(fsck): reclaim CDC chunked-NAR residue (grace-period mark-then-purge) (kalbasit#1335) fix(ent): stop sqlite phantom narinfos/nar_files rebuild (kalbasit#1339) chore: update flake.lock and run go mod tidy (kalbasit#1338) fix(deps): update module github.com/mattn/go-sqlite3 to v1.14.45 (kalbasit#1336) fix(cache,fsck): self-completing CDC drain (de-chunk never strands NARs) (kalbasit#1334) fix(cache,fsck): reconcile narinfo<->nar_file links (drain-mode unblock + prevention) (kalbasit#1333) fix(cache): close the CDC url=none/xz-NAR desync (prevention + repair) (kalbasit#1332) fix(cache): durable-bytes marker for /upload reference presence (kalbasit#1330) fix(cache): non-destructive narinfo purge on root path (kalbasit#1326) # Conflicts: # migrations/mysql/atlas.sum # migrations/postgres/atlas.sum # migrations/sqlite/atlas.sum # pkg/cache/cache.go
The opaque-URL helpers (narInfoStorageKey, setNarInfoUpstreamURL) were inserted between lookupOriginalNarURL's doc comment and its declaration, orphaning the comment onto narInfoStorageKey and leaving lookupOriginalNarURL undocumented. Move the doc comment back to its function. Co-Authored-By: Claude Opus 4.8 <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
pkg/cache/cache.go (2)
3924-3945:⚠️ Potential issue | 🟠 Major | 🏗️ Heavy liftDon't make
upstream_urlpersistence best-effort.By this point the narinfo row already contains ncps's rewritten hash-named
URL. If this follow-up update fails, the request still returns success but loses the only path that can re-fetch an evicted opaque NAR later, which recreates the eviction-time failure this change is meant to fix. Persistupstream_urlin the same transaction asstoreInDatabase, or fail the pull so the row is retried atomically.🤖 Prompt for 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. In `@pkg/cache/cache.go` around lines 3924 - 3945, The follow-up persistence of upstreamNarPath must not be best-effort: ensure the upstream URL is persisted in the same atomic operation as storing the narinfo or return an error to trigger retry. Modify the code path around c.storeInDatabase(ctx, hash, narInfo) so that either storeInDatabase performs the upstream URL write internally (include upstreamNarPath) or, if you keep setNarInfoUpstreamURL separate, treat any error from c.setNarInfoUpstreamURL(ctx, hash, upstreamNarPath) as a hard failure (propagate the error / call ds.setError and return an error) so the pull does not succeed without the opaque upstream path; reference c.storeInDatabase, setNarInfoUpstreamURL, upstreamNarPath and ds.setError when making the change.
1765-1787:⚠️ Potential issue | 🟠 Major | ⚡ Quick winDelete the real
.nar.zstobject before clearingbytes_stored_at.
DeleteNarstill removes onlynarURL, butCompression:noneNARs are physically stored under the.nar.zstvariant. Calling this withnar/<hash>.narcan therefore clearbytes_stored_atwhile the blob is still on disk, which both leaks the object and makes/uploadpresence checks lie. ReusedeleteNarByteshere before clearing the marker.Suggested fix
- if err := c.narStore.DeleteNar(ctx, narURL); err != nil { + if err := c.deleteNarBytes(ctx, narURL); err != nil { return err }🤖 Prompt for 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. In `@pkg/cache/cache.go` around lines 1765 - 1787, The code clears bytes_stored_at after calling c.narStore.DeleteNar, but for Compression:none the on-disk blob lives as the .nar.zst variant so bytes may be cleared while the blob remains; call the existing deleteNarBytes helper to remove the actual stored bytes before clearing the marker. Concretely, replace the current call to c.narStore.DeleteNar (or add immediately after it and before computing clearURL) with a call to c.deleteNarBytes(ctx, narURL) (or pass the normalized URL if deleteNarBytes expects a normalized form), handle and return any error from deleteNarBytes, then proceed to compute clearURL and update ent.NarFile.ClearBytesStoredAt().Save(ctx) as before.
🤖 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 `@pkg/cache/cache.go`:
- Around line 4268-4290: The liveness check in the nar_file servability path
(function returning c.cdcChunkerLive(...) at the end) disagrees with the
progressive streaming code: update streamProgressiveChunks to use the same lock
probe (c.cdcChunkerLive) or extract a shared helper used by both so they
evaluate the migration lock consistently; change the checks in
streamProgressiveChunks (the logic around the cdcChunkingLockTTL hard-fail) to
call c.cdcChunkerLive(ctx, hash) (or the new helper) instead of only relying on
chunk age so GetNar, streamProgressiveChunks and any callers (e.g., GetNar ->
getNarFromChunks) all treat a held migration lock as liveness and avoid aborting
long-running but live chunkers.
- Around line 8463-8466: The URL fallback using
entnarinfo.URLHasPrefix("nar/"+narURL.Hash+".") is too strict and misses
unlinked nix-serve-style narinfos like "nar/<narinfoHash>-<hash>.nar.xz"; update
the lookup to perform a hash-aware parse/normalize instead of a raw prefix
match: when scanning in checkAndFixNarInfosForNar (and the similar spots around
the other occurrences) extract/normalize candidate URLs (reusing
NormalizeChunkedNarInfoURL or implementing the same parse logic) to find the
embedded NarHash, then match against narURL.Hash (or use a new predicate that
checks the extracted hash) so MigrateChunksToNar / LinkedNarinfoNarHash will
correctly detect and normalize those unlinked narinfo URLs. Ensure the change
replaces the URLHasPrefix usage (and equivalent checks at the other locations)
with this hash-aware match.
---
Outside diff comments:
In `@pkg/cache/cache.go`:
- Around line 3924-3945: The follow-up persistence of upstreamNarPath must not
be best-effort: ensure the upstream URL is persisted in the same atomic
operation as storing the narinfo or return an error to trigger retry. Modify the
code path around c.storeInDatabase(ctx, hash, narInfo) so that either
storeInDatabase performs the upstream URL write internally (include
upstreamNarPath) or, if you keep setNarInfoUpstreamURL separate, treat any error
from c.setNarInfoUpstreamURL(ctx, hash, upstreamNarPath) as a hard failure
(propagate the error / call ds.setError and return an error) so the pull does
not succeed without the opaque upstream path; reference c.storeInDatabase,
setNarInfoUpstreamURL, upstreamNarPath and ds.setError when making the change.
- Around line 1765-1787: The code clears bytes_stored_at after calling
c.narStore.DeleteNar, but for Compression:none the on-disk blob lives as the
.nar.zst variant so bytes may be cleared while the blob remains; call the
existing deleteNarBytes helper to remove the actual stored bytes before clearing
the marker. Concretely, replace the current call to c.narStore.DeleteNar (or add
immediately after it and before computing clearURL) with a call to
c.deleteNarBytes(ctx, narURL) (or pass the normalized URL if deleteNarBytes
expects a normalized form), handle and return any error from deleteNarBytes,
then proceed to compute clearURL and update
ent.NarFile.ClearBytesStoredAt().Save(ctx) as before.
🪄 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
Run ID: 053b71df-de0e-4e62-a675-fd8003812495
⛔ Files ignored due to path filters (3)
migrations/mysql/atlas.sumis excluded by!**/*.summigrations/postgres/atlas.sumis excluded by!**/*.summigrations/sqlite/atlas.sumis excluded by!**/*.sum
📒 Files selected for processing (8)
ent/migrate/schema.goent/mutation.goent/runtime.goent/schema/narinfo.gomigrations/mysql/20260607034027_add_narinfo_upstream_url.sqlmigrations/postgres/20260607034027_add_narinfo_upstream_url.sqlmigrations/sqlite/20260607034027_add_narinfo_upstream_url.sqlpkg/cache/cache.go
💤 Files with no reviewable changes (2)
- migrations/postgres/20260607034027_add_narinfo_upstream_url.sql
- migrations/mysql/20260607034027_add_narinfo_upstream_url.sql
✅ Files skipped from review due to trivial changes (3)
- migrations/sqlite/20260607034027_add_narinfo_upstream_url.sql
- ent/migrate/schema.go
- ent/mutation.go
🚧 Files skipped from review as they are similar to previous changes (2)
- ent/runtime.go
- ent/schema/narinfo.go
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
pkg/cache/cache.go (2)
3924-3945:⚠️ Potential issue | 🟠 Major | 🏗️ Heavy liftDon't make
upstream_urlpersistence best-effort.By this point the narinfo row already contains ncps's rewritten hash-named
URL. If this follow-up update fails, the request still returns success but loses the only path that can re-fetch an evicted opaque NAR later, which recreates the eviction-time failure this change is meant to fix. Persistupstream_urlin the same transaction asstoreInDatabase, or fail the pull so the row is retried atomically.🤖 Prompt for 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. In `@pkg/cache/cache.go` around lines 3924 - 3945, The follow-up persistence of upstreamNarPath must not be best-effort: ensure the upstream URL is persisted in the same atomic operation as storing the narinfo or return an error to trigger retry. Modify the code path around c.storeInDatabase(ctx, hash, narInfo) so that either storeInDatabase performs the upstream URL write internally (include upstreamNarPath) or, if you keep setNarInfoUpstreamURL separate, treat any error from c.setNarInfoUpstreamURL(ctx, hash, upstreamNarPath) as a hard failure (propagate the error / call ds.setError and return an error) so the pull does not succeed without the opaque upstream path; reference c.storeInDatabase, setNarInfoUpstreamURL, upstreamNarPath and ds.setError when making the change.
1765-1787:⚠️ Potential issue | 🟠 Major | ⚡ Quick winDelete the real
.nar.zstobject before clearingbytes_stored_at.
DeleteNarstill removes onlynarURL, butCompression:noneNARs are physically stored under the.nar.zstvariant. Calling this withnar/<hash>.narcan therefore clearbytes_stored_atwhile the blob is still on disk, which both leaks the object and makes/uploadpresence checks lie. ReusedeleteNarByteshere before clearing the marker.Suggested fix
- if err := c.narStore.DeleteNar(ctx, narURL); err != nil { + if err := c.deleteNarBytes(ctx, narURL); err != nil { return err }🤖 Prompt for 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. In `@pkg/cache/cache.go` around lines 1765 - 1787, The code clears bytes_stored_at after calling c.narStore.DeleteNar, but for Compression:none the on-disk blob lives as the .nar.zst variant so bytes may be cleared while the blob remains; call the existing deleteNarBytes helper to remove the actual stored bytes before clearing the marker. Concretely, replace the current call to c.narStore.DeleteNar (or add immediately after it and before computing clearURL) with a call to c.deleteNarBytes(ctx, narURL) (or pass the normalized URL if deleteNarBytes expects a normalized form), handle and return any error from deleteNarBytes, then proceed to compute clearURL and update ent.NarFile.ClearBytesStoredAt().Save(ctx) as before.
🤖 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 `@pkg/cache/cache.go`:
- Around line 4268-4290: The liveness check in the nar_file servability path
(function returning c.cdcChunkerLive(...) at the end) disagrees with the
progressive streaming code: update streamProgressiveChunks to use the same lock
probe (c.cdcChunkerLive) or extract a shared helper used by both so they
evaluate the migration lock consistently; change the checks in
streamProgressiveChunks (the logic around the cdcChunkingLockTTL hard-fail) to
call c.cdcChunkerLive(ctx, hash) (or the new helper) instead of only relying on
chunk age so GetNar, streamProgressiveChunks and any callers (e.g., GetNar ->
getNarFromChunks) all treat a held migration lock as liveness and avoid aborting
long-running but live chunkers.
- Around line 8463-8466: The URL fallback using
entnarinfo.URLHasPrefix("nar/"+narURL.Hash+".") is too strict and misses
unlinked nix-serve-style narinfos like "nar/<narinfoHash>-<hash>.nar.xz"; update
the lookup to perform a hash-aware parse/normalize instead of a raw prefix
match: when scanning in checkAndFixNarInfosForNar (and the similar spots around
the other occurrences) extract/normalize candidate URLs (reusing
NormalizeChunkedNarInfoURL or implementing the same parse logic) to find the
embedded NarHash, then match against narURL.Hash (or use a new predicate that
checks the extracted hash) so MigrateChunksToNar / LinkedNarinfoNarHash will
correctly detect and normalize those unlinked narinfo URLs. Ensure the change
replaces the URLHasPrefix usage (and equivalent checks at the other locations)
with this hash-aware match.
---
Outside diff comments:
In `@pkg/cache/cache.go`:
- Around line 3924-3945: The follow-up persistence of upstreamNarPath must not
be best-effort: ensure the upstream URL is persisted in the same atomic
operation as storing the narinfo or return an error to trigger retry. Modify the
code path around c.storeInDatabase(ctx, hash, narInfo) so that either
storeInDatabase performs the upstream URL write internally (include
upstreamNarPath) or, if you keep setNarInfoUpstreamURL separate, treat any error
from c.setNarInfoUpstreamURL(ctx, hash, upstreamNarPath) as a hard failure
(propagate the error / call ds.setError and return an error) so the pull does
not succeed without the opaque upstream path; reference c.storeInDatabase,
setNarInfoUpstreamURL, upstreamNarPath and ds.setError when making the change.
- Around line 1765-1787: The code clears bytes_stored_at after calling
c.narStore.DeleteNar, but for Compression:none the on-disk blob lives as the
.nar.zst variant so bytes may be cleared while the blob remains; call the
existing deleteNarBytes helper to remove the actual stored bytes before clearing
the marker. Concretely, replace the current call to c.narStore.DeleteNar (or add
immediately after it and before computing clearURL) with a call to
c.deleteNarBytes(ctx, narURL) (or pass the normalized URL if deleteNarBytes
expects a normalized form), handle and return any error from deleteNarBytes,
then proceed to compute clearURL and update
ent.NarFile.ClearBytesStoredAt().Save(ctx) as before.
🪄 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
Run ID: 053b71df-de0e-4e62-a675-fd8003812495
⛔ Files ignored due to path filters (3)
migrations/mysql/atlas.sumis excluded by!**/*.summigrations/postgres/atlas.sumis excluded by!**/*.summigrations/sqlite/atlas.sumis excluded by!**/*.sum
📒 Files selected for processing (8)
ent/migrate/schema.goent/mutation.goent/runtime.goent/schema/narinfo.gomigrations/mysql/20260607034027_add_narinfo_upstream_url.sqlmigrations/postgres/20260607034027_add_narinfo_upstream_url.sqlmigrations/sqlite/20260607034027_add_narinfo_upstream_url.sqlpkg/cache/cache.go
💤 Files with no reviewable changes (2)
- migrations/postgres/20260607034027_add_narinfo_upstream_url.sql
- migrations/mysql/20260607034027_add_narinfo_upstream_url.sql
✅ Files skipped from review due to trivial changes (3)
- migrations/sqlite/20260607034027_add_narinfo_upstream_url.sql
- ent/migrate/schema.go
- ent/mutation.go
🚧 Files skipped from review as they are similar to previous changes (2)
- ent/runtime.go
- ent/schema/narinfo.go
🛑 Comments failed to post (2)
pkg/cache/cache.go (2)
4268-4290:
⚠️ Potential issue | 🟠 Major | ⚡ Quick winThe new lock-based liveness check is now out of sync with progressive streaming.
These lines treat a held migration lock as the source of truth for "the chunker is alive", but
streamProgressiveChunksstill hard-fails any in-progress chunk older thancdcChunkingLockTTLat Lines 8119-8123 and 8239-8242. A healthy chunk that runs longer than an hour will now be routed as servable here and then be aborted downstream as "stalled". Make the progressive path use the same lock probe (or a shared helper) so both paths agree on liveness.🤖 Prompt for 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. In `@pkg/cache/cache.go` around lines 4268 - 4290, The liveness check in the nar_file servability path (function returning c.cdcChunkerLive(...) at the end) disagrees with the progressive streaming code: update streamProgressiveChunks to use the same lock probe (c.cdcChunkerLive) or extract a shared helper used by both so they evaluate the migration lock consistently; change the checks in streamProgressiveChunks (the logic around the cdcChunkingLockTTL hard-fail) to call c.cdcChunkerLive(ctx, hash) (or the new helper) instead of only relying on chunk age so GetNar, streamProgressiveChunks and any callers (e.g., GetNar -> getNarFromChunks) all treat a held migration lock as liveness and avoid aborting long-running but live chunkers.
8463-8466:
⚠️ Potential issue | 🟠 Major | 🏗️ Heavy liftThe URL fallback misses unlinked nix-serve-style narinfos.
URLHasPrefix("nar/"+hash+".")only matches canonicalnar/<hash>...URLs. An unlinked narinfo with a prefixed URL likenar/<narinfoHash>-<hash>.nar.xzwill not match, soMigrateChunksToNar/NormalizeChunkedNarInfoURLcan leave it unnormalized andLinkedNarinfoNarHashcan wrongly conclude there's noNarHashto verify against. That's reachable here becausecheckAndFixNarInfosForNaralready documents that CDC row replacement can drop the join row. This fallback needs a hash-aware parse/normalize step instead of a raw prefix match.Also applies to: 8610-8613, 8682-8686
🤖 Prompt for 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. In `@pkg/cache/cache.go` around lines 8463 - 8466, The URL fallback using entnarinfo.URLHasPrefix("nar/"+narURL.Hash+".") is too strict and misses unlinked nix-serve-style narinfos like "nar/<narinfoHash>-<hash>.nar.xz"; update the lookup to perform a hash-aware parse/normalize instead of a raw prefix match: when scanning in checkAndFixNarInfosForNar (and the similar spots around the other occurrences) extract/normalize candidate URLs (reusing NormalizeChunkedNarInfoURL or implementing the same parse logic) to find the embedded NarHash, then match against narURL.Hash (or use a new predicate that checks the extracted hash) so MigrateChunksToNar / LinkedNarinfoNarHash will correctly detect and normalize those unlinked narinfo URLs. Ensure the change replaces the URLHasPrefix usage (and equivalent checks at the other locations) with this hash-aware match.
Document the opaque (non-hash) upstream NAR URL support: proposal, design, delta specs for upstream-fetch-resilience (new requirements) and data-model (narinfos.upstream_url column), and the implementation task breakdown. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Sync the delta specs into the main specs (upstream-fetch-resilience gains the opaque-URL tolerance + eviction-survival requirements; data-model gains the narinfos.upstream_url column) and archive the completed change to clear the openspec-guard merge gate. Co-Authored-By: Claude Opus 4.8 <[email protected]>
There was a problem hiding this comment.
🧹 Nitpick comments (2)
openspec/changes/archive/2026-06-06-tolerate-opaque-upstream-nar-urls/specs/data-model/spec.md (1)
5-5: ⚡ Quick winClarify
upstream_urlvalue semantics (full path vs pre-.narstem).This sentence is contradictory: it says “path before
.nar” but the example includes.nar.zst. Please specify thatupstream_urlstores the full original opaque upstream path verbatim (including.nar[.<compression>]) to match implementation and avoid test ambiguity.Suggested wording
- The `upstream_url` column MAY be `NULL` and SHALL hold the original opaque upstream NAR path (the path before `.nar`, e.g. `nar/<uuid>.nar.zst`) when the upstream narinfo URL was not hash-named; it stays `NULL` for conventional hash-named upstreams. + The `upstream_url` column MAY be `NULL` and SHALL hold the original opaque upstream NAR path verbatim (including `.nar` and any compression suffix, e.g. `nar/<uuid>.nar.zst`) when the upstream narinfo URL was not hash-named; it stays `NULL` for conventional hash-named upstreams.🤖 Prompt for 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. In `@openspec/changes/archive/2026-06-06-tolerate-opaque-upstream-nar-urls/specs/data-model/spec.md` at line 5, The spec text for the narinfos table is ambiguous about what upstream_url holds; update the description for the narinfos table so upstream_url is explicitly defined as storing the full original opaque upstream NAR path verbatim (including the .nar extension and any compression suffix like .zst), not the pre-.nar stem; edit the sentence referencing the upstream_url column in the narinfos table to state: "The upstream_url column MAY be NULL and, when present for opaque (non-hash-named) upstreams, SHALL contain the full original upstream NAR path verbatim (including .nar and any compression suffix, e.g., nar/<uuid>.nar.zst)." Ensure this replaces the current contradictory phrasing in the spec for upstream_url.openspec/specs/data-model/spec.md (1)
77-77: ⚡ Quick winUse unambiguous contract text for
upstream_urlin the active spec.Same ambiguity as the archived spec: “before
.nar” conflicts with the.nar.zstexample. Tightening this to “full original opaque path verbatim” will keep the active contract precise and consistent with behavior.Suggested wording
- The `upstream_url` column MAY be `NULL` and SHALL hold the original opaque upstream NAR path (the path before `.nar`, e.g. `nar/<uuid>.nar.zst`) when the upstream narinfo URL was not hash-named; it stays `NULL` for conventional hash-named upstreams. + The `upstream_url` column MAY be `NULL` and SHALL hold the original opaque upstream NAR path verbatim (including `.nar` and any compression suffix, e.g. `nar/<uuid>.nar.zst`) when the upstream narinfo URL was not hash-named; it stays `NULL` for conventional hash-named upstreams.🤖 Prompt for 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. In `@openspec/specs/data-model/spec.md` at line 77, Update the narinfos table contract text to remove the ambiguous “before `.nar`” phrase and explicitly state that the upstream_url column (in the narinfos table) MAY be NULL and, when populated for non-hash-named upstreams, SHALL contain the full original opaque upstream NAR path verbatim (including any extensions such as “.nar.zst” or other suffixes); keep the rule that upstream_url stays NULL for conventional hash-named upstreams and preserve the existing NULLability for url/compression fields.
🤖 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.
Nitpick comments:
In
`@openspec/changes/archive/2026-06-06-tolerate-opaque-upstream-nar-urls/specs/data-model/spec.md`:
- Line 5: The spec text for the narinfos table is ambiguous about what
upstream_url holds; update the description for the narinfos table so
upstream_url is explicitly defined as storing the full original opaque upstream
NAR path verbatim (including the .nar extension and any compression suffix like
.zst), not the pre-.nar stem; edit the sentence referencing the upstream_url
column in the narinfos table to state: "The upstream_url column MAY be NULL and,
when present for opaque (non-hash-named) upstreams, SHALL contain the full
original upstream NAR path verbatim (including .nar and any compression suffix,
e.g., nar/<uuid>.nar.zst)." Ensure this replaces the current contradictory
phrasing in the spec for upstream_url.
In `@openspec/specs/data-model/spec.md`:
- Line 77: Update the narinfos table contract text to remove the ambiguous
“before `.nar`” phrase and explicitly state that the upstream_url column (in the
narinfos table) MAY be NULL and, when populated for non-hash-named upstreams,
SHALL contain the full original opaque upstream NAR path verbatim (including any
extensions such as “.nar.zst” or other suffixes); keep the rule that
upstream_url stays NULL for conventional hash-named upstreams and preserve the
existing NULLability for url/compression fields.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: afd9b033-c1fc-42a0-930f-a22cfedf8b0c
📒 Files selected for processing (9)
openspec/changes/archive/2026-06-06-tolerate-opaque-upstream-nar-urls/.openspec.yamlopenspec/changes/archive/2026-06-06-tolerate-opaque-upstream-nar-urls/design.mdopenspec/changes/archive/2026-06-06-tolerate-opaque-upstream-nar-urls/proposal.mdopenspec/changes/archive/2026-06-06-tolerate-opaque-upstream-nar-urls/specs/data-model/spec.mdopenspec/changes/archive/2026-06-06-tolerate-opaque-upstream-nar-urls/specs/upstream-fetch-resilience/spec.mdopenspec/changes/archive/2026-06-06-tolerate-opaque-upstream-nar-urls/tasks.mdopenspec/specs/data-model/spec.mdopenspec/specs/upstream-fetch-resilience/spec.mdpkg/cache/cache.go
✅ Files skipped from review due to trivial changes (2)
- openspec/changes/archive/2026-06-06-tolerate-opaque-upstream-nar-urls/tasks.md
- openspec/changes/archive/2026-06-06-tolerate-opaque-upstream-nar-urls/.openspec.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
- pkg/cache/cache.go
Addresses CodeRabbit review (kalbasit#1331): the opaque upstream path was persisted as a best-effort UPDATE after storeInDatabase succeeded. If that follow-up write failed, the pull still returned success but the narinfo row kept ncps's rewritten hash-named URL with no upstream_url — losing the only path that can re-fetch an evicted opaque NAR and recreating the exact eviction failure this change fixes. Move the upstream_url write inside the storeInDatabase transaction so it lands atomically with the narinfo row (all-or-nothing; a failure now fails the pull and is retried). Drop the standalone setNarInfoUpstreamURL helper. PutNarInfo (client uploads, no upstream) passes "". Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Addressed the CodeRabbit "couldn't post inline" / outside-diff-range findings (commit a19f73f): ✅ Fixed — ⏭️ Out of scope — ⏭️ Out of scope — No unresolved inline review threads remain on the PR. |
## Summary `Cache.DeleteNar` removed only the exact URL variant via `narStore.DeleteNar`, but a `Compression:none` NAR's physical object is stored under the `.nar.zst` variant. Deleting `nar/<H>.nar` therefore left the real `.nar.zst` blob orphaned on disk while still clearing `bytes_stored_at` — leaking storage and making the `/upload` presence check lie (report absent while bytes remain). It also spuriously errored, since the bare none object never exists. This deletes the actually-stored variant (the `.nar.zst` variant for `none`, mirroring `statNarInStore`) and tracks whether any variant was present, returning `ErrNotFound` only when none was — preserving the established "deleting an absent NAR errors" contract while no longer orphaning the blob. Surfaced by a CodeRabbit "outside diff range" finding on #1331; scoped out of that PR as pre-existing, now fixed on its own. Specs: adds a requirement to `upload-reference-presence` (deletion removes the stored variant before clearing the marker; not-found only when no variant was present). ## Test plan - [x] `task fmt`, `task lint`, `task test` pass - [x] New: `TestDeleteNar_RemovesNoneNarZstdVariant` (none NAR removes the `.nar.zst` object) - [x] New: `TestDeleteNar_AbsentNoneNarReturnsNotFound` (contract: absent → `ErrNotFound`, marker kept) - [x] Existing xz `DeleteNar` "absent → ErrNotFound" backend test still passes Co-authored-by: Claude Opus 4.8 <[email protected]>
The de-chunk path located narinfos referencing a NAR with a raw
URLHasPrefix("nar/"+hash+".") fallback. That only matches canonical
nar/<hash>... URLs, so a nix-serve-style prefixed URL
(nar/<narinfoHash>-<hash>.nar.xz) on an unlinked narinfo (a known race
drops the join row) matched neither the join link nor the prefix. Such
narinfos were left unnormalized after de-chunk (later serve 404s) and
their NarHash could not be resolved (NAR purged / drain stuck).
Match hash-aware instead: narrow candidates in SQL via
URLContains(hash), then confirm in Go with ParseURL+Normalize so the
embedded hash (prefix stripped) equals the target. A shared
normalizedURLHash helper backs all three sites (LinkedNarinfoNarHash,
MigrateChunksToNar, NormalizeChunkedNarInfoURL); the join link stays the
primary match. Surfaced by CodeRabbit review on PR #1331.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
## Summary
The de-chunk path located narinfos referencing a NAR with a raw
`URLHasPrefix("nar/"+hash+".")` fallback. That only matches canonical
`nar/<hash>...` URLs, so a nix-serve-style prefixed URL
(`nar/<narinfoHash>-<hash>.nar.xz`) on an **unlinked** narinfo (a known
race drops the `narinfo_nar_files` join row) matched neither the join
link nor the prefix. Such narinfos were left unnormalized after de-chunk
(a later serve 404s) and their verification `NarHash` could not be
resolved (NAR purged / drain stuck).
This matches **hash-aware** instead: narrow candidates in SQL via
`URLContains(hash)`, then confirm in Go with `ParseURL`+`Normalize` so
the embedded hash (narinfo-hash prefix stripped) equals the target. A
shared `normalizedURLHash` helper backs all three sites —
`LinkedNarinfoNarHash`, `MigrateChunksToNar`,
`NormalizeChunkedNarInfoURL` — and the join link stays the primary
match.
Surfaced by a CodeRabbit "outside diff range" finding on #1331; scoped
out of that PR as pre-existing, now fixed on its own.
Specs: updates two `chunks-to-nar-migration` requirements (URL-based
narinfo lookup is hash-aware, covering unlinked nix-serve-style prefixed
URLs).
## Test plan
- [x] `task fmt`, `task lint`, `task test` pass
- [x] New: `TestMigrateChunksToNar_DeChunksUnlinkedPrefixedNarinfoURL`
(de-chunk + normalize via hash-aware match)
- [x] New: `TestNormalizeChunkedNarInfoURL_MatchesUnlinkedPrefixedURL`
(first direct test of that entry point)
- [x] Existing canonical/unlinked/different-compression de-chunk tests
still pass (join-link path unchanged)
---------
Co-authored-by: Claude Opus 4.8 <[email protected]>
## Summary The `[Unreleased]` section was populated in #1309 but skewed toward the recent CDC-drain, in-flight-staging, and Ent-migration work, omitting several user-facing features and fixes that also landed since v0.9.4. This backfills the missing notable changes, each cross-referenced by PR. **Added** - `ncps fsck` command + Helm fsck CronJob (#975, #996, #998, #999, #1000, #1004, #1006, #1176) - Closure pinning HTTP endpoints `POST`/`DELETE /pin/{hash}.narinfo`, `GET /pins` (#1108) - pprof server via `--pprof-addr` (#1063) - CDC lazy chunking as a feature + `--cache-cdc-lazy-cleanup-schedule` + recovery cron (#1082, #1083, #1089, #1096) - Helm: auto `GOMEMLIMIT` (#1061), configurable temp volume / `volumeClaimTemplate` (#1074, #1077), SQLite `Recreate` strategy (#1012) - Startup storage reporting + deprecated-narinfo warning (#959, #961) - `docker-dev` image (#1097) **Fixed** - `store/tmp` no longer wiped on startup (#1313) - `nix-hash` NAR verification (#1101) - Prometheus counters primed at startup (#1337, #1343) - 404 on un-reassemblable chunked NARs (#1319), purged narinfo no longer 500 (#1318), fail-fast tmp validation (#1086) - Further CDC/cache reliability fixes (#1317, #1346, #1341, #1342, #1331, #1347) **Changed** - CDC config now persisted in the DB config table (#971) Dependency bumps, CI/test-only changes, and the internal Ent-conversion PRs are intentionally excluded; the existing Ent-migration entry already covers that work. ## Test plan - [x] `nix fmt` reports no changes (docs-only edit) - [x] CHANGELOG section structure intact (Added/Fixed/Changed/Removed/Migration/CI)
Summary
Fixes #1329.
When ncps proxies a narinfo whose
URL:field is not hash-named (e.g. cachix nowserves
nar/<uuidv4>.nar.zst),ParseURLrejected it asinvalid nar hashand thewhole narinfo fetch aborted with HTTP 500. nix treats a 500 as a hard error
(worse than a 404, which would fall through to the next substituter), so this broke
substitution for every affected path once a fleet proxied a cachix-backed cache.
The Nix binary-cache protocol treats the narinfo
URL:field as an opaque pathrelative to the cache root — hash-naming (
nar/<filehash>.nar.xz) is anix copy/ nix-serve / cache.nixos.org convention, not part of the spec(NixOS/nix#4464 tried to standardize it and
was merged then reverted). A pull-through proxy must tolerate it. This matches the
NarHash-as-storage-key approach @dosubot independently suggested on the issue.Fix
pkg/nar— addParseUpstreamURL(u, fallbackHash). Hash-named URLs behaveexactly like
ParseURL(unchanged fast path). Opaque URLs preserve the originalpath for the upstream GET (new unexported
opaquePath, consulted only byJoinURL) and key local storage offfallbackHash— the narinfoNarHash,re-encoded as a bare 52-char nix32 digest (always a valid content hash, already
available at that point). Adds
IsOpaque/OpaquePath/WithOpaquePath.ent+ migrations — new nullablenarinfos.upstream_urlcolumn that persiststhe opaque upstream path so the NAR can be re-fetched from upstream after the local
copy is evicted (the stored narinfo URL becomes ncps's own hash-named URL and no
longer encodes the opaque path). Additive / expand-safe; generated for sqlite +
postgres + mysql.
pkg/cache—pullNarInfoparses viaParseUpstreamURL, re-serves the NARunder ncps's own hash-named URL (keyed on
NarHash, preserving compression,FileHashand signatures), and persists the opaque path.lookupOriginalNarURLrestores it for re-fetch;
lookupPreferredUpstreamURLis made opaque-aware for CDC.The hash-named fast path is byte-identical, so this is purely additive.
Test plan
task fmt,task lint(0 issues),task test, andtask ent:check(codegeninvariants + migration drift) all pass
TDD, RED → GREEN:
pkg/nar/url_test.go: opaque parse,NarHashkeying, path preservation, andinvalid-fallback / structurally-invalid error cases
pkg/cache/cache_test.go::TestGetNarInfoOpaqueUpstreamURL: end-to-endGetNarInfowith an opaqueURL:→200, re-served under a hash-named URL,upstream_urlpersisted; then evicts the local NAR bytes and re-fetches,deterministically exercising the opaque-restore path (the upstream serves the NAR
only at the opaque path, so the re-fetch fails unless the persisted path is used)
Verified live in production against
nix-community.cachix.org's opaque NAR(the issue's repro hash
9scxyz46ynlawfzm22s6vl603m9syz3w):nar/d0c36585-…uuid….nar.zst→nar/13ishym4…narhash….nar.zst(keyed offNarHash)NarHash== narinfoNarHash✅nix-community.cachix.org-1sig retainedAI Transparency
LLMs were used in the development of this PR.