Description
#271's design update of 2026-11-01 fixes the shape of a command root, but it does not give the declarations of LexLeanStd.Host. A consumer preparing for #271 has to guess them. This asks for the exact declarations to be published ahead of the first slice's landing, for example as a draft PR holding only stdlib/src/Host.lex.tex, or as a code block on #271.
Where this was checked. Compiler pinned at 3877351 (release/v0.5 line, lexlean 0.4.0, language 1.2). origin/main (71defb4), origin/release/v0.4 (45ce11d) and origin/release/v0.5 (ed549c2) were read on 2026-11-01. git grep -E 'LexLeanStd\.Host|LexLeanHost|RuntimeHost' has no hits on any of them. No commit on any fetched ref cites #271, no head name contains 271, and no open PR holds the slice. A branch under an unrelated name may exist that was not scanned; #271 says the first slice is written.
At the pin the effect is not registered yet, as expected before #271 lands:
\begin{lexlean}{Main}
\useglossary{lexlean.std.bool@1.2.0}
\useglossary{lexlean.std.nat@1.2.0}
\title{Boolean}
\begin{semanticmodule}
definition{
name: root,
parameters: [x : Bool],
result: Bool,
body: x,
executable: true,
production: {effects: [allocation, files, overflow], targets: [rust-std]}
}
\end{semanticmodule}
\end{lexlean}
error[LLT4001]: phase link: production root `root` names unregistered effect `files`
--> src/Main.lex.tex:6:1
What the design leaves open
The update says it replaces the first design of 2026-10-22, so the first design's answers cannot be assumed to carry over.
| Item | What the accepted text says | Still open |
|---|---|---|
Event.start |
carries "the arguments, working directory, executable path, environment, and whether stderr is a terminal" | field order and types; the environment's type and order |
Event.start arguments |
lists arguments and executable path separately | whether arguments include argv[0] (the first design named std::env::args_os, which yields it first) |
| Answering events | none named | constructor names and payloads for each of the 13 requests that answer |
Failure |
"a closed kind plus the host's message as bytes" | the kinds (the first design had notFound, denied, invalid, other) |
write |
"Text sent to the host is String" |
whether contents is String or Bytes (RB-24's fixture copies a file); whether it still creates missing parents, as the first design's did |
stat |
names the request, and dev and ino under cfg(unix) |
the fields; whether it follows a final symbolic link |
createDir |
names the request | whether it creates parents |
lock |
"std File::lock" |
the answer; blocking or try_lock; how long it is held, given there is no unlock request |
spawn |
environment explicit, stdin null, no shell, output to two named files | working directory (the first design's question 3 asked about both; only the environment is answered); the handle's type |
wait |
names the request | its parameters; the status type (the first design had Option Int32); whether it blocks; see below |
stop |
the driver runs the host's kill or taskkill |
the answer; see below |
exit |
exit status output errors |
the width of status (the first design had UInt8) |
Two questions the declarations should settle
How a step enforces a child's timeout. The update says the "timeout and output cap (§25.5) are semantic and produce diagnostics, so they belong in the certified step". §17.17 has child_timeout_ms bound every Lean process, with exhaustion reported as LLS8002. No request is described as carrying time, and the inputs listed for Event.start do not include it. If wait blocks with no bound, a step cannot end a child at a deadline, or check max_child_output_bytes while the child runs. So wait needs a stated bound or poll form, or something else has to supply time.
stop and the host's kill. The update replaces rustix with "the host's kill" and lists it in the trusted base, so this is deliberate. But §17.17 says the group is signalled directly, with "no kill executable and no PATH ... involved, so a host without one, such as the shipped image, ends the work all the same", and §24.6 says no kill executable is looked up on PATH. Either the SPEC text changes with #271 or stop needs a stated answer for a host with no kill.
Impact
afflom/rule30 is moving its tool runtime to a command root over #271. Its work in progress, not yet published, keeps a local mirror of these types with each guess recorded as data, and has to recheck every guess when #271 lands. Other consumers preparing for #271 are in the same position.
Proposal
Publish the declarations now, even if they may still change, and note in #271 which are final. A types-only module costs no regeneration until it lands. Nothing here asks for a change of shape.
Activity
Integrate Host and Order with deep package export and replay
afflom commentedon Nov 4, 2026
Implemented through merged PR #389: #389 (release/v0.4 merge c613290). Final head943bba379a passed all44 CI41802893306 jobs, same-run honesty and repro41802841576. Actual merge tree65aa81df295f974d87cec011a35aa427da2a6a63 exactly matches the independently reviewed and tested tree. Closing explicitly because this landed on a non-default release branch.
This closes the Host declaration/publication scope. The driver and broader runtime/self-hosting work in #271 remain open; #390's BS16 redelivery is still a separate open draft.