AtlatestRepositoryfolio
1
;;; F1b -- load ONE manuscript, in a fresh process, and report what happened.2
;;;3
;;; WHY ONE MANUSCRIPT PER PROCESS. The no-execution claim is about ABSENCE:4
;;; that no tripwire fired. If several manuscripts were loaded into one process,5
;;; a marker printed by the positive control and a marker printed by the6
;;; manuscript under test would be indistinguishable in the same stdout, and a7
;;; sentinel written by either would sit in the same directory. The gate8
;;; therefore runs this file once per fixture with its own `F1B_WITNESS_DIR`, so9
;;; "no marker" is a fact about one process and one manuscript.10
;;;11
;;; TWO DETECTION CHANNELS, as F2a established: stdout markers AND filesystem12
;;; sentinels. Two channels because a single one that silently stopped working13
;;; would report the absence this arm exists to assert -- and the absence would14
;;; be indistinguishable from success.15
;;;16
;;; The outcome line is printed on BOTH paths, refused and loaded alike, so the17
;;; gate never has to infer what happened from an exit code. A gate that reads18
;;; only an exit status cannot tell "refused as designed" from "the harness19
;;; could not run".20
(import (sigil core) (sigil fs) (folio doc))22
(define fixture23
(let ((v (getenv "F1B_WITNESS_FIXTURE")))24
(if (and (string? v) (> (string-length v) 0))25
v26
(error "F1B_WITNESS_FIXTURE is unset; this harness refuses to report an absence it did not look for"))))28
;; The message is captured here rather than left to propagate, because the29
;; `#lang` load path DISCARDS a reader's exception message30
;; (`compiler.c:530-532` reads the C-level `vm->error_message`, which is empty31
;; for a Scheme-level raise). What survives to this handler is therefore the32
;; compiler's wrapper text, not folio's refusal wording -- which is exactly why33
;; `test/gate-f1b.sh` asserts the WORDING through a direct `read-language-source`34
;; call in a different arm, and asserts only OCCURRENCE here.35
(define outcome36
(guard (exn (else (string-append "REFUSED " (exception-message exn))))37
(load fixture)38
"LOADED"))40
(display "F1B_WITNESS_OUTCOME ")41
(display outcome)42
(newline)