From eadfcd4cf8e727700d8906894f23d7f2dc5c09a3 Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 17 Nov 2026 12:01:12 +0100 Subject: [PATCH] composer: a case names the modules the revision gives no fingerprint, with its none words (G-24 H3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- modules/mesh-delivery-sdk/composer/composer.go | 5 +++++ modules/mesh-delivery-sdk/composer/composer_test.go | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/modules/mesh-delivery-sdk/composer/composer.go b/modules/mesh-delivery-sdk/composer/composer.go index 1f3907ae..fb214a52 100644 --- a/modules/mesh-delivery-sdk/composer/composer.go +++ b/modules/mesh-delivery-sdk/composer/composer.go @@ -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 diff --git a/modules/mesh-delivery-sdk/composer/composer_test.go b/modules/mesh-delivery-sdk/composer/composer_test.go index fd02622e..209f456a 100644 --- a/modules/mesh-delivery-sdk/composer/composer_test.go +++ b/modules/mesh-delivery-sdk/composer/composer_test.go @@ -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"`