Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/adr-0013-store-fallback.md
Original file line number Diff line number Diff line change
@@ -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.
16 changes: 13 additions & 3 deletions docs/rewrite/decisions/0013-pg-to-lmdb-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<n>` 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/<n>` 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/<n>/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
Expand Down
Loading