A first-view reader counts no superseded revision as a gap and catches up a lost last change from the owner's mark #181

Merged
mesh-tools merged 1 commits from fix/1966-views-loss into main 2026-11-09 21:16:17 +00:00
Member

Issue 1966 (note 139): first-view followers lost about one event in ten; the assigner on ace missed its own build's revision (2026-11-09 19:38 UTC) and the delivery stood still 15 minutes; the grants part missed one the same afternoon (second of a kind).

Two causes. (1) Reproduced: the owner's emitter (views/emit.go) watches a one-value-per-key bucket and never says a revision a later write superseded before the watch saw it; the follower counted every revision jump as a gap. Fix: each change event carries Prev, the revision said before it, so a superseded skip is no gap. (2) Live, not yet located: events also go missing between EVENTS and a module's consumer (mesh-catalog #644 brings the tool to find where). Fix of the kind: the owner says its mark as an event after each mark write; a reader short of the mark asks its first view at once and holds what it read, so a lost last change is caught up whatever dropped its event. Mixed old/new parts during the delivery need no ordering edge (old owners send no Prev or mark; old readers drop the mark with one log line).

Quick fix: the emitter repeats its mark after a burst (built as the mark event). Thorough fix (chosen): Prev removes the false gaps and the mark event covers any lost change, for every owner and reader in go/views.

Tests: unit rows in TestViews prove (a) and (b) deterministically (each fails with its change reverted); the integration test runs 900 burst writes and compares the reader with the owner. Research 086's object-store case (a fetched object already deleted) waits for 086 ch.12.

Reviewed-by: mesh-code-reviewer@shanks at 04b323868f

https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ

Issue 1966 (note 139): first-view followers lost about one event in ten; the assigner on ace missed its own build's revision (2026-11-09 19:38 UTC) and the delivery stood still 15 minutes; the grants part missed one the same afternoon (second of a kind). Two causes. (1) Reproduced: the owner's emitter (views/emit.go) watches a one-value-per-key bucket and never says a revision a later write superseded before the watch saw it; the follower counted every revision jump as a gap. Fix: each change event carries Prev, the revision said before it, so a superseded skip is no gap. (2) Live, not yet located: events also go missing between EVENTS and a module's consumer (mesh-catalog #644 brings the tool to find where). Fix of the kind: the owner says its mark as an event after each mark write; a reader short of the mark asks its first view at once and holds what it read, so a lost last change is caught up whatever dropped its event. Mixed old/new parts during the delivery need no ordering edge (old owners send no Prev or mark; old readers drop the mark with one log line). Quick fix: the emitter repeats its mark after a burst (built as the mark event). Thorough fix (chosen): Prev removes the false gaps and the mark event covers any lost change, for every owner and reader in go/views. Tests: unit rows in TestViews prove (a) and (b) deterministically (each fails with its change reverted); the integration test runs 900 burst writes and compares the reader with the owner. Research 086's object-store case (a fetched object already deleted) waits for 086 ch.12. Reviewed-by: mesh-code-reviewer@shanks at 04b323868fc7c4b2484a01c342d150f1b70c944b https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
mesh-tools added 1 commit 2026-11-09 20:24:46 +00:00
Keep a views reader's copy equal to its owner's: no false gaps, a lost last change caught up (issue 1966)
mesh/check being carried to 04b323868fc7 on c2b4178a8009 | from 4b9bac9c73a9
mesh/delivery merged: source.main moved to novox/mesh-sdk@c2b4178a8009
04b323868f
The owner's watch of a state keeping one value per key is never handed a
revision that a later write of the same key replaced first, so every such
skip read as "changes missed" and the reader asked its first view again,
over and over in a burst. Each event now names the revision said before it
(prev), and a reader takes it when its picture holds that one.

A change whose event never reached a reader was only noticed at a later
change, and a lost last one never. The owner now says its mark as an event
each time it writes it; a reader short of it asks its first view at once
and holds what it read, never the event's body.

Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
Author
Member

Delivery novox/mesh-sdk@04b323868fc7 — merged since 2026-11-09T21:16:17Z

Source — source.main moved to novox/mesh-sdk@c2b4178a80. Whether it reached the machines is mesh-delivery-view's, derived from source.main, the wants and the haves.

Transitions

  • 2026-11-09 20:24 (new) → proposed (announced): novox/mesh-sdk#181's head announced
  • 2026-11-09 20:24 proposed → ready (accepted): a verdict names this commit and the trunk's head as its trunk commit, the gate passed or warned, and the repository's own check did not fail; or the check gates no merge (check-gates-merge false)
  • 2026-11-09 21:16 ready → merged (merged): on the trunk its modules follow: merged there

The commit's note under refs/notes/mesh-plan keeps every transition of this change up to its merge: git log --notes=mesh-plan.

<!-- mesh-delivery:view --> **Delivery** `novox/mesh-sdk@04b323868fc7` — **merged** since 2026-11-09T21:16:17Z **Source** — source.main moved to novox/mesh-sdk@c2b4178a8009. Whether it reached the machines is `mesh-delivery-view`'s, derived from `source.main`, the wants and the haves. **Transitions** - 2026-11-09 20:24 (new) → proposed (announced): novox/mesh-sdk#181's head announced - 2026-11-09 20:24 proposed → ready (accepted): a verdict names this commit and the trunk's head as its trunk commit, the gate passed or warned, and the repository's own check did not fail; or the check gates no merge (check-gates-merge false) - 2026-11-09 21:16 ready → merged (merged): on the trunk its modules follow: merged there The commit's note under `refs/notes/mesh-plan` keeps every transition of this change up to its merge: `git log --notes=mesh-plan`.
mesh-tools merged commit c2b4178a80 into main 2026-11-09 21:16:17 +00:00
mesh-tools deleted branch fix/1966-views-loss 2026-11-09 21:16:17 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-sdk#181