M1: the build modules and the registry say their class and name every store's cap; detected-steps is pruned
Each of the four is core. Every state that named no cap names one, from its live fill read 2026-11-22 01:4x CET (mesh-broker show, nats_streams on novox): mesh-build-go steps 16.0 MiB (16,783,695 bytes) -> 128 MiB; mesh-build-node steps 2.35 MiB (2,463,833 bytes) -> 16 MiB; every other state under 2 MiB -> 8 MiB (largest: distribution holds 1,844,287 bytes, mesh-build-go detected-steps 868,554, distribution transfers 846,359, findings 668,161, idle 401,736, mesh-build-go pauses 254,366). The Go build module's finding-events is 8 MiB for 7 days. The objects stores already name their caps; none keeps a log. The Go and Node build modules prune their state detected-steps (each key an artifact's steps as detected, detected again when gone) at their own writes, past prune-mark 70 % down to prune-target 50 %, and serve <module>_state_prune_now and <module>_state_keep; no other state of the four is prunable (each is truth: running steps, pauses, keys, toolchains, findings, holds, transfers, windows, mirrors, taken asks). Builds: design 47 H2 §812, §820; H-A-411 (1), (2), (3), H-A-437
This commit is contained in:
@@ -146,7 +146,7 @@ func TestForgeFilesRenderFromTheBoundValuesInTheModulesOwnHome(t *testing.T) {
|
||||
func TestManifestRequiresForgeAccountKeepsKeysAndTakesFilesFromTemplates(t *testing.T) {
|
||||
m := readForgeManifest(t)
|
||||
// steps: a step's end over what step-ended carries inline, in the steps state's objects store (design 47 G A-254, A-313).
|
||||
steps := map[string]any{"name": "steps", "storage": "key-value", "template": "state", "options": map[string]any{"ttl-seconds": float64(172800), "objects-max-mib": float64(256)}}
|
||||
steps := map[string]any{"name": "steps", "storage": "key-value", "template": "state", "options": map[string]any{"ttl-seconds": float64(172800), "objects-max-mib": float64(256), "max-mib": float64(8)}}
|
||||
// outputs: a run's test output, read by the verb output (design 47 H2 §791, §820: 1 GiB, 7 days).
|
||||
outputs := map[string]any{"name": "outputs", "storage": "object-store", "template": "objects", "options": map[string]any{"max-mib": float64(1024), "max-age-days": float64(7)}}
|
||||
if want := []any{steps, outputs, "forge-account", "rootless-image-build", "node-tools"}; !reflect.DeepEqual(m.Requires, want) {
|
||||
@@ -154,7 +154,8 @@ func TestManifestRequiresForgeAccountKeepsKeysAndTakesFilesFromTemplates(t *test
|
||||
}
|
||||
keeps := false
|
||||
for _, s := range m.State {
|
||||
if s == "keys" {
|
||||
// Design 47 H2 H-A-411 (2): every state names its cap, 8 MiB.
|
||||
if e, _ := s.(map[string]any); e["name"] == "keys" && e["max-mib"] == float64(8) {
|
||||
keeps = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,6 +113,10 @@ func TestWorkAndStoreDirectoriesLieOutsideTheHome(t *testing.T) {
|
||||
// and the registry's address is bound into a file of the home that the program reads.
|
||||
func TestManifestKeepsItsStatesClaimsItsBuildSeatAndDeclaresItsHealthTool(t *testing.T) {
|
||||
m := readManifest(t)
|
||||
// Design 47 H2 H-A-411 (2): a core module.
|
||||
if m.Class != catalogue.ClassCore {
|
||||
t.Errorf("class = %q, want %s", m.Class, catalogue.ClassCore)
|
||||
}
|
||||
// Design 47 G A-488a, A-488b: its runtime follows the seat list, so the module consumes the seat's two events (which makes its
|
||||
// durable consumer) and invokes the verb that reads the list.
|
||||
for _, ev := range []string{"mesh-catalog.seat-definition-changed", "mesh-catalog.seat-definition-removed"} {
|
||||
@@ -238,7 +242,7 @@ func TestManifestRequiresTheStepsStateWithItsObjectsStore(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for _, want := range []map[string]any{
|
||||
{"name": "steps", "storage": "key-value", "template": "state", "options": map[string]any{"ttl-seconds": float64(172800), "objects-max-mib": float64(256)}},
|
||||
{"name": "steps", "storage": "key-value", "template": "state", "options": map[string]any{"ttl-seconds": float64(172800), "objects-max-mib": float64(256), "max-mib": float64(8)}},
|
||||
{"name": "outputs", "storage": "object-store", "template": "objects", "options": map[string]any{"max-mib": float64(1024), "max-age-days": float64(7)}},
|
||||
} {
|
||||
if !slices.ContainsFunc(doc.Requires, func(r any) bool { return reflect.DeepEqual(r, any(want)) }) {
|
||||
|
||||
Reference in New Issue
Block a user