Files
fortran-704/docs/debug-media-validation.md
Eremey Valetov ff7babdec9
Verify and publish documentation / test (macos-latest) (push) Canceled after 0s
Verify and publish documentation / test (ubuntu-latest) (push) Canceled after 0s
Verify and publish documentation / docs (push) Canceled after 0s
Verify and publish documentation / deploy (push) Canceled after 0s
Harden runtime and notebook integration and publish documentation
Validate physical cards and CLI arguments, guard live DO cells, and share
word encoding and checked numeric conversion. Preserve media on failed runs
and bound notebook input, output, execution time and process cleanup.

Clarify fixed-form editor support and compatibility evidence, add executable
quick-start examples, and gate GitHub Pages on Linux/macOS and strict docs CI.
2026-11-21 15:13:01 -05:00

4.6 KiB

Debug/media validation, 20 November 2026

This milestone implements the first two priorities in the debug/media design: both native scripted monitors, and persistent FORTRAN tapes/drums with an explicit BASIC text exchange. See the user guide and common v1 contract for the limits.

Executed checks

Check Result
FORTRAN make test 446 language checks, 26 SAP/BSS methods, 17 debug/media methods pass
make test-oracle-strict 26 exact original-compiler comparisons, zero allowances/failures
FORTRAN ASan/UBSan debug/media suite 17 methods pass; arena leak checking disabled
BASIC native debugger suite 9 methods pass
BASIC existing language suite 74 pass, 2 skipped; 70 original-reference matches, zero mismatches
BASIC compiled suite 65 pass, 11 skipped
BASIC ASan/UBSan debugger suite 9 methods pass; process-lifetime allocations excluded from leak checking
DOS16 and DOS32 builds OpenWatcom builds pass
Both DOS targets under FreeDOS/QEMU Calls, watches, checkpoints, FIELD bytes, graphics POINT, guest screen and normal/debug equivalence pass
DOS harness regression suite 6 methods pass, including expected failure paths
Documented two-runtime example Saved binary/drum reload prints 7, 1.25, 1.25; BASIC reads HELLO and FORTRAN 7
Sphinx with warnings as errors FORTRAN collection site and changed/tracked BASIC docs pass

The FORTRAN tests compare normal/debug stdout, stderr and byte-identical saved media across dialects, including flags/sense lights, calls, loops and aliases. Other tests use an independently constructed big-endian wire fixture, typed empty records, cursor/mark preservation, checksum and valid-checksum structural corruption, truncation, output-path protection and failed-run preservation. BASIC tests compare outputs, RNG sequence, input consumption, file effects and state counts; missing watches never allocate variables/arrays. Colon and inline IF locations, GOSUB depth, array bounds and pure repeated FIELD reads are covered. The cross-runtime test ran against the actual sibling BASIC build, not a stub.

Local QEMU lacks floppy support, so DOS validation used disposable overlays of the existing FreeDOS system disk. The base SHA-256 is unchanged. The portable floppy route remains the default and is wired into the GW-BASIC repository's CI, alongside the focused POSIX debugger suite. The documented results are local runs. BASIC Sphinx validation covered its tracked documentation and the debugger changes.

Independent review and dispositions

Fable 5.2 reviewed FORTRAN persistence and CLI handling; Gemini Argon reviewed the BASIC monitor. Codex reviewed the FORTRAN monitor and path safety. These were component reviews; no single reviewer covered both complete implementations.

Confirmed findings fixed: reject output-path collisions before creating debug logs (including relative path aliases and existing hardlinks); make watch removal case-insensitive and duplicates idempotent; show all array bounds on errors. The loader's size/CRC/kind/cursor/word checks and staging/cleanup were reviewed. Codex findings also fixed: protect BSS inputs and missing media inputs from output collisions; compare parent directory identities for missing leaves; distinguish command read errors from EOF and fail on log write/close errors; validate malformed commands and avoid a one-past watch-table row expression; retain parser-captured source cards through FIFO pauses. New failure-injection and source-replacement tests pass. Destination path preflight is not an adversarial filesystem sandbox: concurrent parent-directory/symlink retargeting is outside the single-writer contract. Descriptor-anchored filesystem access remains outside this milestone. Reviewer assumptions about a DOS FORTRAN writer were corrected: that executable requires POSIX and 128-bit arithmetic. DOS claims apply only to BASIC. BASIC FIELD bytes are already unsigned, identifiers longer than 40 characters are rejected by the native parser, and OpenWatcom supplies open/fdopen; changing those semantics or reopening an exclusively created file would be wrong. The monitor opens once per CLI process; persistence across RUN is intentional. Owner-only output mode 0600 is intentional and documented. Checkpoints export the named bounded scope, not all state; no default drum count is advertised.

Evidence and reproducibility

The committed tests and examples/debug-media reproduce the functionality. Generated logs, DOS captures and review receipts are retained outside the repository. Historical-source fixtures are not distributed here.