Skip to content

docs(adr): record the single local-batch intake in ADR-SYNC-001 - #261

Merged
winlp4ever merged 1 commit into
mainfrom
docs/adr-sync-single-intake
Aug 28, 2026
Merged

docs(adr): record the single local-batch intake in ADR-SYNC-001#261
winlp4ever merged 1 commit into
mainfrom
docs/adr-sync-single-intake

Conversation

@winlp4ever

Copy link
Copy Markdown
Contributor

What

S7c — the docs half of the sync-spine work. Amends ADR-SYNC-001 to record the "single local-batch intake" refinement introduced by #259 (S7a) and #260 (S7b). Docs only, no code.

Changes to the ADR

  • Decision gains a MUST rule: all locally-produced batches enter the coordinator through the single submitLocalBatch intake, never a direct oplog write. One intake, two producers, one seq authority — the store scene (attachSync.sendBatch) and any headless / off-scene producer (getBoardSyncRef()) both funnel here. A headless producer MUST pass scene: false, so its off-layer ops never join the rebase set (else applyRemote's undo/replay injects them into the current scene), and MUST record to the oplog before submitting.
  • Consequences gains the desync hazard: a direct persistence.record without entering the intake lands in the oplog but triggers no pump, so it ships only opportunistically and isn't serverSeq-stamped promptly. The deep-layer cascade delete (graph/subtree.ts) was the last such bypass, now fixed in fix(sync): pump deep-layer cascade deletes through the sync intake #260.
  • Applies to adds graph/subtree.ts; Verify adds a grep for submitLocalBatch (confirmed to resolve to exactly the two producers).
  • Status line records the amendment date.

Notes

Amend the offline-first sync ADR with the S7 refinement: all locally-produced
batches enter the coordinator through one submitLocalBatch intake (one intake,
two producers, one seq authority), a direct oplog write desyncs a synced board,
and a headless / off-scene producer must pass scene:false so its off-layer ops
never join the rebase set. Adds the subtree deep-cascade bypass as the fixed
example, plus a Verify grep.
@winlp4ever
winlp4ever merged commit 15a1947 into main Aug 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant