Recovery fix under issue 1966 (instruction section recovery-fixes-merge-and-tell).
Symptom (live 2026-11-08 11:31-11:50 local): the indexer rewrote all 209 keys of its state modules with identical bytes every 6-7 s: the state's revision climbed ~1,900 a minute (1,609,269 at 11:31:56, 1,624,904 at 11:40:16); adwaita read twice two minutes apart was byte-identical while its revision rose by 1,528. Each write is a views event; mesh-grants took each as a gap and re-asked its whole 7.8 MB first view, never caught up, and its tools timed out.
Cause:internal/index/toolchains.gorecomputeLocked compared the held package versions (map[string]string) with the recompute's (sdkstep.PackageVersions) by reflect.DeepEqual: two map types are never equal, so every module was written on every recompute.
Fix:sameUsed compares toolchains and packages with maps.Equal (nil and empty the same); the indexer's write helper write skips a value whose bytes it already holds, for every state and caller (imports.go wrote with no check before); the merge's written list counts real writes only.
Quick vs thorough: quick = the two comparisons alone; thorough = also the byte-equal skip in the one write helper. Chosen: thorough, since the fault was silent, a views reader amplifies it, and other writers had no check.
Tests: two new rows in TestAToolchainEntryChangedToTheSameValuesWritesNothing (repository over the unit budget: no new function); both fail without the fix (5 writes) and pass with it. go vet ./..., go vet -tags integration ./..., go test ./... pass in modules/mesh-delivery-indexer.
Not proven: what re-runs the recompute every few seconds; if it is the indexer's own events, this ends it. Live proof: the modules state's revision stops climbing, grants' journal stops logging 'a gap in modules'.
Undo: revert this commit.
Reviewed-by: mesh-code-reviewer@shanks at 00232c7197
Recovery fix under issue 1966 (instruction section recovery-fixes-merge-and-tell).
**Symptom (live 2026-11-08 11:31-11:50 local):** the indexer rewrote all 209 keys of its state `modules` with identical bytes every 6-7 s: the state's revision climbed ~1,900 a minute (1,609,269 at 11:31:56, 1,624,904 at 11:40:16); adwaita read twice two minutes apart was byte-identical while its revision rose by 1,528. Each write is a views event; mesh-grants took each as a gap and re-asked its whole 7.8 MB first view, never caught up, and its tools timed out.
**Cause:** `internal/index/toolchains.go` `recomputeLocked` compared the held package versions (`map[string]string`) with the recompute's (`sdkstep.PackageVersions`) by `reflect.DeepEqual`: two map types are never equal, so every module was written on every recompute.
**Fix:** `sameUsed` compares toolchains and packages with `maps.Equal` (nil and empty the same); the indexer's write helper `write` skips a value whose bytes it already holds, for every state and caller (imports.go wrote with no check before); the merge's written list counts real writes only.
**Quick vs thorough:** quick = the two comparisons alone; thorough = also the byte-equal skip in the one write helper. Chosen: thorough, since the fault was silent, a views reader amplifies it, and other writers had no check.
**Tests:** two new rows in `TestAToolchainEntryChangedToTheSameValuesWritesNothing` (repository over the unit budget: no new function); both fail without the fix (5 writes) and pass with it. go vet ./..., go vet -tags integration ./..., go test ./... pass in modules/mesh-delivery-indexer.
**Not proven:** what re-runs the recompute every few seconds; if it is the indexer's own events, this ends it. Live proof: the modules state's revision stops climbing, grants' journal stops logging 'a gap in modules'.
**Undo:** revert this commit.
Reviewed-by: mesh-code-reviewer@shanks at 00232c71977be18fe2534822f95de6f4f9be1c84
https://claude.ai/code/session_01NcbgfFfQ4Z9UE5jK32PmE5
mesh/check failed (3): mesh-build-go: the go.mod of novox/mesh-sdk at 396511b7a276, beside the change, cann…; and 2 more | 00232c71977b on 9c6bf236b6b1
Every recompute wrote every key of its modules state again with identical bytes: recomputeLocked
compared the package versions with reflect.DeepEqual across two map types (the contract's
map[string]string and sdkstep.PackageVersions), which never match. Each write was a views
event, and a reader of the views took each as a gap and asked the whole first view again.
The comparison is by maps.Equal now, and write itself skips an answer whose bytes are the
bytes held, for every caller and every state it writes; the merge's written list counts only
real writes.
Claude-Session: https://claude.ai/code/session_01NcbgfFfQ4Z9UE5jK32PmE5
Deliverynovox/mesh-delivery@00232c71977b — ready since 2026-11-08T10:55:36Z
Transitions
2026-11-08 10:55 (new) → proposed (announced): novox/mesh-delivery#175's head announced
2026-11-08 10:55 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)
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@00232c71977b` — **ready** since 2026-11-08T10:55:36Z
**Transitions**
- 2026-11-08 10:55 (new) → proposed (announced): novox/mesh-delivery#175's head announced
- 2026-11-08 10:55 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)
The commit's note under `refs/notes/mesh-plan` keeps every transition of this change up to its merge: `git log --notes=mesh-plan`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Recovery fix under issue 1966 (instruction section recovery-fixes-merge-and-tell).
Symptom (live 2026-11-08 11:31-11:50 local): the indexer rewrote all 209 keys of its state
moduleswith identical bytes every 6-7 s: the state's revision climbed ~1,900 a minute (1,609,269 at 11:31:56, 1,624,904 at 11:40:16); adwaita read twice two minutes apart was byte-identical while its revision rose by 1,528. Each write is a views event; mesh-grants took each as a gap and re-asked its whole 7.8 MB first view, never caught up, and its tools timed out.Cause:
internal/index/toolchains.gorecomputeLockedcompared the held package versions (map[string]string) with the recompute's (sdkstep.PackageVersions) byreflect.DeepEqual: two map types are never equal, so every module was written on every recompute.Fix:
sameUsedcompares toolchains and packages withmaps.Equal(nil and empty the same); the indexer's write helperwriteskips a value whose bytes it already holds, for every state and caller (imports.go wrote with no check before); the merge's written list counts real writes only.Quick vs thorough: quick = the two comparisons alone; thorough = also the byte-equal skip in the one write helper. Chosen: thorough, since the fault was silent, a views reader amplifies it, and other writers had no check.
Tests: two new rows in
TestAToolchainEntryChangedToTheSameValuesWritesNothing(repository over the unit budget: no new function); both fail without the fix (5 writes) and pass with it. go vet ./..., go vet -tags integration ./..., go test ./... pass in modules/mesh-delivery-indexer.Not proven: what re-runs the recompute every few seconds; if it is the indexer's own events, this ends it. Live proof: the modules state's revision stops climbing, grants' journal stops logging 'a gap in modules'.
Undo: revert this commit.
Reviewed-by: mesh-code-reviewer@shanks at
00232c7197https://claude.ai/code/session_01NcbgfFfQ4Z9UE5jK32PmE5
Delivery
novox/mesh-delivery@00232c71977b— ready since 2026-11-08T10:55:36ZTransitions
The commit's note under
refs/notes/mesh-plankeeps every transition of this change up to its merge:git log --notes=mesh-plan.