fix: M8 review findings (restore ownership, barrier tool, World0 claimRef, CI selection, drill verdicts)

P1: restore-world.sh claims its objects path (mkdir) and the database (a held
session with a restore try-lock and the exclusive upgrade lock), and removes only
what it created, so a losing restore never drops a winner's schema.
P2: barrier Ready-pod selection via shared jsonpath helper with fixtures; barrier
pod fsGroup; script-generated pods inspected by the policy check; World0 PV claim
references protected; ci-paths.sh uses the event's real base and runs on
uncertainty; fault-drill asserts RTO and needs positive quarantine evidence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-09-30 22:53:11 -04:00
co-authored by Claude Opus 5.5
parent 5b482ad6a3
commit 3a34ae39bc
21 changed files with 584 additions and 80 deletions
@@ -12,6 +12,10 @@
# - deleting a PersistentVolume bound to evolution-world0, or changing its reclaim
# policy away from Retain once set (set Retain when the volume is bound: the
# only StorageClass, local-path, provisions with Delete);
# - removing or reassigning such a volume's claim reference (namespace or claim
# name): the reference is how this policy recognizes a World0 volume, so clearing
# it first would otherwise strip the protection (review M8 P2). The binder may
# still fill in uid/resourceVersion; reassignment is a break-glass operation;
# - deleting the aevolution-world0 or aevolution-platform Argo CD Application or
# AppProject (the platform app owns this policy and the World0 namespace).
# Kubernetes does not run admission policies on policy objects themselves, so
@@ -78,6 +82,14 @@ spec:
object.spec.persistentVolumeReclaimPolicy == 'Retain'
message: "A World0 PersistentVolume set to Retain cannot be changed back"
reason: Forbidden
- expression: >-
variables.breakGlass || request.operation != 'UPDATE' || !variables.world0Volume ||
(has(object.spec.claimRef) && has(object.spec.claimRef.namespace) &&
object.spec.claimRef.namespace == 'evolution-world0' &&
(!has(oldObject.spec.claimRef.name) ||
(has(object.spec.claimRef.name) && object.spec.claimRef.name == oldObject.spec.claimRef.name)))
message: "A World0 PersistentVolume keeps its World0 claim reference without the aevolution:world0-break-glass group"
reason: Forbidden
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingAdmissionPolicyBinding