The placement reader names the seat mesh-placement's state, held by the assigner, as L2 moved it (issue 774, ADR 0567)
mesh/delivery-group group feat/774-vault-mints-l2 checking: the checker's verdict is out of date: novox/mesh-delivery@f6df07605dd0 was judged on trunk 5b2e5bc5…
mesh/delivery merged: source.main moved to novox/mesh-sdk@d747c1128e42
mesh/check checking 8eafc0c5ce3c on d747c1128e42

This commit is contained in:
2026-10-28 21:54:04 +01:00
parent 50de0a5a71
commit 8eafc0c5ce
3 changed files with 14 additions and 13 deletions
+11 -10
View File
@@ -21,14 +21,15 @@ import (
// ace.typescript at v26.12.0, and every Node fingerprint said "builders disagree"). // ace.typescript at v26.12.0, and every Node fingerprint said "builders disagree").
// //
// ToolchainGate stands between the toolchains buckets and what takes their entries in (the indexer's PutToolchain, a // ToolchainGate stands between the toolchains buckets and what takes their entries in (the indexer's PutToolchain, a
// ToolchainSet): an entry is passed on only while the catalogue's placement (the indexer's state `placement`, read by // ToolchainSet): an entry is passed on only while the placement (the seat mesh-placement's state `placement`, held by
// delivery.Placed; ADR 0549 §3) places its build module on its node, and only once it was written since that placement; // the assigner, delivery.PlacementBucket, read by delivery.Placed; ADR 0567, ADR 0549 §3) places its build module on
// it is passed on as deleted otherwise, said once, and passed on when its node writes it again. A report written before // its node, and only once it was written since that placement; it is passed on as deleted otherwise, said once, and
// the placement is one an earlier run of the module left (issue 1940, 2026-10-25 20:56: mesh-build-node put on ace again // passed on when its node writes it again. A report written before the placement is one an earlier run of the module
// brought ace.typescript v26.12.0 of 2026-10-23 back into the agreement before the module ran there). Until the // left (issue 1940, 2026-10-25 20:56: mesh-build-node put on ace again brought ace.typescript v26.12.0 of 2026-10-23
// placement is settled, and while no node's placement is held (before the first placement file reaches the indexer, or // back into the agreement before the module ran there). Until the placement is settled, and while no node's placement
// where the state cannot be read), every entry is passed on. Builders that run and report different versions still // is held (before the assigner's adopt writes the first one, or where the state cannot be read), every entry is passed
// disagree: that refusal is the guard of novox/hq ADR 0465, and it stays. // on. Builders that run and report different versions still disagree: that refusal is the guard of novox/hq ADR 0465,
// and it stays.
// //
// This replaces the copies of the gate the indexer, the builder and the checker each kept over the controller's // This replaces the copies of the gate the indexer, the builder and the checker each kept over the controller's
// assignments (issue 1940's subtask, issue 774: those go with the controller's lease, ADR 0549 §6). // assignments (issue 1940's subtask, issue 774: those go with the controller's lease, ADR 0549 §6).
@@ -69,7 +70,7 @@ func (g *ToolchainGate) Toolchain(module, key string, value []byte, deleted bool
return g.pass(module, key) return g.pass(module, key)
} }
// Placement takes one revision of the indexer's placement in (at is when the bus wrote it) and answers whether what it // Placement takes one revision of the seat mesh-placement's placement in (at is when the bus wrote it) and answers whether what it
// passed on changed. A value that does not read is said, and places nothing on its node. // passed on changed. A value that does not read is said, and places nothing on its node.
func (g *ToolchainGate) Placement(key string, value []byte, deleted bool, at time.Time) bool { func (g *ToolchainGate) Placement(key string, value []byte, deleted bool, at time.Time) bool {
g.mu.Lock() g.mu.Lock()
@@ -164,7 +165,7 @@ func (g *ToolchainGate) leftOut(module, node string, value []byte) string {
return "" return ""
} }
// FollowPlacement reads the indexer's placement with its history into gate, says it settled, and follows it; changed // FollowPlacement reads the seat mesh-placement's placement with its history into gate, says it settled, and follows it; changed
// is told whenever what the gate passes on changed. Where the state cannot be read or watched (not there, or this part // is told whenever what the gate passes on changed. Where the state cannot be read or watched (not there, or this part
// may not read it) it says so and the gate passes every report on: not fatal, since an indexer, builder or checker that // may not read it) it says so and the gate passes every report on: not fatal, since an indexer, builder or checker that
// stops for it stops every delivery (issue 1945). An error of the watch after that ends on the channel. // stops for it stops every delivery (issue 1945). An error of the watch after that ends on the channel.
+1 -1
View File
@@ -202,7 +202,7 @@ func TestToolchainGate(t *testing.T) {
t.Run("a placement the bus refuses is said, and the part goes on", func(t *testing.T) { t.Run("a placement the bus refuses is said, and the part goes on", func(t *testing.T) {
var logs bytes.Buffer var logs bytes.Buffer
logger := log.New(&logs, "", 0) logger := log.New(&logs, "", 0)
refused := errors.New("nats: permissions violation for publish to $JS.API.CONSUMER.CREATE.KV_mesh-delivery-indexer_placement") refused := errors.New("nats: permissions violation for publish to $JS.API.CONSUMER.CREATE.KV_mesh-delivery-assigner_placement")
gate, _, _ := start(t, false) gate, _, _ := start(t, false)
for _, bus := range []refusingBus{{err: refused}, {refuseOpen: true, err: refused}} { for _, bus := range []refusingBus{{err: refused}, {refuseOpen: true, err: refused}} {
if _, err := FollowPlacement(context.Background(), bus, gate, func(context.Context) {}, logger.Printf); err != nil { if _, err := FollowPlacement(context.Background(), bus, gate, func(context.Context) {}, logger.Printf); err != nil {
+2 -2
View File
@@ -8,7 +8,7 @@ import (
"time" "time"
) )
// Placed is where the indexer's placement (the state `placement`, ADR 0549 §2, §3) places each module, and since when: // Placed is where the placement (the seat mesh-placement's state `placement`, held by the assigner; ADR 0567, ADR 0549 §3) places each module, and since when:
// the one reader of that state for every part that asks "does module stand on node" (issue 774, design 47's third // the one reader of that state for every part that asks "does module stand on node" (issue 774, design 47's third
// milestone), in place of each part reading the controller's assignments (`mesh-controller_assignments`, which goes // milestone), in place of each part reading the controller's assignments (`mesh-controller_assignments`, which goes
// with the controller's lease, ADR 0549 §6). // with the controller's lease, ADR 0549 §6).
@@ -84,7 +84,7 @@ func (p *Placed) Put(key string, value []byte, deleted bool, at time.Time) (node
return node, changed, err return node, changed, err
} }
// Seeded says some node's placement is held: before the first placement file reaches the indexer nothing is placed, // Seeded says some node's placement is held: before the assigner's adopt writes the first placement nothing is placed,
// and a reader keeps what it did before (ADR 0549 §5). // and a reader keeps what it did before (ADR 0549 §5).
func (p *Placed) Seeded() bool { func (p *Placed) Seeded() bool {
p.mu.Lock() p.mu.Lock()