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 — Design: a verified cursor covers only a restorable chain — replication admission, finished (pkgs/id) · Issue #4592 · developing-today/code

Design: a verified cursor covers only a restorable chain — replication admission, finished (pkgs/id) #4592

New issue
Copy link
New issue
Copy link
Closed
3 / 33 of 3 issues completed
Closed
Design: a verified cursor covers only a restorable chain — replication admission, finished (pkgs/id)#4592
3 / 33 of 3 issues completed
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/lLarge: multi-day or open-ended; expect staged check-insepicMeta-issue grouping multiple items (org Project Type=Epic)kind/designA design proposal (design-architect): multi-step, phased, decision-bearingmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobtask/triageQueue packet kind: verify, reproduce, and route this item

Description

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

Design doc: files/designs/code-id-replication-admission.md in the keep-the-four-repos-healthy goal workspace. Audit at origin/main 73c0ec7466291b164b00f2fb3c911c2769997de2 — every defect below re-verified present at the cited sites this pass (2026-11-02).

Summary

ReplicationTracker::accept (pkgs/id/src/world/replication.rs) is the receiver-side trust boundary for world-journal replication (F12.13, #806, PR #4447): whatever it accepts, the durable receiver and spectator phases treat as a verified, restorable journal. The module's own rule, recorded when the PR #4447 follow-up closed the undecodable-entry hole, is that a verified cursor never covers data the restore path cannot read. That rule has been enforced leg by leg for the payload — entries must decode (chain_payload), and the payload's own journal header must be exactly one Created header for this world at the envelope's version (validate_payload_journal_header, #4486, landed today). The envelope's own header_version field is still held to neither of the two contracts WorldCore::restore and the journal writer jointly state:

  • Range (id(replication): ReplicationTracker accepts journal header_version 0 — accept checks only the upper bound, so a signed Snapshot rebases a v1-v3 chain onto a version WorldCore::restore refuses (1..=3) #4471) — restore accepts a header version only in JOURNAL_VERSION..=MAX_JOURNAL_VERSION (1..=3, world/core.rs:217). accept checks only the upper bound (replication.rs:712), so a signed snapshot with header_version = 0 rebases the tracker onto a chain no binary can restore, and ReplicationTracker::new performs no range check either (a v0 tracker accepts v0 tails). The origin's laptop probe: v0 snapshot accepted, header_version() becomes 0; MAX+1 refused as control.
  • Monotonicity (id(replication): ReplicationTracker accepts a snapshot with a lower header version — replica silently rolls back and re-admits old-version tails #4487) — journal header versions only ever move forward (the writer bumps the header before appending an entry kind an older binary cannot read, world/mod.rs:915-946; there is no downgrade path). Tail and Terminal frames enforce this (HeaderVersionChanged on any change); the Snapshot arm does not — it checks only that cursor_before is the chain base for the snapshot's own version and assigns self.header_version = envelope.header_version unconditionally (replication.rs:739-752). The origin's probe: v1 tail → v2 bump snapshot → v1 tail refused → v1 snapshot accepted → v1 tail accepted. The guard is defeated by inserting one snapshot frame.

Both are one unstated contract with two clauses: the envelope's header version is admitted only if the chain it names could exist — in the restore range, and never behind the chain the tracker already holds.

The contract

A frame is admitted only if its header version names a chain that could exist: inside the restore range JOURNAL_VERSION..=MAX_JOURNAL_VERSION, and — for a snapshot, the one frame kind allowed to change the chain's version — never lower than the version of the chain the tracker already holds.

Recorded decisions (full reasoning, alternatives and risks in the design doc):

  1. The range check lives in accept, for every kind, before any state changes — header_version outside JOURNAL_VERSION..=MAX_JOURNAL_VERSION is refused with the existing UnsupportedJournalVersion variant, now applied to both ends. Snapshot, Tail and Terminal alike: a v0 Terminal against a v0 tracker is the same hole as a v0 Snapshot.
  2. Construction is made inert, not redesigned — id(replication): ReplicationTracker accepts journal header_version 0 — accept checks only the upper bound, so a signed Snapshot rebases a v1-v3 chain onto a version WorldCore::restore refuses (1..=3) #4471 offers two endings for ReplicationTracker::new; this design records the second. With decision 1 in accept, an out-of-range session version makes the tracker inert: every frame kind carries its own header_version and is range-checked on the envelope, and tails/terminals must additionally equal the tracker's version, which no in-range frame can do against an out-of-range tracker. new's doc states this explicitly. A fallible constructor would ripple to every session bootstrap for a state that cannot arise from a real journal header — the session version comes from the local journal, whose header restore already range-checks.
  3. Snapshot monotonicity gets its own error — a snapshot whose header_version is lower than the tracker's current header_version is refused with a dedicated variant (HeaderVersionRegressed), leaving cursor and header version untouched. Reusing HeaderVersionChanged loses: that variant's doc names the tail/terminal fact (any change on a frame kind that may not change version), while a snapshot regression is a different diagnosis — the one frame kind that may move the version moved it the one way journals never move — and the durable receiver's logging will want to tell a downgrading writer bug from a merely desynchronised peer.
  4. Equal and higher stay accepted — same-version snapshots remain the compaction rebase; higher in-range snapshots remain the header-bump rebase (both covered by existing tests). Only the lower direction is refused; no legitimate writer state is excluded, because no code path in the repo ever lowers a journal's header version.

Phased breakdown

Phases adopt the two open origins as sub-issues (no parallels); #4486 is the landed third leg, cited as the embodiment, not a phase. Phase 3 is a new closing-audit issue, gated on Phases 1–2.

  • Phase 1 — the restore range at the envelope (adopted: id(replication): ReplicationTracker accepts journal header_version 0 — accept checks only the upper bound, so a signed Snapshot rebases a v1-v3 chain onto a version WorldCore::restore refuses (1..=3) #4471). Decisions 1–2: range-check every kind in accept; new's inert-tracker doc. (id(replication): ReplicationTracker accepts journal header_version 0 — accept checks only the upper bound, so a signed Snapshot rebases a v1-v3 chain onto a version WorldCore::restore refuses (1..=3) #4471 is currently status/parked with a holder — its agent note under this design records the phase structure; the design does not reassign it.)
  • Phase 2 — snapshot monotonicity (adopted: id(replication): ReplicationTracker accepts a snapshot with a lower header version — replica silently rolls back and re-admits old-version tails #4487). Decisions 3–4: refuse a lower-version snapshot with HeaderVersionRegressed, state untouched. Independent of Phase 1 in logic; textually adjacent in accept (whichever lands second rebases a small diff — noted, not gated).
  • Phase 3 — closing admission inventory + contract statement (new issue, gated on Phases 1–2): the contract statement lands in the replication.rs module doc, and every precondition WorldCore::restore demands of a journal is dispositioned against a check in accept (holds at accept / holds at restore only, with the reason that is safe / gap filed as a named follow-up). Required dispositions: (a) entry-kind version gating — whether a signed in-range snapshot may carry an entry kind that requires a higher header version (header_version_for_entry) on a lower header, and what restore makes of it; (b) the session-bootstrap version source — where ReplicationTracker::new's header_version argument comes from in the serve wiring, and whether decision 2's inert-tracker reasoning holds at that call site, including whether a new session may legitimately start below a previous session's version; (c) Terminal frames carrying an out-of-range version against a tracker set by a pre-fix snapshot (expected covered by Phase 1 — confirm, don't assume); (d) any accept caller that pre-validates versions itself — disposition each as removed, delegated to accept, or named exception.

Open questions (in the design doc, not filed)

Whether the durable receiver (#806 phase 3) should persist a regression refusal as writer-misconduct evidence or merely log it; whether a future protocol revision wants an explicit reset/rebase frame kind for disaster recovery (snapshot regression is recorded as not that mechanism); the session-restart version question, assigned to Phase 3's disposition (b) to answer from the actual bootstrap code.

Related

  • Origins adopted as phases: id(replication): ReplicationTracker accepts journal header_version 0 — accept checks only the upper bound, so a signed Snapshot rebases a v1-v3 chain onto a version WorldCore::restore refuses (1..=3) #4471 (Phase 1), id(replication): ReplicationTracker accepts a snapshot with a lower header version — replica silently rolls back and re-admits old-version tails #4487 (Phase 2).
  • Landed sibling leg, cited not adopted: id(replication): ReplicationTracker::accept never checks the payload's own journal header — a snapshot with no header, a foreign world's header, a version-99 header or a duplicate header is verified and advances the cursor, though WorldCore::restore refuses every one #4486 (payload's own journal header, closed 2026-11-02) and the PR feat(id): F12.13 replication wire contract + crypto primitives (#806 phase 1) #4447 decode leg in chain_payload.
  • Sibling designs in the same crate: Design: reconstruction is admission — validate authority-bearing inputs where they are rebuilt (pkgs/id) #2898 / Design: reconstruction is admission, continued — carried state, checked succession, and every restore's guards (pkgs/id follow-on to #2898) #4000 (journal reconstruction is admission — the restore side of this same rule), Design: a signed artifact is validated as strictly as it is built — one receipt contract for pkgs/id artifacts #3231 (signed-artifact receipt), Design: one guarded door — every gossip claim enters through its table (pkgs/id presence + peers) #4502 (gossip admission). This design is the replication-receipt gate; it does not re-audit the journal seams Design: reconstruction is admission — validate authority-bearing inputs where they are rebuilt (pkgs/id) #2898/Design: reconstruction is admission, continued — carried state, checked succession, and every restore's guards (pkgs/id follow-on to #2898) #4000 own.
  • Feature epic: id: F12.13 journal replication (read replicas over a signed stream) #806 (F12.13 replication; phases 2–5 build on this contract).

Acceptance criteria

  • Every acceptance leg named in the design audit is either implemented with tests or explicitly dispositioned on this issue: a verified cursor never covers journal data the restore path cannot read (headers, chain payload, and each leg the audit enumerates).
  • Regression tests reproduce each audited defect against the pre-fix code and pass after the fix.
  • The design doc (files/designs/code-id-replication-admission.md in the goal workspace) and this issue agree at landing; any leg deferred is filed as a linked follow-up issue, not dropped.

Sub-issues

Collapse Sub-issuesSub-issues

3 of 33 of 3 Issues completed
Loading 3 sub-issues

Activity

Next
  1. dezren39
    added
    status/needs-triageNot yet triaged; needs a first look
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    epicMeta-issue grouping multiple items (org Project Type=Epic)
    kind/designA design proposal (design-architect): multi-step, phased, decision-bearing
    source/design-architectFiled by the repo design architect job
    on Nov 2, 2026
  2. dezren39
    added sub-issues on Nov 2, 2026
    • id(replication): ReplicationTracker accepts journal header_version 0 — accept checks only the upper bound, so a signed Snapshot rebases a v1-v3 chain onto a version WorldCore::restore refuses (1..=3) #4471
    • id(replication): ReplicationTracker accepts a snapshot with a lower header version — replica silently rolls back and re-admits old-version tails #4487
    • Phase 3 (audit) of #4592 — closing replication-admission inventory + contract statement for pkgs/id #4593
  3. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    agent-note:v1 — design architect, pass 40 (2026-11-02)

    Design #4592 originated this pass from the replication-admission audit at origin/main 73c0ec74: ReplicationTracker::accept holds the envelope's header_version to neither the restore range (#4471) nor monotonicity (#4487), while the payload-side legs of the same rule already landed (chain_payload decode check, PR #4447; validate_payload_journal_header, #4486, closed today).

    Structure: Phase 1 = #4471 (adopted), Phase 2 = #4487 (adopted), Phase 3 = #4593 (new closing audit, gated on Phases 1–2, triage packet → pilot task 6481). All three are linked as sub-issues. Full design: files/designs/code-id-replication-admission.md in the keep-the-four-repos-healthy goal workspace; register entry added (status: proposed).

  4. dezren39
    added
    effort/lLarge: multi-day or open-ended; expect staged check-ins
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Nov 2, 2026
  5. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    Intake review

    Design issue from the design-architect audit at origin/main 73c0ec7, re-verified leg by leg in the issue body; companion to #806 / PR #4447 (the replication trust boundary it extends). Still live: no merged PR references this issue (filed today). Risks: the cursor/restore invariant spans several legs — a partial fix that covers only the named leg re-creates the hole the PR #4447 follow-up already closed once. Suggested approach: implement leg-by-leg with one failing test per leg before the fix, in the order the audit lists them.

    🤖 Agent note · filed

    • Agent: fleet monitor
    • Session / ID: repo-fleet-monitor run 2026-11-02 16:12 CST
    • Found via: monitor reconciliation
    • Task: Intake enrichment (§5) for this issue — acceptance criteria appended, labels normalized, this review posted.
    • Expectation: done = the acceptance criteria above; routing to a worker happens through the queue/feeder as usual.
  6. github-actions
    assigned
    dezren39
    on Nov 3, 2026
  7. dezren39
    added a commit that references this issue on Nov 3, 2026

    docs(id): design note for #4630 — bound the checkpoint at write time

    ec38324
  8. 157 remaining items

    Load more actions
  9. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Nov 10, 2026
  10. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: repo queue worker, lane code-j (repo-worker-code)
    • Session / ID: cron repo-queue-worker-shift-j run 2026-11-09 20:30 CST; task 8414
    • Found via: queue claim · task 8414
    • Task: task 8414 for issue Design: a verified cursor covers only a restorable chain — replication admission, finished (pkgs/id) #4592 (triage). Fresh check: issue Design: a verified cursor covers only a restorable chain — replication admission, finished (pkgs/id) #4592 is OPEN, no hard-stop labels (held / user/owned / do-not-merge / do-not-auto-edit). Attempts 7/24 on this claim. Execution-lane assignment row 1484 returned opencode - handed off to the opencode claimant, which launches the bound opencode session; this lane does not work it directly.
    • Expectation: claimant session drives task 8414 to a terminal state.
    • Links: task 8414 · issue Design: a verified cursor covers only a restorable chain — replication admission, finished (pkgs/id) #4592
  11. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    🤖 Agent note · triaged (queue packet closed per runbook §1c) — Agent: queue worker (repo-worker-code), lane code-y — Session/ID: task 8414, repo-queue-worker-shift-y 2026-11-09 run.

    • Task 8414 (triage) for issue Design: a verified cursor covers only a restorable chain — replication admission, finished (pkgs/id) #4592: fresh check — issue Design: a verified cursor covers only a restorable chain — replication admission, finished (pkgs/id) #4592 OPEN, no hard-stop labels (held / user/owned / do-not-merge / do-not-auto-edit), no status/needs-triage label, and it carries status/triaged.
    • Per runbook §1c (Queue/lane design rules: no by-id blocking by default, optional platform selector, triage separate from fixes #8097 rule 3), a triage packet whose issue no longer carries status/needs-triage is bookkeeping only. Nearest triage record on the issue: the 2026-11-03 coverage-pass agent note Design: a verified cursor covers only a restorable chain — replication admission, finished (pkgs/id) #4592 (comment) ("state: triaged (coverage pass) — Verdict: still live"). Gap noted: no dedicated triage-step agent note was found in a full comment search.
    • Completing task 8414 with outcome triaged; issue Design: a verified cursor covers only a restorable chain — replication admission, finished (pkgs/id) #4592 stays OPEN. Queue/status/work labels set by the queue are removed at this terminal transition.
  12. dezren39
    removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Nov 10, 2026
  13. dezren39 commented on Nov 10, 2026

    @dezren39
    dezren39
    on Nov 10, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done (already_done at current main) — closing issue #4592 with evidence

    • Agent: repo queue worker, lane code-e (repo-worker-code)
    • Session / ID: cron repo-queue-worker-shift-e run 2026-11-09; task 14467 (direct lane, row 5660)
    • Task: task 14467 is the triage follow-on for issue Design: a verified cursor covers only a restorable chain — replication admission, finished (pkgs/id) #4592 (from task 8414, completed triaged 2026-11-10T02:58Z). Acceptance: triaged at current main with evidence — fix path scoped, or closed with evidence if already handled. Verified fresh this shift: the design is fully landed.
    • Evidence (origin/main 02f4ece9c422, 2026-11-09):
      • Phase 1 — issue id(replication): ReplicationTracker accepts journal header_version 0 — accept checks only the upper bound, so a signed Snapshot rebases a v1-v3 chain onto a version WorldCore::restore refuses (1..=3) #4471 CLOSED COMPLETED (2026-11-03): the restore-range check is in ReplicationTracker::accept for every frame kind (pkgs/id/src/world/replication.rs: range helper + accept check against JOURNAL_VERSION..=MAX_JOURNAL_VERSION, refusing with UnsupportedJournalVersion); regression tests cover versions 0 and MAX+1 across frame kinds.
      • Phase 2 — issue id(replication): ReplicationTracker accepts a snapshot with a lower header version — replica silently rolls back and re-admits old-version tails #4487 CLOSED COMPLETED (2026-11-08): PR id(replication): refuse snapshot header-version downgrades #7611 squash-merged as 61da87125dfd8e24ba51e5a1f585d6e916de77e1; the Snapshot arm now refuses a lower-than-current header_version before any state change (test snapshot_refuses_a_header_version_downgrade); equal (compaction) and higher (header-bump) snapshots still accepted.
      • Phase 3 — issue Phase 3 (audit) of #4592 — closing replication-admission inventory + contract statement for pkgs/id #4593 CLOSED COMPLETED (2026-11-09): the Design: a verified cursor covers only a restorable chain — replication admission, finished (pkgs/id) #4592 contract statement is in the replication.rs module doc ("Admission contract (Design: a verified cursor covers only a restorable chain — replication admission, finished (pkgs/id) #4592)"), and the closing audit dispositioned every WorldCore::restore precondition against accept.
      • Divergences from the design text were explicitly dispositioned on issue Phase 3 (audit) of #4592 — closing replication-admission inventory + contract statement for pkgs/id #4593 and noted on this issue — not silent: Phase 1 took the fallible-constructor ending for ReplicationTracker::new, and Phase 2 reuses HeaderVersionChanged instead of a dedicated HeaderVersionRegressed variant; refusal semantics match the design in both cases.
      • The audit's one confirmed gap — per-entry version requirements enforced at restore but not at accept — is filed and tracked as issue id: replication admission — accept does not check per-entry version requirements (Phase 3 audit gap from #4593) #7970 (OPEN). Nothing is dropped.
    • Verdict: every acceptance leg of this design is implemented with tests or explicitly dispositioned; the remaining gap has its own issue. Closing issue Design: a verified cursor covers only a restorable chain — replication admission, finished (pkgs/id) #4592 as completed. Task 14467 completes with outcome already_done.
  14. dezren39
    closed this as completedon Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/lLarge: multi-day or open-ended; expect staged check-insepicMeta-issue grouping multiple items (org Project Type=Epic)kind/designA design proposal (design-architect): multi-step, phased, decision-bearingmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/design-architectFiled by the repo design architect jobtask/triageQueue packet kind: verify, reproduce, and route this item

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.