Files
mesh-delivery/modules/mesh-delivery-indexer/internal/index/names.go
T
jschoubben 371b1a98f6 B-D14b/W4.8 (indexer half, integration fixtures left): build modules from the build seats' acts and their holders' manifests (issue 1966)
Design 47 *A module's registration*, "No part fixes a name" (b229f5c4 lines 482-485), and *What ADR 0656
leaves to this design*, "The indexer reads it [acts] into the catalog graph" (line 1583): ToolchainModules,
ToolchainStreams, BuildGoModule and BuildNodeModule go. The build module of a language is the module whose
manifest claims the seat whose acting rule is step build on it (index.BuildModulesOf), its stream the one of
its manifest carrying toolchain.reported, its bucket <holder>_toolchains as before. Found again at start, at
every change of the seat list and at every catalog revision; the watch, the gate and the hearing follow.
A language with no build module found reads as no toolchain reported.

Rows: TestAgreedToolchainChangesAGoModulesReasonWithNoMerge/the build module of a language is the holder...
(fails without: no BuildModulesOf, and go-builds' report refused); TestToolchainWatch's later build module.
Left: six integration tests of cmd/mesh-delivery-indexer hold no build seat with acts nor a holder manifest
and fail (TestIndexerWhole, TestIndexerWritesAGoModuleAgain..., TestIndexerGivesACandidateItsFingerprint...,
TestIndexerJudgesAnUnreadableVerdictAgainAtStart, TestIndexerCountsOnlyThePlacedBuildNodesToolchains,
TestAMeshSDKMergeMovesOnlyTheModulesImportingAChangedPackage): their fixtures are to be given both.

Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ

Builds: design 47 G §364, §428, §535
2026-11-11 14:36:48 +01:00

42 lines
1.8 KiB
Go

package index
// The holders, states and buckets the indexer names, taken from its own manifest (module.json: its name, its `state`, its
// `reads`) and from the manifests of the holders it reads; a unit row checks them against the manifest
// (TestTheNamesAreTheManifests). No contract names a holder (novox/hq ADR 0625 §4, ADR 0634 §1).
const (
// Module is the indexer's own name; each reader names it from its own manifest.
Module = "mesh-delivery-indexer"
// The indexer's own states, with the revisions each keeps per key (module.json `state`).
CandidatesState = "candidates"
CandidatesBucket = Module + "_" + CandidatesState
CandidatesHistory = 10
ModulesState = "modules"
ManifestsState = "manifests"
ManifestsBucket = Module + "_" + ManifestsState
ManifestsHistory = 1
// VerdictsState and VerdictsBucket are in verdicts.go.
VerdictsHistory = 5
PredefinedState = "predefined"
ConfigCandidatesState = "config-candidates"
PackagesState = "packages"
PackagesBucket = Module + "_" + PackagesState
PackagesHistory = 5
TakenState = "taken"
TakenBucket = Module + "_" + TakenState
PredefinedListKey = "list"
ForgeBridgeModule = "mesh-delivery-forge-bridge"
AssignerModule = "mesh-delivery-assigner"
GateModule = "mesh-delivery-gate"
CheckerModule = "mesh-delivery-checker"
AssignmentsState = "assignments"
AssignmentsBucket = AssignerModule + "_" + AssignmentsState
AssignmentsHistory = 5
PreviewsBucket = CheckerModule + "_previews"
PreviewsHistory = 5
toolchainsState = "toolchains"
)
// ToolchainsBucket is the toolchains state of a build module (reads: mesh-build-go.toolchains, mesh-build-node.toolchains).
func ToolchainsBucket(module string) string { return module + "_" + toolchainsState }