Say in the fixture's comment how it was made; test an answered state without inputs (issue 1281)
mesh/repo-check head 839238fec9b9 merged into trunk 6079ddfe84ee — pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (typescript)…
mesh/merge-gate head 839238fec9b9 merged into trunk 6079ddfe84ee — pass: group fix/1281-outcome-is-a-build composed: every machine composes with the change…
mesh/delivery delivered
mesh/delivery-group group fix/1281-outcome-is-a-build delivered: every member is delivered

This commit is contained in:
2026-10-19 22:47:27 +00:00
parent 58373d65b4
commit 839238fec9
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -9,10 +9,11 @@ import (
// The fixture's path is what the controller writes for a build request: strings.Trim(path, "/") at mesh-controller
// internal/inventory/chain_requests.go:19, the module's directory in its repository (Build.Path, internal/chain/records.go:100).
// The fixture is a record the controller's own encoder wrote (json.Marshal of a chain.Build, mesh-controller
// The fixture started as a record the controller's own encoder wrote (json.Marshal of a chain.Build, mesh-controller
// internal/chain, a throwaway test run once and deleted) with build-agent's build-1792395447088936520 values, plus a
// manifest-digest and one made artifact (shape: mesh-controller internal/chain/records.go:91-117 Build, json tags, at commit
// 1f708e2d8d72e2c27dbeaba02f14c128d700eada; an outcome has no state key and a build asked after a merge no ref, records.go:57-59), which a BuildRecord does not carry.
// 1f708e2d8d72e2c27dbeaba02f14c128d700eada; an outcome has no state key and a build asked after a merge no ref, records.go:57-59), which a BuildRecord does not carry. It was then edited by hand
// to the controller's layout for an outcome: state and ref removed, the repository a clone URL (issue 1281).
func loadBuildFixture(t *testing.T) []byte {
t.Helper()
raw, err := os.ReadFile("testdata/build-record-build-agent.json")
+1 -1
View File
@@ -49,7 +49,7 @@ func TestIsTrunkBuild(t *testing.T) { // 1281/AC2
{"another branch", BuildRecord{Ref: "feat/x", SourceInputs: inputs}, false},
{"a commit", BuildRecord{Ref: "9efdd87a", SourceInputs: inputs}, false},
{"asked", BuildRecord{State: "asked", SourceInputs: inputs}, false},
{"answered, state built", BuildRecord{State: "built", SourceInputs: inputs}, false},
{"answered, state answered, no source inputs", BuildRecord{State: "answered"}, false},
{"failed", BuildRecord{Failed: "boom", Ref: "main", SourceInputs: inputs}, false},
{"no source inputs", BuildRecord{Ref: "main"}, false},
{"no ref and no source inputs", BuildRecord{}, false},