Add M8.6 synthetic load driver and fault drill
A drill-only evo-server --synthetic-inputs development-v1 driver feeds deterministic inputs from the committed head after every recovery, with request IDs that match acknowledgements across owners (ADR-0073); it is off in Git and the policy check keeps it off. fault-drill.sh loads dev or stage and runs repeated forced kills (RTO, zero lost acknowledgements), a full object volume (nothing acknowledged), an empty volume (quarantine, never a fresh world) and an operator-driven database outage (stale epoch never resumes), restoring the Git configuration on exit. Process tests prove contiguous acknowledgement across a SIGKILL and exact resumption after the committed head. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -217,6 +217,13 @@ for path, doc in objects:
|
||||
drain = [int(x) for x in __import__('re').findall(r'--drain-ms (\d+)', script)]
|
||||
check(len(drain) == 1 and pod.get('terminationGracePeriodSeconds', 30) * 1000 > drain[0],
|
||||
f'{path}: the termination grace period must exceed --drain-ms')
|
||||
# M8.6 (ADR-0073): synthetic load is a drill-time override, never committed.
|
||||
for path, doc in objects:
|
||||
if path.startswith('deploy/kubernetes/region/') and doc['kind'] == 'Deployment':
|
||||
for container in doc['spec']['template']['spec'].get('containers', []):
|
||||
for variable in container.get('env', []):
|
||||
if variable.get('name') == 'REGION_INPUTS':
|
||||
check(variable.get('value') == '', f'{path}: synthetic inputs are never enabled in Git')
|
||||
for env in ('dev', 'stage'):
|
||||
overlay = f'deploy/kubernetes/region/{env}/'
|
||||
images = manifests.get(overlay + 'kustomization.yaml', [{}])[0].get('images', [])
|
||||
@@ -298,7 +305,7 @@ for path, doc in objects:
|
||||
# The cleanup tool refuses World0 before kubectl runs (no kubectl on PATH here).
|
||||
with tempfile.TemporaryDirectory() as empty:
|
||||
env = dict(os.environ, PATH=empty + os.pathsep + os.path.dirname(sys.executable))
|
||||
for tool in ('tools/ops/cleanup-environment.sh', 'tools/ops/region-drill.sh'):
|
||||
for tool in ('tools/ops/cleanup-environment.sh', 'tools/ops/region-drill.sh', 'tools/ops/fault-drill.sh'):
|
||||
for bad in ('world0', 'evolution-world0', 'World0', 'prod', ''):
|
||||
result = subprocess.run([shutil.which('bash') or '/bin/bash', os.path.join(ROOT, tool), bad],
|
||||
capture_output=True, text=True, env=env)
|
||||
|
||||
Reference in New Issue
Block a user