Commit 86d2ec5
authored
feat(squabble): call-in-the-big-guns moves + ecosystem context +
## Summary
Gives the fighter the two capabilities it lacked to be a *benefit rather
than a drain*, without becoming heavyweight: the judgement to recognise
when a red is **out of its lane**, and a way to **argue the wider case**
— while keeping `squabble ≠ bypass` structurally intact. The heavy
experts are **not** embedded; they are reached (in a later push) through
boj-server, which already brokers them. This push is the foundation +
the training-ground proof.
## Changes
**`squabble-core` — pure, no new deps, gate invariant untouched**
- `Move::EscalateToExpert { check, group, obligation, evidence }` — hand
a red outside the CI-config lane (code/build fix, proof, scan) to a
named `ExpertGroup` (`Hypatia`, `HypatiaFleet`, `Proof`, `Security`). A
**hand-off, never a win**: constructs no `Passed` run, drops no required
context.
- `Move::AssignGateOwner { check, owner, disposition, rationale }` —
surface a check that is owned upstream, structurally misconfigured, or
should be in CI, and name who must own it (`OwnershipDisposition`).
**Pure annotation, never a path to green.**
- `Report` gains typed `escalations` + `owner_assignments` sections
(`#[serde(default)]` for back-compat) so it is a complete evidence
manifest (`AGENTIC`: evidence-per-step, no-silent-skip).
**`squabble-cli` — host-only; core stays detachable**
- `context.rs` — tolerant, fail-safe a2ml reader → `RepoContext` (is /
is-not, coordination owner, golden path, banned langs, relationships).
Never errors on a missing/unknown shape.
- `workflows.rs` — line-based ground-truth of `.github/workflows/`:
emitting workflow per check, reusable-workflow owner, path-filter traps,
job kind (`Hygiene | CodeBuild | Security | Proof`) → per-check
classification.
- `fight.rs` — `squabble fight <owner/repo> <pr> [--repo-root] [--gate]
[--json]`: classify every red as **self-win | escalate | assign-owner**,
plus a read-only structural scan (missing well-known files, path-filter
traps, banned AGPL licence label), emitted as an `Outcome`/`Report`.
**First binary to emit `Outcome`.**
- `examples/ipv6-only-pr43.json` — the training case, as a committed
gate fixture.
**Invariant note:** both new moves are non-satisfying by construction,
so the SPARK postcondition (`Green ⇔ non-empty ∧ all-passed`) is
unchanged and needs no re-proof. No gate-weakening path is representable
as a `Move`.
**Deferred (next push, by design):** the boj-server client +
`cicd-squabbler-mcp` cartridge + live specialist groups.
`EscalateToExpert` is the seam they plug into.
## RSR Quality Checklist
### Required
- [x] Tests pass (`cargo test --workspace` — 39 tests green)
- [x] Code is formatted (`cargo fmt --check` clean)
- [x] Linter is clean (`cargo clippy --workspace --all-targets` — no
warnings)
- [x] No banned language patterns (Rust only)
- [x] No `unsafe` blocks without `// SAFETY:` comments (none added)
- [x] No banned functions (`believe_me`, `unsafeCoerce`, `Obj.magic`,
`Admitted`, `sorry`)
- [x] SPDX license headers present on all new/modified source files
(MPL-2.0)
- [x] No secrets, credentials, or `.env` files included
### As Applicable
- [x] `.machine_readable/descriptiles/STATE.a2ml` updated (new
moves/command; boj wiring + apply marked open)
- [x] New dependencies reviewed — none added (core stays
dependency-light and detachable)
## Testing
`cargo test --workspace` → 39 tests pass (18 core, 21 cli), including:
the two new moves are legitimate and round-trip; `Report` back-compat
parse; a2ml extraction (coordination owner, multi-line arrays); workflow
classification (reusable → owned-upstream, code-build → escalation,
hygiene → in-lane); and an end-to-end test that classifies all five of
ipv6-only#43's reds.
End-to-end against the real ipv6-only workflow files:
```
$ squabble fight hyperpolymath/ipv6-only 43 --gate examples/ipv6-only-pr43.json --repo-root <ipv6-only>
gate Red: 5 unsatisfied — 1 self-win, 2 escalated, 5 owner-assigned
self-win: lint-workflows → ground-truth workflow-linter.yml (CI-config lane)
escalate: lint-shell → hypatia+fleet [dispatch-fix] (ci.yml builds/lints code)
container-build → hypatia+fleet [dispatch-fix]
owner: governance/Well-Known → hyperpolymath/standards [owned-upstream]
governance/Wf-sec-lint→ hyperpolymath/standards [owned-upstream]
+ path-filter traps (wellknown-enforcement, workflow-linter) [misconfigured-gate]
+ Containerfile AGPL label [misconfigured-gate, owner-only per doctrine #6]
```
**Note:** the SPARK gate proof (`gnatprove`) is checked in CI and is
unaffected by these additions; `gnatprove` was not available in the
authoring environment. Commits in this environment are unsigned (no
signing key provisioned) — signature/verification is a follow-up for
CI/owner.
## Screenshots
n/a (terminal output above).
---
_Generated by [Claude
Code](https://claude.ai/code/session_01SUURnQUnzTXYftzWFs5pfZ)_squabble fight (#9)8 files changed
Lines changed: 1669 additions & 6 deletions
File tree
- .machine_readable/descriptiles
- crates
- squabble-cli/src
- squabble-core/src
- examples
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
27 | 31 | | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| |||
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
37 | | - | |
| 42 | + | |
| 43 | + | |
38 | 44 | | |
39 | 45 | | |
40 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 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 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
0 commit comments