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 — feat(id-worlds): durable per-world journal positions on lease entries (#13711) by dezren39 · Pull Request #13829 · developing-today/code

Conversation

@dezren39

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

Uh oh!

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

Copy link
Copy Markdown
Member

Summary

Refs #13711 (prerequisite for #7572 failover barrier). Lease entries
now carry a durable, monotonic per-world journal position, stamped
by the append authority and recorded in the lease history, so a
checkpoint carries every covered position and a successor replaying
the journal reports its watermark through it.

  • JournalEntry lease variants (LeaseGranted, LeaseRenewed,
    LeaseHandedOff, LeaseRevoked, LeaseWriteRejected) gain
    position: u64 (#[serde(default)] — 0 means unstamped, a
    lease entry written before positions existed).
  • WriteLeaseTransition / LeaseWriteRejection gain position;
    WriteLease::last_position() is the replay watermark.
  • WorldCore exposes lease_position_watermark() and
    next_lease_position(); the actor handoff stamps the next
    position before its durable append (a failed append drops the
    uncommitted lease, so the counter — derived from history — never
    advances past a durable record).
  • Replay refuses a stamped position that does not advance past the
    highest stamped position already seen.
  • Journal version 16 for stamped positions (entries and checkpoints
    whose lease history carries one); unstamped entries keep version 7
    and restore unchanged.

Scope note (decide-and-proceed): positions cover lease entries only,
per the issue's request ("every journal entry that changes lease
state (and ideally all entries)"). Per-entry positions for all
entries remain the JournalRecord envelope follow-up (design #2819).
A checkpoint records the last covered lease position through the
lease history it carries (its max is the watermark); no redundant
Checkpoint.position field was added.

Evidence

  • Property test (lease_positions_are_strictly_increasing_across_appends_and_compaction, proptest over the lease state machine — handoff/renew/revoke/grant sequences): history positions are exactly 1..=n after restore and after compaction + restore; watermark is n.
  • Oracle test (lease_position_watermark_reports_the_grant_position_after_replay): grant at position 3 reports watermark 3, before and after compaction; bootstrap reports 0.
  • Legacy test: unstamped entries restore under a version-7 header with watermark 0. Non-monotonic test: a stamped position that does not advance is refused at restore.
  • Live-path test: two actor handoffs stamp positions 1 and 2; the successor restored from that journal reports watermark 2.

Remote verification (narrowest commands, GitHub-hosted runner via
the fleet-command.yml fallback — fleet queue dispatch itself is
blocked by #13185 TLS defect):

cd pkgs/id && cargo test -p id-worlds --lib lease && cargo test -p id-worlds --lib handoff && cargo test -p id-worlds --lib notify_events_require

— fleet run 45278328401 (first dispatch, pre-fix): compile failure — JOURNAL_VERSION_LEASE_POSITION was not re-exported from crate::world and the proptest moved expected twice. Fixed by adding the constant to the world/mod.rs re-export list and cloning expected at its first use (amended commit 7cb3750, pushed with an explicit --force-with-lease value after verifying the remote was still at the pre-amend commit).

— fleet run 45279480155 (re-dispatch after the fix): success — cargo test -p id-worlds --lib lease: 42 passed, 0 failed; --lib handoff: 22 passed, 0 failed; --lib notify_events_require: 1 passed, 0 failed. All four new tests ran and passed by name: lease_positions_are_strictly_increasing_across_appends_and_compaction, lease_position_watermark_reports_the_grant_position_after_replay, unstamped_lease_entries_still_restore_at_version_7, lease_positions_that_do_not_advance_are_refused. Log: https://github.com/developing-today/fleet/actions/runs/45279480155

No new test file, so no test-suite-registry row is needed (tests
added to existing id-worlds test modules).

Merge Danger

Medium-low. The journal format gains an optional field on five
variants plus a new header version; old journals parse unchanged
(position defaults to 0) and old binaries refuse v16 journals at
the header check. Replay now enforces stamped-position monotonicity
(legacy zeros pass through). Revertible: dropping the fields
restores the v15 format, but any journal that already stamped
positions would then lose them at its next checkpoint.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-23T22:39:21Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": "/home/hatch/workspace/github-work/code-13711",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/hatch/workspace/github-work/code-13711",
      "repo": "developing-today/code",
      "branch": "xaltha/13711-journal-position",
      "sha": "7cb3750e4ca19a41df6aee089bac88c2a93e4366"
    },
    "auth_subject": "xaltha",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

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.

All reactions
@dezren39
feat(id-worlds): durable per-world journal positions on lease entries (…
7cb3750
…#13711)

Lease entries (LeaseGranted/Renewed/HandedOff/Revoked/WriteRejected)
now carry a durable monotonic per-world journal position, stamped by
the append authority and recorded in the lease history, so a
checkpoint carries every covered position and a successor replaying
the journal reports its watermark through it. Positions start at 1;
0 means unstamped (pre-positions entry) and restores as before.

- JournalEntry lease variants gain position (serde default 0);
  stamped positions require journal version 16, unstamped keep 7.
- WriteLeaseTransition/LeaseWriteRejection gain position;
  WriteLease::last_position is the replay watermark.
- WorldCore exposes lease_position_watermark and
  next_lease_position; the actor handoff stamps the next position
  before its durable append.
- Replay refuses a stamped position that does not advance past the
  highest stamped position already seen.
- Property test: positions strictly increase across appends and
  survive compaction; oracle test: grant at P reports watermark P;
  legacy and non-monotonic cases covered.

Scope note: positions cover lease entries only, per the issue's
request; per-entry positions for all entries remain the
JournalRecord envelope follow-up (design #2819).
@dezren39 dezren39 mentioned this pull request Nov 23, 2026
id(journal): durable per-world global position covering lease entries, surviving compaction (prerequisite for #7572 failover barrier) #13711
Closed
@coderabbitai

coderabbitai Bot commented Nov 23, 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 32 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: 37a018c2-e4b4-4f20-b204-1510335882ab
Commits

Reviewing files that changed from the base of the PR and between fc43886 and f21cbfd.

Files selected for processing: 7

  • pkgs/id/crates/id-worlds/src/world/actor.rs
  • pkgs/id/crates/id-worlds/src/world/core.rs
  • pkgs/id/crates/id-worlds/src/world/core/operations.rs
  • pkgs/id/crates/id-worlds/src/world/journal.rs
  • pkgs/id/crates/id-worlds/src/world/mod.rs
  • pkgs/id/crates/id-worlds/src/world/tests.rs
  • pkgs/id/crates/id-worlds/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

  • X
  • Mastodon
  • Reddit
  • LinkedIn
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 24, 2026
AUDIT-7 Lane 1 follow-up: rebase-and-merge queue for 90 blocked PRs (batches A–H) #13903
Closed
@dezren39

dezren39 commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Batch B disposition (oc-code-08, task 21623): not merged this run. Verification needs the laptop shell route, which is down from this lane (bridge hello shell leg: broker connection refused). Rebase of this conflicting branch would need a force push, which this batch excludes, so the next step is a merge-main-in commit once verification is reachable. Named blocker: the PR's own verification (Rust/Fleet dispatch or mdBook build) cannot be run from this lane right now, so it is not merged unverified. Resume when a shell route to the laptop answers.

All reactions

Sorry, something went wrong.

Uh oh!

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

@dezren39
Merge origin/main into xaltha/13711-journal-position (Batch B merge-m…
f21cbfd
…ain-in, lane code-h)
@developing-today-fleet

developing-today-fleet Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Batch B verification (lane code-h, task 21623): merge-main-in pushed (f21cbfd onto fc43886, no force). Verification blocked by origin/main breakage, not by this PR: clean origin/main baseline fails cargo check -p id-events with E0599 no method compact on SharedEventStore at crates/id-events/src/local_events.rs:355, and cargo test -p id-worlds fails to compile for the same transitive reason. Named blocker: main breakage in id-events. Not merging until main is green or the PR is rebased past the fix. Codex P1: none on this PR.

All reactions

Sorry, something went wrong.

Uh oh!

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

@dezren39
dezren39 merged commit 9526094 into main Nov 24, 2026
2 checks passed

Uh oh!

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

@dezren39
dezren39 deleted the xaltha/13711-journal-position branch November 24, 2026 05:30
@dezren39

dezren39 commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Batch A/B sweep merge record (task 21622): merged via gh pr merge --merge.

  • Verified in fresh worktree off origin/main 7e28014, local merge of PR head f21cbfd merged cleanly (test-merge 4bfda25fd67).
  • Stated verification re-run locally, all pass:
    • cargo test -p id-worlds --lib lease: 42 passed, 0 failed
    • cargo test -p id-worlds --lib handoff: 22 passed, 0 failed
    • cargo test -p id-worlds --lib notify_events_require: 1 passed, 0 failed
    • All four new tests confirmed by name (strictly-increasing, watermark-replay, unstamped-v7, non-advancing-refused).
  • Prior Batch B blocker (origin/main id-events compact breakage per lane code-h) is resolved on current main.
  • Merge commit: 9526094.
All reactions

Sorry, something went wrong.

Uh oh!

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

@developing-today-fleet developing-today-fleet Bot mentioned this pull request Nov 24, 2026
Open-PR clearance programme 2026-11-24: every open PR merged, fixed+merged, or tasked #14166
Open
@dezren39 dezren39 mentioned this pull request Nov 25, 2026
id: spill v2 phase 1 — pool roster, reader-then-holder eligibility, automatic lease failover (#5787) #7572
Open
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

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

Assignees

No one assigned

Labels

None yet

Projects

None yet

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.

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.