AtlatestRepositoryfolio
1
;;; DEV-SHAPE wrapper for the bounded worker.2
;;;3
;;; The worker's implementation lives in `(folio doc worker)`, which the BUNDLED4
;;; second entry point (`folio-doc-worker`) also calls. This file exists only so5
;;; the same payload can be driven under the `sigil` runtime with `-L` paths,6
;;; which is what the dev-shape gate and sabotage runs use.7
;;;8
;;; ONE IMPLEMENTATION, TWO ENTRY PATHS, AND THAT IS THE POINT: the containment9
;;; claim was proven against the dev shape, and re-proving it against the bundled10
;;; shape only means something if both shapes run the same code. Otherwise the11
;;; re-run compares two programs rather than two ways of starting one.12
;;;13
;;; This wrapper cannot ship: it needs `sigil` on PATH and a resolvable `-L`14
;;; tree, and a deployed folio has neither.15
(import (sigil core) (sigil string) (sigil process) (folio doc worker))17
;; `(command-line)` here is the WHOLE invocation -- interpreter, `-L` pairs,18
;; this script, then arguments -- so the manuscript is whatever follows the19
;; script path, not `(cadr argv)`.20
(define (args-after-script rest)21
(cond22
((null? rest) '())23
((string-ends-with? (car rest) ".sgl") (cdr rest))24
(else (args-after-script (cdr rest)))))26
(exit (worker-main (args-after-script (command-line))))