Join item 4: the indexer serves indexer_read_seat_definitions, the checker's seventh first view

The checker invokes it (A2j 5700edf) and the indexer said the state on its views family without a read tool for it.
Row in TestManifestDeclarations: every indexer tool a module of this repository invokes is one the indexer serves
(failed first, naming the checker's invoke).

Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
This commit is contained in:
2026-11-04 15:04:34 +01:00
parent e648955a94
commit 5385d6844d
3 changed files with 24 additions and 2 deletions
@@ -35,6 +35,7 @@ var ReadTools = []ViewedTool{
{Tool: "indexer_read_heard", State: HeardState, Words: "the forge messages the indexer heard and what it did with each."},
{Tool: "indexer_read_taken", State: "taken", Words: "each repository's merge the indexer took in last."},
{Tool: "indexer_read_findings", State: health.FindingsState, Words: "the indexer's findings, which the condition keeper raises and clears."},
{Tool: "indexer_read_seat_definitions", State: SeatDefinitionsState, Words: "the seat definitions the trunk's and each open pull request's contracts modules hold, resolved, or why one does not parse."},
}
// ViewedTool is one tool over one state of the indexer's.
+22 -2
View File
@@ -143,7 +143,7 @@ func TestManifestDeclarations(t *testing.T) { // 1238/AC1, 1444 (reads the build
// 1945: indexer_take_in, served by its tools bundle through the takeins state; the process serves none. The same bundle
// reads the verdicts state (indexer_verdicts) and asks the indexer to judge again through the takeins state
// (indexer_judge; issue 774, clause 3). 1966/AC11: indexer_old_sections reads the count of the old sections (state oldsections).
// ADR 0621 §1, ADR 0622 §1: the first-view tools manifests, modules and verdicts, and design 25 § 12.2's nine read
// ADR 0621 §1, ADR 0622 §1: the first-view tools manifests, modules and verdicts, and design 25 § 12.2's read
// tools, all of the tools bundle, which runs in a runtime of its own on the indexer's account (runs-as).
want := []string{"indexer_take_in", "indexer_old_sections", "indexer_verdicts", "indexer_judge"}
for _, v := range append(append([]index.ViewedTool{}, index.FirstViewTools...), index.ReadTools...) {
@@ -154,9 +154,29 @@ func TestManifestDeclarations(t *testing.T) { // 1238/AC1, 1444 (reads the build
}
want = append(want, "indexer_first_views", "indexer_first_view_again", index.ConfigReadersTool, index.BusStateTool, index.RequirementsTool, index.PackageUsersTool, index.SayAcceptedTool, // DLV-F3r, DLV-I10, DLV-I11, DLV-I7, DLV-I8, DLV-I9c
index.SeatDefinitionTool, index.SeatDefinitionsAgainTool, index.OutOfStepTool) // DLV-I19
if !reflect.DeepEqual(m.Tools, want) || len(want) != 27 {
if !reflect.DeepEqual(m.Tools, want) || len(want) != 28 {
t.Errorf("tools = %v, want %v", m.Tools, want)
}
// Every read tool of the indexer a reader of this repository invokes is one it serves (the checker's seventh first
// view, indexer_read_seat_definitions, was invoked and not served).
readers, _ := filepath.Glob("../*/module.json")
for _, p := range readers {
raw, err := os.ReadFile(p)
if err != nil {
t.Fatal(err)
}
var r struct {
Invokes []string `json:"invokes"`
}
if err := json.Unmarshal(raw, &r); err != nil {
t.Fatalf("%s: %v", p, err)
}
for _, inv := range r.Invokes {
if tool, ok := strings.CutPrefix(inv, "mesh-delivery-indexer."); ok && !slices.Contains(m.Tools, tool) {
t.Errorf("%s invokes %s, which the indexer does not serve", p, inv)
}
}
}
if m.RunsAs != m.Module || m.SecretsOwner != m.RunsAs {
t.Errorf("runs-as = %q, secrets-owner %q: the tools bundle runs on the indexer's own account (ADR 0621 §1)", m.RunsAs, m.SecretsOwner)
}
@@ -33,6 +33,7 @@
"indexer_read_heard",
"indexer_read_taken",
"indexer_read_findings",
"indexer_read_seat_definitions",
"indexer_first_views",
"indexer_first_view_again",
"indexer_config_readers",