Partition mode: use a mounted DOS device (DH1:) as the test target - #12
Merged
Conversation
devsoak DH1: -d [options] resolves the DOS device name to its exec device/unit and OpenDevice flags via the DosList (LockDosList/ FindDosEntry on V36+, a Forbid()-protected walk of DOSBase->dl_Root->rn_Info->di_DevInfo on Kickstart 1.3), validates the FileSysStartupMsg/DosEnvec hard before trusting any of it, and turns the partition's own cylinder/surface/blocks-per-track extent into a device-sector range exactly like -r. -r is still accepted in this mode as a bounds-checked sub-range relative to the partition start. Also reads the partition's boot sector for a filesystem-signature hint used by the next commit's confirmation tiers. dos.library's LockDosList/UnLockDosList/FindDosEntry/NextDosEntry/DoPkt have no proto/inline glue under -mcrt=nix13's ndk13-include tree (their structs and #defines are present; only these five V36+ calls are omitted), so they are hand-rolled LVO jsrs, the same approach output.c already uses for RawPutChar.
Three tiers, replacing the plain y/N prompt in partition mode: an empty or unrecognised partition behaves exactly as before; a recognised filesystem signature with no live volume mounted adds a warning line ahead of the same y/N; a live mounted volume (a DLT_VOLUME DosList entry naming the same handler) requires typing the volume name back case-insensitively, and -y does not bypass that tier -- destroying a filesystem someone still has mounted forces an interactive run. That last policy is marked for PR discussion; it may want a review path.
Sends ACTION_INHIBIT (dp_Arg1 = DOSTRUE) to the partition's handler before any test traffic, so the filesystem stops touching the device for the run; uninhibited (dp_Arg1 = DOSFALSE) on every exit path via a single call at the top of cleanup_close, a no-op unless the inhibit actually succeeded. A handler that never started is skipped with a note instead of inhibited. --resume now adds a one-line reminder that a partition-mode run's device may still be inhibited after a crash, since nothing can uninhibit it at that point.
Usage synopsis and a new "Partition mode" subsection: the NAME: form, geometry/unit/range resolved from the mount, the inhibit behaviour, the three-tier confirmation (including the live-volume name prompt), -r as a relative sub-range, and that writes never leave the partition.
-y not bypassing the type-the-volume-name tier is agreed behaviour, not an open question. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PhqCc7fq5uY5wLQMTHmzYi
An OS 3.2.2 image with an unformatted 8 MB scratch DH1 partition, validated against copperhf.device under Copperline: a full `devsoak DH1:` run passes, and `devsoak DH0: -y` is refused by the live-volume confirmation tier. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PhqCc7fq5uY5wLQMTHmzYi
sidick
enabled auto-merge (squash)
September 6, 2026 09:13
sidick
disabled auto-merge
September 6, 2026 09:14
CLI-Reference gains the NAME: synopsis, the partition-mode notes on -r and -y, and a Partition mode section (resolution, inhibit, confirmation tiers). Emulator-Testing documents the amibake scratch-partition flow around test/amibake-scratch.toml. The README's live-volume -y policy is no longer marked as under review. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PhqCc7fq5uY5wLQMTHmzYi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a second CLI form,
devsoak DH1: -d [options]: a single positional argument ending in:is a DOS device name, resolved through the DosList to the exec device, unit, and partition extent it is mounted on. The partition becomes the test range — no hand-typed-r, and no way to point the range at the wrong partition.src/dosdev.c, new):LockDosList/FindDosEntryon V36+, aForbid()-protected walk of the BCPLdi_DevInfochain on Kickstart 1.3. EveryFileSysStartupMsg/DosEnvecfield is validated before dereference; failures print a one-line reason and exit rc 20. The five V36+ dos.library calls missing from thendk13-includetree are hand-rolled LVO calls, following output.c'sRawPutCharpattern.LowCyl..HighCylconverted to device sectors with an explicitde_SizeBlock-vs-sector-size scale check, all in U64.-rin partition mode is a partition-relative sub-range, bounds-checked — combined with the existing guarantee that no write probe leaves the range, other partitions are unreachable.ACTION_INHIBITbefore any traffic (DoPkton V36+, hand-rolledStandardPacketon 1.3); refusal to run if it fails; uninhibit on every exit path.--resumenotes the device may still be inhibited after a crash.-ydeliberately does not bypass that tier.Testing
Validated under Copperline on an amibake-built OS 3.2.2 image with an unformatted 8 MB scratch DH1 partition (manifest included as
test/amibake-scratch.toml), against copperhf.device:devsoak DH1: -d -t 30s -w 2 -q 2 -A 0 -W 30 -y→ resolution matched the RDB exactly (copperhf.device unit 0, partition sectors 16384..32768), inhibit succeeded, fill + 30 s traffic + both audits clean, RESULT PASS.devsoak DH0: -d -y→ resolvedsectors 32..16384, detected the live volume, refused before writing a sector:volume "SYS:" is live-mounted; -y does not bypass this confirmation.(No RESULT line, matching every other pre-engine fatal exit; smoke.sh already maps that to rc 20.)Build is warning-clean and
m68k-amigaos-nm devsoak | grep -i utilityprints nothing (the Kickstart 1.3 constraint).🤖 Generated with Claude Code
https://claude.ai/code/session_01PhqCc7fq5uY5wLQMTHmzYi