region HA P3b-2 ops: final review fixes
10 files changed,
+82
−16
docs/superpowers/notes/2026-11-05-region-ha-p3b2-standby-witness.md+3 −1infra/modules/region-group-operator-document/README.md+1 −1infra/modules/region-group-operator-document/harness-pattern.txt+1 −1scripts/region-group-fault/README.md+4 −2scripts/region-group-fault/fault.py+5 −4scripts/region-group-fault/text.json+1 −1scripts/region_group_document_test.py+12 −3scripts/region_group_fault_test.py+52 −0scripts/region_group_frames.py+2 −2scripts/region_group_probe_test.py+1 −1
diff --git a/docs/superpowers/notes/2026-11-05-region-ha-p3b2-standby-witness.md b/docs/superpowers/notes/2026-11-05-region-ha-p3b2-standby-witness.md| index d07426551..e59884cfc 100644 |
| --- a/docs/superpowers/notes/2026-11-05-region-ha-p3b2-standby-witness.md |
| +++ b/docs/superpowers/notes/2026-11-05-region-ha-p3b2-standby-witness.md |
| @@ -227,7 +227,9 @@ python3 scripts/region-group-fault/client.py --profile '<profile>' \ |
| `install` builds and delivers the bundle through the approved Session Manager |
| channel, then checks its pinned hash before unpacking. Compare `status` hashes |
| -with the bundle sources. Delivery must finish while the channel still works: |
| +with the bundle sources. Before arming on a group member, require |
| +`rehearsal_override` to be `false` in `status`. |
| +Delivery must finish while the channel still works: |
| blocking SSM removes operator access until local expiry. SSM uses HTTPS to |
| `ssm`, `ssmmessages` and `ec2messages` regional endpoints: |
| [https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-prerequisites.html](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-prerequisites.html). |
diff --git a/infra/modules/region-group-operator-document/README.md b/infra/modules/region-group-operator-document/README.md| index 363042ce4..1950aa13f 100644 |
| --- a/infra/modules/region-group-operator-document/README.md |
| +++ b/infra/modules/region-group-operator-document/README.md |
| @@ -91,7 +91,7 @@ The remaining forms are: |
| `IID` is `i-` followed by 8 or 17 lowercase hexadecimal digits. `BOOT` has |
| lowercase hexadecimal UUID shape, `8-4-4-4-12`. `TRANSACTION` is 1 to 80 letters, |
| -digits, underscores or hyphens. `MINUTES` is 1 to 999 without leading zeros. |
| +digits, underscores or hyphens. `MINUTES` is 1 to 60 without leading zeros. |
| Argument order and spaces are fixed. The harness must validate the supplied |
| identity and transaction against the member before arming a fault. |
diff --git a/infra/modules/region-group-operator-document/harness-pattern.txt b/infra/modules/region-group-operator-document/harness-pattern.txt| index 528a0b767..dfb1a3f97 100644 |
| --- a/infra/modules/region-group-operator-document/harness-pattern.txt |
| +++ b/infra/modules/region-group-operator-document/harness-pattern.txt |
| @@ -1 +1 @@ |
| -/usr/bin/env -i PATH=/usr/sbin:/usr/bin:/sbin:/bin HOME=/root /bin/sh -c '\[ "\$\(id -u\)" = 0 \] \|\| exit 77; printf '"'"'\\n[0-9a-f]{32}:BEGIN\\n'"'"'; \((umask 077 && mkdir -p -m 0700 /run/carlos-p3b2-fault && printf %s [A-Za-z0-9+/=]{1,1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1} > /run/carlos-p3b2-fault/bundle\.b64 && base64 -d /run/carlos-p3b2-fault/bundle\.b64 > /run/carlos-p3b2-fault/bundle\.tar && \[ "\$\(sha256sum /run/carlos-p3b2-fault/bundle\.tar \| cut -c1-64\)" = HARNESS_SHA256 \] && mkdir -p -m 0700 /usr/local/lib/carlos-p3b2-fault && tar --no-same-owner --no-same-permissions -x -f /run/carlos-p3b2-fault/bundle\.tar -C /usr/local/lib/carlos-p3b2-fault && /bin/sh /usr/local/lib/carlos-p3b2-fault/fault\.sh install|/bin/sh /usr/local/lib/carlos-p3b2-fault/fault\.sh ((status|disarm|remove|uninstall)|(arm-fault|arm-pause|fault-now) --iid i-([0-9a-f]{8}|[0-9a-f]{17}) --boot [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} --transaction [A-Za-z0-9_-]{1,80} --minutes [1-9][0-9]{0,2}))\); result=\$\?; printf '"'"'\\n[0-9a-f]{32}:END:%s\\n'"'"' "\$result"' |
| +/usr/bin/env -i PATH=/usr/sbin:/usr/bin:/sbin:/bin HOME=/root /bin/sh -c '\[ "\$\(id -u\)" = 0 \] \|\| exit 77; printf '"'"'\\n[0-9a-f]{32}:BEGIN\\n'"'"'; \((umask 077 && mkdir -p -m 0700 /run/carlos-p3b2-fault && printf %s [A-Za-z0-9+/=]{1,1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}([A-Za-z0-9+/=]{1000}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1}){0,1} > /run/carlos-p3b2-fault/bundle\.b64 && base64 -d /run/carlos-p3b2-fault/bundle\.b64 > /run/carlos-p3b2-fault/bundle\.tar && \[ "\$\(sha256sum /run/carlos-p3b2-fault/bundle\.tar \| cut -c1-64\)" = HARNESS_SHA256 \] && mkdir -p -m 0700 /usr/local/lib/carlos-p3b2-fault && tar --no-same-owner --no-same-permissions -x -f /run/carlos-p3b2-fault/bundle\.tar -C /usr/local/lib/carlos-p3b2-fault && /bin/sh /usr/local/lib/carlos-p3b2-fault/fault\.sh install|/bin/sh /usr/local/lib/carlos-p3b2-fault/fault\.sh ((status|disarm|remove|uninstall)|(arm-fault|arm-pause|fault-now) --iid i-([0-9a-f]{8}|[0-9a-f]{17}) --boot [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} --transaction [A-Za-z0-9_-]{1,80} --minutes ([1-9]|[1-5][0-9]|60)))\); result=\$\?; printf '"'"'\\n[0-9a-f]{32}:END:%s\\n'"'"' "\$result"' |
diff --git a/scripts/region-group-fault/README.md b/scripts/region-group-fault/README.md| index be0565ab5..b58d0b858 100644 |
| --- a/scripts/region-group-fault/README.md |
| +++ b/scripts/region-group-fault/README.md |
| @@ -13,7 +13,8 @@ for the approved window. `client.py` builds commands with |
| `region_group_frames.py`. Each call requires `--profile`, `--region`, |
| `--document` and `--target`; `--dry-run` prints the exact command. |
| Arming also requires `--iid` matching the target, `--boot`, `--transaction` |
| -and `--minutes 35`. There are no deployment defaults. |
| +and `--minutes 35`. Minutes must be 1 to 60 without leading zeros. |
| +There are no deployment defaults. |
| | Verb | Effect | |
| | --- | --- | |
| @@ -26,7 +27,8 @@ and `--minutes 35`. There are no deployment defaults. |
| | `disarm` | Remove the pending marker and drop-in, then reload systemd. Leave an active fault and its timer alone. | |
| | `uninstall` | Remove the fault, disarm, stop expiry units and delete installed files and harness state. Return cleanup evidence. Export the full log first. | |
| -For Window B, deliver, read status and compare hashes. Rehearse expiry on the |
| +For Window B, deliver, read status and compare hashes. Before arming on a group |
| +member, require `rehearsal_override` to be `false` in `status`. Rehearse expiry on the |
| member before injecting. Record the short `fault-now` outage separately from |
| the roll. An END frame from `fault-now` means "not proven injected": read |
| `status` to confirm the table and counters. R6 requires a refusal to return zero. |
diff --git a/scripts/region-group-fault/fault.py b/scripts/region-group-fault/fault.py| index 47b8f2b4f..59dc717d0 100644 |
| --- a/scripts/region-group-fault/fault.py |
| +++ b/scripts/region-group-fault/fault.py |
| @@ -135,7 +135,7 @@ class Harness: |
| require(re.fullmatch(r'i-(?:[0-9a-f]{8}|[0-9a-f]{17})', marker['iid'])) |
| require(re.fullmatch(r'[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}', marker['boot_id'])) |
| require(re.fullmatch(r'[A-Za-z0-9_-]{1,80}', marker['transaction'])) |
| - require(type(marker['minutes']) is int and 1 <= marker['minutes'] <= 999) |
| + require(type(marker['minutes']) is int and 1 <= marker['minutes'] <= 60) |
| require(type(marker['armed_at']) in {int, float} and |
| 0 <= time.time() - marker['armed_at'] <= 3600) |
| require(marker['boot_id'] == self.path('/proc/sys/kernel/random/boot_id').read_text().strip()) |
| @@ -240,7 +240,7 @@ class Harness: |
| def arm(self, verb, args): |
| require(len(args) == 8 and args[::2] == ['--iid', '--boot', '--transaction', '--minutes']) |
| - require(re.fullmatch(r'[1-9][0-9]{0,2}', args[7])) |
| + require(re.fullmatch(r'([1-9]|[1-5][0-9]|60)', args[7])) |
| marker = dict(mode='pause' if verb == 'arm-pause' else 'fault', iid=args[1], |
| boot_id=args[3], transaction=args[5], minutes=int(args[7]), armed_at=time.time()) |
| nets = self.identity(marker, False) |
| @@ -253,7 +253,7 @@ class Harness: |
| return |
| self.directory(self.path(DROP).parent, 0o755) |
| self.write(self.state / 'marker.json', json.dumps(marker)) |
| - self.write(self.path(DROP), '[Service]\nExecStartPre=+/bin/sh ' + LIB + '/fault.sh prestart\n') |
| + self.write(self.path(DROP), '[Service]\nExecStartPre=-+/bin/sh ' + LIB + '/fault.sh prestart\n') |
| run('systemctl', 'daemon-reload') |
| self.log('arm', **marker) |
| @@ -309,7 +309,8 @@ class Harness: |
| lines = f.read().decode(errors='replace').splitlines()[1:][-8:] |
| return dict(hashes=hashes, marker=marker, drop_in=self.path(DROP).exists(), |
| table_present=table is not None, packets=packets(table), |
| - timer=self.timer(), log=lines) |
| + timer=self.timer(), log=lines, |
| + rehearsal_override=(self.state / 'rehearsal-timer-minutes').exists()) |
| def uninstall(self): |
| self.remove('remove') |
diff --git a/scripts/region-group-fault/text.json b/scripts/region-group-fault/text.json| index 799cd183d..a09dee66c 100644 |
| --- a/scripts/region-group-fault/text.json |
| +++ b/scripts/region-group-fault/text.json |
| @@ -3,7 +3,7 @@ |
| "unsafe": "Refused unsafe harness state or arguments.", |
| "failed": "Harness command failed. Inspect the local log before proceeding.", |
| "fallback": "WARNING: kernel set timeouts are unavailable. Only the verified local timer will remove this fault.", |
| - "rehearsal": "Rehearsal-only timer delay is active. Do not use this bundle on a group member.", |
| + "rehearsal": "The rehearsal override file is present. This file must never exist on a group member.", |
| "remote": "No successful framed result. Read local evidence after access returns.", |
| "leaked": "LEAKED {iid}", |
| "result": "{phase}: {result}", |
diff --git a/scripts/region_group_document_test.py b/scripts/region_group_document_test.py| index 0ce37b042..fdafebaf6 100644 |
| --- a/scripts/region_group_document_test.py |
| +++ b/scripts/region_group_document_test.py |
| @@ -78,7 +78,7 @@ class DocumentPatternTests(unittest.TestCase): |
| self.assertAccepted(frames.harness_command(verb, NONCE), harness=True) |
| for verb in ("arm-fault", "arm-pause", "fault-now"): |
| for iid in ("i-01234567", ARM["iid"]): |
| - for minutes in (1, 9, 10, 99, 100, 999): |
| + for minutes in (1, 9, 10, 35, 59, 60): |
| for transaction in ("a", "A_9-" * 20): |
| args = dict(ARM, iid=iid, minutes=minutes, transaction=transaction) |
| self.assertAccepted(frames.harness_command(verb, NONCE, **args), harness=True) |
| @@ -96,6 +96,15 @@ class DocumentPatternTests(unittest.TestCase): |
| for command in commands: |
| self.assertRefused(command, harness=False) |
| + def test_duration_bound_refused_by_helper_and_document(self): |
| + for verb in ("arm-fault", "arm-pause", "fault-now"): |
| + command = frames.harness_command(verb, NONCE, **ARM) |
| + for minutes in (0, 61, 99, 350, 999): |
| + with self.subTest(verb=verb, minutes=minutes): |
| + with self.assertRaises(ValueError): |
| + frames.harness_command(verb, NONCE, **dict(ARM, minutes=minutes)) |
| + self.assertRefused(command.replace("--minutes 35", "--minutes " + str(minutes))) |
| + |
| def test_tool_refusals(self): |
| status = frames.roll.AWS.remote_command({"verb": "status"}, NONCE) |
| prepare = frames.roll.AWS.remote_command(dict(verb="prepare", sha256=SHA), NONCE) |
| @@ -173,7 +182,7 @@ class DocumentPatternTests(unittest.TestCase): |
| bad.append(arm.replace(ARM["boot"], boot)) |
| for transaction in ("", "x" * 81, "two words", "$(id)", "a.b", "a/b", "x\ny"): |
| bad.append(arm.replace(ARM["transaction"], transaction)) |
| - for minutes in ("0", "00", "01", "1000", "-1", "+1", "1.5", "1;id"): |
| + for minutes in ("0", "00", "01", "61", "99", "350", "999", "1000", "-1", "+1", "1.5", "1;id"): |
| bad.append(arm.replace("--minutes 35", "--minutes " + minutes)) |
| for command in bad: |
| self.assertRefused(command) |
| @@ -211,7 +220,7 @@ class DocumentPatternTests(unittest.TestCase): |
| elif char == "[": |
| end = source.index("]", index) |
| self.assertIn(source[index:end + 1], ( |
| - "[0-9a-f]", "[A-Za-z0-9+/=]", "[A-Za-z0-9_-]", "[1-9]", "[0-9]")) |
| + "[0-9a-f]", "[A-Za-z0-9+/=]", "[A-Za-z0-9_-]", "[1-9]", "[1-5]", "[0-9]")) |
| index = end |
| elif char == "{": |
| end = source.index("}", index) |
diff --git a/scripts/region_group_fault_test.py b/scripts/region_group_fault_test.py| index 79556c484..2f44faf48 100644 |
| --- a/scripts/region_group_fault_test.py |
| +++ b/scripts/region_group_fault_test.py |
| @@ -157,6 +157,58 @@ class HarnessTests(unittest.TestCase): |
| def prestart(self): |
| self.call('prestart') |
| + def test_duration_bounds_at_arm_and_injection(self): |
| + for verb in ('arm-fault', 'arm-pause', 'fault-now'): |
| + for minutes in (0, 61, 99, 350, 999): |
| + with self.subTest(verb=verb, minutes=minutes): |
| + before = self.calls() |
| + p = self.call(verb, *ARGS[:-1], str(minutes), check=False) |
| + self.assertEqual(p.returncode, 0 if verb == 'fault-now' else 1) |
| + self.assertIn(fault.TEXT['failed'], p.stderr) |
| + self.assertEqual(self.calls(), before) |
| + self.assertFalse((self.state / 'marker.json').exists()) |
| + self.assertFalse((self.root / fault.DROP.lstrip('/')).exists()) |
| + for minutes in (1, 35, 60): |
| + with self.subTest(verb=verb, minutes=minutes): |
| + self.call(verb, *ARGS[:-1], str(minutes)) |
| + if verb != 'fault-now': |
| + marker = json.loads((self.state / 'marker.json').read_text()) |
| + self.assertEqual(marker['minutes'], minutes) |
| + self.prestart() |
| + added = [e for e in self.events() if e['event'] == 'table-added'][-1] |
| + self.assertEqual(added['minutes'], minutes) |
| + self.assertIn(' timeout %dm' % minutes, (self.root / 'rules').read_text()) |
| + self.assertTrue(any('--on-active=%dm' % minutes in c for c in self.calls())) |
| + self.call('remove') |
| + self.call('disarm') |
| + |
| + def test_invalid_marker_duration_never_consumes_or_injects(self): |
| + self.arm() |
| + marker = self.state / 'marker.json' |
| + original = json.loads(marker.read_text()) |
| + for minutes in (0, 61, 99, 350, 999, True, 1.5): |
| + with self.subTest(minutes=minutes): |
| + marker.write_text(json.dumps(dict(original, minutes=minutes))) |
| + self.prestart() |
| + self.assertTrue(marker.exists()) |
| + self.assertFalse((self.state / 'consumed.json').exists()) |
| + self.assertFalse(any('--unit=' + fault.TIMER in c for c in self.calls())) |
| + self.assertNotIn(['nft', '-f', '-'], self.calls()) |
| + |
| + def test_drop_in_ignores_failure_with_root_privileges(self): |
| + self.arm() |
| + drop = self.root / fault.DROP.lstrip('/') |
| + self.assertEqual(drop.read_text(), '[Service]\nExecStartPre=-+/bin/sh ' + |
| + fault.LIB + '/fault.sh prestart\n') |
| + |
| + def test_status_reports_rehearsal_override_presence(self): |
| + override = self.state / 'rehearsal-timer-minutes' |
| + self.assertIs(json.loads(self.call('status').stdout)['rehearsal_override'], False) |
| + override.write_text('5') |
| + self.assertIs(json.loads(self.call('status').stdout)['rehearsal_override'], True) |
| + override.unlink() |
| + self.assertIs(json.loads(self.call('status').stdout)['rehearsal_override'], False) |
| + |
| def test_timer_verified_before_drop_and_consume_first(self): |
| self.arm() |
| self.prestart() |
diff --git a/scripts/region_group_frames.py b/scripts/region_group_frames.py| index 7953e97db..5db9b0209 100644 |
| --- a/scripts/region_group_frames.py |
| +++ b/scripts/region_group_frames.py |
| @@ -22,7 +22,7 @@ TEXT = { |
| "iid": "Use an instance ID with 8 or 17 lowercase hexadecimal digits", |
| "boot": "Use a lowercase UUID for the boot ID", |
| "transaction": "Use 1 to 80 letters, digits, underscores or hyphens for the transaction", |
| - "minutes": "Use a duration from 1 to 999 minutes without leading zeros", |
| + "minutes": "Use a duration from 1 to 60 minutes without leading zeros", |
| } |
| @@ -73,6 +73,6 @@ def harness_command(verb, nonce, *, iid=None, boot=None, transaction=None, minut |
| _check(r"i-([0-9a-f]{8}|[0-9a-f]{17})", iid, "iid") |
| _check(r"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", boot, "boot") |
| _check(r"[A-Za-z0-9_-]{1,80}", transaction, "transaction") |
| - _check(r"[1-9][0-9]{0,2}", str(minutes), "minutes") |
| + _check(r"([1-9]|[1-5][0-9]|60)", str(minutes), "minutes") |
| return frame_command(inner + verb + " --iid " + iid + " --boot " + boot + |
| " --transaction " + transaction + " --minutes " + str(minutes), nonce) |
diff --git a/scripts/region_group_probe_test.py b/scripts/region_group_probe_test.py| index 1c9f2c02d..b5547b2e8 100644 |
| --- a/scripts/region_group_probe_test.py |
| +++ b/scripts/region_group_probe_test.py |
| @@ -43,7 +43,7 @@ class ProbeFake(Fake): |
| class ProbeTests(unittest.TestCase): |
| def setUp(self): |
| - self.tmp = tempfile.TemporaryDirectory(prefix="b1-test-", dir=Path(__file__).resolve().parent.parent) |
| + self.tmp = tempfile.TemporaryDirectory(prefix="b1-test-") |
| self.addCleanup(self.tmp.cleanup) |
| self.config = test_config(self.tmp.name) |
| self.store = roll.State(self.config, owner=os.geteuid()) |