#!/bin/bash # The three pieces that need docmost back on the box, run AFTER run_rest.sh. # # WHY THEY ARE HERE AND NOT IN LINE: # * Phase 2.2's own verdict is already recorded and solid — the PostgreSQL 16 -> 17 edge FAILED, # the app held, the pin named 17 while nothing ran, and the restore brought it back in 29 s. # What was LOST is the engine's REFUSAL LINE, because `failAndHold` removed the container # before any probe could read it. That is R-621 demonstrating itself on the single artefact # this leg existed to collect. R-320 says: say so plainly, and REPRODUCE IT INDEPENDENTLY. # * Phase 2.3's rehearsal could not seed, because the restored docmost already had its workspace # (`403 Workspace setup already completed`), so it needs a FRESH deploy. # * B8 needs a deployed app carrying a floating engine pin; docmost is that app. # # The first attempt at the reproduction is kept in 17-postgres-refusal-reproduced.txt and is WRONG: # the volume lookup returned empty, the copy was therefore empty, and postgres:17 initialised a # fresh datadir instead of meeting a 16 one. It printed an EMPTY PG_VERSION and I let it run on — # an instrument that reports nothing should have stopped the step. It is kept, labelled, because # the accidental result (a 17 datadir refused by 16, verbatim) is itself worth having. cd /mnt/5_hdd/felhom.eu/git/felhom.eu/documentation/audits/update-night-2026-09-21 || exit 1 step() { echo; echo "############################################## $(date +%H:%M:%S) $*"; } step "R1 redeploy docmost fresh on postgres:16-alpine, and seed it" timeout 1800 python3 - <<'PY' import sys; sys.path.insert(0, ".") import walk as w from fixtures import FIXTURES w.login() st = w.stack("docmost") if st.get("deployed"): w.say(" docmost is deployed — removing it so the rehearsal meets a FRESH workspace") w.remove("docmost") w.sync_rescan(expect_app="docmost", expect_ref="postgres:16-alpine") if not w.deploy("docmost", "docs"): sys.exit("docmost never came up") tok = FIXTURES["docmost"].seed(w, "docs", w.say) w.say(f" seeded: {bool(tok)}") if tok: w.say(f" C1 readback: {FIXTURES['docmost'].verify(w, 'docs', tok, w.say)}") PY step "R2 reproduce the PostgreSQL refusal INDEPENDENTLY, with a control on every step" timeout 1800 bash ./reproduce_pg_refusal.sh step "R3 Phase 2.3 — the conversion rehearsal, costed" timeout 4500 python3 phase2_pgrehearsal.py step "R4 B8 — the floating pin, on docmost's postgres" timeout 1800 python3 phase3_legs2.py b8 docmost docmost-postgres echo; echo "$(date +%H:%M:%S) phase2_redo done"