Every check the mesh had ran after a merge, on a machine: a manifest the node-engine refused (236), an identity a real machine's name made too long (263). merge-gate raises the mesh as the facts snapshot says it is and the mesh with the change, each in a throwaway store through the controller's own records, composes every machine twice and validates it with the node-engine's validator, and fails what the change breaks, naming the machine's roles and the module - plus a manifest the judging controller cannot read, a consumer left out of its grant, a module removed while a machine runs it, a new module the node-engine would refuse; it warns on a wide rebuild. The forge's new head of a pull request becomes a check the controller asks of the build seat: the head and, beside it, the controller the mesh runs, the catalogue, the host and the lab; a throwaway store and bus of the versions the mesh runs; the repository's merge-check.sh in the mesh's Go toolchain with no container runtime socket; then mesh-lab's replays. The verdict is said as checked, an error never a pass, and nothing is recorded or registered.
55 lines
3.8 KiB
Go
55 lines
3.8 KiB
Go
package link
|
||
|
||
// The contract of every message kind the controller consumes (novox/hq to-be 45 Phase 2, ADR 0227 rule
|
||
// 2 "how it is checked": a contract test per consumed message kind in the receiver's repository, and a
|
||
// check listing every consumed subject against the tests that name it).
|
||
//
|
||
// **Each kind says how an older one is told from a newer, and the tests that deliver n, then n−1.** A
|
||
// kind that carries no order says why none is needed — a word whose newest is simply the latest heard,
|
||
// a request answered once. The test beside it fails a kind the controller can be handed without an
|
||
// entry here, and an entry naming a test that does not exist.
|
||
|
||
// Contract is one consumed kind's order.
|
||
type Contract struct {
|
||
// Ordered is how an older message of this kind is refused; empty for a kind that carries no order.
|
||
Ordered string
|
||
// Unordered is why a kind needs no order; empty for an ordered one.
|
||
Unordered string
|
||
// Tests are the tests that deliver the newer and then the older, and assert the older refused.
|
||
Tests []string
|
||
}
|
||
|
||
// Contracts are every kind the controller consumes, by kind.
|
||
var Contracts = map[string]Contract{
|
||
KindReport: {Ordered: "by the epoch and sequence of the declaration it is about, then the node-engine's " +
|
||
"report sequence (order.go); an older account is refused and counted. A report from a node-engine " +
|
||
"that orders nothing is judged by the digest it names (issue 267)",
|
||
Tests: []string{"TestAnAccountOfAnOlderDeclarationIsRefusedByItsSequence",
|
||
"TestAnOlderReportOfTheSameDeclarationIsRefused", "TestAnAccountOfAnOlderDeclarationDoesNotReplaceTheNewer",
|
||
"TestAnAccountIsOlderByEpochThenSequenceThenReportSequence"}},
|
||
KindBuilt: {Ordered: "by the build's ask: an older ask finishing later is recorded and not registered (issue 219)",
|
||
Tests: []string{"TestAnOlderBuildHeardLaterDoesNotReplaceTheNewer"}},
|
||
KindSourceMoved: {Ordered: "by the merge's commit against what was built from it: a merge already acted on " +
|
||
"or older than the last look is history, not a second plan (issues 250, 266)",
|
||
Tests: []string{"TestAMergeOlderThanTheLastLookIsHistory", "TestAMergeMatchesTheSourcesBuiltFromIt"}},
|
||
KindHeartbeat: {Unordered: "a word that the machine is there: the newest heard is the newest said, and one " +
|
||
"lost is the next one"},
|
||
KindToolsHeartbeat: {Unordered: "a word that the node tools are there, as a machine's heartbeat"},
|
||
KindEnrolment: {Unordered: "a request answered once, under a token spent once: a second presentation is " +
|
||
"refused by the token, not by an order (issue 083)",
|
||
Tests: []string{"TestAnEnrolmentMetByAHeldTokenIsAskedToTryAgain"}},
|
||
KindModuleMoved: {Unordered: "the catalogue saying a module's current build moved: acted on by reading the " +
|
||
"catalogue's record, which is the order, so a late one reads the same record"},
|
||
KindPullUpdated: {Unordered: "a pull request's head, asked to be checked: each head is its own commit, and its " +
|
||
"verdict is set on that commit alone, so a head heard late is checked and judged as itself and never " +
|
||
"stands for a newer one (novox/hq to-be 45 §9)"},
|
||
KindCatchUp: {Unordered: "a catalogue asking what it missed: answered from the record, whenever asked"},
|
||
KindProvisioner: {Unordered: "a provider's newest word about a consumer, said again every fifteen minutes " +
|
||
"while it holds (ADR 0224): the condition keeps the last observed, and S8 says when the words stop. " +
|
||
"Its retirement word (ADR 0230) is unordered too: a waiting set is said again every fifteen minutes, " +
|
||
"and every other change is checked against the provider itself — `retire` and `cleanup` ask it, " +
|
||
"and the self-check's D11 asks it every run — so an older word read late is corrected by the next",
|
||
Tests: []string{"TestAProviderFailingAConsumerBreaksAllWellUntilItRecovers",
|
||
"TestARetirementWordIsKeptAsItsConditionNamingTheEmitterFromTheSubject"}},
|
||
}
|