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(journal): durable per-world global position covering lease entries, surviving compaction (prerequisite for #7572 failover barrier) · Issue #13711 · developing-today/code

id(journal): durable per-world global position covering lease entries, surviving compaction (prerequisite for #7572 failover barrier) #13711

New issue
Copy link
New issue
Copy link
Done
Done
id(journal): durable per-world global position covering lease entries, surviving compaction (prerequisite for #7572 failover barrier)#13711
Copy link
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/enhancementpriority/lowNice to have; do when convenientstatus:in-review

Description

@dezren39
dezren39
opened on Nov 23, 2026
Issue body actions

Why

Spill v2 phase 1 (#7572, design #5787 §1 step 4 and §Q3) needs a replay barrier: a successor must prove it has replayed through the journal position of the LeaseGranted record before accepting writes. PR #13425 holds the tested pool/selection/fencing policy slice, but the actor cannot yet capture the grant position or enforce the barrier.

Gap on current main

  • JournalEntry lease records (LeaseGranted, LeaseRenewed, LeaseHandedOff, LeaseRevoked, LeaseWriteRejected) are not sequenced by a world-level counter. Only Committed events carry sequence.
  • Compaction (Journal::compact) rewrites the file, so byte or entry ordinals reset and no position from before compaction names a stable record.
  • Checkpoint records sequence (last event covered) and the lease state, but not the position of the last lease record.

Requested

  1. A durable, monotonic per-world global journal position assigned to every journal entry that changes lease state (and ideally all entries), persisted in the entry.
  2. The position survives checkpoint compaction, so a checkpoint records the position of the last covered entry.
  3. An accessor the actor can use to capture the grant position, and a replay API that reports the replayed-through position so a successor can enforce replay-before-resume.

Acceptance

  • Property test: positions are strictly increasing across appends, lease records, and compaction.
  • Oracle: a successor replaying a journal with a grant at position P reports watermark >= P before it may accept writes.

Unblocks

#7572 (task 21349). Trigger: none; this is a prerequisite, not gated on a person.

Refs #7572, #5787, #2819

{
  "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-23T20:57:23Z",
    "session_id": "ses_e5df5e9ba5bffeK5NAkKYfgiY3",
    "lane": null,
    "host": "amd",
    "worktree": "/home/user/git/code",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/user/git/code",
      "repo": "developing-today/code",
      "branch": "main",
      "sha": "7e7af3f72d05278760bc8cf5a64a45ffdb5edf6e"
    },
    "auth_subject": "oc-code-06",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Activity

  1. dezren39
    added
    priority/lowNice to have; do when convenient
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    kind/enhancement
    on Nov 23, 2026
  2. developing-today commented on Nov 23, 2026

    @developing-today
    developing-todayBot
    on Nov 23, 2026 – with developing.today
    Contributor
    More actions

    CODE-5027

  3. dezren39
    added 2 commits that reference this issue on Nov 23, 2026

    feat(id-worlds): durable per-world journal positions on lease entries (…

    3493129

    feat(id-worlds): durable per-world journal positions on lease entries (…

    7cb3750
  4. developing-today
    added
    status:in-review
    on Nov 23, 2026
  5. dezren39 commented on Nov 23, 2026

    @dezren39
    dezren39
    on Nov 23, 2026
    MemberAuthor
    More actions

    Slice landed as PR #13829: #13829

    Durable per-world journal positions on lease entries: all five lease variants carry position: u64 (serde-default 0 = unstamped legacy); WriteLease::last_position() is the replay watermark, exposed via WorldCore::lease_position_watermark() / next_lease_position(); the live actor handoff stamps the next position before its durable append; replay refuses a stamped position that does not advance. Journal version 16 for stamped entries/checkpoints; unstamped entries keep version 7 and restore unchanged.

    Verification (remote, fleet-command.yml fallback — dispatch blocked by #13185): fleet run 45279480155 success — cargo test -p id-worlds --lib lease 42 passed, --lib handoff 22 passed, --lib notify_events_require 1 passed, 0 failed. New tests pass by name: the proptest (positions strictly increasing across appends + compaction), the grant-watermark oracle (grant at P=3 → watermark 3), the unstamped-legacy restore, and the non-monotonic refusal.

    Scope: lease entries only, per the issue. Per-entry positions for all entries remain the JournalRecord envelope follow-up (design #2819); the failover-barrier enforcement itself is #7572's work.

  6. dezren39
    added a commit that references this issue on Nov 24, 2026

    Merge pull request #13829 from developing-today/xaltha/13711-journal-…

    9526094
  7. dezren39 commented on Nov 24, 2026

    @dezren39
    dezren39
    on Nov 24, 2026
    MemberAuthor
    More actions

    Triage verdict (lane code-j, 2026-11-24): the slice is in. PR #13829 (durable per-world journal positions on lease entries) is merged. Issue stays open only for the remaining scope named in the body (compaction survival and the #7572 barrier hookup); no new build item is filed here, since that scope is tracked on the issue itself. Refs #14158.

  8. dezren39
    added a commit that references this issue on Nov 24, 2026

    test(id-worlds): pass journal position to lease apply helpers (#14315)

    c75ee38
  9. dezren39 commented on Nov 25, 2026

    @dezren39
    dezren39
    on Nov 25, 2026 – with Claude
    MemberAuthor
    More actions

    Closing: both acceptance checks and the scope left after #13829 are on main.

    • Positions survive compaction. The property test lease_positions_are_strictly_increasing_across_appends_and_compaction (world/tests.rs) checks that positions run 1..=N across appends and lease records, and stay identical after checkpoint_entries and restore. write_lease_survives_restore_and_checkpoint_compaction covers the checkpoint carrying the lease history. A checkpoint with a stamped history requires journal version 16.
    • Replay barrier. evaluate_spill in world/spill_gate.rs takes the replayed-through position. test_successor_dispatch_waits_for_ownership_replay checks that a successor holding a grant at position P is not dispatched until it has replayed through P. Commits d6f8671a and 9ea31f99 added it, and id(worlds): execute spill v2 failover plans through the journal (#7572) #14512 runs spill failover plans through the journal on top of it.
    • Accessors. WorldCore::lease_position_watermark() and next_lease_position() are on main, and the actor's handoff stamps the next position.

    Generated by Claude Code

  10. dezren39
    closed this as completedon Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/enhancementpriority/lowNice to have; do when convenientstatus:in-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      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.