A module's directory is never shared code, held or not (hq issue 278)

The merge of mesh-catalog 7f99fb4a rebuilt 103 modules with the build agent in tier 0, and ADR
0236 recorded it as "a change to the build agent rebuilds most of the catalogue". The agent had
not changed: modules/showcase/index.ts had. showcase is the catalogue's reference module, held
by no machine, and its manifest was not in the merge, so whatTheMergeTouched read the file as
shared code and rebuilt everything built from the repository (88 came out byte-identical). The
agent stood first only because everything is built by it.

Whether a directory is a module is a fact of the repository at the merge commit, so the forge's
announcer now says it: module_dirs, the changed files' directories holding a module.json there,
with module_dirs_said. A changed file inside one is that module's business; only a file in no
such directory is shared. An announcer that does not say keeps the old rule. `plans` what-if
takes the same list as module-dirs.

And a regression for the open question: nothing depends on the build agent except by being
built by it, and built-by never widens a plan, so a change to the agent - manifest or program -
rebuilds the agent alone; what moved beside it is ordered after it.
This commit is contained in:
jochen
2026-10-06 19:55:25 +02:00
parent 4635341a9d
commit b1e02aca1b
8 changed files with 208 additions and 6 deletions
+13
View File
@@ -188,6 +188,19 @@ type SourceMoved struct {
// deleted at its source: it is forgotten, or said, and never built (novox/hq ADR 0236). Empty from an
// announcer that does not say which files went, and then a build that finds no manifest says it.
Removed []string `json:"removed,omitempty"`
// ModuleDirs are the directories holding the files the merge changed that hold a `module.json` at
// the merge commit, from the repository's root (novox/hq issue 278). A changed file inside one of
// them is that module's business, whether or not the mesh holds the module and whether or not the
// merge touched its manifest; only a file in no such directory is shared code. Without it, a
// change to a module the mesh does not hold — whose manifest the merge left alone — read as shared
// and rebuilt every module built from the repository.
ModuleDirs []string `json:"module_dirs,omitempty"`
// ModuleDirsSaid says the announcer looked, so an empty ModuleDirs means "none of them is a
// module" rather than "not said". An announcer from before this says nothing, and the old rule
// stands: a directory is a module only when the merge changed its manifest.
ModuleDirsSaid bool `json:"module_dirs_said,omitempty"`
}
type Upgraded struct {