# --- P2. C1: THE THIRTY-MINUTE HANG, DETECTED (NOT DIAGNOSED) ---------------
# The fork asked for this in round 14 lap 11 §K2, and the split of labour is the
# point: THIS STEP DETECTS, the fork EXPLAINS (their former probe script retired
# in their round 38); if this step hangs, send the run to both sessions; if it
# does not hang, that is itself worth knowing —
# it says the hang is not unconditional, which no disc-image fixture could ever
# establish.
#
# WHAT IT PROVOKES. With no `-s`, cyanrip reads the TOC and refuses for want of
# a read offset. On the 2026-08-25 rig session that refusal wrote its `-j`
# diagnostics record fourteen seconds in — so the process decided to fail and ran
# its exit path all the way to completion — and then stayed alive for roughly
# THIRTY MORE MINUTES holding the drive, needing SIGKILL. Cause not determined,
# by either project. The branch is gated on a DRIVE CAPABILITY that image drivers
# do not report, so it is unreachable from every fixture either side has: it
# needs a real drive, and this is the cheapest place to put one in that state.
#
# WHY IT IS SAFE TO HAVE IN AN UNATTENDED RUN. The `cyanrip` verb is bounded —
# 300 s, then the child is killed, then a further 20 s before the runner stops
# waiting and reports an UNREAPABLE CHILD with a null exit code rather than 0.
# A hang here therefore costs five minutes and is recorded as a finding; it
# cannot eat the night. That bound is the answer to the fork's §J6, which asked
# before agreeing this step should exist at all.
#
# LAST OF THE DRIVE WORK, on §P's reasoning exactly: if it holds the drive it
# costs the tail of the run and not the rip evidence.
#
# `-l 1` is insurance, not intent. If the refusal does NOT fire on this drive,
# cyanrip would otherwise start ripping; limiting it to one track bounds the
# damage to something the verb timeout can end. In that case `expect-exit refused`
# fails and says so, which is the correct result — "it did not refuse" is a real
# finding about the rig, not a broken step.
#
# `refused`, not `1`: from `.25` a refusal exits 64, the class our round 35 lap 8
# S9 asked for. The 2026-10-20 Full run failed here on `expect-exit 1` against a
# correct `.25`, so the code is now asked of the build (`ripper_exit.
# refusal_exit_code`): 1 before `.25`, 64 from it.
#
# NO `-j` HERE, and the reason is worth recording rather than leaving as an
# omission. The fork's §K2 suggested one, to get cyanrip's own record as a
# channel independent of the capture. Our script language has no path
# placeholder, so a `-j` would need a hard-coded absolute path in a file whose
# whole promise is that nothing in it needs editing. It is also less necessary
# here than in their probe: this verb captures through `run_capture` — a pipe we
# drain — and not through the shell redirect whose contents went missing in
# `rig_session.sh` step 5b. Different channel, so an empty capture here would be
# a NEW finding rather than a repeat of that one.

log --- P2. C1: does a no-offset refusal hang the drive? ---
run-size standard
cyanrip -N -d (device) -l 1
expect-exit refused
expect-cyanrip Offset is unset
snapshot afterc1

