diff --git a/modules/mesh-recovery/internal/recovery/manifest_test.go b/modules/mesh-recovery/internal/recovery/manifest_test.go index 686e7dd64..3b8a7dd54 100644 --- a/modules/mesh-recovery/internal/recovery/manifest_test.go +++ b/modules/mesh-recovery/internal/recovery/manifest_test.go @@ -76,10 +76,11 @@ func TestTheManifestSaysWhatTheModuleIs(t *testing.T) { t.Errorf("setting %s defaults to %v, want %v", k, m.Config[k].Default, want) } } - // A bound of time is never 0, which the reader refuses: its minimum is above 0 (the manifest's minimum is inclusive). + // A bound of time is never 0, which the reader refuses, and may be a fraction (A-138), so a whole test sets + // seconds: its minimum is above 0 and below 1 (the manifest's minimum is inclusive). for _, k := range []string{"point-keep-days", "dump-wait-minutes", "snapshot-restore-wait-minutes", "expire-every-hours"} { - if m.Config[k].Minimum == nil || *m.Config[k].Minimum < 1 { - t.Errorf("setting %s has the minimum %v: a bound of 0 is refused by the reader, so the manifest refuses it", k, m.Config[k].Minimum) + if min := m.Config[k].Minimum; min == nil || *min <= 0 || *min >= 1 { + t.Errorf("setting %s has the minimum %v: a bound of 0 is refused by the reader and a fraction is allowed (A-138), so its minimum is above 0 and below 1", k, m.Config[k].Minimum) } } // The keeper's snapshot verbs the recovery module asks, the cancel at its bound among them (ยง681). diff --git a/modules/mesh-recovery/module.json b/modules/mesh-recovery/module.json index acf9bfeb2..179c4ed97 100644 --- a/modules/mesh-recovery/module.json +++ b/modules/mesh-recovery/module.json @@ -110,7 +110,7 @@ "point-keep-days": { "type": "number", "description": "days after which a restore point is removed, the newest of its kept data never (design 47 G sections 551, 557).", - "minimum": 1, + "minimum": 0.01, "maximum": 3650, "trusted": false, "default": 90 @@ -118,7 +118,7 @@ "dump-wait-minutes": { "type": "number", "description": "minutes an act waits on the dump of the bus's item before recovery-waits is written (design 47 G sections 561, 557).", - "minimum": 1, + "minimum": 0.01, "maximum": 10080, "trusted": false, "default": 60 @@ -126,7 +126,7 @@ "snapshot-restore-wait-minutes": { "type": "number", "description": "minutes a restore in place of a protected keeper's snapshot is waited on, and once more after its cancel (design 47 G section 681, A-138, A-140).", - "minimum": 1, + "minimum": 0.01, "maximum": 10080, "trusted": false, "default": 90 @@ -134,7 +134,7 @@ "expire-every-hours": { "type": "number", "description": "hours between two removals of the points past their keep days, beside the one at the start and at each snapshot-kept; timed by a bound key of the state bounds (design 47 G sections 551, 557, A-138).", - "minimum": 1, + "minimum": 0.01, "maximum": 8760, "trusted": false, "default": 24