Skip to content

docs: qualify the migration ADR's Store-line fallback (#1177) - #1359

Merged
cameri merged 2 commits into
rewrite/mainfrom
victrvondoom/1177-store-fallback
Dec 3, 2026
Merged

cameri merged 2 commits into
rewrite/mainfrom
victrvondoom/1177-store-fallback

Conversation

@chappie-daemon

Copy link
Copy Markdown
Collaborator

Summary

Corrects ADR 0013's descriptor-output guarantee: the Store: summary is not one of the messages translated back to the operator's target, and its canonicalisation fallback can print the procfs spelling.

Authored by @victrvondoom as victrvondoom/nostream#1, cherry-picked with -x so the original commit and its authorship are preserved. Closes #1177.

What it changes

crates/nostream-cli/src/commands/migrate.rs:274-280 prints Store: {fs::canonicalize(store_path(root)).unwrap_or_else(|_| store_path(root))}. Every other message goes through operator_message (migrate.rs:529), which rewrites the root's spelling to the target the operator typed; the Store: line deliberately bypasses it, and its fallback has nothing to translate.

The ADR (docs/rewrite/decisions/0013-pg-to-lmdb-migration.md) therefore claimed more than the code keeps. The paragraph now says which messages are translated and states the one reachable way the summary prints /proc/self/fd/<n>/lmdb: canonicalisation fails while the pin is gone. The pin outlives every use of the root (let pin = create_target(...), migrate_with(...).await), so a normal run does not reach it — the issue's first option, the one-sentence edit rather than a code change.

The issue names ADR 0012; the record was renumbered to 0013 in #1296-era work (7af38832), and this edits the file that exists.

Verification

  • The quoted code and the operator_message helper were read at the PR's base, e7ce03e7.
  • The patch applies cleanly to origin/rewrite/main (git apply --check).
  • Docs-only: no runtime behaviour changes; the changeset is the repo's empty-frontmatter shape.

ADR 0013 said no line the command prints names the procfs descriptor.
Error messages built from root-joined paths are translated back to the
operator's target, but the `Store:` summary takes a separate route: it
prints the canonicalised store path, and when canonicalisation fails its
fallback returns `store_path(root)` unchanged, which can be
`/proc/self/fd/<n>/lmdb`. State both outcomes. No runtime behaviour
changes; the pin outlives every use of the root, so a normal run does
not reach the fallback.

Addresses #1177

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJGB15j7gmiM167Cjm4J79
(cherry picked from commit d8fed78)
@coderabbitai

coderabbitai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: feb3139b-ca8e-4327-b4bb-4cb760155668

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@changeset-bot

changeset-bot Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7cf2b36

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@greptile-apps

greptile-apps Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5RetriggerView in Greptile

[Low impact] This documentation-only change appears safe to merge.

Summary

Updates ADR 0013 to describe when the Store: summary can print /proc/self/fd/<n>/lmdb.

  • The migration ADR now explains when its store line can show a procfs path.

The previous finding is fixed. No new actionable issues were found.

Reviews (2) · Last reviewed commit: "docs: the Store fallback's condition is ..." · Reviewed by Greptile

…t a closed pin

Greptile P2 on #1359: the pin holds the target directory, not its lmdb child,
so a child renamed after the last manifest write makes canonicalisation fail
while the pin is still open. The paragraph now names canonicalisation failure
as the condition and keeps the closed pin as one of two ways to reach it.
@cameri
cameri merged commit 2318a41 into rewrite/main Dec 3, 2026
18 checks passed
@cameri
cameri deleted the victrvondoom/1177-store-fallback branch December 3, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants