Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ These are project facts, measured in Phase 0 (docs/status/PHASE0-REPORT.adoc). T
* **Five invariants.** I1 no silent drift, I2 atomic or absent, I3 loud by default, I4 the past never breaks, I5 verify before trust. A change that adds a silent fallback, an untyped failure or a network call on the execution path is wrong even if tests pass.
* **Execution never reads the channel.** `install --locked` and `exec --locked` need only `idris2x.lock` and capsule bytes. Expiry, rollback protection and deprecation gate `pin`/`update` only (ADR 0008).
* **Every failure is typed.** Add or change errors only in `src/errors/errors.toml` (exit codes are append-only), then run `scripts/gen-runbooks.sh` and `scripts/gen-issue-forms.sh`. Never hand-edit `docs/runbooks/*.adoc` above the marker or `.github/ISSUE_TEMPLATE/error_report.yml`.
* **The environment contract is a reset** (ADR 0005): inherited `IDRIS2_*`, `LD_LIBRARY_PATH`, `DYLD_*`, `CHEZ`, `SCHEMEHEAPDIRS` are code search paths; the launcher sets them and inherits none unless `--inherit-env`.
* **The environment contract is a reset** (ADR 0005): inherited `IDRIS2_*`, `LD_LIBRARY_PATH`, `DYLD_*`, `CHEZ`, `SCHEMEHEAPDIRS` are code search paths, and the dynamic loader loads `LD_PRELOAD` and `LD_AUDIT` into every process; the launcher sets the search paths, clears the other two, and inherits none unless `--inherit-env`.
* **Resume only immutable, digest-addressed downloads.** Never resume the channel manifest or any mutable document.
* **Archive extraction** rejects absolute names, `..`, links escaping the staging tree, devices and setuid bits, and uses a containment check, never `join(dst, clean(name))`.
* **Languages:** Rust for the launcher, bash + jq + awk for scripts. No Python, Go or Node.js (estate policy and this repo's anchor). The capsule factory *invokes* upstream Makefiles; it never patches Idris 2 or Chez Scheme (zero-fork policy).
* **The launcher stays under 1,000 lines of our own code.** A feature that does not fit belongs in the channel (data) or the capsule.
* **The launcher stays under 2,000 lines of our own code.** A feature that does not fit belongs in the channel (data) or the capsule.
* **The maintenance agent** may only propose one of four shapes (`compat_patch`, `pin_bump`, `mirror_add`, `escalate`), never signs, never approves or merges its own PR, never widens `src/definitions/targets.toml`. Any open issue labelled `agent:kill-switch` stops it.
* **Report faithfully.** The launcher, factory and published capsules do not exist yet; do not describe planned behaviour as shipped.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
- [ ] Channel patch: `channel_version` is exactly +1, the manifest validates against `src/contracts/channel-v1.schema.json`, and `expires` is set
- [ ] Canaries green on three targets (link the run)
- [ ] 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
- [ ] Launcher still under 1,000 lines of our own code; new crates vendored and allowed in `deny.toml`
- [ ] Launcher still under 2,000 lines of our own code; new crates vendored and allowed in `deny.toml`
- [ ] User-facing output changed: before/after transcript pasted below (plain, `NO_COLOR=1` and `--json`)
- [ ] Wiki source changed in `docs/wikis/` (published on merge)
2 changes: 1 addition & 1 deletion .github/workflows/wiki-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
scripts/gen-errors-rs.sh --check # src/errors_gen.rs, the launcher's message table, vs errors.toml
cargo build --locked --quiet
IDRIS2X_BIN=target/debug/idris2x scripts/proto/dx-golden.sh --check # the Rust launcher renders the same bytes
bash scripts/check-launcher-loc.sh # the launcher stays under 1,000 lines of our own code
bash scripts/check-launcher-loc.sh # the launcher stays under 2,000 lines of our own code
bash scripts/check-msg-negatives.sh # each compile_fail doctest in src/msg.rs fails for its stated reason
bash scripts/check-advice-review.sh # advice entries past their review date fail

Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ https://semver.org/spec/v2.0.0.html[Semantic Versioning].
`scripts/gen-errors-rs.sh`, renders every message byte for byte as the prototype does. It answers `explain`, `help`
and `version` only. Context text is typed by provenance (ADR 0012).
* `E-OUTPUT` (exit 25): a failed write to standard output is a typed error, not a panic reported as `E-INTERNAL`.
* Eight error templates and one advice note no longer quote a lock or channel value in a sentence (ADR 0012); the
value stays on its fact line. `[[advice]]` entries may carry `facts`.
* Rust launcher, milestone 2 (not released): `install`, `verify` and `fetch -o` read `idris2x.lock` with no network,
download over https (or plain http to this machine only), resume a partial download, check the digest, unpack with
the launcher's own containment checks, check the tree and run the two embedded probes, then rename into the store.
* `E-PIN-NOT-FOUND/unreadable-lock` (exit 10) and `E-USAGE/bad-setting` (exit 2): an unreadable lock and an unreadable
setting are typed errors. The minimum Rust version is now 1.89, for file locks in the standard library.
* Review fixes for milestone 2: `E-GLIBC-FLOOR/unknown` (exit 16) refuses a glibc floor that `getconf` cannot check,
instead of skipping it. `E-CAPSULE-INVALID/bad-metadata` (exit 21) refuses a `capsule.json` that does not describe
the capsule. `E-STORE-IO/no-cache-dir` (exit 24) replaces a store in the current directory when `IDRIS2X_CACHE`,
`XDG_CACHE_HOME` and `HOME` are all unset. A lock without schema 1 is refused. Settings that are not Unicode text
are refused. Plain http is allowed only when the host itself is this machine (a user part is refused), and such a
mirror may not redirect; an https mirror may redirect only to https. A hard link that cannot be written is a disk
failure, not an unsafe archive. `getconf` runs with `PATH` only.
* The launcher line cap is 2,000 lines of our own code, raised from 1,000 by the owner on 2026-11-26. Milestone 2
has 1,326 lines with its review fixes; all of Phase 1 is projected at about 1,700 to 1,800.

==== Not yet

Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@ These are project facts, measured in Phase 0 (docs/status/PHASE0-REPORT.adoc). T
* **Five invariants.** I1 no silent drift, I2 atomic or absent, I3 loud by default, I4 the past never breaks, I5 verify before trust. A change that adds a silent fallback, an untyped failure or a network call on the execution path is wrong even if tests pass.
* **Execution never reads the channel.** `install --locked` and `exec --locked` need only `idris2x.lock` and capsule bytes. Expiry, rollback protection and deprecation gate `pin`/`update` only (ADR 0008).
* **Every failure is typed.** Add or change errors only in `src/errors/errors.toml` (exit codes are append-only), then run `scripts/gen-runbooks.sh` and `scripts/gen-issue-forms.sh`. Never hand-edit `docs/runbooks/*.adoc` above the marker or `.github/ISSUE_TEMPLATE/error_report.yml`.
* **The environment contract is a reset** (ADR 0005): inherited `IDRIS2_*`, `LD_LIBRARY_PATH`, `DYLD_*`, `CHEZ`, `SCHEMEHEAPDIRS` are code search paths; the launcher sets them and inherits none unless `--inherit-env`.
* **The environment contract is a reset** (ADR 0005): inherited `IDRIS2_*`, `LD_LIBRARY_PATH`, `DYLD_*`, `CHEZ`, `SCHEMEHEAPDIRS` are code search paths, and the dynamic loader loads `LD_PRELOAD` and `LD_AUDIT` into every process; the launcher sets the search paths, clears the other two, and inherits none unless `--inherit-env`.
* **Resume only immutable, digest-addressed downloads.** Never resume the channel manifest or any mutable document.
* **Archive extraction** rejects absolute names, `..`, links escaping the staging tree, devices and setuid bits, and uses a containment check, never `join(dst, clean(name))`.
* **Languages:** Rust for the launcher, bash + jq + awk for scripts. No Python, Go or Node.js (estate policy and this repo's anchor). The capsule factory *invokes* upstream Makefiles; it never patches Idris 2 or Chez Scheme (zero-fork policy).
* **The launcher stays under 1,000 lines of our own code.** A feature that does not fit belongs in the channel (data) or the capsule.
* **The launcher stays under 2,000 lines of our own code.** A feature that does not fit belongs in the channel (data) or the capsule.
* **The maintenance agent** may only propose one of four shapes (`compat_patch`, `pin_bump`, `mirror_add`, `escalate`), never signs, never approves or merges its own PR, never widens `src/definitions/targets.toml`. Any open issue labelled `agent:kill-switch` stops it.
* **Report faithfully.** The launcher, factory and published capsules do not exist yet; do not describe planned behaviour as shipped.
Loading
Loading