Skip to content

Launcher milestone 3 of 4: exec, run, env, doctor, selftest and gc - #8

Merged
hyperpolymath merged 12 commits into
mainfrom
claude/phase1-launcher-m3
Nov 27, 2026
Merged

hyperpolymath merged 12 commits into
mainfrom
claude/phase1-launcher-m3

Conversation

@hyperpolymath

@hyperpolymath hyperpolymath commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Summary

Milestone 3 of 4 of the Phase 1 Rust launcher: exec, run, env, doctor, selftest and gc. Nothing is shipped: there is no release and no published capsule.

This PR is stacked on #7 (milestone 2, base claude/phase1-launcher-m2), so its diff shows milestone 3 only. I will retarget it to main after #7 merges.

It was rebased onto the #7 review fixes (908efb7), then took #7's review round 2 (d5299ca) by merge, with no force-push. Pushed with the owner's OK (selector, 27 Nov). Its head is 12a842c, signed.

Changes

One commit, Launcher milestone 3: exec, run, env, doctor, selftest and gc.

  • src/run.rs:
    • exec (Idris 2) and run (Chez) replace the launcher process with the capsule's Chez Scheme. They apply the environment reset from ADR 0005. --inherit-env keeps the code variables, and a -- after it is dropped.
    • env prints the same variables as export lines for eval, after an unset line for each inherited code variable. env --json prints one JSON object.
    • selftest re-runs the two probes. It then compiles a small program, runs it, moves it and runs it again with an empty environment. RefC is tried only if cc is on PATH, and never decides the exit code (as in the prototype).
    • Each command installs the pinned capsule first if it is missing, from idris2x.lock alone (ADR 0008).
  • src/doctor.rs: one line per check, status check: text. The checks are store, platform, lock, capsule, probes and each mirror, followed by the advice notes. A problem line ends with the error ID it would cause.
    • It changes nothing and always exits 0.
    • Its only network use is one HEAD request per mirror (5 s), which --offline or IDRIS2X_OFFLINE=1 skips.
    • --json prints one object.
  • src/gc.rs: incomplete installs, and day-old staging files that idris2x wrote, go without asking.
    • Complete capsules beyond --keep-last (default 3, newest kept by install time) are listed first. They are removed only after yes at a terminal, or with --yes; --dry-run stops after the list.
    • Each removal takes the capsule's lock without waiting and deletes .complete first.
    • A capsule whose lock an install holds is kept, and named.
    • gc touches only names idris2x writes: a 64-hex digest, fetch.log, selftest-<pid>.
  • src/main.rs: the usage table is one usage|description string per command. Flag parsing is shared, and so is the missing-value error.
  • New error case E-PROBE-CODEGEN/cannot-start (exit 17; no new exit code): the system refused to start the capsule's Chez. New advice gc-compiled-programs (review by 2027-05-26). The rendered catalogue is regenerated, and dx-golden.sh gets a sample. Runbooks, the issue form and the wiki table had no diff.
  • src/msg.rs:
    • Txt<Checked>::shown() is the only way to read a checked value.
    • clean() replaces control characters.
    • brief() is a one-line summary of a failure, for doctor.
    • advice() now returns the text, or nothing when silenced.
  • Tests: the helpers moved to tests/common/mod.rs, and the new tests/run.rs uses them.
  • Docs:
    • CHANGELOG.adoc has a milestone 3 entry, and corrects my milestone 2 projection.
    • docs/dx/JOURNEYS.adoc says where milestone 3 differs from the doctor and gc designs.
    • docs/status/PROOF-STATUS.adoc has two new open rows, ENV-1 and GC-1, and one new boundary (advisory file locks).

Line count

The launcher is 1,873 of 2,000 lines of our own code, counted with rustfmt's default layout. It was 1,825 before #7's review round 2 was merged in.

My milestone 2 projection (1,700 to 1,800 for all of Phase 1) was too low. Milestone 4 is estimated at 200 to 250 more lines.

The owner chose by selector (26 Nov) to keep the defaults and the cap, and to fit milestone 4 by tightening. If it will not fit, I stop and ask before going over. Some of the tightening in this commit is layout-driven: tuple lets that keep rustfmt from spreading a struct literal over five lines. For milestone 4 the owner then chose "Max heuristics" (selector, 26 Nov): src/ uses rustfmt's denser layout from #11 on, and the cap stays at 2,000.

Departures from the bash prototype and the designs

  • --inherit-env is a flag, not the variable IDRIS2X_INHERIT_ENV.
  • env quotes with single quotes, prints DYLD_LIBRARY_PATH too, and prints unset lines for inherited code variables.
  • doctor's environment note names every variable the reset removes, not only the prototype's seven IDRIS2_* names. Chaos drill T17 compares an exact line, so it may differ if the runner has LD_LIBRARY_PATH set.
  • doctor always exits 0, and a missing lock is info.
  • doctor's notes are the usual advice blocks, not one line each. Its status column is 8 characters wide. The idris2-lsp note names the pinned version only.
  • doctor reads IDRIS2X_OFFLINE strictly, as install does since the Launcher milestone 2 of 4: install, verify and fetch from a lock #7 fixes. A value other than 0 or 1 is a problem setting line, and doctor then sends no request. Before, a value such as yes counted as online, and doctor sent its HEAD requests.
  • With no store directory, doctor shows a problem store line and skips the capsule check.
  • selftest's work directory is cache/staging/selftest-<pid>, not /tmp. It also re-runs the probes.
  • gc rows show version, digest and size only. idris2x keeps no record of the last run or of which projects pin a capsule, so the design's "last run" and "pinned by" columns are not there.

Owner rulings on this PR (selector, 26 Nov)

  • Exec form: exec will take exec [--locked] [--inherit-env] -- <program> <args>, with programs read from capsule.json's exec map (ADR 0005) and each path checked to stay inside the capsule. This PR still has the prototype form (exec -- <idris2 args>, run -- <chez args>, no --locked), and README.adoc plus four wiki pages already show the new form. The change comes in milestone 4.
  • Control characters: text and terminal output print lock and host values without removing control characters, in both msg.rs and the prototype's render.jq. doctor, gc and brief already clean their own lines. The renderers are fixed in a separate PR stacked on this one.

Known gaps, not fixed here

  • exec takes no lock, so gc --yes cannot see a capsule that is running at that moment (recorded in JOURNEYS and as a PROOF-STATUS boundary).
  • docs/status/ROADMAP.adoc still says "Phase 1 not started". Launcher milestone 4: pin, channel trust and the exec map #11 fixes it.
  • capsule::vars reads LD_LIBRARY_PATH, DYLD_LIBRARY_PATH and PATH with std::env::var. Under --inherit-env, a value that is not text is dropped without a word.
  • CodeQL analyze (actions, none) fails because the repository has CodeQL default setup on. It is not caused by this code.
  • Creusot (with Pearlite contracts) and Verus were not run. ENV-1 and GC-1 are open.
  • The chaos suite has not been run against the Rust launcher. The owner chose (26 Nov) to port it in the PR after Launcher milestone 4: pin, channel trust and the exec map #11.
  • cargo vendor and cargo deny are still not set up. A Sonnet thread does that after Launcher milestone 2 of 4: install, verify and fetch from a lock #7 merges.

RSR Quality Checklist

Required

  • Tests pass (just test or equivalent)
  • Code is formatted (just fmt or equivalent)
  • Linter is clean (no new warnings or errors): cargo clippy --all-targets -- -D warnings
  • No banned language patterns (no Python, Go, TypeScript or ReScript; JavaScript runs Bun > Deno > pnpm > npm)
  • No unsafe blocks without // SAFETY: comments (the binary has #[forbid(unsafe_code)])
  • No banned functions (believe_me, unsafeCoerce, Obj.magic, Admitted, sorry)
  • SPDX license headers present on all new/modified source files (new files carry the dual header; existing headers are unchanged)
  • No secrets, credentials, or .env files included

