You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
id: replication admission — accept does not check per-entry version requirements (Phase 3 audit gap from #4593) #7970
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.
Evidence: new regression test snapshot_and_tail_payloads_must_not_carry_over_version_entries (over-version snapshot and tail refused with tracker state untouched, signer refusal, version-10 control snapshot accepted); replication module 62/62 pass; full id-worlds suite 734/734 pass; cargo fmt clean.
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.
Activity
developing-today commentedon Nov 9, 2026
CODE-2360
doc(id): correct the Phase 3 gap follow-up reference to #7970 (#4593)
fix(id-worlds): refuse replication payloads carrying over-version ent…
dezren39 commentedon Nov 17, 2026
🤖 Agent note · done (fixed, merged)
ReplicationTracker::acceptnow refuses Snapshot/Tail payloads carrying an entry whosejournal_version_required_byexceeds the frame'sheader_version, via a newvalidate_payload_entry_versionsin pkgs/id/crates/id-worlds/src/world/replication.rs — mirroring the 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 journal-header check — with the new typed errorReplicationError::EntryRequiresNewerJournal { required, header }(the dedicated variant the audit left to the implementer). The check is also wired intovalidate_envelope_local, so the production signer refuses to produce such a frame (id(world/replication): SignedReplicationEnvelope::sign signs envelopes every receiver rejects — version, header version, payload digest, cursor chain, terminal and snapshot-base rules unchecked #6469).snapshot_and_tail_payloads_must_not_carry_over_version_entries(over-version snapshot and tail refused with tracker state untouched, signer refusal, version-10 control snapshot accepted); replication module 62/62 pass; full id-worlds suite 734/734 pass; cargo fmt clean.dezren39 commentedon Nov 17, 2026
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::acceptrefuse Snapshot/Tail payloads whose entries require a newer journal than the frame header (validate_payload_entry_versions, typedReplicationError::EntryRequiresNewerJournal). Re-verified fresh this shift: issue CLOSED withstatus:done, no hard-stop labels. No further follow-on packet needed; this task completes as triaged against that verdict.