From fb0be84e2470ba85cdf848a75f1be37931e53bcc Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 28 Oct 2026 17:59:27 +0100 Subject: [PATCH] View: drop indexer_placement and its reads, the seat mesh-placement answers placement (issue 1126) --- .../cmd/mesh-delivery-view-tools/main.go | 30 +- .../cmd/mesh-delivery-view-tools/main_test.go | 106 ------ .../mesh-delivery-view/internal/view/read.go | 332 ------------------ modules/mesh-delivery-view/manifest_test.go | 4 +- modules/mesh-delivery-view/module.json | 3 - 5 files changed, 4 insertions(+), 471 deletions(-) diff --git a/modules/mesh-delivery-view/cmd/mesh-delivery-view-tools/main.go b/modules/mesh-delivery-view/cmd/mesh-delivery-view-tools/main.go index 9231f3e..d76f73b 100644 --- a/modules/mesh-delivery-view/cmd/mesh-delivery-view-tools/main.go +++ b/modules/mesh-delivery-view/cmd/mesh-delivery-view-tools/main.go @@ -85,30 +85,6 @@ func Tools(r view.Reader, u view.UsageReader) []stdio.Tool { mods, err := r.Modules(only) return map[string]any{"modules": mods}, err }}, - {Name: view.PlacementReadTool, - Description: "Placement candidates and the shadow answers per node: where modules run, as the indexer read it from the catalogue's placement files at the last merge (placement., novox/hq ADR 0549), " + - "and beside it, the candidates, each open catalogue pull request's placement of a node that differs from the trunk's (placement-candidates ., issue 1126) " + - "with that node's shadow answer from its .node have (answered: same, differs, refused, stale for an earlier head, none when it has not answered), as the node wrote it: " + - "the modules that are the same, those that differ with each differing resource's why, bodies and the JSON paths that differ, the refusals. " + - "Each node's placement lists its modules in order with their host ports, bindings and settings placement, its pins and the seats its modules hold, and the catalogue revision. " + - "With node, that node's; with module, every node placing it; with neither, every node's. Keys that do not read are listed as unreadable. " + - "With summary true, only the compact form: per node and candidate the answer, the counts of same and differing, and per differing resource its module, id, why and paths, with no bodies and no placement (a read for one node is about 60 KB whole). Read-only.", - Input: map[string]any{"type": "object", "properties": map[string]any{ - "node": nodeModule["node"], - "module": nodeModule["module"], - "summary": map[string]any{"type": "boolean", "description": "the compact form: the answer, the counts and the differing resources' paths, without bodies or placements"}}}, - Run: func(args map[string]any) (any, error) { - node, module := nodeModuleOf(args) - out, err := r.Placement(node, module) - if err != nil { - return out, err - } - if summary, _ := args["summary"].(bool); summary { - rows, _ := out["candidates"].([]view.CandidateRow) - return map[string]any{"candidates": view.SummarizeCandidates(rows)}, nil - } - return out, nil - }}, {Name: view.CandidateReadTool, Description: "What the indexer stored for one candidate (the open pull requests of a branch) under candidates., as stored: " + "the pull requests and heads, the base, and per pull request the touched modules with their new-form fingerprint (fp2) or why " + @@ -247,10 +223,8 @@ func read(state stdio.KeptState) view.StateRead { func main() { r := view.Reader{State: read(stdio.State("mesh-delivery-indexer.modules")), Builds: read(stdio.State("mesh-delivery-builder.builds")), CandidatesState: read(stdio.State("mesh-delivery-indexer.candidates")), WantsState: read(stdio.State("mesh-delivery-assigner.wants")), DifferencesState: read(stdio.State("mesh-delivery-assigner.differences")), HavesState: read(stdio.State("node-engine.have")), - ReachState: read(stdio.State("reach")), - PlacementState: read(stdio.State("mesh-delivery-indexer.placement")), - PlacementCandidatesState: read(stdio.State("mesh-delivery-indexer.placement-candidates")), - HeardState: read(stdio.State("mesh-delivery-indexer.heard"))} + ReachState: read(stdio.State("reach")), + HeardState: read(stdio.State("mesh-delivery-indexer.heard"))} u := view.UsageReader{Haves: r.HavesState, Resolved: read(stdio.State("mesh-config.resolved")), Tries: read(stdio.State("mesh-delivery-checker.tries")), Steps: map[string]view.StateRead{}, Pauses: map[string]view.StateRead{}, Backlog: backlogOf(socket())} for _, lang := range delivery.AskLanguages { diff --git a/modules/mesh-delivery-view/cmd/mesh-delivery-view-tools/main_test.go b/modules/mesh-delivery-view/cmd/mesh-delivery-view-tools/main_test.go index e2ec081..3cb27d2 100644 --- a/modules/mesh-delivery-view/cmd/mesh-delivery-view-tools/main_test.go +++ b/modules/mesh-delivery-view/cmd/mesh-delivery-view-tools/main_test.go @@ -135,112 +135,6 @@ func TestModulesToolAnswersEveryKeyAsStored(t *testing.T) { if len(only) != 1 || string(only["b"]) != withNone { t.Errorf("none2 modules = %v", only) } - - // 1126 (ADR 0549 §2): indexer_placement answers a node's key as stored, every node placing a module, or every node's, - // and lists a key that does not read. - const ace, g14 = `{"v":1,"node":"ace","revision":"m1","modules":[{"module":"plex"}]}`, `{"v":1,"node":"g14","revision":"m1","modules":[{"module":"zsh"},{"module":"plex"}]}` - p := view.Reader{PlacementState: fake{"placement.ace": ace, "placement.g14": g14, "placement.bad": `{"v":1}`, "other": "{}"}.reader().State} - got := func(args map[string]any) map[string]json.RawMessage { - t.Helper() - out, err := run(t, p, view.PlacementReadTool, args) - if err != nil { - t.Fatal(err) - } - return out.(map[string]any)["placement"].(map[string]json.RawMessage) - } - if one := got(map[string]any{"node": "ace"}); len(one) != 1 || string(one["ace"]) != ace { - t.Errorf("node ace = %v", one) - } - if zsh := got(map[string]any{"module": "zsh"}); len(zsh) != 1 || string(zsh["g14"]) != g14 { - t.Errorf("module zsh = %v", zsh) - } - out, err = run(t, p, view.PlacementReadTool, map[string]any{}) - if all := out.(map[string]any); err != nil || len(all["placement"].(map[string]json.RawMessage)) != 2 || len(all["unreadable"].([]string)) != 2 { - t.Errorf("every node = %v, %v", all, err) - } - if _, err := run(t, p, view.PlacementReadTool, map[string]any{"node": "novox"}); err == nil || !strings.Contains(err.Error(), "no placement of novox") { - t.Errorf("a node with no key: %v", err) - } - if c := out.(map[string]any)["candidates"].([]view.CandidateRow); len(c) != 0 { - t.Errorf("with no candidate open: %v", c) - } - - // ADR 0559 §7 (issue 1126): beside the trunk's, each open candidate key and the node's answer from its .node: - // answered at the key's head and revision, at an earlier head (stale), or not at all (none); a node the trunk does not - // place yet is shown by its candidate alone; ace, placed on the trunk with its file unchanged (no key of its own), is - // shown with its answer, counted by the head alone. - const h1, h2 = "1111111111111111111111111111111111111111", "2222222222222222222222222222222222222222" - cand := func(node, head string, placed bool) string { - pl := `,"placement":{"v":1,"node":"` + node + `","modules":[{"module":"plex"}]}` - if !placed { - pl = "" - } - return `{"v":1,"group":"feat/p","pull":{"repository":"novox/mesh-catalog","number":9,"head":"` + head + `"}` + pl + `}` - } - cands := fake{"feat/p.g14": cand("g14", h2, false), "feat/p.novox": cand("novox", h2, true)} - revs := map[string]uint64{"feat/p.g14": 5, "feat/p.novox": 6} - p.PlacementCandidatesState = view.StateRead{Keys: cands.reader().State.Keys, GetEntry: func(key string) (json.RawMessage, uint64, error) { - raw, _ := cands.reader().State.Get(key) - return raw, revs[key], nil - }} - p.HavesState = fake{ - // ace's answer as the node wrote it, with what this view's mesh-sdk may not know (issue 1126, probe #532: the - // bodies of each difference were dropped on the way): shown as stored. - "ace.node": `{"v":1,"composed":"x","candidates":{"feat/p":{"head":"` + h2 + `","verdict":"same","same":["plex"],` + - `"differs":[],"note":"took over a minute","future":{"bodies":[{"id":"x","composed":""}]}}}}`, - "g14.node": `{"v":1,"composed":"x","candidates":{"feat/p":{"head":"` + h1 + `","revision":2,"verdict":"same"}}}`, - }.reader().State - out, err = run(t, p, view.PlacementReadTool, map[string]any{}) - if err != nil { - t.Fatal(err) - } - answered := map[string]string{} - for _, c := range out.(map[string]any)["candidates"].([]view.CandidateRow) { - answered[c.Node] = c.Answered - if c.Node == "ace" && (!strings.Contains(string(c.Answer), `"future":{"bodies"`) || !strings.Contains(string(c.Answer), `"note":"took over a minute"`)) { - t.Errorf("ace's answer is not shown as stored: %s", c.Answer) - } - } - if want := map[string]string{"ace": "same", "g14": view.AnswerStale, "novox": view.AnswerNone}; fmt.Sprint(answered) != fmt.Sprint(want) { - t.Errorf("answers %v, want %v", answered, want) - } - out, err = run(t, p, view.PlacementReadTool, map[string]any{"node": "novox"}) - if c := out.(map[string]any)["candidates"].([]view.CandidateRow); err != nil || len(c) != 1 || c[0].Pull.Head != h2 || len(out.(map[string]any)["placement"].(map[string]json.RawMessage)) != 0 { - t.Errorf("a node placed by its candidate alone: %v, %v", out, err) - } - out, _ = run(t, p, view.PlacementReadTool, map[string]any{"module": "plex"}) - if c := out.(map[string]any)["candidates"].([]view.CandidateRow); len(c) != 2 { - t.Errorf("the candidates placing plex: %v (g14's removes its file)", c) - } - - // Issue 1126, summary: true keeps the verdict, the counts and each differing resource's module, id, why and paths, and - // drops the bodies and the placements; a field the node adds to a differing resource (paths) rides through whole. - p.HavesState = fake{ - "ace.node": `{"v":1,"composed":"x","candidates":{"feat/p":{"head":"` + h2 + `","revision":0,"verdict":"differs","same":["plex","zsh"],` + - `"differs":[{"module":"brother","resource":"brother.cfg","composed":"sha256:a","running":"sha256:b","why":"the resource differs",` + - `"bodies":[{"id":"brother.cfg","why":"the resource differs","paths":["sealed","links.0"],"composed":"BODYBODYBODY","running":"BODYBODYBODY"}]}]}}}`, - }.reader().State - out, err = run(t, p, view.PlacementReadTool, map[string]any{"summary": true}) - if err != nil { - t.Fatal(err) - } - sums := out.(map[string]any)["candidates"].([]view.CandidateSummary) - raw, _ := json.Marshal(sums) - var ace2 *view.CandidateSummary - for i := range sums { - if sums[i].Node == "ace" { - ace2 = &sums[i] - } - } - if _, has := out.(map[string]any)["placement"]; has || ace2 == nil || ace2.Verdict != "differs" || ace2.Same != 2 || ace2.Differing != 1 || - strings.Contains(string(raw), "BODY") || !strings.Contains(string(raw), `"paths":["sealed","links.0"]`) || !strings.Contains(string(raw), `"module":"brother"`) || - !strings.Contains(string(raw), `"why":"the resource differs"`) { - t.Errorf("the summary of a differing answer: %s", raw) - } - whole, _ := run(t, p, view.PlacementReadTool, map[string]any{}) - if w, _ := json.Marshal(whole); !strings.Contains(string(w), "BODYBODYBODY") || !strings.Contains(string(w), `"paths"`) { - t.Errorf("the whole answer drops what the node wrote: %s", w) - } } const ( diff --git a/modules/mesh-delivery-view/internal/view/read.go b/modules/mesh-delivery-view/internal/view/read.go index 928a37e..05ee803 100644 --- a/modules/mesh-delivery-view/internal/view/read.go +++ b/modules/mesh-delivery-view/internal/view/read.go @@ -7,7 +7,6 @@ package view import ( "encoding/json" "fmt" - "maps" "slices" "sort" "strings" @@ -21,8 +20,6 @@ import ( const ( ModuleReadTool = "indexer_module" ModulesReadTool = "indexer_modules" - // PlacementReadTool reads the indexer's placement (novox/hq ADR 0549 §2, issue 1126). - PlacementReadTool = "indexer_placement" ) // StateRead reads the indexer's modules state, as the view's reads grant it: its keys and a key's stored value (nil for a key with none). @@ -45,9 +42,6 @@ type Reader struct { DifferencesState StateRead // the assigner's differences HavesState StateRead // the node-engine's haves ReachState StateRead // the view's own reach (ADR 0556) - PlacementState StateRead // the indexer's placement - // PlacementCandidatesState is the indexer's placement candidates (issue 1126); unset reads none. - PlacementCandidatesState StateRead // HeardState is the FORGE messages the indexer handled (issue 1126 note 76); unset reads none. HeardState StateRead } @@ -655,329 +649,3 @@ func (r Reader) Differences(node, module string) (KeptAnswer, error) { func (r Reader) Haves(node, module string) (KeptAnswer, error) { return r.kept(r.HavesState, "the haves", node, module) } - -// Placement is the indexer's placement as stored (ADR 0549 §2): one node's key with node, every node placing a module -// with module (each node's key whole, so its pins, ports and bindings are beside the module), and every node's key with -// neither. A key that does not read as a placement is listed as unreadable, never dropped. -// -// Beside it, candidates (issue 1126, ADR 0549 §4): each open catalogue pull request's placement of a node that differs from -// the trunk's (the indexer's placement-candidates `.`), narrowed the same way, each with the node's answer from -// its `.node` have and whether that answer is for the candidate as it stands (its head and key revision). -func (r Reader) Placement(node, module string) (map[string]any, error) { - node, module = strings.TrimSpace(node), strings.TrimSpace(module) - if r.PlacementState.Keys == nil || r.PlacementState.Get == nil { - return nil, fmt.Errorf("the placement state cannot be read here") - } - candidates, err := r.PlacementCandidates(node, module) - if err != nil { - return nil, err - } - if node != "" { - key, err := delivery.PlacementKey(node) - if err != nil { - return nil, err - } - raw, err := r.PlacementState.Get(key) - if err != nil { - return nil, err - } - if len(raw) == 0 && len(candidates) == 0 { - return nil, fmt.Errorf("no placement of %s: the catalogue holds no placement file for it, or the indexer has read none yet", node) - } - out := map[string]json.RawMessage{} - if len(raw) > 0 { - out[node] = raw - } - return map[string]any{"placement": out, "candidates": candidates}, nil - } - keys, err := r.PlacementState.Keys() - if err != nil { - return nil, err - } - sort.Strings(keys) - values, err := r.PlacementState.values(keys) - if err != nil { - return nil, err - } - out := map[string]json.RawMessage{} - var unreadable []string - for i, key := range keys { - n, err := delivery.ParsePlacementKey(key) - if err != nil { - unreadable = append(unreadable, key) - continue - } - p, err := delivery.DecodePlacement(values[i]) - if err != nil { - unreadable = append(unreadable, key) - continue - } - if module != "" && !slices.Contains(p.Assigned(), module) { - continue - } - out[n] = values[i] - } - return map[string]any{"placement": out, "unreadable": unreadable, "candidates": candidates}, nil -} - -// The states of a node's answer to a placement candidate, as the view and the assigner's check read it. -const ( - // AnswerNone: the node's have holds no answer for the candidate's group (a node asleep, or not composing yet). - AnswerNone = "none" - // AnswerStale: the node answered an earlier head or revision of the candidate. - AnswerStale = "stale" -) - -// CandidateRow is one placement candidate and the node's answer to it. -type CandidateRow struct { - Group string `json:"group"` - Node string `json:"node"` - Pull delivery.Head `json:"pull"` - Revision uint64 `json:"revision"` - Placement json.RawMessage `json:"placement,omitempty"` // the candidate value as stored - Removes bool `json:"removes,omitempty"` // the head removes the node's file - Answered string `json:"answered"` // same, differs, refused, stale or none - // Answer is the node's answer as its node wrote it, whole: what this view's mesh-sdk does not know rides through (issue - // 1126, probe #532: each difference's bodies were dropped when the answer was decoded and encoded again here). - Answer json.RawMessage `json:"answer,omitempty"` -} - -// PlacementCandidates is every placement candidate, narrowed by node and by a module its placement names, with each -// node's answer; beside each group's keys, a row for every other node placed at the group's head or on the trunk, whose -// answer counts by the head alone (its file is unchanged, so it has no key, ADR 0559 §5, §7). A key that does not read is -// a row naming only its key's group and node, answered none, never dropped. -func (r Reader) PlacementCandidates(node, module string) ([]CandidateRow, error) { - st := r.PlacementCandidatesState - if st.Keys == nil || st.GetEntry == nil { - return []CandidateRow{}, nil - } - keys, err := st.Keys() - if err != nil { - return nil, fmt.Errorf("reading the placement candidates: %w", err) - } - sort.Strings(keys) - // The trunk's placed nodes, each with its modules. - trunk := map[string][]string{} - if r.PlacementState.Keys != nil && r.PlacementState.Get != nil { - if tkeys, err := r.PlacementState.Keys(); err == nil { - for _, k := range tkeys { - n, err := delivery.ParsePlacementKey(k) - if err != nil { - continue - } - if raw, err := r.PlacementState.Get(k); err == nil && len(raw) > 0 { - if p, err := delivery.DecodePlacement(raw); err == nil { - trunk[n] = p.Assigned() - } - } - } - } - } - type group struct { - pull delivery.Head - keyed map[string]bool - placed map[string]bool - } - groups := map[string]*group{} - answers := map[string]map[string]storedAnswer{} // node, then group - answerOf := func(n, g string) (storedAnswer, bool) { - if _, read := answers[n]; !read { - answers[n] = r.candidateAnswers(n) - } - a, ok := answers[n][g] - return a, ok - } - rows := []CandidateRow{} - for _, key := range keys { - gname, n, err := delivery.ParsePlacementCandidateKey(key) - if err != nil { - continue - } - raw, rev, err := st.GetEntry(key) - if err != nil { - return nil, fmt.Errorf("reading %s: %w", key, err) - } - if len(raw) == 0 { - continue - } - g := groups[gname] - if g == nil { - g = &group{keyed: map[string]bool{}, placed: map[string]bool{}} - groups[gname] = g - } - g.keyed[n] = true - row := CandidateRow{Group: gname, Node: n, Revision: rev, Placement: raw, Answered: AnswerNone} - c, err := delivery.DecodePlacementCandidate(raw) - if err == nil { - g.pull = c.Pull - if c.Placement != nil { - g.placed[n] = true - } - row.Pull, row.Removes = c.Pull, c.Placement == nil - if module != "" && (c.Placement == nil || !slices.Contains(c.Placement.Assigned(), module)) { - continue - } - } else if module != "" { - continue - } - if node != "" && n != node { - continue - } - if a, ok := answerOf(n, gname); ok && err == nil { - row.Answer = a.raw - row.Answered = AnswerOf(c.Pull.Head, rev, true, a.a) - } - rows = append(rows, row) - } - for _, gname := range slices.Sorted(maps.Keys(groups)) { - g := groups[gname] - if g.pull.Head == "" { - continue - } - others := map[string]bool{} - for n := range trunk { - others[n] = true - } - for n := range g.placed { - others[n] = true - } - for _, n := range slices.Sorted(maps.Keys(others)) { - if g.keyed[n] || (node != "" && n != node) || (module != "" && !slices.Contains(trunk[n], module)) { - continue - } - row := CandidateRow{Group: gname, Node: n, Pull: g.pull, Answered: AnswerNone} - if a, ok := answerOf(n, gname); ok { - row.Answer = a.raw - row.Answered = AnswerOf(g.pull.Head, 0, false, a.a) - } - rows = append(rows, row) - } - } - return rows, nil -} - -// CandidateSummary is one placement candidate in the compact form of indexer_placement (summary: true): the node's answer -// counted and its differing resources named, without the candidate's value or any resource body. -type CandidateSummary struct { - Group string `json:"group"` - Node string `json:"node"` - Pull delivery.Head `json:"pull"` - Revision uint64 `json:"revision"` - Removes bool `json:"removes,omitempty"` - Answered string `json:"answered"` - // Verdict, Head and the counts are the node's answer as it wrote it; Differs names each differing module and, in - // Resources, each differing resource with why and the JSON paths that differ when the node says them. - Verdict string `json:"verdict,omitempty"` - Head string `json:"head,omitempty"` - Same int `json:"same"` - Differing int `json:"differing"` - Differs []map[string]any `json:"differs,omitempty"` - Added int `json:"added,omitempty"` - Removed int `json:"removed,omitempty"` - Refused string `json:"refused,omitempty"` - Refusals json.RawMessage `json:"refusals,omitempty"` -} - -// summaryKeep are the keys a summary keeps of a differing module and of a differing resource; a body (composed, running) -// is not among them, and a key a newer node adds is left out until it is named here. -var ( - summaryModuleKeys = []string{"module", "resource", "why", "paths"} - summaryResourceKeys = []string{"id", "why", "paths"} -) - -// SummarizeCandidates is the compact form of rows: per candidate the answer's verdict, the counts of same and differing -// resources, and per differing resource its module, id, why and paths list when the node says one, with no body. -func SummarizeCandidates(rows []CandidateRow) []CandidateSummary { - out := make([]CandidateSummary, 0, len(rows)) - pick := func(m map[string]json.RawMessage, keys []string) map[string]any { - o := map[string]any{} - for _, k := range keys { - if v, ok := m[k]; ok { - o[k] = v - } - } - return o - } - for _, row := range rows { - sum := CandidateSummary{Group: row.Group, Node: row.Node, Pull: row.Pull, Revision: row.Revision, Removes: row.Removes, Answered: row.Answered} - var a struct { - Verdict string `json:"verdict"` - Head string `json:"head"` - Same []json.RawMessage `json:"same"` - Differs []map[string]json.RawMessage `json:"differs"` - Added []json.RawMessage `json:"added"` - Removed []json.RawMessage `json:"removed"` - Refusals json.RawMessage `json:"refusals"` - Refused string `json:"refused"` - } - if len(row.Answer) > 0 && json.Unmarshal(row.Answer, &a) == nil { - sum.Verdict, sum.Head, sum.Same, sum.Added, sum.Removed = a.Verdict, a.Head, len(a.Same), len(a.Added), len(a.Removed) - sum.Refused, sum.Refusals = a.Refused, a.Refusals - for _, d := range a.Differs { - m := pick(d, summaryModuleKeys) - var bodies []map[string]json.RawMessage - if json.Unmarshal(d["bodies"], &bodies) == nil && len(bodies) > 0 { - res := make([]map[string]any, 0, len(bodies)) - for _, b := range bodies { - res = append(res, pick(b, summaryResourceKeys)) - } - m["resources"] = res - sum.Differing += len(bodies) - } else { - sum.Differing++ - } - sum.Differs = append(sum.Differs, m) - } - } - out = append(out, sum) - } - return out -} - -// AnswerOf is the state of a node's answer a to its group's candidates at head: its verdict when it answers that head -// and, for a node with a key of its own (keyed), that key's revision rev; AnswerStale otherwise. -func AnswerOf(head string, rev uint64, keyed bool, a delivery.CandidateAnswer) string { - if a.Head != head || (keyed && a.Revision != rev) { - return AnswerStale - } - return a.Verdict -} - -// storedAnswer is a node's answer to one group: as stored, and read for its head, revision and verdict. -type storedAnswer struct { - raw json.RawMessage - a delivery.CandidateAnswer -} - -// candidateAnswers is a node's answers to its candidates, by group, from its `.node` have, each as stored; none -// when it has none. -func (r Reader) candidateAnswers(node string) map[string]storedAnswer { - if r.HavesState.Get == nil { - return nil - } - key, err := delivery.HaveNodeKey(node) - if err != nil { - return nil - } - raw, err := r.HavesState.Get(key) - if err != nil || len(raw) == 0 { - return nil - } - if _, err := delivery.DecodeHaveNode(raw); err != nil { - return nil - } - var stored struct { - Candidates map[string]json.RawMessage `json:"candidates"` - } - if json.Unmarshal(raw, &stored) != nil { - return nil - } - out := make(map[string]storedAnswer, len(stored.Candidates)) - for g, ans := range stored.Candidates { - var a delivery.CandidateAnswer - if json.Unmarshal(ans, &a) == nil { - out[g] = storedAnswer{raw: ans, a: a} - } - } - return out -} diff --git a/modules/mesh-delivery-view/manifest_test.go b/modules/mesh-delivery-view/manifest_test.go index eab7c9c..9c07239 100644 --- a/modules/mesh-delivery-view/manifest_test.go +++ b/modules/mesh-delivery-view/manifest_test.go @@ -87,7 +87,7 @@ func TestManifestIsTakenAndReadsOnly(t *testing.T) { // 1134/AC7 if m.Module != "mesh-delivery-view" { t.Errorf("module = %q", m.Module) } - want := []string{"mesh-build-go.pauses", "mesh-build-go.steps", "mesh-build-image.pauses", "mesh-build-image.steps", "mesh-build-node.pauses", "mesh-build-node.steps", "mesh-config.resolved", "mesh-controller.assignments", "mesh-controller.builds", "mesh-controller.composed", "mesh-delivery-assigner.asks", "mesh-delivery-assigner.differences", "mesh-delivery-assigner.wants", "mesh-delivery-builder.builds", "mesh-delivery-checker.tries", "mesh-delivery-gate.asks", "mesh-delivery-gate.source", "mesh-delivery-indexer.candidates", "mesh-delivery-indexer.heard", "mesh-delivery-indexer.modules", "mesh-delivery-indexer.placement", "mesh-delivery-indexer.placement-candidates", "mesh-delivery-indexer.taken", "mesh-delivery-teller.answers", "mesh-delivery-watchman.presence", "mesh-delivery-watchman.stuck", "node-engine.have"} // indexer_placement reads the placement candidates and every .node (ADR 0559 §7); build_usage reads the build modules' steps and pauses, mesh-config's capacities and the checker's tries; 1168/AC1, 1241/AC4, 1345/AC3, 1297/B8, B9 + want := []string{"mesh-build-go.pauses", "mesh-build-go.steps", "mesh-build-image.pauses", "mesh-build-image.steps", "mesh-build-node.pauses", "mesh-build-node.steps", "mesh-config.resolved", "mesh-controller.assignments", "mesh-controller.builds", "mesh-controller.composed", "mesh-delivery-assigner.asks", "mesh-delivery-assigner.differences", "mesh-delivery-assigner.wants", "mesh-delivery-builder.builds", "mesh-delivery-checker.tries", "mesh-delivery-gate.asks", "mesh-delivery-gate.source", "mesh-delivery-indexer.candidates", "mesh-delivery-indexer.heard", "mesh-delivery-indexer.modules", "mesh-delivery-indexer.taken", "mesh-delivery-teller.answers", "mesh-delivery-watchman.presence", "mesh-delivery-watchman.stuck", "node-engine.have"} // indexer_placement reads the placement candidates and every .node (ADR 0559 §7); build_usage reads the build modules' steps and pauses, mesh-config's capacities and the checker's tries; 1168/AC1, 1241/AC4, 1345/AC3, 1297/B8, B9 got := slices.Clone(m.Reads) slices.Sort(got) if !reflect.DeepEqual(got, want) { @@ -119,7 +119,7 @@ func TestManifestIsTakenAndReadsOnly(t *testing.T) { // 1134/AC7 } // The two read tools of the indexer's modules (issue 1562), carried by a bundle the runtime launches; the indexer // itself serves no tool (ADR 0437 §4). Carrying them gives the tool runner read access to every bucket the view reads. - if want := []string{"indexer_module", "indexer_modules", "indexer_placement", "indexer_candidate", "indexer_candidates", "builder_build", "builder_builds", "assigner_wants", "assigner_want", "assigner_differences", "node_haves", "build_usage", "view_reach", "indexer_module_history", "indexer_heard"}; !reflect.DeepEqual(m.Tools, want) { + if want := []string{"indexer_module", "indexer_modules", "indexer_candidate", "indexer_candidates", "builder_build", "builder_builds", "assigner_wants", "assigner_want", "assigner_differences", "node_haves", "build_usage", "view_reach", "indexer_module_history", "indexer_heard"}; !reflect.DeepEqual(m.Tools, want) { t.Errorf("tools = %v, want %v", m.Tools, want) } for _, a := range m.Build.Artifacts { diff --git a/modules/mesh-delivery-view/module.json b/modules/mesh-delivery-view/module.json index e8ea5a0..475f6ca 100644 --- a/modules/mesh-delivery-view/module.json +++ b/modules/mesh-delivery-view/module.json @@ -6,7 +6,6 @@ "tools": [ "indexer_module", "indexer_modules", - "indexer_placement", "indexer_candidate", "indexer_candidates", "builder_build", @@ -51,8 +50,6 @@ "mesh-delivery-indexer.candidates", "mesh-delivery-indexer.heard", "mesh-delivery-indexer.modules", - "mesh-delivery-indexer.placement", - "mesh-delivery-indexer.placement-candidates", "mesh-delivery-indexer.taken", "mesh-delivery-teller.answers", "mesh-delivery-watchman.presence",