SDK-C: a composer case carries no verdicts
The composer judges no manifest and the assigner's composition step sets no verdicts, so Case.Verdicts goes with its words; a case carrying verdicts was read before and is refused by a strict reader now. Builds: design 47 H §745, §764 (the indexer: the validation at the take-in); lead answer H-A-112 Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
This commit is contained in:
@@ -55,8 +55,8 @@ type Request struct {
|
||||
// Declarations asks each composed machine's declared paths (DepthCompose only).
|
||||
Declarations bool `json:"declarations,omitempty"`
|
||||
// Predefined is the list of predefined keys at the catalogue's root (predefined.json, novox/hq ADR 0348 §7). No
|
||||
// longer read: the composer judges no manifest (novox/hq ADR 0578 §5), the indexer's judge does, and its verdicts
|
||||
// come in each case's Verdicts. Kept so an asker that still sends it is read.
|
||||
// longer read: the composer judges no manifest (novox/hq ADR 0578 §5); a manifest is validated by its pipeline's step
|
||||
// validate (design 47 H §745). Kept so an asker that still sends it is read.
|
||||
Predefined catalogue.PredefinedList `json:"predefined,omitempty"`
|
||||
// Packages are the known packages a manifest's `packages` may name, each by its name in its own ecosystem (design 32:
|
||||
// a Go package's go.mod module path, a TypeScript package's package.json name), for the indexer's judge (novox/hq ADR
|
||||
@@ -80,14 +80,11 @@ type Request struct {
|
||||
// own assignments files, so a check composes a catalogue pull request's assignments (issue 1126, frombus.Placed); a null
|
||||
// assignments leaves nothing placed on the node. A case without them composes Input's.
|
||||
//
|
||||
// Verdicts are, by module, as raw JSON (this package is seat-neutral, novox/hq ADR 0635 §4; the node-engine's composer decodes the
|
||||
// mesh-catalog seat's manifest verdict, and Assignments the mesh-module-assigner seat's assignments), the indexer's judge's verdict on its manifest in Manifests (novox/hq ADR 0578 §5), put in by
|
||||
// the assigner or the checker that runs the composer: a refused one is held, composed as its stub so what it offers
|
||||
// still shapes the rest, and named in the case's verdict. A module without one is accepted (the mesh-catalog seat's ManifestVerdict, taken by its readers).
|
||||
// Assignments are raw JSON (this package is seat-neutral, novox/hq ADR 0635 §4; the node-engine's composer decodes the
|
||||
// mesh-module-assigner seat's assignments). A case carries no verdicts (design 47 H-A-112).
|
||||
type Case struct {
|
||||
Name string `json:"name"`
|
||||
Manifests map[string]Manifest `json:"manifests"`
|
||||
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
|
||||
@@ -164,8 +161,7 @@ type CaseVerdict struct {
|
||||
Machines map[string]Machine `json:"machines,omitempty"`
|
||||
}
|
||||
|
||||
// ManifestRead is one manifest as this mesh-sdk reads it: accepted, or refused with why: the indexer's verdict
|
||||
// (Case.Verdicts) or bytes that do not decode. A field the decoder does not know is set aside, named in SetAside, and
|
||||
// ManifestRead is one manifest as this mesh-sdk reads it: accepted, or refused with why: bytes that do not decode. A field the decoder does not know is set aside, named in SetAside, and
|
||||
// the manifest still accepted (novox/hq ADR 0578 §6).
|
||||
type ManifestRead struct {
|
||||
Accepted bool `json:"accepted"`
|
||||
|
||||
@@ -107,3 +107,13 @@ func TestAManifestIsItsBytesOrItsDigest(t *testing.T) {
|
||||
t.Fatalf("a digest the indexer does not hold: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
// design 47 H-A-112: a case carries no verdicts; the composer judges no manifest and the assigner's composition step sets none.
|
||||
func TestACaseCarriesNoVerdicts(t *testing.T) {
|
||||
var c Case
|
||||
dec := json.NewDecoder(strings.NewReader(`{"name":"c","manifests":{},"verdicts":{"demo":{}}}`))
|
||||
dec.DisallowUnknownFields()
|
||||
if err := dec.Decode(&c); err == nil {
|
||||
t.Error("a case's verdicts are read")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user