The indexer never moves a module backwards: a late merged message writes nothing; indexer_heard and indexer_module_history read what it heard and kept (issue 1126)
#96
Merged
mesh-toolsmerged 3 commits from fix/1126-index-order into main2026-10-28 14:44:34 +00:00
Issue 1126 notes 76, 81, 82. The indexer applied mesh-catalog merge 69056948 for kernel and mesh-build-image, then wrote the older merge 9cdac09a back over it: ace's mesh-build-image went back to pre-fix code after the operator's Release, and kernel was rolled back on all four nodes. Nothing checked order.
One forge call per merged message, before any write: if the merge is contained in taken..Merge and differs from it, the message is late, and no module, deletion, placement or taken key is written (logged). A diverged or rewritten history is written forward. A taken commit the forge no longer has (': 404 ') is not known older, so the merge is written and logged. Any other forge error leaves the message for redelivery (loud after 5, in DEAD_LETTERS), with nothing written.
indexer_take_in makes its own single call; an older head is not read.
One log line per applied merged message.
Tools (tools-are-how-a-module-is-spoken-to): indexer_heard (the FORGE messages the indexer handled, with delivery count, sequence, times and outcome; new state heard, history 64) and indexer_module_history (a modules key's kept values with times, commit and fp2).
Quick vs thorough: quick (keep a value with a higher source revision) fails here, because the revision is 0 once the source moves; thorough, chosen: order by the forge's ancestry.
Review: three rounds. Round 1: a 404 or a diverged main blocked the repository, and one call per module. Round 2: a bare '404' match in the error words could turn a 502 into a backwards write. All fixed.
Left as notes: a typed not-found from gitea_contains (81); a take-in newer than taken, then a late message (82).
Tests: rows in TestAnUnchangedModuleWritesNothing and TestARegisteredModuleIsIndexedFromItsRepository, plus assertions in the indexer's and view's tests, each failing first; no new test function. go test -race passes.
Issue 1126 notes 76, 81, 82. The indexer applied mesh-catalog merge 69056948 for kernel and mesh-build-image, then wrote the older merge 9cdac09a back over it: ace's mesh-build-image went back to pre-fix code after the operator's Release, and kernel was rolled back on all four nodes. Nothing checked order.
- One forge call per merged message, before any write: if the merge is contained in taken.<repo>.Merge and differs from it, the message is late, and no module, deletion, placement or taken key is written (logged). A diverged or rewritten history is written forward. A taken commit the forge no longer has (': 404 ') is not known older, so the merge is written and logged. Any other forge error leaves the message for redelivery (loud after 5, in DEAD_LETTERS), with nothing written.
- indexer_take_in makes its own single call; an older head is not read.
- One log line per applied merged message.
- Tools (tools-are-how-a-module-is-spoken-to): indexer_heard (the FORGE messages the indexer handled, with delivery count, sequence, times and outcome; new state `heard`, history 64) and indexer_module_history (a modules key's kept values with times, commit and fp2).
Quick vs thorough: quick (keep a value with a higher source revision) fails here, because the revision is 0 once the source moves; thorough, chosen: order by the forge's ancestry.
Review: three rounds. Round 1: a 404 or a diverged main blocked the repository, and one call per module. Round 2: a bare '404' match in the error words could turn a 502 into a backwards write. All fixed.
Left as notes: a typed not-found from gitea_contains (81); a take-in newer than taken, then a late message (82).
Tests: rows in TestAnUnchangedModuleWritesNothing and TestARegisteredModuleIsIndexedFromItsRepository, plus assertions in the indexer's and view's tests, each failing first; no new test function. go test -race passes.
Reviewed-by: rev-index-order@shanks at 3629bcf057c3782f732131452bd58d4d12db9544
The indexer wrote mesh-catalog's merge 9cdac09a back over the later 69056948,
rolling kernel and mesh-build-image back on the nodes: a merged message's
commit was written whatever the held one was. Before writing or deleting a
module's value, the indexer now asks the forge whether the merge contains the
held commit, keeps the held value when it does not and says so, and leaves the
message for redelivery when the forge cannot say. Each applied merged message
is said in one line with the modules written.
No tool showed what the indexer heard of FORGE nor a modules key's history
with times, so the cause could not be proven: the indexer now records each
FORGE message it handles (sequence, deliveries, times, commit, outcome) in its
state heard, read by indexer_heard, and indexer_module_history reads
modules.<module>'s kept values with their times.
Quick fix (Src order in writeOverlay) rejected: Src is 0 once the source moved
on, as here. Thorough fix chosen: the order is the forge's, on every path that
writes a module (merged message, take-in).
Asking whether the merge contains the held commit refused forward merges
forever on a diverged or rewritten main or a squash-merged registered head,
failed every later merge when the forge no longer had the held commit, and
cost one forge call per held commit. The question is now the reverse: a merge
is kept back only when it is in the taken merge and differs from it. A merged
message asks it once, before it writes anything, and a late message writes no
module, deletion, placement or taken key. A take-in asks it once for its
module. A 404 is not known to be older and is written, and said; any other
failure to say leaves the message for redelivery.
Deliverynovox/mesh-delivery@3629bcf057c3 — merged since 2026-10-28T14:44:36Z
Source — source.main moved to novox/mesh-delivery@e753009fbc. Whether it reached the machines is mesh-delivery-view's, derived from source.main, the wants and the haves.
Transitions
2026-10-28 14:03 (new) → proposed (announced): novox/mesh-delivery#96's head announced
2026-10-28 14:04 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-28 14:44 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@3629bcf057c3` — **merged** since 2026-10-28T14:44:36Z
**Source** — source.main moved to novox/mesh-delivery@e753009fbc71. Whether it reached the machines is `mesh-delivery-view`'s, derived from `source.main`, the wants and the haves.
**Transitions**
- 2026-10-28 14:03 (new) → proposed (announced): novox/mesh-delivery#96's head announced
- 2026-10-28 14:04 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-28 14:44 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`.
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.
Issue 1126 notes 76, 81, 82. The indexer applied mesh-catalog merge 69056948 for kernel and mesh-build-image, then wrote the older merge 9cdac09a back over it: ace's mesh-build-image went back to pre-fix code after the operator's Release, and kernel was rolled back on all four nodes. Nothing checked order.
heard, history 64) and indexer_module_history (a modules key's kept values with times, commit and fp2).Quick vs thorough: quick (keep a value with a higher source revision) fails here, because the revision is 0 once the source moves; thorough, chosen: order by the forge's ancestry.
Review: three rounds. Round 1: a 404 or a diverged main blocked the repository, and one call per module. Round 2: a bare '404' match in the error words could turn a 502 into a backwards write. All fixed.
Left as notes: a typed not-found from gitea_contains (81); a take-in newer than taken, then a late message (82).
Tests: rows in TestAnUnchangedModuleWritesNothing and TestARegisteredModuleIsIndexedFromItsRepository, plus assertions in the indexer's and view's tests, each failing first; no new test function. go test -race passes.
Reviewed-by: rev-index-order@shanks at
3629bcf057Delivery
novox/mesh-delivery@3629bcf057c3— merged since 2026-10-28T14:44:36ZSource — source.main moved to novox/mesh-delivery@e753009fbc. Whether it reached the machines is
mesh-delivery-view's, derived fromsource.main, the wants and the haves.Transitions
The commit's note under
refs/notes/mesh-plankeeps every transition of this change up to its merge:git log --notes=mesh-plan.