The indexer fills each repository's taken key from merges it applied or a drained stream's heads, so a merge heard while the state was missing reads on the machines (issue 1280) #83

Merged
mesh-tools merged 3 commits from fix/1280-indexer-fills-taken into main 2026-10-26 23:22:02 +00:00
Member

Issue 1280, notes 12 and 16. mesh-delivery.deliveries said 'not yet on the machines: the indexer has taken in no merge' for every merge of mesh-host (#145-#150) and mesh-tools (#44, #45), while view_reach shows mesh-host's #150 on all four nodes: the indexer's taken state got no key for a merge heard while its bucket was missing, and none until that repository's next merge.

Change (modules/mesh-delivery-indexer):

  • writeTaken keeps the latest merge applied while the state was missing; FillTaken writes those once the state is there.
  • FillTaken fills from the gate's source heads only when the forge consumer is drained (NumPending and NumAckPending 0), so a taken key never names a merge the indexer has not applied (ADR 0556 §1); a skipped fill and an empty source are logged.
  • The fill is kicked on the state's Ready and after every applied forge message; the forge handler confirms its ack with DoubleAck, so the drain check does not count the message just applied.
  • Tests: rows in the existing table test (a merge heard while the state was missing is filled; an unapplied source head writes no key; a drained source fills a missing key; an older head leaves a later key) and the ack test asserts DoubleAck. No new test function.

Quick fix weighed and not chosen: waiting for each repository's next merge leaves a rarely merged repository false for days. Thorough: every repository is filled at start and on the state's appearance, through the same write path as a live merge.

Local: gofmt clean, go vet ./... and go vet -tags integration ./... clean, go test -race ./... green in the indexer module. Integration compiled, not run: it runs in this pull request's one check.

Live case: after delivery, mesh-delivery.deliveries {repository: novox/mesh-host} reads 'on the machines' for #150.

Reviewed-by: review-1280t@shanks at 6c79e456a1

Issue 1280, notes 12 and 16. mesh-delivery.deliveries said 'not yet on the machines: the indexer has taken in no merge' for every merge of mesh-host (#145-#150) and mesh-tools (#44, #45), while view_reach shows mesh-host's #150 on all four nodes: the indexer's `taken` state got no key for a merge heard while its bucket was missing, and none until that repository's next merge. Change (modules/mesh-delivery-indexer): - writeTaken keeps the latest merge applied while the state was missing; FillTaken writes those once the state is there. - FillTaken fills from the gate's source heads only when the forge consumer is drained (NumPending and NumAckPending 0), so a taken key never names a merge the indexer has not applied (ADR 0556 §1); a skipped fill and an empty source are logged. - The fill is kicked on the state's Ready and after every applied forge message; the forge handler confirms its ack with DoubleAck, so the drain check does not count the message just applied. - Tests: rows in the existing table test (a merge heard while the state was missing is filled; an unapplied source head writes no key; a drained source fills a missing key; an older head leaves a later key) and the ack test asserts DoubleAck. No new test function. Quick fix weighed and not chosen: waiting for each repository's next merge leaves a rarely merged repository false for days. Thorough: every repository is filled at start and on the state's appearance, through the same write path as a live merge. Local: gofmt clean, go vet ./... and go vet -tags integration ./... clean, go test -race ./... green in the indexer module. Integration compiled, not run: it runs in this pull request's one check. Live case: after delivery, mesh-delivery.deliveries {repository: novox/mesh-host} reads 'on the machines' for #150. Reviewed-by: review-1280t@shanks at 6c79e456a100b75b0ec287c85654ee3965d14c2d
mesh-tools added 3 commits 2026-10-26 23:21:08 +00:00
Author
Member

Delivery novox/mesh-delivery@6c79e456a100 — merged since 2026-10-26T23:22:05Z

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

Transitions

  • 2026-10-26 23:21 (new) → proposed (announced): novox/mesh-delivery#83's head announced
  • 2026-10-26 23:21 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-10-26 23:22 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-delivery@6c79e456a100` — **merged** since 2026-10-26T23:22:05Z **Source** — source.main moved to novox/mesh-delivery@9f1b227fb8c0. Whether it reached the machines is `mesh-delivery-view`'s, derived from `source.main`, the wants and the haves. **Transitions** - 2026-10-26 23:21 (new) → proposed (announced): novox/mesh-delivery#83's head announced - 2026-10-26 23:21 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-10-26 23:22 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 9f1b227fb8 into main 2026-10-26 23:22:02 +00:00
mesh-tools deleted branch fix/1280-indexer-fills-taken 2026-10-26 23:22:02 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-delivery#83