Name build-agent's own as the builder's module, build-agent and mesh-tools (ADR 0520 §1, issue 1851)

ADR 0520 narrowed after its review: mesh-tools-go builds from its own
directory on a pinned base and has its key from mesh-build-image, and
mesh-tools-python is no module, so the set is named, not derived from
the toolchain bases.
This commit is contained in:
2026-10-22 21:08:47 +02:00
parent 61f7e89ad5
commit 61449249a8
3 changed files with 22 additions and 36 deletions
+6 -11
View File
@@ -25,19 +25,14 @@ import (
// **No timer**: the builder's and the indexer's writes wake the look (builderkeys.Watch, watchNewModules).
// isBuildersOwn says a module is build-agent's own: asked of build-agent on a merge and taken from its build record, never
// from the builder's key, until R4g (ADR 0453 §5, ADR 0498 §7, ADR 0520). They are the builder's module, build-agent itself
// (its image's context is another repository's) and the toolchain images build-agent's builds stand on
// (builder.Bases): the builder writes no key of any of them, and a walk waiting for one would hold its tier for ever.
// from the builder's key, until R4g (ADR 0453 §5, ADR 0498 §7, ADR 0520 §1).
func isBuildersOwn(module string) bool { return buildersOwn(module) }
// buildAgentsOwn are those modules: the builder's, build-agent's and every toolchain's base, read from the toolchains.
var buildAgentsOwn = func() map[string]bool {
own := map[string]bool{sdkdelivery.BuilderModule: true, builder.AgentModule: true}
for _, b := range builder.Bases() {
own[b] = true
}
return own
}()
// buildAgentsOwn are those modules, named (ADR 0520 §1): the builder's; build-agent itself, whose image's context is another
// repository's; and mesh-tools, the toolchain image build-agent's builds stand on. The builder writes no key of any of them,
// and a walk waiting for one would hold its tier for ever. mesh-tools-go is not among them: it builds from a Dockerfile in
// its own directory on a pinned base, and has its key from mesh-build-image.
var buildAgentsOwn = map[string]bool{sdkdelivery.BuilderModule: true, builder.AgentModule: true, "mesh-tools": true}
// buildersOwn is isBuildersOwn's rule: a variable only so a test of the asks left (their bus waits, their plan key) may
// name modules of its own as build-agent's.