Commit da5cb49
authored
## Summary
#13 merged while its adversarial multi-angle review (8 independent
angles, each finding separately verified) was still running. This PR
applies **every confirmed finding** — three of them genuine fail-closed
violations — as the follow-up sweep.
## Changes
**Correctness / fail-closed integrity**
| Finding (angle) | Fix |
|---|---|
| A 200 whose body carries an estate error shape was recorded as an "ok"
verdict — the boj router unwraps cartridge failure envelopes into 200
bodies, so a hard miss (e.g. echidna without `ANTHROPIC_API_KEY`) looked
like success *(cross-file)* | `invoke()` now inspects 200 bodies for
`error` / `success:false` and returns them as failures |
| Absent `repo_root` defaulted to the daemon's CWD, silently grafting
whatever tree the server was launched from onto a fight for an unrelated
slug *(3 angles independently)* | New `plan_ungrounded()` — no
filesystem probed at all; every plan whose ground-truth is absent now
carries an explicit `ground-truth absent` blocker |
| A relative `repo_root` (CLI default `.`) was sent to experts that run
in their own working directories; panic-attack requires an absolute path
*(line-by-line)* | `summon()` canonicalizes first; on failure the call
is refused and recorded fail-closed |
| Routing let the obligation reroute away from the planner's chosen
specialist (HypatiaFleet+Scan → panic-attack) *(line-by-line)* | Routing
is now group-primary, with a test pinning it |
| `SQUABBLE_PORT` garbage silently fell back to 7741; `0` would bind an
ephemeral port the cartridge can't target *(line-by-line + altitude)* |
Malformed or zero port refuses to boot (exit 69); startup prints the
actually-bound address |
| The golden path (`just test`) never compiled the `boj` feature — a
break in `--summon` would ship silently *(cross-file)* | `just test` now
also runs the boj-feature tests |
**Evidence fidelity** *(altitude)*: `Report` gains typed
`expert_verdicts: Vec<ExpertVerdict>` (`#[serde(default)]`, back-compat)
— every expert call recorded verbatim (check, cartridge, tool, `ok` =
transport **and** body, honest meaning, full untruncated verdict).
Previously verdicts were spliced into evidence prose and cut at 400
chars — silent evidence loss.
**API robustness** *(altitude)*: `/api/v1/diagnose` accepts both the
bare `Gate` and a `{gate: …}` wrapper (no more opaque 422 for callers
generalising from `/api/v1/fight`).
**Docs / honesty (doctrine #10)** *(removed-behavior + cross-file +
reuse)*: fixed the stale "lives in squabble-cli" claim in `context.rs`;
the CLI doc now names `fight`/`--summon` and its network surface; the
App doc no longer claims a non-loopback "refusal" guard that never
existed; README no longer calls squabble-app a stub; `boj.rs` documents
the deliberate, feature-contained reversal of `fetch.rs`'s shell-out
stance.
**Simplifications**: `structural_scan` is a pure producer (clippy allow
dropped); the summon cfg-pair collapsed to inline cfg; fight's `USAGE`
shared with the top-level help; `FightRequest.repo_root:
Option<PathBuf>`.
**Refuted in verification (not applied):** the cartridge `domain:"ci"`
claim (laminar-mcp uses the identical value) and all efficiency
candidates (honest scale analysis at n≈5 escalations, loopback,
freshness-by-design).
## RSR Quality Checklist
### Required
- [x] Tests pass (43 default + 11 boj-feature tests)
- [x] Code is formatted (`cargo fmt --check` clean)
- [x] Linter is clean (clippy 0 findings, both feature configs)
- [x] No banned language patterns
- [x] No `unsafe` blocks without `// SAFETY:` comments (none)
- [x] No banned functions
- [x] SPDX license headers present on all new/modified source files
- [x] No secrets, credentials, or `.env` files included
### As Applicable
- [x] Documentation updated for user-facing changes (README status +
crate table)
- [x] No new dependencies
## Testing
Beyond the suites: live re-check of every fixed behavior — ungrounded
fight emits the honesty blocker instead of probing the CWD; both
diagnose shapes accepted; `SQUABBLE_PORT=0` refuses with exit 69; new
unit tests pin group-primary routing, body-error detection, back-compat
parsing, and the never-reads-CWD guarantee.
**Note:** commits unsigned (no signing key in this environment) —
owner/CI to sign.
## Screenshots
n/a
---
_Generated by [Claude
Code](https://claude.ai/code/session_01SUURnQUnzTXYftzWFs5pfZ)_
9 files changed
Lines changed: 382 additions & 173 deletions
File tree
- crates
- squabble-app/src
- squabble-cli/src
- squabble-core/src
- squabble-fight/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
134 | 136 | | |
135 | 137 | | |
| 138 | + | |
136 | 139 | | |
137 | 140 | | |
138 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
39 | | - | |
40 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
18 | 23 | | |
19 | | - | |
20 | | - | |
21 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
22 | 30 | | |
23 | 31 | | |
24 | 32 | | |
| |||
43 | 51 | | |
44 | 52 | | |
45 | 53 | | |
46 | | - | |
47 | | - | |
48 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
49 | 66 | | |
50 | 67 | | |
51 | 68 | | |
| |||
57 | 74 | | |
58 | 75 | | |
59 | 76 | | |
60 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
61 | 81 | | |
62 | 82 | | |
63 | 83 | | |
64 | 84 | | |
65 | | - | |
66 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
67 | 91 | | |
68 | 92 | | |
69 | 93 | | |
70 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
71 | 98 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
77 | 108 | | |
78 | 109 | | |
79 | 110 | | |
80 | 111 | | |
81 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
82 | 121 | | |
83 | 122 | | |
84 | 123 | | |
85 | 124 | | |
86 | 125 | | |
87 | | - | |
88 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
89 | 129 | | |
90 | 130 | | |
91 | 131 | | |
92 | 132 | | |
93 | 133 | | |
94 | 134 | | |
95 | 135 | | |
| 136 | + | |
96 | 137 | | |
97 | | - | |
| 138 | + | |
98 | 139 | | |
99 | 140 | | |
100 | 141 | | |
| |||
0 commit comments