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
+53
View File
@@ -3034,3 +3034,56 @@ Fixes (this segment):
- scheduling onto a second labelled node;
- the Windows MSVC build (no Windows target changed; the server and PostgreSQL
code are Linux-only).
## M8.1–M8.9 review fixes - 2026-09-30
Review: `.cache/reviews/M8_REVIEW_680e7e5-5b482ad.md` (one P1, five P2).
- **P1 restore ownership.** `backup-check.sh` passed in the Release, analysis and
ASan/UBSan PostgreSQL builds, including three new cases:
- A schema created after the checks but before `pg_restore`: exit 4 ("pg_restore
failed; the database was not changed"). The competing table survived, and only
this restore's own objects directory was removed.
- A second concurrent restore of the same database: exit 4 ("another restore
holds this database"). It left no directory, and the first restore was
verified.
- While the first restore held the database, a lease acquisition there ended in
`lock timeout`. An occupied objects path was refused and left untouched.
- The reviewer's `restore-race.sh` now ends with `remaining_evolution_schemas=1`
(`schema=no, objects=yes`).
- **P2 barrier Ready-pod selection.** `tools/ops/lib/pods.sh` uses a plain
jsonpath and needs exactly one Ready pod that is not being deleted.
`ops-lib-check.sh` passed its fixtures: one pod, not Ready, being deleted, no
condition, Ready beside a deleting pod, two Ready pods, and no pods. Not run:
the jsonpath against a live API server (no kubectl or Go in this environment).
- **P2 barrier Secret access.** The generated pod has `fsGroup: 10001`. The deploy
policy check now renders the backup and barrier pods with `--print-manifest` and
checks: non-root 10001 with fsGroup 10001, no token, read-only root, no
escalation, Secret files 0440, and egress admission of the component. Not run: a
disposable pod reading the Secret in the cluster.
- **P2 World0 claimRef.** A new admission validation denies removing a World0
volume's claim reference, or changing its namespace or name, without
break-glass. The policy check requires the rule, and `verify-isolation.sh`
dry-runs the removal when a World0 PV exists. Not run: no admission test cluster
here, and no World0 PV exists.
- **P2 CI change selection.** `ci-paths.sh` compares against the event's base (the
push's `before`, or the PR base, fetched if missing). It runs on manual
dispatch, local runs and any uncertainty, and the path lists now include the
check scripts. `ci-paths-check.sh` passed 11 fixtures, and the deploy suite runs
it first. The reviewer's `ci-range.sh` now runs in both cases. Not run: a real
Gitea push, so the event-context mapping is unverified.
- **P2 drill verdicts.** Every kill RTO is asserted against `RTO_BUDGET_MS`
(60 000). The empty scenario needs positive quarantine evidence; INCONCLUSIVE and
other exits fail. Acknowledgements are read from the dead or drained owner's
finalized log. The fixtures passed. Not run: the drill itself.
- Mutations, each caught:
- dropping a schema that was not installed: `backup-check.sh` failed;
- removing `fsGroup`: the policy check failed;
- accepting several Ready pods, or treating never-ran as PASS: the
`ops-lib-check.sh` fixtures failed;
- falling back to `HEAD^` when there is no base: the `ci-paths-check.sh` fixtures
failed.
- The host-loss and upgrade rehearsals, and the PostgreSQL migration and
permission suites, still pass in all three builds. The deploy policy check: 67
objects, 0 failures.
- ROADMAP corrected: M8-dev/stage is implemented and locally qualified, but **not
passed** until the live gates listed there are run.