Files
felhom.eu/documentation/tests/campaign10-evidence-2026-07-31/runner/vm.sh
T
admin 69f896d3cd Campaign 10 Phase B: 27 cycles, 586 invariant checks, 0 violations
Ran the soak on the Phase A rig. Ended on its own deadline — no watchdog halt,
no atom exception, no I11 breach.

I1 28+28 pairs, I2 28+28 pairs, I3 56, I4 56, I5/I6 28 each, I7 28, I10 135,
I11 28. Zero violations. The row counts are themselves the no-silent-skip check:
I3/I4 twice per cycle (both drives), I10 = 5 secret-class fields x 27, REBOOT on
cycles 7/14/21 only.

I7 is the headline: 28 restores, 28 correct discriminators — never stale, never
empty. RTO (Tier 1, rallly, 66 MB): min 38.8s, median 42.0s, p90 42.5s, max
44.3s. That is the S band's lower end ONLY; the 5.5s spread over 28 runs says
fixed work dominates, so nothing extrapolates to M or L. RPO not measured.

Every atom and invariant was proven BY HAND before automation — the runner
asserts nothing that was not first observed live.

Caught a Phase A gap before starting: no app had HDD_PATH, so all data sat on the
system disk and I3 could never have fired. Deployed calibre-web onto adatok
first; otherwise the run would have produced 27 green cycles that tested nothing
cross-drive.

Investigated and DISPROVED a suspected defect (audit 5.2): /api/disks reports
state=attached for a physically absent drive, and intermediary.go:230 really does
compute presence from State=="attached". It is inert — planDriveGates only gates
paths under /mnt/felhom-drives/ and uses BoundUnderParent there, which was
correctly false. The gate fired; the storage page showed "Meghajtó leválasztva".
No R-n minted.

Honest gaps: 6 of ~12 atom families ran. Not run — Tier 3 (structurally
un-isolatable), abort-fs-in-place, kill-agent-mid-backup, hard-reset-mid-write,
reboot-VM, both concurrency atoms, fill-drive-near-full. I8 not checked, I9 not
automated (cited from the tester-gate run, not re-claimed). kill_controller is
NOT mid-backup and reboot_guest never interleaved with a detach. 27 cycles does
not answer the brief's question about drift at the thirty-eighth.

Teardown still OWED, including hub customer c10-soak (disposition: DELETE).
2026-08-01 15:45:13 +02:00

63 lines
2.6 KiB
Bash
Executable File

#!/bin/bash
# Campaign 10 — blind console driver for VM 311 on demo-hp.
# snap <label> : screendump the VM console -> PNG on DooPlex (for visual Read)
# key <k> [k...] : sendkey one or more keys (QEMU keynames), 0.25s apart
# type <string> : type an ASCII string as sendkey events
set -uo pipefail
SCRATCH=/tmp/claude-1000/-mnt-5-hdd-felhom-eu-git/0d68ad3e-5c39-4852-8e38-9c029dff2562/scratchpad
VM=311
H=demo-hp
mon() { ssh -o ConnectTimeout=10 "$H" "LC_ALL=C qm monitor $VM" <<<"$1" 2>/dev/null | grep -v '^QEMU\|^(qemu)' ; }
snap() {
local label="${1:-x}"
ssh -o ConnectTimeout=10 "$H" "LC_ALL=C qm monitor $VM" <<<"screendump /tmp/c10.ppm" >/dev/null 2>&1
scp -q "$H:/tmp/c10.ppm" "$SCRATCH/c10-$label.ppm" 2>/dev/null || { echo "snap: scp failed"; return 1; }
convert "$SCRATCH/c10-$label.ppm" "$SCRATCH/c10-$label.png" 2>/dev/null || { echo "snap: convert failed"; return 1; }
echo "$SCRATCH/c10-$label.png"
}
key() {
local cmds=""
for k in "$@"; do cmds+="sendkey $k
"; done
ssh -o ConnectTimeout=10 "$H" "LC_ALL=C qm monitor $VM" <<<"$cmds" >/dev/null 2>&1
}
# type: map ASCII -> qemu keynames, including shifted chars
type_str() {
local s="$1" cmds="" c
local -A M=( [' ']='spc' ['-']='minus' ['.']='dot' ['/']='slash' ['=']='equal'
[',']='comma' [';']='semicolon' ["'"]='apostrophe' ['\']='backslash'
['[']='bracket_left' [']']='bracket_right' ['`']='grave_accent' )
local -A SH=( ['_']='minus' ['+']='equal' ['?']='slash' [':']='semicolon' ['"']='apostrophe'
['!']='1' ['@']='2' ['#']='3' ['$']='4' ['%']='5' ['^']='6' ['&']='7'
['*']='8' ['(']='9' [')']='0' ['{']='bracket_left' ['}']='bracket_right'
['|']='backslash' ['~']='grave_accent' ['<']='comma' ['>']='dot' )
for (( i=0; i<${#s}; i++ )); do
c="${s:$i:1}"
if [[ -n "${SH[$c]:-}" ]]; then cmds+="sendkey shift-${SH[$c]}
"
elif [[ -n "${M[$c]:-}" ]]; then cmds+="sendkey ${M[$c]}
"
elif [[ "$c" =~ [A-Z] ]]; then cmds+="sendkey shift-$(tr '[:upper:]' '[:lower:]' <<<"$c")
"
elif [[ "$c" =~ [a-z0-9] ]]; then cmds+="sendkey $c
"
else echo "type_str: unmapped char '$c'" >&2; return 1
fi
done
ssh -o ConnectTimeout=10 "$H" "LC_ALL=C qm monitor $VM" <<<"$cmds" >/dev/null 2>&1
}
case "${1:-}" in
snap) shift; snap "$@" ;;
key) shift; key "$@" ;;
type) shift; type_str "$@" ;;
# typefile: read the string from a file so a secret never lands in argv/ps
typefile) shift; type_str "$(cat "$1")" ;;
mon) shift; mon "$@" ;;
*) echo "usage: vm.sh {snap <label>|key <k>...|type <str>|typefile <path>|mon <cmd>}"; exit 2 ;;
esac