M-class (assigner): class core, every state capped above its live fill

It claims the seat mesh-wants, so its class is core, and every state it
keeps names its cap. Fills read on novox (nats_buckets, 2026-11-22 02:50):
findings 3,507,749 and proposals 3,648,514 bytes, above a quarter of 8 MiB,
so 16 MiB (the power of two above four times the fill); every other state
under 2 MiB, so 8: wants 1,737,869, written 889,116, waits 780,485,
candidates 564,884, asks 513,017, puts 442,260, placement 221,392,
differences 176,358, assignments 147,691, seat-holders 80,508, engine-reads
38,397, pulses 5,100, first-views 4,631, view-marks 1,776, copies 140,
policies 0, put-waits 0.

Builds: design 47 H2 §810, §812, §814; H-A-394 (1), H-A-437
This commit is contained in:
2026-11-22 02:48:27 +01:00
parent 1146a6a37f
commit 380412d94f
2 changed files with 31 additions and 19 deletions
@@ -73,6 +73,17 @@ func TestManifest(t *testing.T) {
"engine-reads": 1, "written": 5, "waits": 5, "put-waits": 1, "inputs": 1, "composition-runs": 1, "taken": 1}; !reflect.DeepEqual(states, want) {
t.Errorf("state = %v, want %v", states, want)
}
// design 47 H2 §810, §812, §814; H-A-394 (1), H-A-437: it claims a seat, so its class is core, and every state names its
// cap: 8 MiB, 16 where the live fill passed 2 MiB (findings 3.35, proposals 3.48 MiB on 2026-11-22), as set before for inputs and composition-runs.
caps := map[string]int{}
for _, s := range m.State {
caps[s.Name] = s.MaxMiB
}
if want := map[string]int{"asks": 8, "differences": 8, "puts": 8, "wants": 8,
"assignments": 8, "placement": 8, "copies": 8, "proposals": 16, "candidates": 8, "pulses": 8, "findings": 16, "policies": 8, "seat-holders": 8, views.MarksState: 8, views.StatusState: 8,
"engine-reads": 8, "written": 8, "waits": 8, "put-waits": 8, "inputs": 64, "composition-runs": 64, "taken": 8}; !reflect.DeepEqual(caps, want) || m.Class != catalogue.ClassCore {
t.Errorf("class %q, caps = %v, want core and %v", m.Class, caps, want)
}
if _, ok := m.OwnSecrets["broker"]; !ok || len(m.OwnSecrets) != 1 {
t.Errorf("own-secrets = %v, want exactly broker (or no credential is issued)", m.OwnSecrets)
}
+20 -19
View File
@@ -1,6 +1,7 @@
{
"module": "mesh-delivery-assigner",
"version": "0.3",
"class": "core",
"slug": "assigner",
"runs-as": "mesh-delivery-assigner",
"claims": [
@@ -139,25 +140,25 @@
"assigner_validate_before"
],
"state": [
{ "name": "assignments", "history": 64 },
{ "name": "placement", "history": 64 },
{ "name": "copies", "history": 1 },
{ "name": "proposals", "history": 5 },
{ "name": "candidates", "history": 5 },
{ "name": "pulses", "key-ttl": true },
{ "name": "asks", "history": 5 },
{ "name": "differences", "history": 64 },
{ "name": "puts", "history": 20 },
{ "name": "wants", "history": 20 },
{ "name": "findings", "history": 5 },
{ "name": "policies", "history": 20 },
{ "name": "seat-holders", "history": 5 },
{ "name": "view-marks", "history": 1 },
{ "name": "first-views", "history": 1 },
{ "name": "engine-reads", "history": 1 },
{ "name": "written", "history": 5 },
{ "name": "waits", "history": 5 },
{ "name": "put-waits", "history": 1 },
{ "name": "assignments", "history": 64, "max-mib": 8 },
{ "name": "placement", "history": 64, "max-mib": 8 },
{ "name": "copies", "history": 1, "max-mib": 8 },
{ "name": "proposals", "history": 5, "max-mib": 16 },
{ "name": "candidates", "history": 5, "max-mib": 8 },
{ "name": "pulses", "key-ttl": true, "max-mib": 8 },
{ "name": "asks", "history": 5, "max-mib": 8 },
{ "name": "differences", "history": 64, "max-mib": 8 },
{ "name": "puts", "history": 20, "max-mib": 8 },
{ "name": "wants", "history": 20, "max-mib": 8 },
{ "name": "findings", "history": 5, "max-mib": 16 },
{ "name": "policies", "history": 20, "max-mib": 8 },
{ "name": "seat-holders", "history": 5, "max-mib": 8 },
{ "name": "view-marks", "history": 1, "max-mib": 8 },
{ "name": "first-views", "history": 1, "max-mib": 8 },
{ "name": "engine-reads", "history": 1, "max-mib": 8 },
{ "name": "written", "history": 5, "max-mib": 8 },
{ "name": "waits", "history": 5, "max-mib": 8 },
{ "name": "put-waits", "history": 1, "max-mib": 8 },
{ "name": "inputs", "history": 1, "max-mib": 64 },
{ "name": "composition-runs", "history": 1, "key-ttl": true, "max-mib": 64 },
{ "name": "taken", "history": 1, "key-ttl": true, "max-mib": 8 }