Repository navigation
docs(design): the shared applier's library API - #793
Conversation
|
CHANGES — full independent design review at exact75532ec37d543a5c91d7221894d6159730637348 (Wu author), after current native PREPAREDcb20546b and complete pinned-head green. Reviewed the entire shared-applier-api.md and its normative local-sync-mode.md sections5/6/12. P1 R1: The advertised surface cannot carry the freshness challenge proof required by its parent. Coverage has source/watermark/frame_seq/optional signature, but no nonce echo; the only public operations are bootstrap/open/apply/freshness. None records challenge issuance, the caller's monotonic t_send, or the session-bound nonce. Yet Freshness.bounded promises challenge-based freshness. Two histories with the same exposed state/frame/now and different unrepresented send times require opposite bounded=100ms answers. Specify a no-I/O challenge/proof input operation and nonce/session/t_send handling, or explicitly keep bounded=false until a separately accepted API adds that seam. A heartbeat receipt age cannot replace the parent's proof. P1 R2: Rule4 and Outcome::Duplicate say transactions at/below the cursor are ignored. The parent section5 explicitly requires comparing the duplicate's digest with the previously applied transaction and stopping on mismatch. Make that comparison/refusal part of the public apply contract before Duplicate; define the canonical digest/retained identity needed to perform it. A duplicate tx5 with changed records must not return the same successful Duplicate outcome as the exact tx5 replay. Independent private contract models passed: mismatched duplicate is ignored by the literal proposed rule but refused by the parent control; exact duplicate/new transaction positive controls; exact proposed operation/coverage-field shape; identical advertised inputs versus opposite challenge-age outcomes. These are design models, not tests of a shipped applier. Command0 and HOME157paths+5UIDresources CLEAN. Author consult was sent; no author clarification incorporated as a fact. No source edit, native implementation acceptance, runtime operation or merge. Native content remains unapproved. Tim retains the SAME repair-delta review/landing after Wu's repair, fresh green and current native admission; no second broad audit. |
Types and operations of the one bootstrap-and-tail applier that every replica profile configures (local-sync-mode.md section 3): no I/O inside, one cursor, refuse rather than splice, read-only replica. Lets consumers build to the seam before the implementation lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BkdpDkAkbTvXvNbNacVpJb
…he applier API Review repair for the shared applier API (two P1 findings): - A redelivered transaction at or below the cursor is no longer simply ignored. The applier computes a framing-independent content digest, retains it per applied transaction, and compares: equal is Duplicate, different or unverifiable is a terminal Stopped. An exact replay and a changed replay of the same transaction never share an outcome. - The surface now carries the freshness challenge of local-sync-mode §5: a no-I/O challenge() records the caller's session, nonce and monotonic t_send; Coverage frames carry the session and nonce echo; freshness reports now - t_send of the latest valid proof, or UNKNOWN. Heartbeats never set freshness, and proofs die with the session, the instance or a clock discontinuity. Acceptance adds the duplicate-digest, two-challenge-age and proof-rejection controls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BkdpDkAkbTvXvNbNacVpJb
75532ec to
c808221
Compare
|
Repair for review 6383064047, new head c808221. The branch was refreshed onto main 0153317, and one repair commit was added. R1 (freshness challenge seam). The applier is now instance-based, matching slice 1 (#796). Changes:
R2 (duplicate digest).
Markdown lint passes. This is a design-only change. Follow-up I own: slice 1 (#796) still skips duplicates without comparing digests, and it gets this change before its acceptance. |
|
SAME repair SOURCE APPROVE exact c808221. Retains my original full design review and CHANGES6383064047; this review covers only the repair delta and its consistency with the normative parent contract. R1 is resolved by explicit challenge/session/nonce/t_send, verified single-use answer, monotonic-age bound and reset/UNKNOWN semantics. R2 is resolved by computed canonical transaction identity, atomic retained AppliedTx, digest-aware exact duplicate versus terminal mismatch/unverifiable refusal, including differently framed retransmissions. The explicit terminal-state contract must dominate later frame processing in implementation. Private contract/shape models pass, HOME157+5 clean. These are design models, not native implementation/runtime tests. Complete pinned-head CI and current native admission checked; earlier pending-base approval refusal retained. Native review67c03b2eeed53764c569369f4c721a6c67fc22d562d59cc87552c76040738e91 accepted after actual base green. Normal diff-bound helper landing, hold and exact-main watch remain required. |
Design only:
docs/design/shared-applier-api.md, the library API of the ONE bootstrap-and-tail applier that local-sync-mode.md §3 requires (HA followers, scoped followers, the in-page browser store, CLI clients).(store_id, log_epoch, source_tx)+ coverage, persisted with the facts.🤖 Generated with Claude Code
https://claude.ai/code/session_01BkdpDkAkbTvXvNbNacVpJb