composer: a case names the modules the revision gives no fingerprint, with its none words (G-24 H3)

The assigner fills it from the revision; the node-engine's composer reads it alone to tell a build that can
never be made, and judges the machine with that module held instead of leaving it not judged.

Builds: design 47 G §721, §722, A-470j, A-470k
This commit is contained in:
2026-11-17 12:01:12 +01:00
parent 09224d2cdf
commit eadfcd4cf8
2 changed files with 14 additions and 0 deletions
@@ -90,6 +90,11 @@ type Case struct {
Verdicts map[string]json.RawMessage `json:"verdicts,omitempty"`
Kept map[string]map[string]Manifest `json:"kept,omitempty"`
Assignments map[string]json.RawMessage `json:"assignments,omitempty"`
// None is, by module, the words of the revision's none for each module of the case the revision gives no fingerprint
// (its build can never be made: builders disagree, no build module), the same word as the revision's. The assigner
// fills it from the revision it reads for the run; the composer reads it alone to tell a build that can never be made
// (design 47 G A-470j, A-470k).
None map[string]string `json:"none,omitempty"`
}
// Manifest is a module's manifest as its repository holds it (Raw, the bytes), or the digest the delivery indexer keeps
@@ -63,6 +63,15 @@ func TestAManifestIsItsBytesOrItsDigest(t *testing.T) {
if back, derr := Decode(wire); err != nil || derr != nil || back.BlameTries != 20 || !strings.Contains(string(wire), `"blame_tries":20`) {
t.Errorf("blame_tries 20 went as %s and read back %d (%v, %v)", wire, back.BlameTries, err, derr)
}
// H3 (design 47 G A-470j, A-470k): a case's none, each module the revision gives no fingerprint with its none words,
// reads back whole; a case naming none leaves the field off the wire.
wire, err = json.Marshal(Request{V: Version, Cases: []Case{{Name: "change", Manifests: map[string]Manifest{},
None: map[string]string{"lidarr": "builders disagree: node"}}, {Name: "trunk", Manifests: map[string]Manifest{}}}})
if back, derr := Decode(wire); err != nil || derr != nil || back.Cases[0].None["lidarr"] != "builders disagree: node" ||
back.Cases[1].None != nil || !strings.Contains(string(wire), `"none":{"lidarr":"builders disagree: node"}`) ||
strings.Count(string(wire), `"none"`) != 1 {
t.Errorf("a case's none went as %s and read back %+v (%v, %v)", wire, back.Cases, err, derr)
}
one := Machine{}
one.Blamed = append(one.Blamed, struct {
Module string `json:"module"`