GeezerVison is showing github.com — feat(id): region-seam handoff journal foundation (#3900) by dezren39 · Pull Request #3922 · developing-today/code
Conversation
dezren39
commented
Nov 1, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
Phase 1 of #3870 (design #2818, doc/2026-11-01_design_id2818.md §8 packet 1): the journal/schema/checkpoint foundation for journaled region-seam export/import. Format only — no routing behavior changes; existing worlds are unaffected until a handoff entry is written.
- Typed entries (
pkgs/id/src/world/mod.rs): JournalEntry::EntityExported / EntityImported with the design §3 fields (handoff ID, entity ref, regions, owner epochs, module hash, payload schema/digest, embedded host system event; the export carries the complete payload as the durable recovery copy), plus the CoordinatorJournalEntry format (Started / ExportObserved / ImportObserved / Completed / Cancelled — no entity payloads) for the phase-4 coordinator to build on.
- Entity-addressed input:
WorldEventKind::EntityInput { entity_ref, input }; replay treats it like Input, and the sandbox / native / fixture program hosts deliver its bytes exactly like unscoped input (entity scoping is host-side fencing metadata, wired in phase 2).
- Journal version 3:
JOURNAL_VERSION_REGION_HANDOFF = 3, MAX_JOURNAL_VERSION = 3; journal_version_required_by pins v3 for handoff entries, EntityInput events, and checkpoints carrying transfers — the existing bump-on-first-write / refuse-at-open contract (Define rollback compatibility for world profile journal entries #227) does the rest. v1/v2 journals still open.
- Checkpoint preservation:
WorldCore.handoff_transfers is rebuilt by replay (a duplicate export/import for one handoff ID is refused; an import whose epoch does not advance is refused) and rides the Checkpoint entry's new transfers field through compaction, so an exported entity cannot be resurrected and an import receipt cannot be forgotten. Compacted headers carrying transfers are marked v3.
Tests
New laptop-run tests (CI will re-run): handoff_entries_require_journal_version_3, handoff_transfers_survive_restore_and_checkpoint_compaction, duplicate_handoff_export_in_journal_is_refused — all pass; the v1/v2 header test still passes.
Queue: task 5863. Parent: #3870. Design: #2818. Phases 2–5 are #3901–#3904, gated in order.
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
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
Phase 1 of #3870 (design #2818): typed EntityExported/EntityImported
world journal entries plus the CoordinatorJournalEntry format,
WorldEventKind::EntityInput, journal version 3 with bump-on-first-write
via journal_version_required_by, WorldCore handoff transfer state
rebuilt by replay (duplicate handoff sides refused, import epoch must
advance), and checkpoint/compaction preservation of active handoffs,
fences, receipts and owner epochs. EntityInput delivers to programs
exactly like Input in the sandbox/native/fixture hosts. No routing
behavior changes; phases 2-5 of #3870 build on this format.
Tests: 3 new world tests (version pinning + coordinator wire shape,
restore + checkpoint compaction round-trip, duplicate export refusal)
pass on the laptop; full id lib suite run locally.
Codex Review Summary
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-11-01T18:41:15.517754Z |
d8a40bc |
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 1, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
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 20 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:
fed44a62-5fbe-4e4a-be8a-5454c000693f
Commits
-
Reviewing files that changed from the base of the PR and between 33aefa7 and d8a40bc.
Files selected for processing: 7
-
pkgs/id/src/sandbox.rs
pkgs/id/src/world/core.rs
pkgs/id/src/world/mod.rs
pkgs/id/src/world/tests.rs
pkgs/id/src/world_fixture.rs
pkgs/id/src/world_native.rs
pkgs/id/src/world_store.rs
- 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
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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: 344ce0520e
ℹ️ 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.
Comment on lines
+911
to
+913
|
|
JournalEntry::Checkpoint { transfers, .. } => match transfers {
|
|
|
Some(_) => JOURNAL_VERSION_REGION_HANDOFF,
|
|
|
None => JOURNAL_VERSION,
|
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.
Include retained entity inputs in checkpoint version detection
When a world has committed EntityInput events but has no handoff transfers, this branch reports version 1 even though the checkpoint's retained events still contain the new event kind. WorldCore::checkpoint_entries derives the compacted header from this helper, so compaction downgrades that journal's header to version 1 (or version 2 with a nondefault execution profile). Older binaries then accept the header but cannot deserialize the checkpoint, violating the bump-on-first-write compatibility contract. Inspect the checkpoint's retained events as well as transfers when determining whether version 3 is required.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Fixed in d8a40bc: journal_version_required_by now scans a checkpoint's retained events — a checkpoint retaining an EntityInput event requires journal version 3 even with no active handoff transfers, so compaction can no longer downgrade the header. Covered by an added case in handoff_entries_require_journal_version_3 (laptop: 3 handoff tests pass).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Codex P2 on PR #3922: a checkpoint retaining EntityInput events but
carrying no handoff transfers reported version 1, so compaction could
downgrade the header and an older binary would accept it then fail
mid-read. journal_version_required_by now scans the checkpoint
retained events (and drops const to do so; all callers are runtime).
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 1, 2026
|
Verification note (lane D, post-merge): the full id lib suite in the fleet worktree showed one failure in store_traits::test_the_lock_has_no_sqlite_with_logsync_wired. Verified NOT a regression from this PR: the merge changes zero Cargo files, and the same test passes in a clean worktree at both pre-merge main (33aefa7) and post-merge main (876b402). The failure only reproduces in the fleet/5863 worktree, whose target dir accumulated libsqlite3-sys artifacts from concurrent cargo invocations during the shift — a worktree-local build-state artifact. All other 1467+ tests passed, including the 3 new handoff tests.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 1, 2026
|
CORRECTION to my verification note above (lane D): the claim that the lock test passes in clean worktrees was wrong — it rested on garbled tool deliveries. Re-read directly from the saved result files: test_the_lock_has_no_sqlite_with_logsync_wired FAILS in clean worktrees at BOTH pre-merge main (33aefa7) and post-merge main (876b402), panicking at store_traits.rs:701 on the committed Cargo.lock's sqlx-sqlite → libsqlite3-sys edge. So the accurate statement is: the failure is PRE-EXISTING on main and unrelated to this PR (which changed zero Cargo files), not a worktree artifact. Filed as #3930 with evidence and fix directions.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 1, 2026
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|