From 9904a03b51dd326f2e249006226e1ad5d98259c8 Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 1 Nov 2026 02:18:56 +0100 Subject: [PATCH] =?UTF-8?q?Let=20the=20merge=20preview=20and=20the=20provi?= =?UTF-8?q?ded=20manifest=20decode=20instead=20of=20judging=20(ADR=200578?= =?UTF-8?q?=20=C2=A73)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue 1585, S12 (mesh-sdk half): buildstep's named paths and delivery.ProvidedManifest read with catalogue.Decode. Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL --- go/buildstep/trees.go | 9 +++++---- go/delivery/provided.go | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/go/buildstep/trees.go b/go/buildstep/trees.go index 65a775e..b63065f 100644 --- a/go/buildstep/trees.go +++ b/go/buildstep/trees.go @@ -75,11 +75,12 @@ func ModuleTrees(ctx context.Context, run forgekey.Runner, env []string, dir, co } // narrow sets mt's Paths and its named Tree when the module's manifest names paths on every artifact (novox/hq ADR 0499 -// clause 2): one `git ls-tree -z` gives each named path's object at commit. The merge preview reads the manifest here, as -// the indexer does, with catalogue.ParseManifestForInputs (issue 1751), and no other build step reads paths from one (ADR 0495 clause 1). A manifest that does not parse -// is not narrowed: the indexer gives it none. A named path absent at commit fails, naming the module and the path. +// clause 2): one `git ls-tree -z` gives each named path's object at commit. The merge preview decodes the manifest here +// (catalogue.Decode: a build step judges no manifest, novox/hq ADR 0578 §3), and no other build step reads paths from one +// (ADR 0495 clause 1). A manifest that does not decode is not narrowed: the indexer gives it none. A named path absent at +// commit fails, naming the module and the path. func narrow(ctx context.Context, run forgekey.Runner, env []string, dir, commit, mdir string, raw []byte, mt *ModuleTree) error { - m, err := catalogue.ParseManifestForInputs(raw) + m, err := catalogue.Decode(raw) if err != nil { return nil } diff --git a/go/delivery/provided.go b/go/delivery/provided.go index 712453e..bcb58e6 100644 --- a/go/delivery/provided.go +++ b/go/delivery/provided.go @@ -29,9 +29,10 @@ func ProvidedManifest(module string) (catalogue.Manifest, []byte, error) { if err != nil { return catalogue.Manifest{}, nil, err } - m, err := catalogue.ParseManifestForInputs(raw) + // Decoded as every reader decodes a manifest (novox/hq ADR 0578 §3); its judgement is the indexer's. + m, err := catalogue.Decode(raw) if err != nil { - return catalogue.Manifest{}, raw, fmt.Errorf("delivery: the manifest mesh-sdk provides for %s is refused by its own reader: %w", module, err) + return catalogue.Manifest{}, raw, fmt.Errorf("delivery: the manifest mesh-sdk provides for %s does not decode: %w", module, err) } return m, raw, nil }