mesh-knowledge: give the bus test's bundle a fixed clock, so it passes on any day (issue 540)
mesh/merge-gate pass: the change touches no module of the mesh's graph
mesh/repo-check pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)
mesh/delivery delivered

The bundle dated a reservation from the real day while the proposal kept the
fixture's 2026-10-11, so the date rule refused it on every later day.
This commit is contained in:
jochen
2026-10-12 12:23:38 +02:00
parent b707f27911
commit 7628b0e5b9
@@ -28,10 +28,15 @@ import (
const bundleVar = "MESH_KNOWLEDGE_TEST_BUNDLE"
// bundleDay is the bundle's clock: the day the fixture's proposals are dated (valid's Date), so a reservation and the
// proposal after it are of one day whatever day the test runs on (issue 540).
var bundleDay = time.Date(2026, 10, 11, 9, 0, 0, 0, time.UTC)
func TestMain(m *testing.M) {
if os.Getenv(bundleVar) == "1" {
// The bundle the bus test starts: the knowledge base as the runtime launches it, its store in memory.
k := newKB(newMemStore())
k.Now = func() time.Time { return bundleDay }
serve(k, os.Getenv("MESH_KNOWLEDGE_STATUS"))
os.Exit(0)
}