Files
hq/04-ISSUES/309-two-order-rules-ordered-one-pair-both-ways/01-diagnosis.md
T
jochen a3bedeb227
mesh/merge-gate pass: the change touches no module of the mesh's graph
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery delivered
Issue 309: two order rules ordered one pair both ways; ADR 0249 gives them a precedence
A group of the controller, the node-engine and the lab, each ready, was
refused as a cycle: built by put the controller's member first, engine
before controller the node-engine's. ADR 0249 ranks the rules (declared,
then built by and version skew, then engine before controller) and
supersedes ADR 0239's sentence that made a declared order against an
inferred one a cycle; design 47 says the precedence. Resolved by
mesh-controller #134 and mesh-catalog #119, replay R309 (mesh-lab #64).
2026-10-08 10:46:34 +02:00

2.5 KiB

309 — diagnosis

2026-10-08

  • The delivery's show for the group gave both pairs and cycle with the controller's and the node-engine's members. The lab's member was ordered alone, since it moves no module.
  • The pairs come from the controller's delivery-order verb, orderOf in cmd/mesh-controller/delivery.go. mesh-delivery only stores them and says "its order contradicts itself" with the cycle's ids (GroupState in holder.go). So the order is the controller's to fix, and the words are mesh-delivery's.
  • Built by: orderOf adds a pair for any edge of the dependency relation from a module the second member moves to one the first moves. The controller's plan for #132 moved build-agent, mesh-controller and route-proxy. The relation (inventory.dependenciesOf) gives every source-built module an edge built-by to the build seat's holder, so mesh-host → build-agent ordered the controller's member first. The pair was labelled built by although the edge was the build agent's, not the controller's.
  • Engine before controller: the node-engine's member moved mesh-host, the controller's moved mesh-controller, and the node-engine's did not move the controller. The rule put the node-engine's member first.
  • add dropped a pair only when the same direction was already there, so both directions stood and the planner's sort stalled. Every two-way pair was a cycle, whatever the rules.
  • The person's order, the controller first, was right for this change. The new node-engine calls a verb the new controller adds, which is ADR 0246's case: a verb is promised before it is required. Engine before controller comes from ADR 0236's order for its walks, where the node-engine had to accept something new first. The rule reads only module names, so it cannot tell the two cases apart. Built by is read from the graph.

Ruled out.

  • That the relation was wrong. The node-engine is source-built and is built by the build agent.
  • Narrowing built by so it never applies through the build agent. A builder change can matter to what it builds, and the next pair of disagreeing rules would be refused the same way.
  • Leaving it to a declared after: line alone. ADR 0239 made a declared order against an inferred one a cycle too, so no line could settle it.

Decided. Precedence, with a declared order above all inferred rules (ADR 0249). That supersedes the one sentence of ADR 0239 decision 4 that made a declared order against an inferred one a cycle.