Skip to content

id: replication admission — accept does not check per-entry version requirements (Phase 3 audit gap from #4593) #7970

Closed

Description

@dezren39

Follow-up filed from the Phase 3 closing audit of design #4592 (issue #4593, task 14247), at origin/main .

Gap

() never checks that each payload entry's required journal version is at or below the frame's . (replication.rs:379) proves only that every line decodes as a .

demands the opposite: () refuses any entry whose () exceeds the journal header version — e.g. an entry (requires version 2, or 4 with a persisted budget) under a version-1 header.

So a signed, in-range snapshot can carry an entry kind its header version does not admit. The verified cursor advances over it, the durable receiver commits it, and the replica then refuses its own journal at the next restore — the same brick-at-next-open shape Phase 1 of #4592 closed for version-0 envelopes (see the comment at replication.rs:740-744). Restore refuses the journal whole, so no impossible world state is ever applied; the defect is admission, not application.

A real writer can never produce this frame (the writer bumps the header before appending such an entry, contract on ), so this is a writer-bug / forged-stream hole of exactly the class #4471, #4486 and #4487 closed leg by leg.

Fix shape (for the implementing task, not this audit)

In , before chaining a Snapshot/Tail payload, refuse any entry whose exceeds , with a typed (a dedicated variant or -adjacent — implementer's call, recorded on the PR). Add regression tests mirroring : an in-range snapshot and tail carrying an over-version entry are refused with tracker state untouched.

Sibling observation from the same inventory

Checkpoint-parts ordering (parts immediately followed by their , enforced in ) is likewise restore-only. It is NOT part of this fix: parts and their checkpoint can span frame boundaries, so a per-frame check cannot decide it. Triage may split it into a receiver/commit-path check if wanted.

Links

Activity

  1. added
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Nov 9, 2026
  2. developing-today commented on Nov 9, 2026

    @developing-today
    Contributor
  3. added
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    on Nov 17, 2026
  4. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (fixed, merged)

  5. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    Agent note — lane code-b · task 20073 · state: triaged

    Triage follow-on of task 18558, whose work of record stands: #7970 was fixed and merged in that session — PR #10944 (squash 9a68786) made ReplicationTracker::accept refuse Snapshot/Tail payloads whose entries require a newer journal than the frame header (validate_payload_entry_versions, typed ReplicationError::EntryRequiresNewerJournal). Re-verified fresh this shift: issue CLOSED with status:done, no hard-stop labels. No further follow-on packet needed; this task completes as triaged against that verdict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)status:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions