Catch up on merges the bus announced and never handed over (hq issue 266) #73

Merged
mesh-admin merged 1 commits from fix/missed-merges-are-caught-up into main 2026-10-05 23:33:19 +00:00
Contributor

The controller acted only on what its multi-filter events consumer handed it. On nats 2.10 that consumer sometimes skips a message (hq issue 266), and a merge it skipped left modules behind with nothing said.

  • link.(*Server).AnnouncedMerges reads the forge's merge announcements back from EVENTS on an ordered, ephemeral consumer filtered on the merge subject alone. It acknowledges nothing. I checked it against an embedded 2.10.29 server holding exactly the controller's bus grants (throwaway test, not committed, so no nats-server dependency was added here).
  • Every 5 minutes, catchingUpOnMerges reads the last 24h. Any announcement older than 10 minutes that wouldMove says would still move a module built from that repository is said (repo, commit, how late, which modules are behind) and handed to SourceMoved.
  • No record of handled merges is needed: acting marks the moved modules as looked at, so a handled merge reads as history. Modules that only package source from the repo are not judged, since acting records nothing for them and they would be re-acted forever.
  • SourceMoved is now serialized by a mutex, so the bus path and the catch-up never act on the same merge at once. Its candidate selection moved into mergeCandidates with no change in behaviour.

Tests: TestAMergeTheBusNeverHandedOverIsActedOnLate replays the incident (left alone for 10 minutes, then acted on once and never again). Also TestAMissedMergeThatCouldNotBeActedOnIsTriedAgain and TestAMergeOlderThanTheLookBackIsLeftAlone.

Note: on rollout, the first pass acts on any merge from the last 24h that is still unacted, e.g. the tools repository's PR #14 for the mesh-tools module, if that module was not rebuilt since.

Checks: gofmt -l (clean), go vet ./..., go test ./... (all ok, with ../mesh-catalog as sibling).

The controller acted only on what its multi-filter events consumer handed it. On nats 2.10 that consumer sometimes skips a message (hq issue 266), and a merge it skipped left modules behind with nothing said. - `link.(*Server).AnnouncedMerges` reads the forge's merge announcements back from EVENTS on an ordered, ephemeral consumer filtered on the merge subject alone. It acknowledges nothing. I checked it against an embedded 2.10.29 server holding exactly the controller's bus grants (throwaway test, not committed, so no nats-server dependency was added here). - Every 5 minutes, `catchingUpOnMerges` reads the last 24h. Any announcement older than 10 minutes that `wouldMove` says would still move a module built from that repository is said (repo, commit, how late, which modules are behind) and handed to `SourceMoved`. - No record of handled merges is needed: acting marks the moved modules as looked at, so a handled merge reads as history. Modules that only package source from the repo are not judged, since acting records nothing for them and they would be re-acted forever. - `SourceMoved` is now serialized by a mutex, so the bus path and the catch-up never act on the same merge at once. Its candidate selection moved into `mergeCandidates` with no change in behaviour. Tests: `TestAMergeTheBusNeverHandedOverIsActedOnLate` replays the incident (left alone for 10 minutes, then acted on once and never again). Also `TestAMissedMergeThatCouldNotBeActedOnIsTriedAgain` and `TestAMergeOlderThanTheLookBackIsLeftAlone`. Note: on rollout, the first pass acts on any merge from the last 24h that is still unacted, e.g. the tools repository's PR #14 for the mesh-tools module, if that module was not rebuilt since. Checks: gofmt -l (clean), go vet ./..., go test ./... (all ok, with ../mesh-catalog as sibling).
mesh-admin added 1 commit 2026-10-05 23:30:26 +00:00
The controller acted only on what its events consumer handed it, so a merge
the bus skipped left modules behind with nothing said. The stream is now read
back every five minutes on a single-filter consumer, and any merge that would
still move a module after ten minutes is said and acted on.
mesh-admin merged commit d1fc25f682 into main 2026-10-05 23:33:19 +00:00
mesh-admin deleted branch fix/missed-merges-are-caught-up 2026-10-05 23:33:19 +00:00
Author
Contributor

Delivery novox/mesh-controller@d1fc25f682cd — held since 2026-10-06T23:05:28Z

Held for a person: merged without a passing check: only a person decides that it goes on — mesh-delivery.release with why lets it go on.

Delivery plan — builds build-agent, mesh-controller, route-proxy → ace, g14, novox, shanks; no bus step

  • tier 0: mesh-controller
  • tier 1: build-agent
  • tier 2: route-proxy
  • ace: receives build-agent, route-proxy
  • g14: receives build-agent
  • novox: receives mesh-controller, build-agent, route-proxy
  • shanks: receives build-agent
  • build-agent keeps data (ADR 0233): what it holds is backed up before it moves
  • route-proxy provides route: its consumers are sent again after it
  • route-proxy keeps data (ADR 0233): what it holds is backed up before it moves

Transitions

  • 2026-10-06 23:05 (new) → proposed (announced): novox/mesh-controller#73 merged; its head was not heard by this owner, so it is made from the forge's word
  • 2026-10-06 23:05 proposed → held (merged-unchecked): merged without a passing check — a verdict known with it is taken first: only a person decides that it goes on

The commit's note under refs/notes/mesh-plan keeps every transition: git log --notes=mesh-plan.

<!-- mesh-delivery:view --> **Delivery** `novox/mesh-controller@d1fc25f682cd` — **held** since 2026-10-06T23:05:28Z Held for a person: merged without a passing check: only a person decides that it goes on — `mesh-delivery.release` with why lets it go on. **Delivery plan** — builds build-agent, mesh-controller, route-proxy → ace, g14, novox, shanks; no bus step - tier 0: mesh-controller - tier 1: build-agent - tier 2: route-proxy - ace: receives build-agent, route-proxy - g14: receives build-agent - novox: receives mesh-controller, build-agent, route-proxy - shanks: receives build-agent - build-agent keeps data (ADR 0233): what it holds is backed up before it moves - route-proxy provides route: its consumers are sent again after it - route-proxy keeps data (ADR 0233): what it holds is backed up before it moves **Transitions** - 2026-10-06 23:05 (new) → proposed (announced): novox/mesh-controller#73 merged; its head was not heard by this owner, so it is made from the forge's word - 2026-10-06 23:05 proposed → held (merged-unchecked): merged without a passing check — a verdict known with it is taken first: only a person decides that it goes on The commit's note under `refs/notes/mesh-plan` keeps every transition: `git log --notes=mesh-plan`.
This repo is archived. You cannot comment on pull requests.
No Reviewers
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-controller#73