As Applicable

  • Repo deed (*_chora.deed) (status) / (maturity) updated: not changed. The phase is still incubating and nothing is shipped.
  • Repo deed (ecosystem) updated: no integration changed.
  • Repo deed (meta) and/or docs/decisions/ updated: no ADR changed. The exec-map ruling follows ADR 0005 as written.
  • docs/status/ROADMAP.adoc updated: not in this PR (see known gaps).
  • Documentation updated for user-facing changes (CHANGELOG, JOURNEYS, the rendered catalogue)
  • docs/architecture/TOPOLOGY.adoc updated: not needed for this milestone.
  • CHANGELOG or release notes updated
  • New dependencies reviewed for license compatibility (compatible with MPL-2.0): no new crates.
  • Interface contract changes (src/errors/errors.toml) reflected in the regenerated outputs. One case and one advice added; no exit code changed.

Testing

Run locally on Linux x86_64:

  • just test && just quality: pass.
  • cargo test --locked with Rust 1.97, and the build with a real 1.89 toolchain (the MSRV): pass on 13b6ea9. Run again on 12a842c after Launcher milestone 2 of 4: install, verify and fetch from a lock #7's review round 2 was merged in: just test (31 tests) and just quality pass.
  • tests/run.rs runs a stand-in Chez (a shell script that also stands in for Idris 2 and the compiler) and covers:
    • exec and run with and without --inherit-env, a Chez that cannot start, and a capsule with no Idris 2.
    • env lines eval'd by /bin/sh with a store path holding a quote and a space, and env --json.
    • doctor outside a project, with a mirror, --offline, the env note silenced, and a modified store in --json, an IDRIS2X_OFFLINE that is not 0 or 1, and no store directory. It also checks that no .doctor-* file is left behind.
    • gc --dry-run, without --yes, with a held lock, and a name idris2x never writes.
    • selftest passing, failing codegen, and a store path with a space.
  • I removed two protections one at a time (the environment reset, and gc's lock check) and saw the matching tests fail.
  • Gates: gen-errors-rs --check, gen-runbooks --check, gen-issue-forms --check, sync-wiki --check, dx-golden --check (plain, and through the Rust launcher), check-msg-negatives, check-advice-review, check-mint-tokens, check-spdx-headers, check-invisible-characters, check-escape-hatches, check-launcher-loc (1,825 of 2,000), check-adoc-renders, proof-claims-rows: pass.

Not run: Creusot, Verus, and the chaos suite against the Rust launcher.

idris2x specifics

  • Risk class: [x] C (launcher, exit-code use, environment contract: ADR 0005, 0008, 0012)
  • Error taxonomy changed: src/errors/errors.toml edited (exit codes append-only), then scripts/gen-runbooks.sh and scripts/gen-issue-forms.sh re-run (no diff)
  • Launcher still under 2,000 lines of our own code (yes, 1,825); new crates vendored and allowed in deny.toml (no new crates; deny.toml not set up)
  • Wiki source changed in docs/wikis/: no.

Generated by Claude Code

ADR 0012 lets text read from the lock or the channel fill a fact slot
only. Eight templates quoted such a value in a sentence: the glibc a
capsule needs, the version a capsule claims and the one it reports, a
lock or manifest format, the toml and lock versions in E-PIN-DRIFT, the
manifest versions in E-CHANNEL-ROLLBACK and an expiry time. Each sentence
now describes the value, which stays on its fact line in full. The fix
command `idris2x pin {toml}` keeps its value: a fix slot accepts lock
text once it has passed the version check.

The advice note lsp-mismatch quoted the pinned version twice. An
[[advice]] entry may now carry `facts`, as a [[case]] does. The generator
types a key that appears only on a fact line as Fact. The launcher and
the prototype print fact lines between the note and its silencing line,
and the prototype now fills advice text in one pass, as render.jq does.

The chaos drill for the note checks the new text and the fact line in
one assertion, so the suite still has 121 checks. The rendered catalogue
is regenerated; both launchers match it.
install reads idris2x.lock with no network (ADR 0008), downloads over
https or plain http to this machine only, resumes a partial download with
a Range request, checks the digest, unpacks with its own containment
checks, checks sha256sums.txt, runs the two embedded probes in the reset
environment (ADR 0005), and renames into the store under a per-digest
file lock (I2). verify re-checks an installed capsule. fetch -o writes a
bundle that install --from takes offline.

Two error cases are added through errors.toml: E-PIN-NOT-FOUND
unreadable-lock and E-USAGE bad-setting. Settings are strict: a value
the launcher cannot read is refused, never replaced by a default.

New crates: ring, rustls, ureq, flate2, tar, serde_json, signal-hook.
The minimum Rust version is 1.89, for std file locks. SIGXFSZ is caught
so that a file size limit is reported as E-STORE-IO.

tests/install.rs drives the binary against a local HTTP server and a
fake capsule: resume, cut transfers, refused mirrors, digest mismatch,
bundles, offline, held locks, strict settings, bad locks, the file size
limit, twelve unsafe archives and six archives that are not valid
capsules. Seven protections were removed one at a time (the symlink
check after unpacking, the walk through parents, the setuid check, the
plain-name check, the environment reset, the SIGXFSZ handler, and
keeping a bundle), and a test failed each time.

The launcher line gate fails: 1,265 lines against a cap of 1,000.
The owner ruled on 2026-11-26 to raise the cap and keep standard rustfmt.
Milestone 2 has 1,265 lines of our own code. All of Phase 1 is projected
at about 1,700 to 1,800 lines.

The gate script now fails at 2,000. Every live statement of the cap says
2,000: CLAUDE.md, the Copilot instructions, the pull request template,
the workflow comment, the roadmap, the maintainers guide, two wiki pages
and the DX principles. ADR 0007 gets a "superseded in part" note, as
other ADRs in this repository do. ADR 0012's estimate, made under the
old cap, is left as written.
Two engineering claims are added to PROOF-STATUS, both open and ungraded.
STORE-1: unpacking writes only inside the staging tree. STORE-2: nothing
enters the store before the digest, tree and probe checks pass.

Creusot with Pearlite contracts and Verus are scoped to `plain` and
`inside` for STORE-1, and to the order of checks in `fill` for STORE-2.
Neither was run, and neither toolchain is installed or pinned here.
Whether either handles std::path::Components has not been checked.

Three boundaries are recorded: the tar crate's header parsing and ring's
SHA-256 (both ASSUMED, third-party), and that the staging tree is private
while an install holds its lock.
The estate-rules job failed on PR #7: asciidoctor warned that the id
"case" was already in use at docs/dx/ERROR-CATALOGUE.adoc line 378.
AsciiDoc reads [[name]] as an inline anchor even inside backticks, and
the paragraph added in dbc7cd3 wrote `[[advice]]` and `[[case]]`.
A backslash before each stops the anchor. The rendered text is
unchanged. All 228 tracked .adoc files now render clean.
@gitnotebooks

gitnotebooks Bot commented Nov 26, 2026

Copy link
Copy Markdown

Review these changes at https://app.gitnotebooks.com/metadatastician/idris2x/pull/8

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 11 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 0ee5940 and 4fa30bb.

Files selected for processing: 21

  • CHANGELOG.adoc
  • docs/dx/ERROR-CATALOGUE-RENDERED.adoc
  • docs/dx/JOURNEYS.adoc
  • docs/status/PROOF-STATUS.adoc
  • scripts/proto/dx-golden.sh
  • src/capsule.rs
  • src/doctor.rs
  • src/errors/errors.toml
  • src/errors_gen.rs
  • src/gc.rs
  • src/lib.rs
  • src/lock.rs
  • src/main.rs
  • src/msg.rs
  • src/net.rs
  • src/run.rs
  • src/store.rs
  • tests/cli.rs
  • tests/common/mod.rs
  • tests/install.rs
  • tests/run.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Hypatia grid green

🟢 clean · commit 4fa30bb8d0f5 · run 45919550460 · scope: this change (21 file(s))

Advisory: 11 row(s), worst 🟡 medium (0 critical, 0 high in grid scope) — reported, never grading the change.

Unique graded findings across gating and advisory rows: 11 (11 reporter observations; 7 without sufficient identity to corroborate). Row counts remain per reporter; unique totals do not change gating.
Raw Hypatia alert-derived observations: 36 (code-scanning, Dependabot and secret-scanning; some may also be in SARIF; not an extra total).

Reporter Gate Status Critical High Medium Minor Since previous revision
Hypatia scan gating 🟢 clean 0 0 0 0 — same commit (no revision comparison)
panic-attack assail advisory 🟡 medium 0 0 4 0 — same commit (no revision comparison)
pons asinorum advisory 🟢 clean 0 0 0 0 — same commit (no revision comparison)
echidnabot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
rhodibot (RSR compliance) advisory 🟢 clean 0 0 0 0 — same commit (no revision comparison)
panicbot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
sustainabot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
glambot (presentation quality) advisory 🔵 minor 0 0 0 4 — same commit (no revision comparison)
seambot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
finishingbot (release readiness) advisory 🟡 medium 0 0 2 1 — same commit (no revision comparison)
cipherbot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
accessibilitybot advisory ⚪ not applicable 0 0 0 0 — same commit (no revision comparison)
Hypatia scan: 5 finding(s)
  • 5 further finding(s) in files this change does not touch: reported, not graded (0 critical, 0 high).
panic-attack assail: 27 finding(s)
  • medium InsecureProtocol — tests/install.rs — 2 HTTP (non-HTTPS) URLs in tests/install.rs
  • medium CommandInjection — scripts/proto/dx-golden.sh — 29 potentially unquoted variable expansions in scripts/proto/dx-golden.sh
  • medium UnboundedAllocation — src/lock.rs — Potential unbounded allocation pattern detected in src/lock.rs
  • medium UnboundedAllocation — src/store.rs — Potential unbounded allocation pattern detected in src/store.rs
  • 23 further finding(s) in files this change does not touch: reported, not graded (0 critical, 0 high).
pons asinorum: 9 finding(s)
  • 9 further finding(s) in files this change does not touch: reported, not graded (0 critical, 0 high).
echidnabot: not_applicable — template default: enrol once the repository carries proofs and an ECHIDNA engine is configured
  • ⚪ not applicable: template default: enrol once the repository carries proofs and an ECHIDNA engine is configured
rhodibot (RSR compliance): 13 finding(s)
  • 13 further finding(s) in files this change does not touch: reported, not graded (0 critical, 12 high).
panicbot: not_applicable — panic-attack is already graded by the verdict grid's own panic-attack row, from static-analysis-gate.yml evidence; enrolling panicbot would report one scanner twice and give two rows that can disagree
  • ⚪ not applicable: panic-attack is already graded by the verdict grid's own panic-attack row, from static-analysis-gate.yml evidence; enrolling panicbot would report one scanner twice and give two rows that can disagree
sustainabot: not_applicable — reserved fleet slot; no adapter exists (gitbot-fleet bots/sustainabot/README.adoc)
  • ⚪ not applicable: reserved fleet slot; no adapter exists (gitbot-fleet bots/sustainabot/README.adoc)
glambot (presentation quality): 151 finding(s)
  • info VIS-005 — docs/status/PROOF-STATUS.adoc:8 — Line 82 characters exceeds max length of 80.
  • info VIS-005 — docs/dx/ERROR-CATALOGUE-RENDERED.adoc:3 — Line 112 characters exceeds max length of 80.
  • info VIS-005 — docs/dx/JOURNEYS.adoc:10 — Line 109 characters exceeds max length of 80.
  • info VIS-005 — CHANGELOG.adoc:13 — Line 120 characters exceeds max length of 80.
  • 147 further finding(s) in files this change does not touch: reported, not graded (0 critical, 0 high).
seambot: not_applicable — template default: enrol once a seam register exists at spec/seams/seam-register.json
  • ⚪ not applicable: template default: enrol once a seam register exists at spec/seams/seam-register.json
finishingbot (release readiness): 151 finding(s)
  • medium CLM-006 — docs/status/PROOF-STATUS.adoc — Documentation references non-existent file: sha256sums.txt
  • medium CLM-006 — docs/status/PROOF-STATUS.adoc — Documentation references non-existent file: sha256sums.txt
  • info REL-003 — src/msg.rs — Found 1 occurrence(s) of 'println!' in source
  • 148 further finding(s) in files this change does not touch: reported, not graded (0 critical, 4 high).
cipherbot: not_applicable — template default: enrol once the repository implements cryptography
  • ⚪ not applicable: template default: enrol once the repository implements cryptography
accessibilitybot: not_applicable — template default: enrol once the repository serves HTML
  • ⚪ not applicable: template default: enrol once the repository serves HTML

Scope: static findings reported by each row's tool at the named commit. The table grades only findings in files this change touches, so the colour answers "does this change introduce anything?", not "what does the whole repository still carry?". Standing findings are counted in each accordion and in report.json; the baseline filter remains the place where acknowledged debt is recorded. The lane state is the worst GATING row; advisory rows are listed and counted but never set it. Purple, red, yellow and blue grade the worst GRADED finding present; orange is evidence missing, malformed or a scanner that did not run; grey is an explicit scope exclusion with its reason. No row is a security certification. report.json, badge.json and the raw findings are in the verdict-grid artifact on the linked run.

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 26, 2026 15:59
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-26T15:59:58.121456Z
We couldn’t complete this review. Comment @codex review to try again.
d8cb7dc Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@hyperpolymath
hyperpolymath added this pull request to stack #10 November 26, 2026 16:32
A glibc floor that getconf cannot check is refused as
E-GLIBC-FLOOR/unknown (exit 16) instead of skipped. getconf runs
with PATH only, so an inherited LD_PRELOAD cannot answer for it.

A capsule.json that does not name the capsule and give its versions
is refused at install as E-CAPSULE-INVALID/bad-metadata (exit 21).
The versions become a heap path and a probe answer, so they pass the
version check first.

With IDRIS2X_CACHE, XDG_CACHE_HOME and HOME all unset there is no
store: E-STORE-IO/no-cache-dir (exit 24). The launcher used to put
one in the current directory.

A lock without schema 1 is refused. A setting that is not Unicode
text is refused, never read as unset. IDRIS2X_LOCK and IDRIS2X_CACHE
go through the same strict reader as the others.

Plain http is allowed only when the host itself is this machine; an
address with a user part is refused. A local mirror may not
redirect, and an https mirror may redirect only to https. A 3xx
answer is reported, not saved as the capsule.

A hard link that cannot be written is a disk failure, not an unsafe
archive. PROOF-STATUS STORE-2 now names sha256sums.txt, and says
which files it covers.
exec and run start the capsule's Chez Scheme with the environment reset
from ADR 0005; --inherit-env keeps the code variables. env prints the
same variables as shell lines, with an unset line for each inherited
code variable, or as one JSON object. selftest compiles a program, runs
it, then runs it again from another directory with an empty
environment. Each of these installs the pinned capsule first if it is
missing, from idris2x.lock alone.

doctor prints one line per check (store, platform, lock, capsule,
probes, each mirror) and the notes, changes nothing, and sends one HEAD
request per mirror unless --offline or IDRIS2X_OFFLINE=1 is given. A
store it cannot find, or an IDRIS2X_OFFLINE it cannot read, is a
problem line; in the second case nothing is sent. gc removes
incomplete installs and day-old staging files it wrote, lists the
capsules beyond --keep-last, and removes them only after yes at a
terminal or with --yes, each under its capsule's lock with .complete
deleted first.

New error case E-PROBE-CODEGEN/cannot-start (exit 17) and advice
gc-compiled-programs. The test helpers moved to tests/common so a new
file, tests/run.rs, can share them. ENV-1 and GC-1 are recorded in
PROOF-STATUS as open; no verifier has run. The launcher is 1,825 of
2,000 lines.
A mirror that stops sending now fails over. IDRIS2X_NET_TIMEOUT (seconds
without data, default 30) bounds every read and write, before the answer
and in the middle of the file. The prototype bounds curl the same way.
Each mirror now starts the file clean: bytes from one that failed are
never resumed from another. The new stall test found that hole.

A version may have at most 19 digits in each run, so every run fits in
64 bits. A glibc floor or any other version too large to compare is
refused as malformed, never read as 0. The prototype checks the same.

The checksum list must cover capsule.json, as the factory's list does.
verify reads capsule.json again and reports store-modified if it no
longer describes the pinned capsule.

New case E-CAPSULE-INVALID/pin-mismatch: the capsule's capsule.json names
a different Idris 2 than the lock pins. A Chez-only capsule names none
and still installs; exec refuses it later, as before.

The unsafe-path state no longer says a --from bundle was deleted. The
prototype did delete it; now it keeps it, as the launcher does.

ADR 0005 amended (owner ruling): LD_PRELOAD and LD_AUDIT join the reset.
--inherit-env still passes them. CLAUDE.md, the Copilot instructions and
the threat model say the same.

The 302 test now sends a Location and checks the hop was not followed.
Brings in the fixes from review round 2 on #7: the stall bound on
downloads, versions limited to 19 digits in each run so the glibc floor
cannot overflow, verify reading capsule.json again, the pin-mismatch
case, the --from state text, and LD_PRELOAD and LD_AUDIT in the
environment reset.

Resolved by hand:
- src/capsule.rs keeps milestone 3's code() and reset(); code() now
  names LD_PRELOAD and LD_AUDIT, so exec, run, the probes, env's unset
  lines and doctor's ignored-variables note all use the same list.
- src/net.rs keeps milestone 3's agent() helper and gives it the stall
  bound; doctor's mirror check keeps its 5 second limit.
- tests: the new test helpers (described, stall, the redirect Location
  header, the loader check in the SCHEME stand-in) move into
  tests/common/mod.rs with the others.
- src/errors_gen.rs is generated again from src/errors/errors.toml.

New test: exec drops LD_PRELOAD and LD_AUDIT and passes them on only
with --inherit-env.
A finished store entry was returned without checking that its
capsule.json names the Idris 2 version the lock pins. A lock that tied
the same digest to another version passed on a warm cache and failed
on a cold one. Both cached return paths in store::install now run the
same capsule::holds check as fill, and fail with E-CAPSULE-INVALID
pin-mismatch. A Chez-only capsule is still reused. A new test installs
a capsule, re-locks its digest as 0.7.0, and sees the refusal; it
fails without the fix.

The prototype now checks min_glibc as the launcher does: the version
form with at most 19 digits per run, a string or nothing, and on Linux
a host glibc it cannot read is E-GLIBC-FLOOR unknown, not a skip.
Base automatically changed from claude/phase1-launcher-m2 to main November 27, 2026 00:51
main now holds #7 squashed (0ee5940), whose tree equals fff6dff, which this branch already contains. The tree is unchanged.
@hyperpolymath
hyperpolymath merged commit c3619ad into main Nov 27, 2026
52 of 53 checks passed
@hyperpolymath
hyperpolymath deleted the claude/phase1-launcher-m3 branch November 27, 2026 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants