RD-0: the judge's state rule names max-mib among a state's words

mesh-sdk's reader release reads max-mib on an old state section and names
it in its refusal of an unknown word; the judge's row reads that refusal.

Builds: design 47 G §494, §469

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
2026-11-12 03:10:46 +01:00
parent 2f1b60f2a2
commit f39572c878
@@ -2929,7 +2929,7 @@ func caseAStateNameIsLocalAndOneToken(t *testing.T) {
{`{"module":"a.b","version":"1","state":["s"]}`, `no dot`},
{`{"module":"a","version":"1","reads":["bindings"]}`, `a read is <module>.<name>`},
{`{"module":"a","version":"1","reads":["a.s"]}`, `which is its own state`},
{`{"module":"a","version":"1","state":[{"name":"s","shared":true}]}`, `{name, history, ttl-seconds, per-machine, key-ttl, read-only, form, catch-up}`},
{`{"module":"a","version":"1","state":[{"name":"s","shared":true}]}`, `{name, history, ttl-seconds, per-machine, key-ttl, read-only, max-mib, form, catch-up}`},
} {
_, err := ParseManifest([]byte(c.manifest))
if c.says == "" {
@@ -6379,4 +6379,25 @@ func TestRulesOther(t *testing.T) {
t.Run("AskingForTheRuleSetWithNowhereToPutItIsRefused", caseAskingForTheRuleSetWithNowhereToPutItIsRefused)
t.Run("TakesSettingsIsRefusedWhereItCannotMeanAnything", caseTakesSettingsIsRefusedWhereItCannotMeanAnything)
t.Run("TheInstallationCheckReadsADefault", caseTheInstallationCheckReadsADefault)
t.Run("ASeatNamedViewIsJudgedAgainstTheSeatsViews", caseASeatNamedViewIsJudgedAgainstTheSeatsViews)
}
// A consumed view, `seat:<seat>.views.<state>`, is accepted where the seat offers the state as a view and refused, by name,
// where it does not or the seat is unknown (design 47 G §616, §699, §621).
func caseASeatNamedViewIsJudgedAgainstTheSeatsViews(t *testing.T) {
was := catalogue.Seats()
t.Cleanup(func() { catalogue.UseSeats(was) })
catalogue.UseSeats([]catalogue.Seat{{Name: "mesh-module-assigner", Scope: catalogue.ScopeMesh, Decision: "test",
Views: []string{"assignments"}}})
for _, row := range []struct{ consume, says string }{
{"seat:mesh-module-assigner.views.assignments", ""},
{"seat:mesh-module-assigner.views.placement", "does not offer the state"},
{"seat:mesh-unknown.views.assignments", "mesh-unknown"},
{"seat:mesh-module-assigner.assignments", "does not name a seat and its view"},
} {
problems := strings.Join(EventProblems(catalogue.Manifest{Module: "reader", Consumes: []string{row.consume}}), "\n")
if row.says == "" && problems != "" || row.says != "" && !strings.Contains(problems, row.says) {
t.Errorf("%s: problems %q, want %q", row.consume, problems, row.says)
}
}
}