indexer: the seed asks steps of each artifact's build seat from the newest trunk entry

The seat list's build seat per artifact (language or kind), a kept call
<seat>.steps with {module, artifact, fingerprint, fetch}, and the finding
call-unanswered (scope call, id <seat>.steps) after five minutes, cleared on an answer.

Builds: design 47 G §704

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
2026-11-11 22:56:06 +01:00
parent 0f62358fb0
commit c0e2621bba
7 changed files with 311 additions and 4 deletions
@@ -452,8 +452,12 @@ func run(ctx context.Context, getenv func(string) string, logOut io.Writer) erro
awaitedStore{b: process.AwaitBucket(ctx, js, conn, index.ProposalsBucket, "no change of a registration waits for its warrant", logger.Printf)},
routerRecordUnread, ix, logger.Printf)
ix.Registry = registry
ix.SeedModules = func(context.Context) ([]index.SeedModule, error) {
return nil, errors.New("the first registrations are not composed by this build: what the build seats answer steps with is not read yet (design question)")
ix.SeedModules = func(ctx context.Context) ([]index.SeedModule, error) {
r := seatReader.Reader()
if r == nil {
return nil, errors.New("the seat list is not read yet: the seed waits for it")
}
return ix.SeedModulesFrom(ctx, r.Definitions(), stepsVia(calls.CallKept))
}
// Which build this program is, fixed here once, before it hears any merge and never asked again (index.FixOwnBuild): the
// node-engine names the successor while it replaces this process, and an old process that learnt it later would take
@@ -0,0 +1,28 @@
package main
import (
"context"
"encoding/json"
"fmt"
"git.novox.be/novox/mesh-delivery/contracts/go/seats/nodebuildgo"
"mesh-delivery-indexer/internal/index"
)
// stepsVia asks a build seat's verb steps through call (process.Conn.CallKept, ADR 0668 §1) and reads its answer (design
// 47 G §704); the seats' verbs have one form, so nodebuildgo's contract reads each seat's answer.
func stepsVia(call toolCaller) index.StepsCaller {
return func(_ context.Context, seat string, in nodebuildgo.StepsInput) (nodebuildgo.StepsAnswer, error) {
verb := "seat:" + seat + "." + index.StepsVerb
raw, err := call(verb, in)
if err != nil {
return nodebuildgo.StepsAnswer{}, err
}
var a nodebuildgo.StepsAnswer
if err := json.Unmarshal(raw, &a); err != nil {
return a, fmt.Errorf("the answer of %s is not its steps: %w", verb, err)
}
return a, nil
}
}