Repository navigation
feat(sites): run a workflow on a machine of your own over ssh - #588
vjaganat90 wants to merge 3 commits into
Conversation
79689dd to
bf25c8f
Compare
bf25c8f to
2bbd7e1
Compare
cfb1eed to
585e02f
Compare
darkclad
left a comment
There was a problem hiding this comment.
I reviewed this PR's own three commits (55be7c1..585e02f, on top of #587), mainly sites.py and the lowered_for_site / _lowered_for_run change. The transport guard, the claim and traps in job.sh, decide against Appendix B, the _PUT offsets that status reads run.log with, and cancel's process-group kill all hold up as written, and moving inline_artifact_runs into _lowered_for_run leaves the local run's document unchanged. CI is green. I did not run the suite: a Machine is refused on Windows.
Two small points inline, neither blocking.
| _HOST: Final = re.compile(r'[A-Za-z0-9_][A-Za-z0-9_.@:-]*') | ||
| _FOLDER: Final = re.compile(r'/[A-Za-z0-9/._+-]*') | ||
| _NAME: Final = re.compile(r'[A-Za-z0-9_][A-Za-z0-9_./+-]*') | ||
| _RUN_ID: Final = re.compile(r'[A-Za-z0-9][A-Za-z0-9_.-]*') |
There was a problem hiding this comment.
A run id starts with the workflow's name, and check_written_name accepts a name that starts with _ or - (WRITTEN_NAME is [A-Za-z0-9_-][A-Za-z0-9_.-]*). _RUN_ID requires a letter or digit first. So Workflow(steps, '_align') submits fine and prints Machine(...).attach('_align-20261123T...-...'), and that line then raises ValueError: ... is not a run id. That is the one line submit says follows the run from anywhere. Letting _RUN_ID start with [A-Za-z0-9_-] fixes it; every use of the id is quoted and sits under <root>/sophios/runs/, so a leading - is never read as an option.
There was a problem hiding this comment.
Fixed in ac3240e1. attach checks the id against WRITTEN_NAME, the pattern of a workflow's name, and the id's own pattern is gone, so the two cannot drift apart. The id no run has, in test_a_script_runs_there_only_as_it_was_sent, now starts with -; its three cases raised the ValueError before the change.
| for path in files} - {'.'})), | ||
| *(f'printf %s {_q(text)} > {_q(f"{run}/{path}")}' for path, text in files.items()), | ||
| f'cd {_q(run)}', 'set -m', | ||
| f'nohup bash -l {_q(f"{run}/job.sh")} > {_q(f"{run}/run.log")} 2>&1 < /dev/null &']) |
There was a problem hiding this comment.
run.log is opened twice with different modes: here with > (truncate, no append), and in job.sh with >> around the runner. The outer descriptor keeps its own offset, so anything job.sh writes outside the braces after the runner started (a module load message, an error from the EXIT trap's chmod/rm/mv, a set -u failure) lands at that stale offset and overwrites the runner's output. A login profile that prints is enough to put that offset past zero. Reproduced with a three-line script: profile says hi / runner lines appended / one later stderr line gave profile says hi, trap: rm failed, NNER LINE 2. status reads run.log from the byte count it already holds, so the overwritten bytes are also never shown again by wait(). Opening it with >> here fixes both.
There was a problem hiding this comment.
Fixed in ac3240e1: the leader is started with >>, as job.sh opens run.log for the runner and as the Slurm header's --open-mode=append does in #589. test_run_log_is_only_added_to_whoever_writes_it runs the real leader script with a runner of its own that removes its scratch, so the trap's chmod speaks after the runner; before the change its line had replaced the runner's, as in your reproduction. The design's line (§7) says >> too.
a7449df to
c41e7a0
Compare
S2 builds Machine and Run, and records in sites-design.md §17 what it found: macOS has no setsid, so the leader takes a process group of its own with `set -m`; the traps follow the claim at once; Toil's scratch folders are made before Toil starts, which refuses a --workDir that does not exist; the guard prints the hash before the script, so a login profile's output is never read as the script's; the runner versions a site takes; Toil's single_machine refuses a step that asks for more memory than the machine has, so check() notes each Toil step that declares no memory on a machine too, wic066; a run unclaimed ten minutes after its submit is claimed `none` on a machine too; the codes S2 adds and reuses; a Machine is refused when it is made on Windows itself; and the known limit of a StepInput default's path. Decision 18's exception to the Nextflow design's non-goal lands here, with the first PR that runs a pipeline on a site and sets one of its settings: executor.queueSize, in a block the site appends to the run's copy of the generated nextflow.config (decision 25). Decision 27 (2026-11-24, the owner's) replaces 26: check() and submit() take the runner as a value, as Workflow.run does, and a site takes from it only the flags of one table, Toil's --maxJobs and --clean and Nextflow's -qs; max_parallel= and clean= are gone.
c41e7a0 to
1ea23ad
Compare
sophios.sites.Machine(host, root=, bin=) runs a workflow on a computer you can ssh to, macOS or Linux, as yourself. check() compiles and lowers here as run() does, by the one function both call, with relative paths read against root, and judges in one call there each input the backend's needs names, the runner in bin and its version, the container engine, and the folders it writes; it writes nothing. A site runs each target with one runner, toil-cwl-runner for cwl and nextflow for nextflow, so target= names it, and runner= takes it as a value, as Workflow.run does, for the flags a site takes from it: Toil's --maxJobs and --clean, Nextflow's -qs. One function reads the value: another runner, a setting of the value's own or any other flag is a ValueError, since a site sets every other flag itself and its engine is its container_engine=. The run's runner is built with the site's container engine, which the site reads back from it. Under Toil it notes each step whose tool declares no memory, which Toil gives 4 GiB there and refuses to start on a machine with less. submit() copies the run's files into <root>/sophios/runs/<id> and starts job.sh, which claims the run with its pid, runs the backend's launch from bin with a machine's flags (Toil's single_machine), and records how it ended. Nextflow takes no flags of the site's: how many tasks run at once is executor.queueSize, in a block the site appends to the run's copy of nextflow.config, the one configuration the backend has Nextflow read. Run follows the run as RunHandle does, with id and a repr that attaches; its end is the backend's own outcome over what the run left. Every call is the user's ssh with the script on its input, run only when its sha256 matches. On Windows itself a Machine is refused when it is made. The new codes are wic062 to wic066, of kind machine, wic066 a note; wic015, wic016, wic021 and api008 cover what they already mean. tests/core/test_sites.py runs in the package job (about 60 s), with a local bash for ssh and the real Toil; its Nextflow row runs in Lint And Test's Nextflow Runtime step, which now names the file (about 15 s), and reads the capacity Nextflow's log gives its executor. The walk gives each runner as a value, and reads what it asks in the job, in that capacity and in the run's record. The site codes' provocations go through the same local bash; the Windows leg checks that a Machine is refused there.
docs/sites.md opens with the sites design's first message, then says how to make a Machine and reach it, which runner runs each target and how (a Toil step that declares no memory gets 4 GiB there), what check and submit do, how a run is followed and where its folder is, what cleanup leaves, and what each code means. It sits under Run and manage, and the pages that list the kinds of code, api008 and the run path name a site.
1ea23ad to
4cf33c0
Compare
What
The second of four PRs for Sites (
design_docs/sites-design.md):sophios.sites.Machine, a computer of your own you cansshto, macOS or Linux, such as a workstation or a cloud instance. An EC2 instance works from here on.ssh -T -o BatchMode=yes -o RemoteCommand=none -o ConnectTimeout=20 -o ServerAliveInterval=15 -o ServerAliveCountMax=3 <host> "bash -l -c '<guard>'", with the script on its input, run only when its sha256 matches. The guard prints the hash before it runs the script, so what a login profile prints is never read as the script's output. Tests replacessh <host>with a localbash, and nothing else.checkcompiles and lowers here, through the target table (the new_workflow_runtime.lowered_for_site), reading relative paths againstrootand refusing..,~,$and real-time analyses. It calls the backend'swriteinto a temporary folder and itsneeds, then asks the site everything in one call: its platform, every input path,<bin>/<program>and its version, the container engine when a step runs in a container, whether<root>/sophioscan be written andoutdiris free. It returns every problem at once and writes nothing on either side. Under Toil it notes each step whose tool declares no memory (wic066), which Toil gives 4 GiB there and refuses to start on a machine with less.submitraisescheck's errors with nothing written. Otherwise it prints the id, the runner, how many steps run at once and the outputs folder, each with its source, and in one call that ignores hang-ups it makes<root>/sophios/runs/<id>and the outdir (each only if new), writesjob.sh,run.jsonand the backend's files, and starts the leader withset -m; nohup bash -l job.sh &.job.shis the design's Appendix A in its machine form: the claim with$$, the EXIT and TERM traps, Toil's scratch removed as the run's--cleansays,exitwritten last, and the backend's launch run frombinwith what a machine adds (ON_A_MACHINE:--batchSystem single_machineand Appendix A's flags for Toil; no flag for Nextflow). For Nextflow the site appendsexecutor { queueSize = <max_parallel> }to the run's copy ofnextflow.config, the one configuration the backend has Nextflow read, from one function, the one place a site sets anything of Nextflow's (decisions 18 and 25).Runhasid,status,wait,outputs,logsandcancel, and areprthat is theattachline. Its states follow Appendix B on a machine, withps -ww -o args= -p <pid>read beforeexit. A run's end is its backend's ownoutcomeover the run's files, read once.targets.TARGETSruns on a machine, with the one runner a site runs it with:toil-cwl-runnerforcwl, withsingle_machine, and Nextflow fornextflow, with the local executor.checkandsubmittaketarget=andrunner=asWorkflow.rundoes (decision 27): the runner as a value, for the flags a site takes from it,Toil('--maxJobs', '8', '--clean', 'onSuccess')orNextflow('-qs', '8'); another runner, another flag or a setting of the value's own is aValueError. No site runs cwltool (decision 22). A Nextflow process with a container needscontainer_engine='docker'; otherwisecheckrefuses it by name (wic065). A test walkstargets.TARGETS, so a target added there cannot silently miss a machine.machine, each explained bysophios --explainand listed indocs/error_codes.md: newwic062(the site cannot be reached or used, or Sophios runs on Windows itself, where making aMachineis refused),wic063(the runnerbinlacks, that does not run there, or that is older than a site runs),wic064(an id that names no run),wic065(a Nextflow container without Docker), andwic066(a note: a Toil step that declares no memory).wic015,wic016,wic021andapi008are reused, their explanations widened to name a site.design_docs/sites-design.md§17, in thedesign:commit:set -minstead ofsetsid, which macOS lacks;single_machinerefusing a step that asks for more memory than the machine has, so the memory note applies on a machine too;noneon a machine too;Machinerefused on Windows itself;StepInput(default=...)File is made absolute against the local working directory.What changes for callers
Nothing for a local run, on the command line or in the Python API. What is new:
sophios.sites, whichsophios.api.pythonneither exports nor knows; the codeswic062towic066; and wider explanations forwic015,wic016,wic021andapi008. Inside the package:preflight._written_pathis now public aswritten_path, so a site reads input paths as the pre-flight does;targets.for_runtakes aPurePath; and_workflow_runtime.lowered_for_sitelowers a workflow for a site, through_lowered_for_run, which now takes the folder relative paths are read against.Why
The goal is decision 1: develop and test on a workstation, then run the same workflow on a cloud VM or a cluster as yourself, changing about one line, with nothing of Sophios installed there. This PR is the machine half. Slurm follows in S3 (the CWL runners) and S4 (Nextflow).
Verified
2026-11-24, a race in
statuson Linux, found by CI on feat(sites): run Nextflow on a Slurm cluster #590 and fixed here.stat -c %Y … || stat -f %m …: GNU's form, then BSD's. On Linux, when the run ended between the two, so thatexitappeared after-chad missed it, GNU's-f, which is the file system's, printed its report into the answer, andstatus()raised aValueError(too many values to unpack, once, on feat(sites): run Nextflow on a Slurm cluster #590's Lint And Test). macOS never took that path.stat's form once, by askingstat -c %Y ., and never falls from one to the other. A run that ends in that instant reads as ended, with its exit status and no end time.statthat reads as GNU's on any computer and missesexitonce after it is there. It failed before the fix on macOS too, and on feat(sites): run a workflow on a Slurm cluster, with the CWL runners #589's Slurm rows with CI's own error; the fixed lines were also run against GNUstatin a Debian container._settings, not_askedas this morning: from feat(sites): run a workflow on a Slurm cluster, with the CWL runners #589 a site has a method_asked, whatstatusasks its scheduler.mypyover all files andpylintonsophios.sitesand its tests are clean at the top of the chain, where 603 tests are collected.tests/core/test_sites.pywith Nextflow 26.10.5 passed at each PR on its own with the fix: 60 cases at feat(sites): run a workflow on a machine of your own over ssh #588, 82 at feat(sites): run a workflow on a Slurm cluster, with the CWL runners #589, 83 at feat(sites): run Nextflow on a Slurm cluster #590. The whole lanes are CI's.2026-11-24, decision 27 (owner): a site takes the runner value, and from it only the flags a site knows. It replaces decision 26.
checkandsubmittaketarget=andrunner=asWorkflow.rundoes;max_parallel=andclean=are gone.runner=Toil('--maxJobs', '8', '--clean', 'onSuccess'),runner=Nextflow('-qs', '8'); None is the runner with no flags, sosubmit(workflow)andsubmit(workflow, target='nextflow')read as before._settings, reads the value, and one table,_FLAGS, names the flags a site takes from each runner and the setting each gives: how many steps run at once (--maxJobs,-qs; 64 when not given) and when Toil's scratch is removed (--clean). The site gives each where the runner reads it, Toil's command line or Nextflow's configuration, as before; no flag of the value is passed on as written, and each value is a count or one of three names, so none is free text.ValueErrorbefore anything is compiled: a runner that is not the site's for the target (Cwltool(...), a name as text), a value with a setting of its own (the engine is the site'scontainer_engine=, the others act on this machine), any other flag, a flag with no value, and a value it cannot have.max_parallelandclean, each with the flag that gave it (--maxJobs,-qs,--clean) or "Sophios's default".targets.TARGETSgives each runner as a value and reads what it asks injob.sh, in the capacity Nextflow's log gives its executor and inrun.json. Ten mutations of_settingsand of what reaches the runner, each caught.sites.pypasses 750 lines here, so it carries thetoo-many-linesexemption feat(sites): run a workflow on a Slurm cluster, with the CWL runners #589 already has, until feat(sites): run Nextflow on a Slurm cluster #590 makes it a package.docs/sites.md("Runner flags") say the same.mypyover all files,lint-imports(8 contracts kept) andpylintonsophios.sitesand its tests are clean at the top of the chain, where 603 tests are collected.tests/core/test_sites.pywith Nextflow 26.10.5 passed at each PR on its own: 60 cases at feat(sites): run a workflow on a machine of your own over ssh #588, 82 at feat(sites): run a workflow on a Slurm cluster, with the CWL runners #589, 83 at feat(sites): run Nextflow on a Slurm cluster #590; after those runs feat(sites): run a workflow on a machine of your own over ssh #588 only moved the walk's runner values to a constant (its two tests run again) and feat(sites): run a workflow on a Slurm cluster, with the CWL runners #589 only reworded a comment. The whole lanes are CI's.2026-11-23, review (darkclad): two fixes, folded into the feature commit, and the design corrected in the design commit.
attachtakes every idsubmitprints. A run id starts with its workflow's name, which may start with_or-, and the id's own pattern refused those. The id is now checked against the pattern of a name (lang.names.WRITTEN_NAME), so there is one rule. An id is only ever used quoted, in a path under<root>/sophios/runs/.run.logis opened to be added to by the call that starts the leader (>>), asjob.shopens it for the runner and as Slurm's--open-mode=appendopens it. Opened with>, what the leader said after the runner (an error of its trap'schmodorrm) was written over the runner's lines.-, in three cases of an existing test; one new test runs the real leader script with a runner of its own that removes its scratch, and readsrun.log(before the fix the trap's line had replaced the runner's).nohupline with>>;<bin>/<name>where three places said<bin>/<program>(a site runs the runner'sname, §6);request.run.outdirwhere §6.1 saidrequest.outdir; and the sample line of §3 says "at most 64 at once", assubmitprints it.mypyover all files,lint-imports(8 contracts kept) andpylintonsophios.sitesand its tests clean; 596 tests collected;tests/core/test_sites.pywith Nextflow 26.10.5: 76 passed. At this PR's own tip, before the fold: its 52 cases without Nextflow passed. The whole lanes are CI's.2026-11-23, refactor: a backend describes a run, and the machine acts #587 merged; rebased onto master
9c0b56e1, whose tree is the tree of the refactor: a backend describes a run, and the machine acts #587 head this chain sat on (c84b7e61), so each PR's tip has the content it had: a replay with no conflict, and nothing run again.git range-diffshows the 9 commits unchanged.2026-11-23, feat(compute): run a workflow on the compute service with Nextflow #597 merged; rebased onto master
d553d7a8, whose tree is the tree of the feat(compute): run a workflow on the compute service with Nextflow #597 head this chain sat on (81995735), so each PR's tip has the content it had: a replay with no conflict, and nothing run again.git range-diffshows the 11 commits unchanged.2026-11-23, feat(compute): run a workflow on the compute service with Nextflow #597 moved to the front of the chain (owner: let the sites review happen independently). The order is now feat(compute): run a workflow on the compute service with Nextflow #597, refactor: a backend describes a run, and the machine acts #587, feat(sites): run a workflow on a machine of your own over ssh #588, feat(sites): run a workflow on a Slurm cluster, with the CWL runners #589, feat(sites): run Nextflow on a Slurm cluster #590, with feat(compute): run a workflow on the compute service with Nextflow #597 on master (
4b11628d). feat(compute): run a workflow on the compute service with Nextflow #597 takeswic061, so the sites' codes are one up: this PR's arewic062towic066, in the code, the tests, the pages, the design and the commit messages. The text above says them as they are now; the entries below keep the numbers of their day. The sentences about Docker (wic065's explanation and message, two docstrings and the paragraph ofdocs/sites.md) are written here as feat(compute): run a workflow on the compute service with Nextflow #597 used to rewrite them: Docker only is the need of the pipelinecompile()writes, which a site runs. The chain's new top is its old top with the codes renumbered, byte for byte, but for three things: wherewic061sits in the code table and in the provocations, now in the order of the numbers, and feat(compute): run a workflow on the compute service with Nextflow #597's test fix. Checked at this PR's tip, before feat(compute): run a workflow on the compute service with Nextflow #597's test fix beneath it:mypy(239 files) clean, every test module imports (572 tests), the census of codes passed, andtest_compute.py,test_backends.py,test_diagnostics.py,test_ci_coverage.pyandtest_entry_points.pywithtest_sites.py: 116 passed. The whole lanes are CI's.2026-11-23, rebased onto master (
4b11628d), seven commits on from252d37a2: master deletes thepython_scriptstep with its codewic014, and says why the warning refactor: a backend describes a run, and the machine acts #587 drops is filtered. No conflict in this PR:git range-diffshows its commits as the patches they were, with two lines of context that are now master's (the Compile row ofdocs/checks-and-errors.md, which readswic011–wic013, and the imports oftests/core/provocations.py). Checked at the chain's top (481a8a04), not by the lanes, which CI runs:mypyas the pre-commit hook runs it, clean; every test module imports (595 tests collected); nothing in the chain names what master deleted.2026-11-20, rebased onto refactor: a backend describes a run, and the machine acts #587's new tip (
8689def3), which adds the fix that drops schema-salad'spreviously definedwarning wherever CWL is loaded. A replay with no conflict:git range-diffshows each of this PR's commits as the patch it was.2026-11-18, on master (
252d37a2): the site's flags are set where the run is placed._preparegives the runner the machine's flags and makes the request once;_job(request, clean, folders)launches the request as it is given, where it tookmax_paralleland wrapped the request again, twice.RunSettingstakes the run'soutdirunder Nextflow too, whose launch does not read it, where a branch gave it''. The runner is still built without flags first: the backend and the check need a runner value before the one call whose answer, on Slurm, the flags need, so one statement gives it the site's flags once the run is placed. No change of behaviour, measured at this PR's tip against the tip before: over 4000 generated runs (each target, the engines,clean,max_parallel, values a site takes and values it refuses), the scripts a site sends, which carry every file of the run, its diagnostics and whatsubmitprints are the same bytes. The property that reads Toil's line back through Toil's parser builds its runner with the table's flags and asserts what it did; the walk now asserts--maxJobs 64injob.sh, which holds the flags reaching the launch from_prepare. Mutation at the chain's top: 9 rules broken one at a time, each caught.tests/core/test_sites.pyhere: 52 passed.2026-11-18, rebased onto feat(lang): write a tool in .wic #609 as rewritten (
603c2194). feat(lang): write a tool in .wic #609 moved three times during the day (aef7ab98,681d54c6,603c2194) and the chain's 15 commits were replayed onto each. Three conflicts in all: two in feat(compute): run a workflow on the compute service with Nextflow #597 (the runtime adapter's imports, where feat(lang): write a tool in .wic #609 droppedlang.tool; the Compile row of the layer table indocs/checks-and-errors.md, which is feat(lang): write a tool in .wic #609's withwic067at its end) and one in feat(sites): run a workflow on a machine of your own over ssh #588 (the provocations table, where feat(lang): write a tool in .wic #609 removed theINVALID_NAMEentry the hunk sat beside).git range-diffshows no other change to any commit than the codes. What was run locally, and where: ataef7ab98, the whole chain was gated once at feat(compute): run a workflow on the compute service with Nextflow #597's tip as master's lanes run (mypy251 files,lint-imports8 contracts kept,pre-commit,autopep8,pylint9.95 as feat(lang): write a tool in .wic #609's tip, the chain adding the twotoo-many-linesmessages of feat(compute): run a workflow on the compute service with Nextflow #597;test_entry_points.pywithtest_ci_coverage.py12 passed; the census of codes 4 passed; the package job's selection 465 passed, 8 skipped; the Nextflow Runtime step 32 passed), with six failures, each reproduced on feat(lang): write a tool in .wic #609's head alone: the five known on this Mac (macOSwcpadding, four cases; Python 3.14'sPurePath.as_uri()deprecation, one) and one Hypothesis draw oftest_a_scatter_records_what_cwl_defines_for_its_methodwhose captured text passes the 64 KiBloadContentstakes. At681d54c6and603c2194each commit passed its pre-commit hooks,mypyamong them, and nothing else was run locally: CI is the gate for this head.feat(lang): write a tool in .wic #609 now assigns
wic058towic060, so every code of this chain moved up by two:wic061towic065in feat(sites): run a workflow on a machine of your own over ssh #588,wic066in feat(sites): run a workflow on a Slurm cluster, with the CWL runners #589,wic067in feat(compute): run a workflow on the compute service with Nextflow #597, in the code, the docs, the tests, the design and the commit messages. The numbers in the entries below are the ones the codes have now. The mutation of 2026-11-17 was run again at the chain's top onaef7ab98: 12 of 12 caught.2026-11-17, rebased onto feat(lang): write a tool in .wic #609 (
b7ff2244), which carries fix(plugins): read a tool when a step runs it #608 and the tool documents. The whole chain was gated once at feat(compute): run a workflow on the compute service with Nextflow #597's tip, which contains this PR (CI runs each PR on its own), as master's lanes run:mypy(251 files),lint-imports(8 contracts kept),pre-commit runfrom feat(lang): write a tool in .wic #609's tip to the top (22 hooks),autopep8,pylint src/ examples/**/*.py tests/(9.96, feat(lang): write a tool in .wic #609's tip 9.95; the chain adds two messages to feat(lang): write a tool in .wic #609's, bothtoo-many-linesand both in feat(compute): run a workflow on the compute service with Nextflow #597:_workflow_runtime.pyat 763 lines andcompute.pyat 751) andmake html, whose pages are written, the code table listingwic057towic067and the contents the Sites page, and whose one warning is intersphinx's inventory fetch, which this network's proxy refuses and the docs Makefile now makes an error, on feat(lang): write a tool in .wic #609's tip alike;test_entry_points.pywithtest_ci_coverage.py12 passed; the census of codes (test_lang_parser.pyand its three siblings,-m skip_pypi_ci) 4 passed; the package job's selection (-m "not skip_pypi_ci and not nextflow and not cwl_corpus") 502 passed, 8 skipped; Lint And Test's Nextflow Runtime step with Nextflow 26.10.5 33 passed. Five cases fail on this Mac at this tip and at feat(lang): write a tool in .wic #609's alike:[commands]and[nested]oftest_an_example_runs_under_cwltool_as_statedand oftest_an_example_workflow_runs_under_nextflow_as_stated(macOSwcpads its count), andtest_cookbook.py::test_every_pair_compiles_alike_from_both_surfaces_and_as_stated, which stops on Python 3.14's deprecation ofPurePath.as_uri()in master'slang/cwl.py. The gate ran on feat(lang): write a tool in .wic #609 at0801d5bc; feat(lang): write a tool in .wic #609 was then rebased onto master asb7ff2244with the same tree, and the chain replayed onto it, changing one line of the design.feat(lang): write a tool in .wic #609 assigned
wic058(a tool document Sophios cannot read), so every code of this chain moved up by one again:wic061towic065in feat(sites): run a workflow on a machine of your own over ssh #588,wic066in feat(sites): run a workflow on a Slurm cluster, with the CWL runners #589,wic067in feat(compute): run a workflow on the compute service with Nextflow #597, in the code, the docs, the tests, the design and the commit messages.Decision 26 (owner, 2026-11-17): a site takes no
runner=. Replaced by decision 27 (2026-11-24), above. Since decision 22 a site runs each target with one runner, so the runner follows fromtarget=. Locally feat(run): runner values on run(), and one run for both doors #600 made the runner a value,run(runner=Toil(...)); a site taking that value would take settings that are this machine's and flags that compete with the ones the site sets. Socheckandsubmittaketarget=alone. What went: the parameter, the refusal of cwltool before anything is compiled, that half ofwic062, its sentence insophios --explainand in the docs, and the walk's refusal rows; the walk is overtargets.TARGETS. The run's record still names its runner, witha site's runner for <target>as where it comes from.What else changed here, with no change of behaviour. The site reads the container engine from its runner value: a CWL runner takes the site's and Nextflow's is Docker, so the refusal of a container (
wic064) is "the runner's engine is not the site's", and the engine a check probes and the Singularity caches a job sets follow the runner's, where three places asked whether the runner was Nextflow.lowered_for_sitelowers through_lowered_for_run, the functionrun()andcheck()lower with: it takes the folder relative paths are read against, the working directory by default, and gives a CWL runner the one documentcompile()returns, which was written three times. The runner is still built without flags and given the site's once Slurm has placed the run: the flags need the answer of the check that needs the runner.checkandsubmittypetarget=aswic_types.TargetName, as feat(lang): write a tool in .wic #609 now types everytarget=.Mutation at the chain's top: 12 rules of what this change and the rebase moved, broken one at a time, each caught, once four that no test held, before this change or after, were given one. The tests' working directory is no longer the site's
root, and holds no data, so every path they read is read againstroot. The table of refused options has a target no table has. The table ofcheck's problems has a Nextflow container on a site whose Docker answers, which is not refused. The walk asserts the Singularity caches for Toil on Slurm (feat(sites): run a workflow on a Slurm cluster, with the CWL runners #589) and none for Nextflow (feat(sites): run Nextflow on a Slurm cluster #590).2026-11-16, rebased onto refactor: one statement for each fact, in docs, tests and the Nextflow target #605 (
05d2533a), which sits on master with feat(run): runner values on run(), and one run for both doors #600's runner values. The whole chain was gated once at feat(compute): run a workflow on the compute service with Nextflow #597's tip, which contains this PR (CI runs each PR on its own), as master's lanes run:mypy(247 files),lint-imports(8 contracts kept),pre-commit runfrom refactor: one statement for each fact, in docs, tests and the Nextflow target #605's tip to the top (22 hooks),autopep8,pylint src/ examples/**/*.py tests/(9.95) andmake html(its code table listswic057towic067, its contents the Sites page);test_entry_points.pywithtest_ci_coverage.py12 passed; the census of codes (test_lang_parser.pyand its three siblings,-m skip_pypi_ci) 4 passed; the package job's selection (-m "not skip_pypi_ci and not nextflow and not cwl_corpus") 440 passed, 8 skipped; Lint And Test's Nextflow Runtime step with Nextflow 26.10.5 33 passed. Five cases fail on this Mac at this tip and at refactor: one statement for each fact, in docs, tests and the Nextflow target #605's alike:[commands]and[nested]oftest_an_example_runs_under_cwltool_as_statedand oftest_an_example_workflow_runs_under_nextflow_as_stated(macOSwcpads its count), andtest_cookbook.py::test_every_pair_compiles_alike_from_both_surfaces_and_as_stated, which stops on Python 3.14's deprecation ofPurePath.as_uri()in master'slang/cwl.py.Master assigned
wic057meanwhile (a tool cwltool refuses), so every code of this chain moved up by one:wic061towic065in feat(sites): run a workflow on a machine of your own over ssh #588,wic066in feat(sites): run a workflow on a Slurm cluster, with the CWL runners #589,wic067in feat(compute): run a workflow on the compute service with Nextflow #597. Each is declared as master now declares a code, with its explanation in the enum;docs/error_codes.mdis built from them. The page joins the contents once, indocs/toctrees.inc.What the rebase changed here: the site builds its runner as a value (
runners.build, with the site'scontainer_engine) and hands the backend aRunSettings, where it filled a request's loose fields; it reads the runner'snamewhere it read the backend'sprogram.runner=still takes a name on a site.lowered_for_sitereads paths againstrootwithtargets.for_run, master's replacement forrun_setup.absolute_view, and a step's tool is master'swic_types.Tool. Master droppedWINDOWS_EXCLUDED, so this PR adds no entry to it.Mutation of the lines the port rewrote found three rules no test held, before the rebase or after: the run's
outdirreaching the runner, a site being sent the one documentcompile()returns, and the site's container engine reaching the runner. The walk now asserts the first two here and the third in feat(sites): run a workflow on a Slurm cluster, with the CWL runners #589, where Slurm'ssingularitytells it from the default; each mutant is caught.2026-11-13, after feat: one table of targets, and nf-s codes for Nextflow refusals #586 and fix: an output directory is a Directory literal #598 merged, rebased onto master
123ab482, the whole chain was gated once at feat(sites): run Nextflow on a Slurm cluster #590's tip, which contains this PR (CI runs each PR on its own), as master's lanes run:mypy(249 files),lint-imports(7 contracts kept),pre-commit run --from-ref 123ab482 --to-ref HEADover every file the chain changes,autopep8andpylint src/ examples/**/*.py tests/as Lint And Test runs them (9.94; the two messages it gave on lines the rebase wrote were then fixed in refactor: a backend describes a run, and the machine acts #587's code commit, a comment and a docstring's wrap, and checked again), andmake htmlwith no warning but intersphinx's two inventory fetches, which this network's proxy refuses;test_entry_points.pywithtest_ci_coverage.py16 passed; the package job (python -m pytest -m "not skip_pypi_ci and not nextflow and not cwl_corpus") 413 passed, 8 skipped; Lint And Test's Nextflow Runtime step with Nextflow 26.10.5 (pytest tests/core/nextflow tests/core/test_sites.py -m "nextflow and not nextflow_corpus") 31 passed, the walk's runs on a machine and on Slurm among them. Each of the two failed the same two cases, which fail on master here too:test_an_example_runs_under_cwltool_as_statedandtest_an_example_workflow_runs_under_nextflow_as_stated,[commands]and[nested], whosewccount macOS pads and GNU's does not (CI runs Ubuntu).--collect-onlyshows the walk'smachine-nextflowandslurm-nextflowcases collected by the Nextflow Runtime step and the weekly Python matrix, and by no lane without Nextflow. The counts below are this PR's own, from before these changes, under Nextflow 26.04.2; those of the nextflow lane were measured there, before feat: one table of targets, and nf-s codes for Nextflow refusals #586 removed it.The rebase's conflicts with master: the site's job values come from
runtime_inputs.runner_job_inputs, fix: an output directory is a Directory literal #598's replacement fornormalize_artifact_job_inputs, with the view's output targets; the check that aMachineis refused on Windows itself is asitecase of master's one Windows test,test_each_door_says_to_run_in_wsl; and Lint And Test's Nextflow Runtime step, which selects the tests markednextflow, getstests/core/test_sites.pyin its one command instead of a second command.mypy(263 files),lint-imports(7 contracts kept),pylintonsrc/and the changed tests (no new message), andautopep8 --exit-code --diff --max-line-length 120on the changed files: all clean. No.shfile is added.Each lane that collects a changed test file, run as its workflow runs it:
python -m pytest -m "not skip_pypi_ci and not nextflow" -k "not test_cwl_docker_extract"): 2858 passed, 20 skipped, 1 xfailed;tests/core/test_sites.pytoo: 82 passed. That lane is now Lint And Test's Nextflow Runtime step, which selects the tests markednextflow; this PR addstests/core/test_sites.pyto its one command, so the Nextflow row of the walk overrunners.RUNNERSruns there, and the rest of the file in the package job;lint_and_test's environment-dependent step, which fires every code's provocation: 120 passed;test_ci_coverage.pywithtest_entry_points.py: 17 passed;test_run_on_windows.py, which skips off Windows.tests/core/test_sites.pyruns in the package job in about 60 s locally, all against a localbashforsshand the real Toil. They cover:bashand the guard;cleanand exit status;checkreporting every problem at once and writing nothing;ResourceRequirement(384 cases, under a second);targets.TARGETS;The provocations of the site codes go through the same local
bash. On the Windows leg, where Sophios makes no site, onlywic061fires, andtest_run_on_windows.pychecks that aMachineis refused.The code commit adds 393 test lines against 838 in
src/. Each commit passes its lanes on its own.Mutation checks:
wic062message.ramMaxignored; the runner judge, the Docker-only refusal,attach's unknown run and an ssh that cannot run each disarmed.sys.platformset towin32; the test itself runs on the Windows leg.