The checks running are readable through reads and carry when each started (issue 1155)

This commit is contained in:
2026-10-18 20:55:18 +02:00
parent 3b49d7044f
commit 0273609090
6 changed files with 159 additions and 4 deletions
+15 -2
View File
@@ -56,7 +56,7 @@ var (
// check ends; a key not renewed within the bucket's age is a builder that died, and is gone. A builder that takes a
// waiting request for a head and trunk commit a key names drops it. **Written by the build seat's holders, several by
// design** — each the key of the check it runs.
CheckRunningBucket = BucketName(ControllerSeat, "checks-running")
CheckRunningBucket = BucketName(ControllerSeat, ChecksRunning)
// DeliveryMergesBucket holds the merges mesh-delivery announced it made, each with the ask whose Approve it merged
// on (novox/hq ADR 0420 §7, issue 1025): per merge a key `<owner>/<repo>/<number>/<head sha>` holding the
// announcement, kept DeliveryMergesKeptFor. What lets the build of a moved module register it from its new
@@ -133,9 +133,22 @@ func ChainBuckets() []string { return []string{BuildsBucket, RolloutsBucket, Ass
// ControllerMirrors are the local names of the controller's buckets a module may read: the record mirrors and the
// chain's buckets.
func ControllerMirrors() []string {
return []string{MirrorAssignments, MirrorDeclaredConfig, MirrorPredefined, ChainBuilds, ChainRollouts}
return []string{MirrorAssignments, MirrorDeclaredConfig, MirrorPredefined, ChainBuilds, ChainRollouts, ChecksRunning}
}
// MirrorsWrittenByAnother are the controller's mirrors whose writer is not the controller, each with its reason: the rule
// that a mirror is written by the controller alone (TestTheMirrorsListAndTheWritersTableAgree) has these exceptions and no
// other.
var MirrorsWrittenByAnother = map[string]string{
ChecksRunning: "the checks running are said by the builders themselves: every machine holding the build seat puts the " +
"key of the check it runs, at its start and at each heartbeat, and deletes it when the check ends, so the " +
"controller asserts the bucket and writes none of its keys (ADR 0406 §3); it is readable through `reads` so " +
"the watchman sees a check that stopped (ADR 0433 §6)",
}
// ChecksRunning is the local name of the bucket of the checks running, as a reader names it in `reads`.
const ChecksRunning = "checks-running"
// The mirrors' caps (design 54 §5): one value per key, no age, 64 KiB a value, 64 MiB a bucket.
const (
MirrorValueBytes = 64 << 10