diff --git a/.changeset/adr-0013-store-fallback.md b/.changeset/adr-0013-store-fallback.md new file mode 100644 index 000000000..2f5c82863 --- /dev/null +++ b/.changeset/adr-0013-store-fallback.md @@ -0,0 +1,9 @@ +--- +--- + +docs: qualify the migration ADR's descriptor-output guarantee + +ADR 0013 said no printed line names the procfs descriptor. Error messages are +translated back to the operator's target, but the `Store:` summary takes a +separate route whose canonicalisation fallback returns `store_path(root)` +unchanged. The ADR now says so. No runtime behaviour changes. diff --git a/docs/rewrite/decisions/0013-pg-to-lmdb-migration.md b/docs/rewrite/decisions/0013-pg-to-lmdb-migration.md index f84821823..2cd6495eb 100644 --- a/docs/rewrite/decisions/0013-pg-to-lmdb-migration.md +++ b/docs/rewrite/decisions/0013-pg-to-lmdb-migration.md @@ -168,9 +168,19 @@ still resolves an absolute name, and a rename inside that pair still reaches the it needs an fd-relative environment open inside heed, which is a dependency change and not a change here. -No line the command prints names the descriptor: every message built from a root-joined path is -translated back to the target the operator typed, because `/proc/self/fd/` dies with the -process and is not a path anyone can act on. The cost of the pin, recorded rather than left to be +Every error message built from a root-joined path is translated back to the target the operator +typed, because `/proc/self/fd/` dies with the process and is not a path anyone can act on. The +`Store:` summary is not one of those messages: it takes a separate route, printing +`fs::canonicalize(store_path(root))` and falling back to `store_path(root)` unchanged when +canonicalisation fails. Where `root` is the procfs spelling and the canonicalisation fails, the +line can therefore print `/proc/self/fd//lmdb`. A pin that is gone is one way to fail, since the +descriptor dies with it. Another is an `lmdb` child renamed after the last manifest write: the pin +holds the target directory, not the store under it, so canonicalising the child can fail while the +pin is open. Neither is a normal run's shape — the pin outlives every use of the root, and the copy +is the only writer while it holds the target — and both need an actor who can write the target, +which is the interval the pin narrows rather than closes. + +The cost of the pin, recorded rather than left to be discovered: `--verify` now opens the target directory itself, so it needs **read** permission on the target where the path-only version needed search alone, and a `0300` target is refused by the pin with the target's own path in the line. That is accepted and not mitigated — the target is a