From a1f556d38b7e6071ada64900b6f6ac14302ade88 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 19 Nov 2026 23:23:29 +0100 Subject: [PATCH] Catch-up: leave the source number spent when nothing is said; no write-back (numbers only go up, A-431) Builds: design 47 G A-490k, A-431 Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy --- .../mesh-delivery-indexer/internal/index/source.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/modules/mesh-delivery-indexer/internal/index/source.go b/modules/mesh-delivery-indexer/internal/index/source.go index ca2eb58e..82b654d7 100644 --- a/modules/mesh-delivery-indexer/internal/index/source.go +++ b/modules/mesh-delivery-indexer/internal/index/source.go @@ -252,19 +252,10 @@ func (ix *Indexer) sayCaughtUp(ctx context.Context, written []string, heads map[ if len(merges) == 0 { return } - ix.mu.Lock() - was, had := ix.saidSource[TrunkBranch] - ix.mu.Unlock() branch, src, took := ix.takenWhat(ctx, claimed, Applied{Written: written}) if len(took) == 0 { - // Nothing is said, so the source number is not spent (takenWhat took it). - ix.mu.Lock() - if had { - ix.saidSource[branch] = was - } else { - delete(ix.saidSource, branch) - } - ix.mu.Unlock() + // Nothing is said; the source number takenWhat took is left spent: a gap is harmless, a number said twice or going + // backwards is not (A-431). return } revision := ix.PinPipelines(ctx, branch, src, took)