// Package replays is the lab's replay of every core incident (novox/hq to-be 45 ยง9, M9): a scripted // replay of what happened, asserting the rule's outcome, run before every merge of a core repository โ€” // and proved, once, to fail on the commit before its fix and to pass on the fix. // // **Where a replay lives.** A replay of one component's logic is a test in that component's repository, // written only with what the component had before its fix, so it can be laid over the older commit // (the controller's replays_test.go). A replay of what the mesh runs rather than what it wrote โ€” the bus // server's release, the resolver the catalogue configures, under both C libraries โ€” lives here, where a // container runtime and a bus of a given release are at hand. Every one is in Register, with the issue, // the fix, and how the prover runs it at a commit. // // **A new core issue resolves with its replay added here, or with a stated reason none is possible** // (hq 00-META/checks/cycle.py holds the issue to it: `replay:` names an entry here, or `replay-none:` // says why). package replays // Kind is how a replay is run at a commit. type Kind string const ( // InRepository is a test in the fixed repository, laid over the commit and run there with go test. InRepository Kind = "test" // Bus is the bus replay here, run against a server of the release the catalogue pinned at the commit. Bus Kind = "bus" // Resolver is the resolver replay here, run with the catalogue's resolver configuration at the commit, // asked by a program under musl and one under glibc. Resolver Kind = "resolver" // Gate is a test of the merge gate itself: before its fix there was no check to fail, so the commit // before is held to fail by not having it. Gate Kind = "gate" ) // Replay is one incident, replayed. type Replay struct { ID string Issue int // What is the incident in a line, and Asserts the rule's outcome the replay holds. What, Asserts string Kind Kind // Repository is where the fix is, and Fix the fix's commit there: the replay must fail on Fix's first // parent and pass on Fix. Repository string Fix string // Before is the commit the replay must fail on, when that is not Fix's first parent: a fix still on its // branch is proved against the main it branched from. Set to "" once the fix is merged. Before string // Package and Test are where the replay is run: a package of Repository for InRepository and Gate, // of this module otherwise; Files are the files laid over the commit, from where the replay lives. Package string Test string Files []string // Home is where the replay's files live, when that is not the fix: the repository and ref. Home, HomeRef string } // Register is every replay, by incident. var Register = []Replay{ {ID: "R236", Issue: 236, Kind: Gate, Repository: "mesh-controller", Fix: "feat/merge-gate", Before: "origin/main", What: "a login manager's service passed the catalogue check and was refused whole by the node-engine", Asserts: "a manifest the node-engine refuses fails its pull request, naming the machine and the module", Package: "./cmd/mesh-controller", Test: "TestIssue236", Files: []string{"cmd/mesh-controller/merge_gate_test.go"}}, {ID: "R262", Issue: 262, Kind: Resolver, Repository: "mesh-catalog", Fix: "20603b63e67323f2c725b242c0ea87281d4dee93", What: "an Alpine container could not find a machine by its mesh name: NXDOMAIN for IPv6 is final to musl", Asserts: "every machine's name resolves through the catalogue's resolver under musl and under glibc", Package: ".", Test: "TestReplay262"}, {ID: "R263", Issue: 263, Kind: InRepository, Repository: "mesh-controller", Fix: "6d620f77c3f3f967be953ff760823c6a51b7b8d3", What: "a consumer's 26-character identity refused the resolver holder's whole declaration", Asserts: "a provider's machine composes whatever its consumers are called", Package: "./cmd/mesh-controller", Test: "TestReplay263", Files: []string{"cmd/mesh-controller/replays_test.go"}, Home: "mesh-controller", HomeRef: "feat/replays"}, {ID: "R266", Issue: 266, Kind: Bus, Repository: "mesh-catalog", Fix: "0275c2e", What: "a merge on the bus was never handed to the controller: 2.10 skipped messages on a consumer with several filters", Asserts: "a consumer filtered like the controller's is handed every followed message under the mesh's traffic", Package: ".", Test: "TestReplay266"}, {ID: "R273", Issue: 273, Kind: InRepository, Repository: "mesh-controller", Fix: "8bfaf1523ed2dddde80daa0994f1044e59db44b1", What: "a rule for the resolver re-bound a machine's database consumers to empty databases elsewhere", Asserts: "a consumer beside its store stays bound to it while another machine holds the store's seat", Package: "./cmd/mesh-controller", Test: "TestReplay273", Files: []string{"cmd/mesh-controller/replays_test.go"}, Home: "mesh-controller", HomeRef: "feat/replays"}, } // Find is the replay of that id, or of that issue. func Find(id string) (Replay, bool) { for _, r := range Register { if r.ID == id || r.ID == "R"+id { return r, true } } return Replay{}, false }