Commit 84004cb
chore: audit-remediation batch — panic/unsafe, CI test-gating + coverage, doc drift (#154)
## What & why
Closes the short list of low-risk fixes surfaced by the repo audit.
Everything Rust-side is **verified locally**: `cargo build` + `cargo
clippy` clean on the touched files (modulo one pre-existing `parser.rs`
`let_and_return` lint that only the newest clippy flags — not in this
diff), **766 tests pass** in `impl/rust-cli` + **24** in `ffi/rust`, **0
failures**.
### 1. Panic-safety & `unsafe` (`impl/rust-cli/src`, `ffi/rust/src`)
- Removed the **3 startup panics**: `enhanced_repl.rs` (history file,
Ctrl-C handler) and `repl.rs` (Ctrl-C handler) now **degrade
gracefully** — warn + fall back to in-memory history / default Ctrl-C
behaviour — instead of `.expect()`-aborting the shell on a degraded
environment (e.g. read-only `$HOME`).
- Added `// SAFETY:` comments to the **4 previously-undocumented
`unsafe` libc blocks** (`audit.rs` `getuid`; `operations.rs` +
`commands.rs` ×2 `chown`). Also clears the matching Hypatia
`code_safety` findings.
### 2. CI (`rust-cli.yml`)
- **Gate the full suite**: the `test` job previously ran only 3 of ~18
suites (`--lib`, one integration suite, `property_tests`). Now runs
`cargo test` (all suites + doctests) plus a dedicated `ffi/rust` step —
so every test that passes locally is enforced on push.
- **New `coverage` job** using `cargo-llvm-cov` (self-contained; all
actions SHA-pinned to the versions already used in the repo). Runs the
suite under instrumentation, writes the summary to the job summary, and
uploads `lcov.info`. **Measured/reported, not a hard gate** — closes the
"coverage is unmeasured" gap without a brittle threshold.
### 3. Docs / metadata drift
- `security.txt`: fixed the **RFC 9116 §2.5.3 `Canonical`** URL — was a
non-served `github.com/.../.well-known/...` blob path; now the served
`raw.githubusercontent.com` location (Pages only publishes the README,
so `.well-known` isn't served there).
- `README.adoc`: added a **"Run the shell (Rust CLI)"** section as the
*first* install step — the front door previously only documented
compiling the six proof systems, not how to `cargo build`/run the actual
shell.
- `0-AI-MANIFEST.a2ml` + `6a2/STATE.a2ml`: **reconciled counts to
measured reality** — `idris2-holes 22 → 0` (closed in #152),
`tests-passing 757 → 766`, source files `32 → 33`, LoC `21331 → 22574`,
`last-updated → 2026-07-01`. The manifest had been contradicting its own
authoritative `docs/PROOF_HOLES_AUDIT.md`.
## Verification
```
cd impl/rust-cli && cargo build && cargo test # 766 pass / 0 fail / 14 ignored
cd ffi/rust && cargo test # 24 pass / 0 fail
python3 -c "import glob,yaml; [yaml.safe_load(open(f)) for f in glob.glob('.github/workflows/*.yml')]" # all parse
```
## Not included (deliberately out of scope)
The larger audit items — missing marketer/journalist + lay-person docs
and a real audience-segmented wiki, the ABI/FFI consolidation (C NIF /
Rust `ffi/rust` / ReScript MCP not being Zig), the absent launcher, and
the RSR template/`RSR_COMPLIANCE.md` inflation — are each their own
scoped pass, not smuggled into this hygiene batch.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01KfgJznd6jzSeDYsSXGAXkU
---
_Generated by [Claude
Code](https://claude.ai/code/session_01KfgJznd6jzSeDYsSXGAXkU)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 9b11d08 commit 84004cb
10 files changed
Lines changed: 123 additions & 31 deletions
File tree
- .github/workflows
- .machine_readable/6a2
- .well-known
- ffi/rust/src
- impl/rust-cli/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
56 | 52 | | |
57 | 53 | | |
58 | 54 | | |
| |||
98 | 94 | | |
99 | 95 | | |
100 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
20 | 37 | | |
21 | 38 | | |
22 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
121 | 138 | | |
122 | 139 | | |
123 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
274 | 278 | | |
275 | 279 | | |
276 | 280 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1000 | 1000 | | |
1001 | 1001 | | |
1002 | 1002 | | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
1003 | 1007 | | |
1004 | 1008 | | |
1005 | 1009 | | |
| |||
1523 | 1527 | | |
1524 | 1528 | | |
1525 | 1529 | | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
1526 | 1535 | | |
1527 | 1536 | | |
1528 | 1537 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | 249 | | |
254 | 250 | | |
255 | 251 | | |
| |||
268 | 264 | | |
269 | 265 | | |
270 | 266 | | |
271 | | - | |
272 | 267 | | |
273 | 268 | | |
274 | 269 | | |
| |||
278 | 273 | | |
279 | 274 | | |
280 | 275 | | |
281 | | - | |
282 | | - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
283 | 286 | | |
284 | | - | |
285 | | - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
286 | 290 | | |
287 | 291 | | |
288 | 292 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | | - | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| |||
0 commit comments