ADR-0065: before any readiness, recovery now verifies the head's tail. The trace object must exist with its manifest digest, its header must bind profile, region, predecessor and range; the predecessor (schema v6 load_region_commit) must hash to the digest the head names; replaying the trace from the predecessor's verified payload must reproduce every report and the exact head bytes; and trace-derived decisions must equal the head's durable decisions. Missing, corrupt or non-reproducing tails quarantine (RecoveryError::tail); nothing older or empty is served. Test-only crash seams (HostConfig::crash_hook, PublishHooks) and evo-server --crash-at deliver real SIGKILL at before-upload, before-transaction, after-commit and after-ack. The kill matrix, a SIGSTOP/SIGCONT stale owner and damaged-head startups all behave as the durability contract requires; successors verify before readiness. Validated: PostgreSQL suites under GCC Release, clang-tidy and ASan/UBSan; tail-skip and replay-equality mutations each caught. No Docker/Gitea CI, production-lease kill test or deployment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
53 lines
1.9 KiB
Plaintext
53 lines
1.9 KiB
Plaintext
# Review and pin the postgres-tools image digest before applying to evolution-dev.
|
|
# Not included in the active Argo kustomization; never target World0 routinely.
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: evolution-db-migrate-v6
|
|
namespace: evolution-dev
|
|
spec:
|
|
backoffLimit: 0
|
|
activeDeadlineSeconds: 120
|
|
template:
|
|
spec:
|
|
restartPolicy: Never
|
|
automountServiceAccountToken: false
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 10001
|
|
runAsGroup: 10001
|
|
fsGroup: 10001
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: migrate
|
|
image: registry.aeternalisgames.com/aeternalis/aevolution-postgres-tools:replace-with-immutable-digest
|
|
securityContext:
|
|
readOnlyRootFilesystem: true
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop: [ALL]
|
|
resources:
|
|
requests: {cpu: 100m, memory: 64Mi}
|
|
limits: {cpu: 500m, memory: 128Mi}
|
|
env:
|
|
- {name: PGSERVICE, value: evolution-migrator}
|
|
- {name: PGSERVICEFILE, value: /run/postgres/pg_service.conf}
|
|
- {name: EVO_PGPASS_SOURCE, value: /run/postgres/pgpass}
|
|
# Operator-created NOLOGIN group role; the runtime login is its member.
|
|
- {name: EVO_PG_RUNTIME_ROLE, value: evolution_runtime}
|
|
volumeMounts:
|
|
- {name: connection, mountPath: /run/postgres, readOnly: true}
|
|
- {name: scratch, mountPath: /tmp}
|
|
volumes:
|
|
- name: connection
|
|
secret:
|
|
secretName: evolution-postgres-migrator
|
|
defaultMode: 0440
|
|
items:
|
|
- {key: pg_service.conf, path: pg_service.conf}
|
|
- {key: pgpass, path: pgpass}
|
|
- {key: ca.crt, path: ca.crt}
|
|
- name: scratch
|
|
emptyDir: {medium: Memory, sizeLimit: 8Mi}
|