B-src: the builder's floor wakes on the indexer's take-in.taken

The seat mesh-catalog defines no manifest-accepted any more: the builder
consumes the indexer's take-in.taken in its place (module.json, names.go's
patterns) and wakes its floor on every one, looking at every module again as
before (versions.go, the wake take-in.taken). With the in-progress commit
before it the builder reads no source stamp and its untagged suite is green.

Builds: design 47 H §764 (the indexer: its events manifest-refused and manifest-accepted, with their reader); lead answers H-A-48, H-A-49, H-A-66, H-A-116 (hq 508faf0c)

Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
This commit is contained in:
2026-11-20 04:48:48 +01:00
parent 11a22fdff7
commit 94d3f02f76
9 changed files with 31 additions and 24 deletions
@@ -399,7 +399,7 @@ func run(ctx context.Context, getenv func(string) string, logOut io.Writer) erro
// The seat mesh-artifact-sweep says artifacts-gone when it found a key's blob gone (issue 1937, ADR 0571 §2): the
// builder's durable consumer on EVENTS, made by the grants part from the manifest's consumes. Where it is not there yet the builder says
// so; it still asks held at its start and at every module value.
// The same consumer carries what wakes a floor (design 51 *The floor*): the indexer's manifest-accepted and the
// The same consumer carries what wakes a floor (design 51 *The floor*): the indexer's take-in.taken (design 47 H H-A-116) and the
// condition keeper's condition-cleared.
floor := floorWake{b: b, waits: floorWaits, logf: logger.Printf}
// And the four registry seats' published, refused and removed (DLV-B4), which move a numbered version.
@@ -416,7 +416,7 @@ func run(ctx context.Context, getenv func(string) string, logOut io.Writer) erro
}
heardGone(ctx, b, m, logger.Printf)
}
// The seats' events (artifacts-gone, the registry seats' words, the build seats' toolchain-reported, manifest-accepted and
// The seats' events (artifacts-gone, the registry seats' words, the build seats' toolchain-reported, the indexer's take-in.taken and
// manifest-reads-changed and the seat mesh-conditions' condition-cleared: seatEventPatterns); the owners' views events and the
// catalog half's catalog-revision and registration-changed and the gate's source-moved are the views reader's (a message has
// one taker, so no pattern here covers them).
@@ -9,7 +9,7 @@ const namedTreePrefix = "named:"
// seatEventPatterns are the seats' events the builder's own handler takes off its durable consumer (its manifest's `consumes` of
// them): the registry seats' words, artifacts-gone, the build seats' toolchain-reported, condition-cleared, the node-engine
// seat's events and, of the seat mesh-catalog, manifest-accepted, version-released and versions-filled. The seat mesh-catalog's
// seat's events, of the seat mesh-catalog, version-released and versions-filled, and the indexer's take-in.taken. The seat mesh-catalog's
// catalog-revision and registration-changed and the seat mesh-delivery's source-moved are the views reader's (the branch
// follower's), so no pattern here covers them: a message has one taker.
var seatEventPatterns = func() []string {
@@ -18,8 +18,9 @@ var seatEventPatterns = func() []string {
"mesh-artifact-sweep", "mesh-conditions", "node-engine", "node-build-go", "node-build-image", "node-build-node"} {
out = append(out, "mesh.seat."+seat+".event.>")
}
for _, event := range []string{meshcatalog.EventManifestAccepted, meshcatalog.EventVersionReleased, meshcatalog.EventVersionsFilled} {
for _, event := range []string{meshcatalog.EventVersionReleased, meshcatalog.EventVersionsFilled} {
out = append(out, "mesh.seat."+meshcatalog.Seat+".event."+event, "mesh.seat."+meshcatalog.Seat+".event."+event+".>")
}
return out
// And the indexer's take-in.taken, which wakes the floor (design 47 H H-A-116).
return append(out, takenInSubject)
}()
@@ -32,9 +32,13 @@ func TestTheNamesAreTheManifests(t *testing.T) {
t.Errorf("the builder reads %s, its manifest's reads are %v", read, m.Reads)
}
}
// The catalog half (design 47 G §348, §614) is followed through the seat, and no state of the indexer is.
// The catalog half (design 47 G §348, §614) is followed through the seat, and no state of the indexer is; the indexer's
// event take-in.taken wakes the floor (design 47 H H-A-116).
if !slices.Contains(m.Consumes, "mesh-delivery-indexer.take-in.taken") {
t.Errorf("the builder's floor wakes on no take-in.taken: its manifest consumes %v", m.Consumes)
}
for _, c := range m.Consumes {
if strings.HasPrefix(c, "mesh-delivery-indexer.") {
if strings.HasPrefix(c, "mesh-delivery-indexer.") && c != "mesh-delivery-indexer.take-in.taken" {
t.Errorf("the builder follows %s, an indexer state, its manifest consumes it", c)
}
}
@@ -257,9 +257,9 @@ func aFloorsWakeIsHeard(t *testing.T) {
waits.Wait("m/lib", versions.SeatGoPackages, "", versions.Floor{Silent: []string{versions.SourceRequirements}}, nil, time.Unix(0, 0))
waits.Wait("m/img", versions.SeatImages, "", versions.Floor{Silent: []string{versions.SourceTags}}, nil, time.Unix(0, 0))
f := &floorWake{b: &build.Builder{}, waits: waits, logf: log.New(&logs, "", 0).Printf}
accepted := &wakeMsg{subject: manifestAcceptedSubject}
if !f.heard(context.Background(), accepted) || !accepted.acked || !strings.Contains(logs.String(), "the floor of m/lib is asked again: manifest-accepted") {
t.Fatalf("manifest-accepted: acked %v, log %q", accepted.acked, logs.String())
accepted := &wakeMsg{subject: takenInSubject}
if !f.heard(context.Background(), accepted) || !accepted.acked || !strings.Contains(logs.String(), "the floor of m/lib is asked again: take-in.taken") {
t.Fatalf("take-in.taken: acked %v, log %q", accepted.acked, logs.String())
}
logs.Reset()
cleared := &wakeMsg{subject: conditionClearedSubject, data: []byte(`{"subject":{"scope":"probe","id":"ace/mesh-delivery-forge-bridge"}}`)}
@@ -299,8 +299,8 @@ func aFloorsWakeIsHeard(t *testing.T) {
if !h.heard(context.Background(), published) || !published.acked || published.naked || len(saidPub) != 1 || saidPub[0].Artifact != "m:program" {
t.Fatalf("a published of a reserved version: acked %v, naked %v, said %+v, log %q", published.acked, published.naked, saidPub, logs.String())
}
if h.heard(context.Background(), &wakeMsg{subject: manifestAcceptedSubject}) {
t.Fatal("manifest-accepted was taken as a seat's outcome")
if h.heard(context.Background(), &wakeMsg{subject: takenInSubject}) {
t.Fatal("take-in.taken was taken as a seat's outcome")
}
// Design 47 G A-420: a message left for the bus is said given up on the last delivery its consumer allows, never before.
for _, n := range []uint64{4, EventDeliveries} {
@@ -13,7 +13,6 @@ import (
"git.novox.be/novox/mesh-contracts/health-and-repair/go/seats/meshconditions"
gitseat "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-contracts/go/seats/git"
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-contracts/go/seats/meshcatalog"
"git.novox.be/novox/mesh-sdk/go/process"
"mesh-delivery-builder/internal/build"
@@ -189,7 +188,8 @@ func emitSeatEvent(ctx context.Context, js jetstream.JetStream, cred process.Acc
// The events on the builder's consumer of EVENTS that wake a floor (design 51 *The floor*, DLV-B3b).
var (
manifestAcceptedSubject = meshcatalog.SubjectManifestAccepted
// The indexer's take-in.taken, which the builder consumes in place of the retired manifest-accepted (design 47 H H-A-116).
takenInSubject = "mesh.mod.mesh-delivery-indexer.event.take-in.taken"
conditionClearedSubject = meshconditions.SubjectConditionCleared
)
@@ -204,9 +204,9 @@ type floorWake struct {
// heard takes a message of the consumer in when it is one that wakes a floor, acknowledged, and answers whether it was.
func (f *floorWake) heard(ctx context.Context, m jetstream.Msg) bool {
switch m.Subject() {
case manifestAcceptedSubject:
case takenInSubject:
f.ack(m)
f.wake(ctx, versions.WakeAccepted, "", "")
f.wake(ctx, versions.WakeTakenIn, "", "")
case conditionClearedSubject:
f.ack(m)
var e meshconditions.ConditionEvent
@@ -66,8 +66,9 @@ const (
WakePublished = "published"
// WakeRevision is a catalog revision the builder hears (the catalog half's entry changed): tags and requirements are asked again.
WakeRevision = "catalog-revision"
// WakeAccepted is the next `manifest-accepted` of the seat mesh-catalog.
WakeAccepted = "manifest-accepted"
// WakeTakenIn is the indexer's next `take-in.taken`, in place of the retired manifest-accepted: the floor looks at every
// module again (design 47 H H-A-116).
WakeTakenIn = "take-in.taken"
// WakeCleared is the condition keeper's clear of a silent module's health condition on `mesh-conditions`.
WakeCleared = "condition-cleared"
// WakeByHand is builder_floor_again, a hand act.
@@ -75,7 +76,7 @@ const (
)
// sourceOfWake is the floor source each event says something of; a clear names the source by its module.
var sourceOfWake = map[string]string{WakePublished: SourceSeat, WakeAccepted: SourceRequirements}
var sourceOfWake = map[string]string{WakePublished: SourceSeat, WakeTakenIn: SourceRequirements}
// SourceSeats are the seats whose holders are the floor's tag and requirement sources (design 47 G A-82): the seat git (tags)
// and the seat mesh-catalog (requirements), the holders read from the seat list and the catalog half.
@@ -269,7 +269,7 @@ func TestTheBuildersVersions(t *testing.T) {
want []string
}{
{WakePublished, "oci-artifact-registry", "", "", nil}, // the seat answered already: a publish wakes nothing
{WakeAccepted, "", "", "", nil},
{WakeTakenIn, "", "", "", nil},
{WakeRevision, "", "", "", []string{"m/program"}},
{WakeCleared, "", "mesh-delivery-forge-bridge", "", []string{"m/program"}}, // recovered with nothing to say
{WakeCleared, "", "mesh-delivery-indexer", "", nil},
@@ -154,13 +154,14 @@ func TestManifestDeclarations(t *testing.T) { // 1607/AC1
// The builder hears the build seats' toolchain-reported and the node-engine seat's running (design 47 G §492, §546) and reads no
// build module's toolchains; and by the seat mesh-artifact-sweep's artifacts-gone, a blob the sweep found gone (1937/AC4, 1955/L7), the
// controller's no longer (1126/B9, ADR 0590).
// Design 51 *The floor*: the indexer's manifest-accepted and the condition keeper's condition-cleared wake a silent floor.
// Design 51 *The floor*: the indexer's take-in.taken (design 47 H H-A-116) and the condition keeper's condition-cleared wake
// a silent floor.
// DLV-B4: the four registry seats' outcomes, each a seat event `<seat>.<event>` on the shared events stream.
// DLV-M1: the indexer's and the assigner's views families of the states it follows.
if want := []string{"container-image-registry.kept", "container-image-registry.published", "container-image-registry.refused", "container-image-registry.removed",
"go-package-registry.kept", "go-package-registry.published", "go-package-registry.refused", "go-package-registry.removed",
"mesh-artifact-sweep.artifacts-gone", "mesh-catalog.manifest-accepted", "mesh-catalog.seat-definition-changed", "mesh-catalog.seat-definition-removed", "mesh-catalog.version-released", "mesh-catalog.versions-filled",
"mesh-conditions.condition-cleared", "mesh-conditions.findings-asked", "seat:mesh-module-assigner.views.assignments",
"mesh-artifact-sweep.artifacts-gone", "mesh-catalog.seat-definition-changed", "mesh-catalog.seat-definition-removed", "mesh-catalog.version-released", "mesh-catalog.versions-filled",
"mesh-conditions.condition-cleared", "mesh-conditions.findings-asked", "mesh-delivery-indexer.take-in.taken", "seat:mesh-module-assigner.views.assignments",
"seat:mesh-module-assigner.views.seat-holders", // A-298: the claimant's seat-holders view resolves the callers' seat entries
"mesh-catalog.catalog-revision", "mesh-catalog.registration-changed", "mesh-delivery.source-moved", "node-build-go.toolchain-reported", "node-build-node.toolchain-reported", "node-engine.manifest-reads-changed", "node-engine.running",
"npm-package-registry.kept", "npm-package-registry.published", "npm-package-registry.refused", "npm-package-registry.removed",
+1 -1
View File
@@ -54,12 +54,12 @@
"go-package-registry.refused",
"go-package-registry.removed",
"mesh-artifact-sweep.artifacts-gone",
"mesh-catalog.manifest-accepted",
"mesh-catalog.seat-definition-changed",
"mesh-catalog.seat-definition-removed",
"mesh-catalog.version-released",
"mesh-catalog.versions-filled",
"mesh-conditions.condition-cleared",
"mesh-delivery-indexer.take-in.taken",
"node-build-go.toolchain-reported",
"node-build-node.toolchain-reported",
"node-engine.manifest-reads-changed",