GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id: keep versions and reports on disk through id_store::content_store by dezren39 · Pull Request #12497 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 22, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Closes #12492

Stacked on #12470 (B2(a)): this PR is based on xaltha/id-record-join-admission and retargets to main when that merges. The diff against main includes #12470 until then.

Summary

  • New module pkgs/id/crates/id-sync/src/federation/record_store.rs (declared in federation/mod.rs in this change): a node keeps its versions and reports on disk through id_store::content_store, so it restarts with what it had.
  • Canonical encodings, domain-separated in the b07/b32 field style, for the two records kept: a version record (the B32 gate Envelope — which had no canonical encoding — plus ingress path, source, and admitted-at time) and a report record (a StoredReport: the report's canonical bytes plus its status, with a decoder for the canonical form).
  • A NodeStore ingests both as verified content under raw-blake3-256 content ids over iroh's FsStore (the production on-disk backend), with a small index file in the node directory naming the records: version records in admission order, latest record per report id. Content is digest-verified again on every load by ContentStore::get.
  • A StoredReplica owns a Replica and a NodeStore and presents the sync path's surface. Write-through: admissions persist at produce/receive; versions admitted during an exchange persist at the exchange's end, from the exchange's own outcomes; new or changed reports persist at the same points. Opening replays the version records through Replica::receive (same gate, same join check, same nows) and rebuilds the store exactly; persisted report records are checked against the rebuilt reports, a record lost to a crash between the two writes is re-written, and any other divergence is an error.
  • Nothing in b07/b09 changes: store and replica are driven through their existing public APIs, so the path-loaded slice suites are untouched.
  • Recorded scope limits: refusals are not persisted (re-refused deterministically on re-offer); report expiry is not reachable through a Replica, so replay reproduces the reports map exactly; one writer per node directory.
  • Plan step B2(b) in planning/plans/2026-11-21_results-first.md is recorded as landed; (c) transport between two processes is next.

Evidence

  • cargo test --manifest-path pkgs/id/Cargo.toml -p id-sync --test substrate_sync_path — 5 passed. The new restart test runs the exchange between disk-backed nodes dropped and reopened between steps: B restarts and reads the record from its address with no exchange; both restart and keep the open report under the same id with the same conflict key, versions and base; a post-restart resolution stays closed across a further restart. The four existing tests pass unchanged.
  • Mutation check: with the replay loop in StoredReplica::open disabled, the restart test fails at the first reopened-node assertion; restored, it passes.
  • cargo test --manifest-path pkgs/id/Cargo.toml -p id-sync --lib record_store — 5 passed (envelope/version-record/report-record codec round-trips, report id preserved; node-store round-trip in admission order; stored-replica restart over an in-memory backend).
  • cargo test -p id-sync --test federation_b07 — 11 passed; --test federation_b09 — 8 passed.
  • bash .github/scripts/check-rust-module-reach.sh — OK (819 files in 91 crates, all reached).

Merge Danger

  • No existing API changes: the slice is one new module, one new test, one plan line. Replica/ConflictStore behavior is unchanged for in-process nodes.
  • A node directory is reopened only after its blob store is shut down (StoredReplica::shutdown, the in-process form of a process exit): iroh's FsStore keeps its database locked after a plain drop — found by the restart test hanging on the second FsStore::load, isolated to the backend, and fixed by holding the api handle in the new FsBlobs backend wrapper.

Run Proof on this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@dezren39
id: keep versions and reports on disk through id_store::content_store (…
a575adc
…#12492)

New federation::record_store module beside record_join: canonical
encodings for the gate Envelope (none existed) and for StoredReport,
a NodeStore that ingests version records and report records as
verified content over iroh's FsStore behind id_store::content_store
with a small index file naming them, and a StoredReplica that writes
admissions and report changes through at produce/receive and at the
end of every exchange. Opening a node replays its version records
through Replica::receive and checks the persisted report records
against the rebuilt reports. Nothing in b07/b09 changes.

The substrate sync-path test gains a restart test: the same exchange
between disk-backed nodes dropped and reopened between steps, reading
from id:// addresses with no exchange after a restart, the conflict
report surviving under the same id, and a post-restart resolution
staying closed across a further restart. Plan step B2(b) ticked.

Stacked on #12470 (B2(a)).
@dezren39
dezren39 requested a review from a team as a code owner November 22, 2026 10:20
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 37 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8fceb2b9-8615-4ffd-89ed-47bda6e8a376
Commits

Reviewing files that changed from the base of the PR and between 9b5e17c and 90350a6.

Files selected for processing: 4

  • pkgs/id/crates/id-sync/src/federation/mod.rs
  • pkgs/id/crates/id-sync/src/federation/record_store.rs
  • pkgs/id/crates/id-sync/tests/substrate_sync_path.rs
  • planning/plans/2026-11-21_results-first.md
  • 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

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T19:05:10.173570Z 90350a6 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Nov 22, 2026
id: walking skeleton for #9106 — a signed record at an id:// address synced between two nodes #12232
Closed
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 22, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a575adc386

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/crates/id-sync/src/federation/record_store.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pkgs/id/crates/id-sync/src/federation/record_store.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pkgs/id/crates/id-sync/src/federation/record_store.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pkgs/id/crates/id-sync/src/federation/record_store.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Base automatically changed from xaltha/id-record-join-admission to main November 22, 2026 11:50
This was referenced Nov 22, 2026
fleet: ready PRs are left unmerged (20 open; the merge sweep has filed nothing since 2026-11-17) #12280
Open
id: walking skeleton steps 3–4 — the #9106 path between two processes over the transport (#12232) #12621
Merged
@dezren39
test(id-sync): failing-first tests for the #12497 review threads
099edca
- stale report record heals on open (thread 1, P1)
- failed version/report persist rolls the admission back, retry
  succeeds (thread 2, P2); failed reconcile rolls both sides back
- failed open releases the blob store (thread 4, P2)
- proptest codec round-trips and restart-equivalence against the
  in-memory Replica model (thread 3, P1)

These fail on the current head; the fixes follow.
@dezren39 dezren39 mentioned this pull request Nov 22, 2026
id: keep versions and reports on disk through id_store::content_store (#12232 slice 4) #12492
Closed
@dezren39
fix(id-sync): answer Codex review on #12497 — atomic report commit, a…
ef127c7
…dmission rollback, backend shutdown on failed open

- Thread 1 (P1): a write-through point now stages the version and
  the reports it changed and publishes them in one index update
  (write-then-rename), so a crash leaves the old index or the new
  one, never a version without its reports. Opening also heals a
  stale report record: a report id is the hash of its canonical
  bytes, so a record under a rebuilt id can only be stale in status
  and is re-written from the replay; an unknown id is still
  ReportDiverged.
- Thread 2 (P2): a persist failure in produce/receive rolls the
  admission back (replica and index restored), so the envelope
  retries instead of being rejected as a replay and no child can be
  admitted on an unpersisted version; reconcile_with rolls both
  sides back.
- Thread 3 (P1): the failing-first commit already added proptest
  codec round-trips (envelope, version record, report record) and a
  model-based restart-equivalence test against the in-memory
  Replica; verified adequate, no further coverage added.
- Thread 4 (P2): DiskReplica::open_dir retains a backend handle
  and shuts it down when NodeStore::new or StoredReplica::open
  fails, so the directory can be retried in the same process.

Tests in 099edca define the expected behavior; compile/test
verification is by CI (no local rustc in this seat).
@dezren39 dezren39 mentioned this pull request Nov 22, 2026
ID #9106 walking skeleton (#12232 #12492) #12535
Closed
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 22, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ef127c76cf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/id/crates/id-sync/src/federation/record_store.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Nov 22, 2026
id: walking skeleton B2(c) — the B09 exchange over the transport between two processes (#12232) #12652
Closed
docs(id): plan B2 state — transport slice (c) landed, (b) remains (#12232) #12654
Merged
@dezren39
Fix record store property test borrow order
fc1eeb2
@dezren39

dezren39 commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Picked up queue task 21071 to shepherd PR #12497. I found one new Codex review finding on cancellation during async persistence; validating it against current main and the existing branch before deciding the safe next action.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 added work/assigned Queue worker lifecycle state queue/claimed Queue worker lifecycle state status/in-progress Queue worker lifecycle state labels Nov 22, 2026
@dezren39
Merge remote-tracking branch 'origin/main' into xaltha/id-record-stor…
90350a6
…e-disk

# Conflicts:
#	planning/plans/2026-11-21_results-first.md
@dezren39
dezren39 merged commit d058c35 into main Nov 22, 2026
1 check passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the xaltha/id-record-store-disk branch November 22, 2026 19:04
dezren39 pushed a commit that referenced this pull request Nov 22, 2026
felix
docs(id): README five-steps for id walk; registry + plan catch up (#1…
d09de31
…2232)

README gains 'The #9106 walking skeleton, by hand' — the five
steps as id walk commands, from a real run of the binary.
Registry: walk_cli_path joins id.rust.substrate-path (the
nightly runs it with the other substrate suites). Plan: B2(b)
marked landed (PR #12497), B3 marked landed with this PR, and
the Track B summary row updated. Plus rustfmt on the new code.
This was referenced Nov 22, 2026
id: B3 — the #9106 walking skeleton from the CLI (id walk), store composed with transport #12672
Merged
epic: ID platform expansion — apps, comms, currency, hosting, boards (2026-10-28 directive, LIST 6–15) #2056
Closed
@dezren39 dezren39 added the audit:complete PR fully implemented spawning issue label Nov 24, 2026
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
AUDIT-7 Lane 4 — MERGED-PR-AUDIT: merged PRs since 2026-10-23 vs their spawning issues #13879
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

audit:complete PR fully implemented spawning issue queue/claimed Queue worker lifecycle state status/in-progress Queue worker lifecycle state work/assigned Queue worker lifecycle state

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

id: keep versions and reports on disk through id_store::content_store (#12232 slice 4)

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.