gates / gates (push) Successful in 2m1s
What every thing a customer can end leaves behind, and who is told. - documentation/audits/endings-list-2026-11-10/: README (one page), TABLE (67 endings x 8 questions, each answer with a mark and a pointer), MATRIX, the search list with controls, the helpers' raw answers, and the ageing drill on scratch guest 9202 (five rounds, put back). - Marks: A 499, D 0, K 15, N 22. 9 endings are not named in the architecture folder. - Register: six new rows, one per class (R-1373 … R-1378); 230 -> 236 open rows. Nine existing rows get a dated pointer line; none is closed, merged or re-ranked. - STATUS.md: four decisions for the operator (D71 … D74). No code change. No release. Machines: scratch guest 9202 only, put back. Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
110 lines
5.1 KiB
Python
Executable File
110 lines
5.1 KiB
Python
Executable File
#!/usr/bin/env python3
|
|
"""drill.py <phase> — the ageing drill on scratch guest 9202 (Endings list 2026-11-10). EVIDENCE, NOT PRODUCT.
|
|
It presses the product's own endpoints through app-catalog-felhom.eu/scripts/box_walk.py (deploy, stop, remove, update,
|
|
restore) and takes a baseline + an itemised listing (snap.sh) after every step that can leave something.
|
|
|
|
cheap N N rounds: install termix -> the app answers -> remove (delete data + backups)
|
|
keep install termix -> remove KEEPING everything -> install again -> remove deleting everything
|
|
drive APP a drive app: install -> remove(delete all) [409 expected, R-442] -> remove keeping data ->
|
|
install with no choice [409 kept_data_choice] -> install "fresh" -> remove keeping -> install "fresh" -> remove
|
|
update K install termix at FROM -> (the caller moves the drill catalog) -> update -> restore -> remove
|
|
remove APP stop + remove (delete all), for a tidy-up
|
|
Environment: SC (0600 dir with .ctlpw), EV.
|
|
"""
|
|
import json, os, subprocess, sys, time
|
|
sys.path.insert(0, "/mnt/5_hdd/felhom.eu/git/app-catalog-felhom.eu/scripts")
|
|
import box_walk as w
|
|
HERE = os.path.dirname(os.path.abspath(__file__))
|
|
REC = []
|
|
|
|
|
|
def snap(label):
|
|
r = subprocess.run([HERE + "/snap.sh", label], capture_output=True, text=True, timeout=300)
|
|
w.say(f" [snap] {label}: {' '.join(r.stdout.split())[:160]}")
|
|
|
|
|
|
def rm(name, hdd, bk):
|
|
c1, d1 = w.ctl("POST", f"/api/stacks/{name}/stop")
|
|
w.say(f" [X] stop {name} -> {c1} {str(d1)[:90]}")
|
|
for _ in range(24):
|
|
time.sleep(5)
|
|
if w.stack(name).get("state") != "running":
|
|
break
|
|
code, d = w.ctl("POST", f"/api/stacks/{name}/remove", {"remove_hdd_data": hdd, "remove_backups": bk})
|
|
w.say(f" [X] remove {name} hdd_data={hdd} backups={bk} -> {code} {str(d)[:300]}")
|
|
time.sleep(5)
|
|
st = w.stack(name)
|
|
w.say(f" [X] after: deployed={st.get('deployed')} state={st.get('state')}")
|
|
REC.append({"act": "remove", "app": name, "hdd": hdd, "backups": bk, "http": code, "body": str(d)[:400]})
|
|
return code
|
|
|
|
|
|
def install(name, sub, kept=None, expect_fail=False):
|
|
if kept:
|
|
os.environ["KEPT"] = kept
|
|
else:
|
|
os.environ.pop("KEPT", None)
|
|
t0 = time.time()
|
|
ok = w.deploy(name, sub)
|
|
up = w.wait_app(sub, tries=36) if ok else False
|
|
REC.append({"act": "install", "app": name, "kept": kept, "deployed": ok, "answers": up, "s": round(time.time() - t0, 1)})
|
|
w.say(f" [1] install {name}: deployed={ok} answers={up} in {round(time.time()-t0,1)}s")
|
|
return ok
|
|
|
|
|
|
def main():
|
|
ph = sys.argv[1]
|
|
w.login()
|
|
if ph == "cheap":
|
|
for i in range(1, int(sys.argv[2]) + 1):
|
|
w.say(f"== cheap round {i}")
|
|
install("termix", "terminal")
|
|
rm("termix", True, True)
|
|
snap(f"cheap-{i:02d}")
|
|
elif ph == "keep":
|
|
install("termix", "terminal"); snap("keep-1-installed")
|
|
rm("termix", False, False); snap("keep-2-removed-kept")
|
|
install("termix", "terminal"); snap("keep-3-installed-again")
|
|
rm("termix", True, True); snap("keep-4-removed-all")
|
|
elif ph == "drive":
|
|
a, sub = sys.argv[2], sys.argv[3]
|
|
install(a, sub); snap("drive-1-installed")
|
|
c = rm(a, True, True); snap("drive-2-remove-all-tried")
|
|
if c == "409":
|
|
rm(a, False, True); snap("drive-3-removed-data-kept")
|
|
code, d = w.ctl("POST", f"/api/stacks/{a}/deploy", {"values": w.deploy_values(a, sub)})
|
|
w.say(f" [1] install with NO kept-data choice -> {code} {str(d)[:300]}")
|
|
REC.append({"act": "install-no-choice", "http": code, "body": str(d)[:600]})
|
|
if code == "202": # no kept-data question was asked: it installed
|
|
time.sleep(60); snap("drive-4-installed-no-question")
|
|
else:
|
|
install(a, sub, kept="fresh"); snap("drive-4-installed-fresh")
|
|
rm(a, False, False); snap("drive-5-removed-kept-all")
|
|
install(a, sub, kept="fresh"); snap("drive-6-installed-fresh-2")
|
|
rm(a, False, True); snap("drive-7-removed-data-kept-2")
|
|
elif ph == "update-a":
|
|
k = sys.argv[2]
|
|
install("termix", "terminal"); snap(f"upd{k}-1-installed-from")
|
|
elif ph == "update-b":
|
|
k, to = sys.argv[2], sys.argv[3]
|
|
waited = w.sync_rescan("termix", to)
|
|
w.say(f" [5] badge waited {waited}")
|
|
res = w.press_update("termix")
|
|
REC.append({"act": "update", "result": res})
|
|
snap(f"upd{k}-2-updated")
|
|
snaps = w.snapshots("termix")
|
|
w.say(f" [R] snapshots offered: {json.dumps(snaps)[:600]}")
|
|
rr = w.restore("termix")
|
|
rr.pop("observables_after", None)
|
|
REC.append({"act": "restore", "result": rr})
|
|
snap(f"upd{k}-3-restored")
|
|
rm("termix", True, True); snap(f"upd{k}-4-removed-all")
|
|
elif ph == "remove":
|
|
rm(sys.argv[2], True, True); snap(f"tidy-{sys.argv[2]}")
|
|
out = os.path.join(os.environ["EV"], f"drill-{ph}-{'-'.join(sys.argv[2:3])}-{int(time.time())}.json")
|
|
json.dump({"phase": ph, "argv": sys.argv[1:], "record": REC, "log": w.LOG}, open(out, "w"), indent=1)
|
|
print("wrote", out)
|
|
|
|
|
|
main()
|