opencode-swarm 7.146.3 → 7.146.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.opencode/skills/swarm-pr-review/SKILL.md +27 -44
- package/.opencode/skills/swarm-pr-review/references/findings-persistence-contract.md +52 -12
- package/.opencode/skills/swarm-pr-review/references/lane-output-recoverability.md +6 -3
- package/.opencode/skills/swarm-pr-review/references/parser-dry-run.md +19 -1
- package/.opencode/skills/swarm-pr-review/references/verdict-settlement-contract.md +41 -0
- package/dist/background/candidate-contract.d.ts +21 -1
- package/dist/background/candidate-parser.d.ts +21 -1
- package/dist/background/pending-delegations.d.ts +8 -1
- package/dist/background/pr-review-collection-receipt.d.ts +70 -0
- package/dist/cli/{config-doctor-yd866pd5.js → config-doctor-28e6h9ex.js} +2 -2
- package/dist/cli/{core-nc9a9g5m.js → core-n57ssze0.js} +1 -1
- package/dist/cli/{curation-policy-9vv7v5rf.js → curation-policy-g353f457.js} +4 -4
- package/dist/cli/{curator-acp80hpc.js → curator-e6p9vysv.js} +24 -24
- package/dist/cli/{curator-llm-factory-ewffa8r1.js → curator-llm-factory-bzvv3grb.js} +24 -24
- package/dist/cli/{evidence-summary-service-8gw74j8g.js → evidence-summary-service-b2xp0m26.js} +9 -9
- package/dist/cli/{gate-evidence-jj3zt2x1.js → gate-evidence-fmbx6hp1.js} +4 -4
- package/dist/cli/{guardrail-explain-50cp8k3r.js → guardrail-explain-g1nqbz0j.js} +25 -25
- package/dist/cli/{guardrail-log-jazq10gt.js → guardrail-log-1bbg0vx4.js} +3 -3
- package/dist/cli/{hive-promoter-qhrngsvb.js → hive-promoter-trew6apr.js} +24 -24
- package/dist/cli/{index-0a4s2803.js → index-0pya01vw.js} +4 -4
- package/dist/cli/{index-gwt7ceh7.js → index-52460nma.js} +2 -2
- package/dist/cli/{index-cgcs823z.js → index-53asfj0j.js} +4 -4
- package/dist/cli/{index-pgsvn005.js → index-55g08cg2.js} +5 -5
- package/dist/cli/{index-ypwwchs0.js → index-7pggq9ys.js} +1 -1
- package/dist/cli/{index-1kq3x5q6.js → index-8py21zn6.js} +1 -1
- package/dist/cli/{index-4zevsvaa.js → index-aybph866.js} +3 -3
- package/dist/cli/{index-a7cnyp5e.js → index-cp8jp4cv.js} +5 -5
- package/dist/cli/{index-bxk21f2w.js → index-cpzra8my.js} +1 -1
- package/dist/cli/{index-bydybrke.js → index-cyxdm0v3.js} +2 -2
- package/dist/cli/{index-gayh8tmh.js → index-d3t7q4b8.js} +1 -1
- package/dist/cli/{index-j2ckvbx7.js → index-f75qjtn5.js} +1 -1
- package/dist/cli/{index-3377n9qp.js → index-fjhc8mk2.js} +1 -1
- package/dist/cli/{index-v2eevdbj.js → index-fymrwjak.js} +4 -4
- package/dist/cli/{index-fypq68yn.js → index-gqx0rq53.js} +1 -1
- package/dist/cli/{index-qjgg9qzs.js → index-hcb25p12.js} +1 -1
- package/dist/cli/{index-3gagma8p.js → index-hn0hvgtt.js} +1 -1
- package/dist/cli/{index-xz9w7sa9.js → index-hw1yghpg.js} +4 -4
- package/dist/cli/{index-eybamsqg.js → index-ktpj357z.js} +2 -2
- package/dist/cli/{index-n96nt4gb.js → index-npw2xm46.js} +247 -102
- package/dist/cli/{index-pc4423w8.js → index-p3k155dv.js} +1 -1
- package/dist/cli/{index-yr1aabxa.js → index-p4ar0k0n.js} +3 -3
- package/dist/cli/{index-bxs4wkjf.js → index-rpy0bent.js} +177 -17
- package/dist/cli/{index-7ph5pz77.js → index-rqgnad5w.js} +2 -1
- package/dist/cli/{index-463msy1e.js → index-tp5ytzzg.js} +1 -1
- package/dist/cli/{index-262kyrk3.js → index-vjkfhqef.js} +2 -2
- package/dist/cli/{index-qqawmxe7.js → index-ymyv4d36.js} +26 -26
- package/dist/cli/{index-923phxsp.js → index-zqmzn9hk.js} +6 -6
- package/dist/cli/index.js +24 -24
- package/dist/cli/{knowledge-escalator-7zpg79dx.js → knowledge-escalator-dyrrftth.js} +9 -9
- package/dist/cli/{knowledge-events-8abttcnt.js → knowledge-events-hqrwgn29.js} +7 -7
- package/dist/cli/{knowledge-link-mgg482z6.js → knowledge-link-jkx8xjxp.js} +3 -3
- package/dist/cli/{knowledge-store-a5mzf986.js → knowledge-store-fn7whe2j.js} +4 -4
- package/dist/cli/{knowledge-validator-fn2myc73.js → knowledge-validator-6zb1j8c4.js} +6 -6
- package/dist/cli/{pending-delegations-591vme3d.js → pending-delegations-k2yqg1sj.js} +1 -1
- package/dist/cli/{runner-rcnpm510.js → runner-q7d22d1w.js} +4 -4
- package/dist/cli/{scan-cursor-4jv70zwb.js → scan-cursor-m04qgx82.js} +5 -5
- package/dist/cli/{schema-jhz9hme9.js → schema-40w13gdv.js} +1 -1
- package/dist/cli/{scope-persistence-ykswenxj.js → scope-persistence-fz2r889v.js} +5 -5
- package/dist/cli/{skill-generator-k5pxb3w2.js → skill-generator-413k36q9.js} +11 -11
- package/dist/cli/{worktree-collision-ownership-vt0jzmdt.js → worktree-collision-ownership-xj0bsg92.js} +1 -1
- package/dist/cli/{worktree-isolation-443q0pah.js → worktree-isolation-50afhbga.js} +24 -24
- package/dist/hooks/pr-workflow-gate.d.ts +58 -5
- package/dist/index.js +80 -77
- package/dist/tools/dispatch-lanes.d.ts +30 -8
- package/package.json +2 -1
|
@@ -689,7 +689,7 @@ the review head SHA recorded at the top.
|
|
|
689
689
|
Each persisted finding record must include at least:
|
|
690
690
|
|
|
691
691
|
```json
|
|
692
|
-
{"finding_id":"F-001","status":"PENDING","file_line":"src/file.ts:123","evidence":"quote, command output, lane id, or reviewer rationale","next_action":"route_to_reviewer"}
|
|
692
|
+
{"finding_id":"F-001","status":"PENDING","file_line":"src/file.ts:123","evidence":"quote, command output, lane id, or reviewer rationale","next_action":"route_to_reviewer","severity":"HIGH"}
|
|
693
693
|
```
|
|
694
694
|
|
|
695
695
|
Minimum field contract:
|
|
@@ -697,10 +697,9 @@ Minimum field contract:
|
|
|
697
697
|
- `finding_id`: stable ID from the candidate/reviewer/critic ledger.
|
|
698
698
|
- `status`: one of `PENDING`, `CONFIRMED`, `DISPROVED`, or `PRE_EXISTING`.
|
|
699
699
|
- `file_line`: exact `file:line`, or `N/A` with reason when cross-file.
|
|
700
|
-
- `evidence`: compact source-backed proof (lane/reviewer/critic IDs or command
|
|
701
|
-
|
|
702
|
-
- `
|
|
703
|
-
`suppress_with_reason`, or `handoff_to_feedback`.
|
|
700
|
+
- `evidence`: compact source-backed proof (lane/reviewer/critic IDs or command output references when available).
|
|
701
|
+
- `next_action`: `route_to_reviewer`, `route_to_critic`, `report`, `suppress_with_reason`, or `handoff_to_feedback`.
|
|
702
|
+
- `severity`: REQUIRED at every boundary — omitting it is a violation, not a shortcut. Vocabulary is the VERDICT dialect `INFO|LOW|MEDIUM|HIGH|CRITICAL|NONE`. At `post_explorer` it must equal the severity of the `[CANDIDATE]` row the record projects (so never `NONE`, which no candidate row can declare) — except the mechanically derived `CLEAN-REVIEW` sentinel emitted when discovery found nothing, whose severity is `NONE`; at `post_reviewer` the reviewer `final_severity`; at `post_critic` the **critic** `final_severity` for critic-routed records, otherwise the reviewer's (issue #2279).
|
|
704
703
|
|
|
705
704
|
Persist after every major validation boundary (Profile A via the controller
|
|
706
705
|
calls below; Profiles B/C by appending the same boundary-tagged records to the
|
|
@@ -714,8 +713,8 @@ ledger file):
|
|
|
714
713
|
record to `CONFIRMED`, `DISPROVED`, `PRE_EXISTING`, or keep `PENDING` with a
|
|
715
714
|
concrete `next_action` if more evidence is required.
|
|
716
715
|
3. **Post-critic:** after Phase 8 critic challenge, call the controller with
|
|
717
|
-
`boundary: "post_critic"` and update final status,
|
|
718
|
-
severity
|
|
716
|
+
`boundary: "post_critic"` and update final status, the authoritative
|
|
717
|
+
`severity`, and final reporting or handoff action.
|
|
719
718
|
|
|
720
719
|
**Enforced order, dispositions, and error reporting (Profile A).** Checkpoints
|
|
721
720
|
are admitted only after the trigger evaluation completes, then strictly
|
|
@@ -723,7 +722,7 @@ are admitted only after the trigger evaluation completes, then strictly
|
|
|
723
722
|
checkpoint persisted; records must match the authoritative reviewer/critic
|
|
724
723
|
verdict rows, and an invalid payload is rejected in ONE call listing every
|
|
725
724
|
violation as `finding_id: field expected <value>, got <value>`. Full contract
|
|
726
|
-
(write order,
|
|
725
|
+
(write order, dispositions, severity authority table, handoff schema):
|
|
727
726
|
references/findings-persistence-contract.md.
|
|
728
727
|
|
|
729
728
|
Resume/reload procedure: read the latest `findings.jsonl` and reconstruct the
|
|
@@ -983,7 +982,7 @@ build a minimal correct single-lane reproduction using the same workflow mode,
|
|
|
983
982
|
lane identity, exact head, and canonical row. Before retrying, distinguish the
|
|
984
983
|
three independent input layers: the header schema, data-row values, and tool
|
|
985
984
|
argument shape. A correct header does not repair an invalid severity or lane
|
|
986
|
-
value, and correct row data does not repair malformed dispatch JSON. Benign shape defects (evidence pipes, marker rows, verdict-row pipes) are auto-repaired and recorded as salvage — never a retry reason alone (contract and fidelity boundaries: `references/lane-output-recoverability.md`).
|
|
985
|
+
value, and correct row data does not repair malformed dispatch JSON. Benign shape defects (evidence pipes, marker rows, verdict-row pipes, a header re-emitted as a data row) are auto-repaired and recorded as salvage — never a retry reason alone; the `parse_lane_candidates` receipt discloses them as `repair_kinds`, and a `[CLEAN]` attestation discredited beside a same-lane `[CANDIDATE]` row as `clean_attestation_salvaged` + `clean_attestation_salvage_reason` (the parse SUCCEEDS and the attestation still supplies no coverage) (contract and fidelity boundaries: `references/lane-output-recoverability.md`).
|
|
987
986
|
|
|
988
987
|
Classify the incident from actual user-visible harm and the first failed
|
|
989
988
|
predicate, not from the number of retries or the eventual result. A successful
|
|
@@ -1338,6 +1337,11 @@ file area, category, or count — not the full candidate set. The reviewer must
|
|
|
1338
1337
|
re-read the candidate's file:line evidence and relevant context pack entries
|
|
1339
1338
|
directly.
|
|
1340
1339
|
|
|
1340
|
+
A reviewer or critic chunk may own any non-empty subset of the current
|
|
1341
|
+
inventory. On a retry, that subset may overlap prior successful work; the lane
|
|
1342
|
+
contract is the assigned item set for that chunk, not a requirement to re-own
|
|
1343
|
+
the full inventory every time.
|
|
1344
|
+
|
|
1341
1345
|
Under Profile A, dispatch reviewer chunks with `dispatch_lanes_async`,
|
|
1342
1346
|
`mode: "swarm-pr-review:reviewer"`, a unique non-empty `workflow_lane` per
|
|
1343
1347
|
chunk, `review_item_ids` containing the exact candidate IDs assigned to that
|
|
@@ -1364,8 +1368,10 @@ Reviewer ownership is not accepted as an architect assertion. Under Profile A,
|
|
|
1364
1368
|
the controller derives the immutable candidate inventory from the
|
|
1365
1369
|
integrity-checked base, mandatory micro-lane, and council artifacts; under
|
|
1366
1370
|
Profiles B/C, the orchestrator derives the same inventory from the persisted
|
|
1367
|
-
ledgers. Either way,
|
|
1368
|
-
|
|
1371
|
+
ledgers. Either way, successful reviewer batches compose item by item: the
|
|
1372
|
+
union of their accepted `review_item_ids` must equal that inventory exactly,
|
|
1373
|
+
with the newest successful verdict winning for each item. If discovery produces
|
|
1374
|
+
no candidates,
|
|
1369
1375
|
the derived sentinel is `CLEAN-REVIEW`, which still requires one independent
|
|
1370
1376
|
semantic reviewer row (a fresh subagent on Profile B; a separate reviewer pass
|
|
1371
1377
|
on Profile C).
|
|
@@ -1436,7 +1442,8 @@ assigned candidate. A malformed `[REVIEWED]` row is not a verdict: re-dispatch
|
|
|
1436
1442
|
with the exact contract (max 2), then mark the reviewer dimension BLOCKED if no
|
|
1437
1443
|
valid row returns.
|
|
1438
1444
|
|
|
1439
|
-
`DISPROVED`
|
|
1445
|
+
`DISPROVED` reviewer rows must use `NONE` for `final_severity`. `PRE_EXISTING`
|
|
1446
|
+
findings must include the base-branch evidence if available.
|
|
1440
1447
|
|
|
1441
1448
|
After reviewer lanes settle, persist the post-reviewer finding ledger before
|
|
1442
1449
|
critic routing or synthesis. The artifact must preserve `CONFIRMED`,
|
|
@@ -1473,38 +1480,14 @@ machine enforcement cannot safely infer every repository-specific trust
|
|
|
1473
1480
|
boundary from prose. Completion is blocked until that exact derived inventory
|
|
1474
1481
|
has valid critic rows.
|
|
1475
1482
|
|
|
1476
|
-
Reviewer and critic settlement compose
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
When more than one successful batch covers the same item, the most recent
|
|
1485
|
-
successful batch wins that item. This conflict rule is one shared computation,
|
|
1486
|
-
so settlement and every downstream verdict use (candidate inventory, critic
|
|
1487
|
-
routing, final synthesis) never disagree about which claim is authoritative
|
|
1488
|
-
for an item. A batch contributes only when it was validated against the exact
|
|
1489
|
-
candidate inventory current at validation time; a batch recorded before that
|
|
1490
|
-
binding existed contributes only if it is wholly successful and its item set
|
|
1491
|
-
exactly matches the current inventory — the historical all-or-nothing rule,
|
|
1492
|
-
preserved unchanged for state that predates composition.
|
|
1493
|
-
|
|
1494
|
-
A critic claim is bound per item to the exact reviewer row it was validated
|
|
1495
|
-
against, not to the reviewer batch as a whole. A reviewer retry that
|
|
1496
|
-
reproduces a byte-identical row for an item retains that item's critic work;
|
|
1497
|
-
a reviewer row that changed at all — even one field — invalidates only that
|
|
1498
|
-
item's critic claim, not the whole critic wave. Critic batches recorded
|
|
1499
|
-
before per-item binding existed keep the old behavior: any newer reviewer
|
|
1500
|
-
batch invalidates them wholesale. Dispatch a fresh critic wave to cover
|
|
1501
|
-
whatever items composition leaves unclaimed; critic evidence can never
|
|
1502
|
-
predate the reviewer evidence it purports to challenge.
|
|
1503
|
-
|
|
1504
|
-
Settlement is item completeness, not lane completeness: a declared lane that
|
|
1505
|
-
never completes produces a diagnostic naming the abandoned lane, not an
|
|
1506
|
-
automatic block, as long as every item in the inventory already holds a
|
|
1507
|
-
successful verdict from some lane.
|
|
1483
|
+
Reviewer and critic settlement MUST compose successful verdicts item by item
|
|
1484
|
+
across complementary partial batches. The newest successful claim wins each
|
|
1485
|
+
item; malformed or stale batches contribute nothing without erasing healthy
|
|
1486
|
+
sibling claims. Collection MUST validate exact lane ownership atomically, and
|
|
1487
|
+
critic claims MUST bind to the exact reviewer row for their item. Settlement is
|
|
1488
|
+
item completeness, not lane completeness. Follow the full retry, legacy,
|
|
1489
|
+
binding, and diagnostic contract in
|
|
1490
|
+
[`references/verdict-settlement-contract.md`](references/verdict-settlement-contract.md).
|
|
1508
1491
|
|
|
1509
1492
|
Under Profile A, dispatch critic chunks with `dispatch_lanes_async`,
|
|
1510
1493
|
`mode: "swarm-pr-review:critic"`, a unique non-empty `workflow_lane` per
|
|
@@ -63,14 +63,53 @@ At `post_explorer` every record must be `PENDING` with
|
|
|
63
63
|
|
|
64
64
|
## Severity semantics
|
|
65
65
|
|
|
66
|
-
`severity` is
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
`severity` is REQUIRED on every findings record, at every boundary. Omitting it
|
|
67
|
+
is a violation, not a shortcut — the rejection names the value you owed, e.g.
|
|
68
|
+
`severity expected "MEDIUM", got (omitted)` (issue #2279).
|
|
69
|
+
|
|
70
|
+
The vocabulary is the VERDICT dialect — `INFO | LOW | MEDIUM | HIGH | CRITICAL |
|
|
71
|
+
NONE` — because a findings record is a projection of an authenticated
|
|
72
|
+
`[REVIEWED]`/`[CRITIC]` row. `NONE` is a first-class value here: a `DISPROVED`
|
|
73
|
+
critic verdict is required to carry it, and a CONFIRMED-but-cosmetic reviewer
|
|
74
|
+
verdict legitimately does. (This is a WIDER set than the `[CANDIDATE]` row
|
|
75
|
+
severities, which exclude `NONE` — a discovered candidate asserting "no severity"
|
|
76
|
+
is a contradiction.)
|
|
77
|
+
|
|
78
|
+
Exactly one authority applies per record; there is never a value that must
|
|
79
|
+
satisfy two:
|
|
80
|
+
|
|
81
|
+
| Boundary | Routing | `severity` must equal |
|
|
82
|
+
| --- | --- | --- |
|
|
83
|
+
| `post_explorer` | has a `[CANDIDATE]` row | the severity that row declared (never `NONE`) |
|
|
84
|
+
| `post_explorer` | `CLEAN-REVIEW` with no row | `NONE` |
|
|
85
|
+
| `post_reviewer` | any | the reviewer `final_severity` |
|
|
86
|
+
| `post_critic` | not critic-routed | the reviewer `final_severity` |
|
|
87
|
+
| `post_critic` | critic-routed | the **critic** `final_severity` — the final word |
|
|
88
|
+
|
|
89
|
+
A record is critic-routed when the reviewer classification is `CONFIRMED` and the
|
|
90
|
+
reviewer severity is `CRITICAL`, `HIGH`, or `MEDIUM`.
|
|
91
|
+
|
|
92
|
+
Because the critic is authoritative for critic-routed records, a **downgrade is
|
|
93
|
+
encodable verbatim**: reviewer `MEDIUM` + critic `LOW` persists as
|
|
94
|
+
`severity: "LOW"` and validates. The former rule — omit the field when the two
|
|
95
|
+
authorities disagree — is gone; it disabled the comparison against both
|
|
96
|
+
authorities and is now itself rejected.
|
|
97
|
+
|
|
98
|
+
At `post_explorer` the authority is the `[CANDIDATE]` row the record projects:
|
|
99
|
+
the severity must equal what that row declared, compared exactly (issue #2320).
|
|
100
|
+
Because candidate rows validate against the candidate vocabulary, `NONE` can
|
|
101
|
+
never match one.
|
|
102
|
+
|
|
103
|
+
The one exception is the mechanically derived `CLEAN-REVIEW` sentinel, emitted
|
|
104
|
+
as the whole inventory when discovery found nothing at all. It has no
|
|
105
|
+
`[CANDIDATE]` row, so its severity is `NONE` — the same value its mandated
|
|
106
|
+
reviewer row carries — and a zero-finding review never has to invent a severity
|
|
107
|
+
and then change it.
|
|
108
|
+
|
|
109
|
+
`CLEAN-REVIEW` is **not a reserved id**: `candidate_id` is free text, so a lane
|
|
110
|
+
may name a real finding that. The rule is therefore keyed on the authority, not
|
|
111
|
+
the name — whenever a `[CANDIDATE]` row exists for the id, that row wins and its
|
|
112
|
+
severity is compared exactly. The sentinel rule applies only when no row exists.
|
|
74
113
|
|
|
75
114
|
## Error reporting
|
|
76
115
|
|
|
@@ -86,10 +125,11 @@ BLOCKED: PR_REVIEW post_reviewer artifact invalid — 4 violation(s):
|
|
|
86
125
|
C-1: severity expected "HIGH", got "LOW"
|
|
87
126
|
```
|
|
88
127
|
|
|
89
|
-
A critic-downgraded record
|
|
90
|
-
value
|
|
91
|
-
|
|
92
|
-
in a single round trip; do
|
|
128
|
+
A critic-downgraded record is compared against the critic alone, so carrying the
|
|
129
|
+
stale reviewer value is reported plainly: `severity expected "LOW", got "MEDIUM"`.
|
|
130
|
+
An omitted severity is reported the same way: `severity expected "LOW", got
|
|
131
|
+
(omitted)`. Repair every listed violation and resubmit in a single round trip; do
|
|
132
|
+
not guess-and-retry one record at a time.
|
|
93
133
|
|
|
94
134
|
## Handoff artifact schema
|
|
95
135
|
|
|
@@ -48,10 +48,13 @@ their exact owned workflow lanes are marked salvaged. Council, reviewer, and
|
|
|
48
48
|
critic outputs remain fail-closed and require retry when incomplete. `[CLEAN]`
|
|
49
49
|
is absence evidence and therefore requires a complete transcript. One positive
|
|
50
50
|
row in a consolidated lane never salvages a sibling dimension whose only
|
|
51
|
-
evidence is `[CLEAN]` or missing. Recovery reasons are lane-scoped and use
|
|
51
|
+
evidence is `[CLEAN]` or missing. Recovery reasons are lane-scoped and use five
|
|
52
52
|
kinds: `parser-normalization`, `parser-row-recovery`,
|
|
53
|
-
`truncated-preview-durable-artifact`,
|
|
54
|
-
`transcript-incomplete-terminal-candidate
|
|
53
|
+
`truncated-preview-durable-artifact`,
|
|
54
|
+
`transcript-incomplete-terminal-candidate`, and
|
|
55
|
+
`clean-attestation-salvaged` (a `[CLEAN]` attestation conflicting with a
|
|
56
|
+
same-lane `[CANDIDATE]` row was discredited while the candidate rows were
|
|
57
|
+
retained — the attestation contributes no coverage).
|
|
55
58
|
|
|
56
59
|
## Verdict-row pipe tolerance and its fidelity boundary
|
|
57
60
|
|
|
@@ -48,7 +48,25 @@ The orchestrator calls `parse_lane_candidates` for each `output_ref`:
|
|
|
48
48
|
|
|
49
49
|
### Step 2 — Structured response
|
|
50
50
|
|
|
51
|
-
The parser returns a `ParseResultWithSidecar`. On success, `error` and `error_code` are absent
|
|
51
|
+
The parser returns a `ParseResultWithSidecar`. On success, `error` and `error_code` are absent.
|
|
52
|
+
|
|
53
|
+
A successful receipt may additionally carry **salvage disclosure** fields, which
|
|
54
|
+
report that the artifact was accepted only after a narrow, auditable repair —
|
|
55
|
+
never that it was pristine (issue #2279):
|
|
56
|
+
|
|
57
|
+
- `repair_kinds` — structural repairs applied before the strict parse, e.g.
|
|
58
|
+
`["duplicate-header-row-dropped"]` when a canonical header was re-emitted as a
|
|
59
|
+
data row, or `["synthesized-header"]`, `["summary-row-dropped"]`.
|
|
60
|
+
- `clean_attestation_salvaged: true` plus `clean_attestation_salvage_reason` — a
|
|
61
|
+
`[CLEAN]` attestation conflicted with a same-lane `[CANDIDATE]` row, so the
|
|
62
|
+
attestation was discredited while the candidate rows were retained. The parse
|
|
63
|
+
SUCCEEDS. Do **not** read this as coverage: `clean_attestation` is absent
|
|
64
|
+
whenever it is set, so a lane with no candidate rows still fails coverage.
|
|
65
|
+
A `[CLEAN]` that failed for any other reason (degraded or partial source,
|
|
66
|
+
duplicate attestation, lane mismatch) still hard-errors and never reports a
|
|
67
|
+
salvage.
|
|
68
|
+
|
|
69
|
+
Example success receipt:
|
|
52
70
|
|
|
53
71
|
```json
|
|
54
72
|
{
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Verdict settlement contract
|
|
2
|
+
|
|
3
|
+
Reviewer and critic settlement composes across batches, item by item. A phase
|
|
4
|
+
settles once every review item in the current mechanically assigned inventory
|
|
5
|
+
holds a successful verdict, whether that coverage comes from one batch or from
|
|
6
|
+
several complementary partial retries. A later degraded, truncated, stale,
|
|
7
|
+
wrong-identity, or malformed batch never supplies a verdict for the items it
|
|
8
|
+
touches, but it does not discard verdicts other batches already supplied for
|
|
9
|
+
different items.
|
|
10
|
+
|
|
11
|
+
When more than one successful batch covers the same item, the most recent
|
|
12
|
+
successful batch wins that item. This conflict rule is one shared computation,
|
|
13
|
+
so settlement and every downstream verdict use—candidate inventory, critic
|
|
14
|
+
routing, and final synthesis—never disagree about which claim is authoritative
|
|
15
|
+
for an item. A batch contributes only the items it was validated for against
|
|
16
|
+
the exact candidate inventory current at validation time. Partial batches are
|
|
17
|
+
first-class inputs, not an error state. Legacy artifacts that predate exact
|
|
18
|
+
item binding remain all-or-nothing and MUST validate against their complete
|
|
19
|
+
recorded inventory before they contribute any claim.
|
|
20
|
+
|
|
21
|
+
Collection validates every dispatched reviewer or critic lane against the exact
|
|
22
|
+
assigned verdict rows and records lane-atomic accepted and rejected IDs before
|
|
23
|
+
settlement. A malformed, missing, or surplus row never silently upgrades the
|
|
24
|
+
lane: the lane accepts every assigned ID only when the complete assigned row set
|
|
25
|
+
is valid; otherwise it rejects every assigned ID for precise re-dispatch. The
|
|
26
|
+
lane report MUST disclose both sets.
|
|
27
|
+
|
|
28
|
+
A critic claim binds per item to the exact reviewer row it was validated
|
|
29
|
+
against, not to the reviewer batch as a whole. A reviewer retry that reproduces
|
|
30
|
+
a byte-identical row for an item retains that item's critic work. A reviewer row
|
|
31
|
+
that changes at all—even one field—invalidates only that item's critic claim,
|
|
32
|
+
not the whole critic wave. Critic batches recorded before per-item binding
|
|
33
|
+
existed keep the legacy behavior: any newer reviewer batch invalidates them
|
|
34
|
+
wholesale. Dispatch a fresh critic wave to cover whatever items composition
|
|
35
|
+
leaves unclaimed. Critic evidence can never predate the reviewer evidence it
|
|
36
|
+
purports to challenge.
|
|
37
|
+
|
|
38
|
+
Settlement is item completeness, not lane completeness. A declared lane that
|
|
39
|
+
never completes produces a diagnostic naming the abandoned lane, not an
|
|
40
|
+
automatic block, as long as every item in the inventory already holds a
|
|
41
|
+
successful verdict from some lane.
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
export declare const CANDIDATE_SEVERITIES: readonly ["INFO", "LOW", "MEDIUM", "HIGH", "CRITICAL"];
|
|
2
2
|
export type CandidateSeverity = (typeof CANDIDATE_SEVERITIES)[number];
|
|
3
|
+
/**
|
|
4
|
+
* Severity vocabulary of the PR-review FINDINGS artifact.
|
|
5
|
+
*
|
|
6
|
+
* A findings record is a projection of an authenticated `[REVIEWED]`/`[CRITIC]`
|
|
7
|
+
* verdict row, never of a `[CANDIDATE]` row — so it must speak the VERDICT
|
|
8
|
+
* dialect. That dialect is `REVIEW_SEVERITIES` in `src/hooks/pr-workflow-gate.ts`,
|
|
9
|
+
* which is exactly `CANDIDATE_SEVERITIES` plus `NONE` (a DISPROVED critic verdict
|
|
10
|
+
* is *required* to carry `NONE`, and a CONFIRMED-but-cosmetic reviewer verdict
|
|
11
|
+
* legitimately does). Reusing `CANDIDATE_SEVERITIES` for findings made `NONE`
|
|
12
|
+
* unrepresentable and forced field omission as its only encoding — which in turn
|
|
13
|
+
* disabled the gate's severity comparison (issue #2279).
|
|
14
|
+
*
|
|
15
|
+
* Deliberately a SEPARATE constant rather than a widened `CANDIDATE_SEVERITIES`:
|
|
16
|
+
* that one still governs explorer/micro-lane `[CANDIDATE]` rows
|
|
17
|
+
* (`isCandidateSeverity` → `analyzeCandidateFields`) and the required sidecar
|
|
18
|
+
* field (`candidate-sidecar-store.ts`), where `NONE` is never legitimate — a
|
|
19
|
+
* candidate row asserting "no severity" is a contradiction, not a finding.
|
|
20
|
+
*/
|
|
21
|
+
export declare const FINDINGS_SEVERITIES: readonly ["INFO", "LOW", "MEDIUM", "HIGH", "CRITICAL", "NONE"];
|
|
22
|
+
export type FindingsSeverity = (typeof FINDINGS_SEVERITIES)[number];
|
|
3
23
|
export declare const CANDIDATE_CONFIDENCES: readonly ["HIGH", "MEDIUM", "LOW"];
|
|
4
24
|
export type CandidateConfidence = (typeof CANDIDATE_CONFIDENCES)[number];
|
|
5
25
|
export type RowFormatFamily = 'base_explorer' | 'micro_lane';
|
|
@@ -51,7 +71,7 @@ export interface NormalizedCandidateArtifact {
|
|
|
51
71
|
/** Narrow, auditable repairs applied before the unchanged strict parser runs. */
|
|
52
72
|
repairKinds: CandidateArtifactRepairKind[];
|
|
53
73
|
}
|
|
54
|
-
export type CandidateArtifactRepairKind = 'synthesized-header' | 'terminal-protocol-fence' | 'redundant-clean-confidence' | 'clean-evidence-pipe-tail-merge' | 'summary-row-dropped';
|
|
74
|
+
export type CandidateArtifactRepairKind = 'synthesized-header' | 'terminal-protocol-fence' | 'redundant-clean-confidence' | 'clean-evidence-pipe-tail-merge' | 'summary-row-dropped' | 'duplicate-header-row-dropped';
|
|
55
75
|
/**
|
|
56
76
|
* Normalize a lane artifact ONCE so every consumer parses byte-identical text.
|
|
57
77
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { type CandidateConfidence, type CandidateSeverity, type RowFormatFamily, type CleanAttestationRecord as SharedCleanAttestationRecord } from './candidate-contract';
|
|
2
|
+
import { type CandidateArtifactRepairKind, type CandidateConfidence, type CandidateSeverity, type RowFormatFamily, type CleanAttestationRecord as SharedCleanAttestationRecord } from './candidate-contract';
|
|
3
3
|
declare const ArtifactInputSchema: z.ZodObject<{
|
|
4
4
|
output_ref: z.ZodString;
|
|
5
5
|
batchId: z.ZodString;
|
|
@@ -138,6 +138,26 @@ export interface ParseResult {
|
|
|
138
138
|
error_code?: string;
|
|
139
139
|
candidates: CandidateRecord[];
|
|
140
140
|
clean_attestation?: CleanAttestationRecord;
|
|
141
|
+
/**
|
|
142
|
+
* The artifact carried a `[CLEAN]` attestation that had to be discredited,
|
|
143
|
+
* but the artifact itself is still valid and its candidate rows were retained.
|
|
144
|
+
* The parse SUCCEEDS: `error`/`error_code` are absent. Mutually exclusive with
|
|
145
|
+
* `error_code` by construction (issue #2279).
|
|
146
|
+
*
|
|
147
|
+
* Callers must not read this as coverage: `clean_attestation` is `undefined`
|
|
148
|
+
* whenever this is set, so a lane with zero candidate rows still fails
|
|
149
|
+
* coverage exactly as before.
|
|
150
|
+
*/
|
|
151
|
+
clean_attestation_salvaged?: boolean;
|
|
152
|
+
/** Human-readable reason a salvaged attestation was discredited. */
|
|
153
|
+
clean_attestation_salvage_reason?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Structural repairs applied by `normalizeCandidateArtifact` before the strict
|
|
156
|
+
* parse. Present only on the `parseAndPersist` path, which is the one that
|
|
157
|
+
* normalizes; disclosed so the tool receipt reports a repaired artifact
|
|
158
|
+
* instead of silently presenting it as pristine.
|
|
159
|
+
*/
|
|
160
|
+
repair_kinds?: CandidateArtifactRepairKind[];
|
|
141
161
|
invocation_envelope: InvocationEnvelope;
|
|
142
162
|
diagnostics: DiagnosticsSummary;
|
|
143
163
|
}
|
|
@@ -212,7 +212,14 @@ export interface BackgroundPromptSnapshot {
|
|
|
212
212
|
truncated: boolean;
|
|
213
213
|
digest: string;
|
|
214
214
|
}
|
|
215
|
-
export type BackgroundDelegationRecoveryKind = 'parser-normalization' | 'parser-row-recovery' | 'truncated-preview-durable-artifact' | 'transcript-incomplete-terminal-candidate'
|
|
215
|
+
export type BackgroundDelegationRecoveryKind = 'parser-normalization' | 'parser-row-recovery' | 'truncated-preview-durable-artifact' | 'transcript-incomplete-terminal-candidate'
|
|
216
|
+
/**
|
|
217
|
+
* A `[CLEAN]` attestation was discredited while the artifact's candidate rows
|
|
218
|
+
* were retained. Distinct from `parser-normalization` (a text-shape repair by
|
|
219
|
+
* `normalizeCandidateArtifact`) because nothing was repaired — an assertion
|
|
220
|
+
* was dropped (issue #2279).
|
|
221
|
+
*/
|
|
222
|
+
| 'clean-attestation-salvaged';
|
|
216
223
|
export interface BackgroundDelegationWorkflowLaneRecovery {
|
|
217
224
|
workflowLane: string;
|
|
218
225
|
kind: BackgroundDelegationRecoveryKind;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const PR_REVIEW_COLLECTION_RECEIPT_PREFIX = "[PR_REVIEW_COLLECTION_RECEIPT_V1] ";
|
|
3
|
+
export declare const PR_REVIEW_COLLECTION_RECEIPT_SHED_PREFIX = "[PR_REVIEW_COLLECTION_RECEIPT_SHED_V1] ";
|
|
4
|
+
/** Bound durable receipt metadata even when a malformed producer supplies text. */
|
|
5
|
+
export declare const MAX_PR_REVIEW_COLLECTION_RECEIPT_CHARS: number;
|
|
6
|
+
/** Keep public assignment schemas aligned with the largest durable receipt. */
|
|
7
|
+
export declare const MAX_PR_REVIEW_COLLECTION_RECEIPT_ITEM_IDS = 10000;
|
|
8
|
+
declare const PrReviewCollectionReceiptPayloadSchema: z.ZodObject<{
|
|
9
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
10
|
+
parentSessionId: z.ZodString;
|
|
11
|
+
batchId: z.ZodString;
|
|
12
|
+
laneId: z.ZodString;
|
|
13
|
+
mode: z.ZodEnum<{
|
|
14
|
+
"swarm-pr-review:reviewer": "swarm-pr-review:reviewer";
|
|
15
|
+
"swarm-pr-review:critic": "swarm-pr-review:critic";
|
|
16
|
+
}>;
|
|
17
|
+
workflowLane: z.ZodString;
|
|
18
|
+
outputDigest: z.ZodString;
|
|
19
|
+
disposition: z.ZodEnum<{
|
|
20
|
+
rejected: "rejected";
|
|
21
|
+
accepted: "accepted";
|
|
22
|
+
}>;
|
|
23
|
+
reviewItemIds: z.ZodArray<z.ZodString>;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
export type PrReviewCollectionReceiptPayload = z.infer<typeof PrReviewCollectionReceiptPayloadSchema>;
|
|
26
|
+
declare const PrReviewCollectionReceiptShedMarkerSchema: z.ZodObject<{
|
|
27
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
28
|
+
parentSessionId: z.ZodString;
|
|
29
|
+
batchId: z.ZodString;
|
|
30
|
+
laneId: z.ZodString;
|
|
31
|
+
mode: z.ZodEnum<{
|
|
32
|
+
"swarm-pr-review:reviewer": "swarm-pr-review:reviewer";
|
|
33
|
+
"swarm-pr-review:critic": "swarm-pr-review:critic";
|
|
34
|
+
}>;
|
|
35
|
+
workflowLane: z.ZodString;
|
|
36
|
+
outputDigest: z.ZodString;
|
|
37
|
+
disposition: z.ZodEnum<{
|
|
38
|
+
rejected: "rejected";
|
|
39
|
+
accepted: "accepted";
|
|
40
|
+
}>;
|
|
41
|
+
reviewItemCount: z.ZodNumber;
|
|
42
|
+
reviewItemDigest: z.ZodString;
|
|
43
|
+
}, z.core.$strict>;
|
|
44
|
+
export type PrReviewCollectionReceiptShedMarker = z.infer<typeof PrReviewCollectionReceiptShedMarkerSchema>;
|
|
45
|
+
export interface PrReviewCollectionReceiptBinding {
|
|
46
|
+
parentSessionId: string;
|
|
47
|
+
batchId?: string;
|
|
48
|
+
callID: string;
|
|
49
|
+
laneId?: string;
|
|
50
|
+
correlationId: string;
|
|
51
|
+
mode?: string;
|
|
52
|
+
workflowLane?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface PrReviewCollectionReceiptResult {
|
|
55
|
+
text?: string;
|
|
56
|
+
digest: string;
|
|
57
|
+
}
|
|
58
|
+
export interface PrReviewCollectionReceiptPartition {
|
|
59
|
+
assignedReviewItemIds: string[];
|
|
60
|
+
acceptedReviewItemIds: string[];
|
|
61
|
+
rejectedReviewItemIds: string[];
|
|
62
|
+
}
|
|
63
|
+
export declare function encodePrReviewCollectionReceiptFooter(binding: PrReviewCollectionReceiptBinding, result: PrReviewCollectionReceiptResult, receipt: PrReviewCollectionReceiptPartition): string | null;
|
|
64
|
+
export declare function projectPrReviewCollectionReceipt(payload: PrReviewCollectionReceiptPayload): PrReviewCollectionReceiptPartition;
|
|
65
|
+
export declare function encodePrReviewCollectionReceiptShedMarker(payload: PrReviewCollectionReceiptPayload): string;
|
|
66
|
+
export declare function encodePrReviewCollectionReceiptShedMarkerFromReceipt(binding: PrReviewCollectionReceiptBinding, result: PrReviewCollectionReceiptResult, receipt: PrReviewCollectionReceiptPartition): string | null;
|
|
67
|
+
export declare function parsePrReviewCollectionReceiptShedMarker(binding: PrReviewCollectionReceiptBinding, result: PrReviewCollectionReceiptResult): PrReviewCollectionReceiptShedMarker | null;
|
|
68
|
+
export declare function projectPrReviewCollectionReceiptShedMarker(marker: PrReviewCollectionReceiptShedMarker, reviewItemIds: readonly string[]): PrReviewCollectionReceiptPartition | null;
|
|
69
|
+
export declare function parsePrReviewCollectionReceiptFooter(binding: PrReviewCollectionReceiptBinding, result: PrReviewCollectionReceiptResult): PrReviewCollectionReceiptPayload | null;
|
|
70
|
+
export {};
|
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
shouldRunOnStartup,
|
|
13
13
|
writeBackupArtifact,
|
|
14
14
|
writeDoctorArtifact
|
|
15
|
-
} from "./index-
|
|
16
|
-
import"./index-
|
|
15
|
+
} from "./index-d3t7q4b8.js";
|
|
16
|
+
import"./index-rqgnad5w.js";
|
|
17
17
|
import"./index-cpg98bh1.js";
|
|
18
18
|
import"./index-z6xqpmqg.js";
|
|
19
19
|
import"./index-zjygnfay.js";
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
authorizeCuration,
|
|
5
5
|
buildConfigFingerprintInput,
|
|
6
6
|
readCohortConfigFingerprint
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-tp5ytzzg.js";
|
|
8
8
|
import"./index-rtry5xyf.js";
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
9
|
+
import"./index-f75qjtn5.js";
|
|
10
|
+
import"./index-8py21zn6.js";
|
|
11
|
+
import"./index-hw1yghpg.js";
|
|
12
12
|
import"./index-6q35swn2.js";
|
|
13
13
|
import"./index-q81s0m8k.js";
|
|
14
14
|
import"./index-7g4c7s5r.js";
|
|
@@ -14,45 +14,45 @@ import {
|
|
|
14
14
|
runCuratorInit,
|
|
15
15
|
runCuratorPhase,
|
|
16
16
|
writeCuratorSummary
|
|
17
|
-
} from "./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
17
|
+
} from "./index-npw2xm46.js";
|
|
18
|
+
import"./index-hcb25p12.js";
|
|
19
|
+
import"./index-fjhc8mk2.js";
|
|
20
|
+
import"./index-d3t7q4b8.js";
|
|
21
|
+
import"./index-0pya01vw.js";
|
|
22
|
+
import"./index-p3k155dv.js";
|
|
23
23
|
import"./index-134d35c1.js";
|
|
24
24
|
import"./index-abtrcs16.js";
|
|
25
25
|
import"./index-y8552snf.js";
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
import"./index-55g08cg2.js";
|
|
27
|
+
import"./index-ktpj357z.js";
|
|
28
28
|
import"./index-70ha9e09.js";
|
|
29
29
|
import"./index-c8s9a3zh.js";
|
|
30
30
|
import"./index-9ss2m4rs.js";
|
|
31
31
|
import"./index-z9yhhk6q.js";
|
|
32
32
|
import"./index-3p4wgm0d.js";
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
33
|
+
import"./index-fymrwjak.js";
|
|
34
|
+
import"./index-53asfj0j.js";
|
|
35
|
+
import"./index-tp5ytzzg.js";
|
|
36
36
|
import"./index-rtry5xyf.js";
|
|
37
37
|
import"./index-zsrtt42s.js";
|
|
38
|
-
import"./index-
|
|
38
|
+
import"./index-rpy0bent.js";
|
|
39
39
|
import"./index-e1pxav9g.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
43
|
-
import"./index-
|
|
40
|
+
import"./index-vjkfhqef.js";
|
|
41
|
+
import"./index-cpzra8my.js";
|
|
42
|
+
import"./index-p4ar0k0n.js";
|
|
43
|
+
import"./index-hn0hvgtt.js";
|
|
44
44
|
import"./index-556ja8an.js";
|
|
45
45
|
import"./index-7sy3aa9m.js";
|
|
46
46
|
import"./index-wx8zdh4a.js";
|
|
47
47
|
import"./index-3g0xk6tk.js";
|
|
48
48
|
import"./index-85gkedsf.js";
|
|
49
|
-
import"./index-
|
|
50
|
-
import"./index-
|
|
51
|
-
import"./index-
|
|
49
|
+
import"./index-zqmzn9hk.js";
|
|
50
|
+
import"./index-cp8jp4cv.js";
|
|
51
|
+
import"./index-cyxdm0v3.js";
|
|
52
52
|
import"./index-gprxjmm7.js";
|
|
53
53
|
import"./index-n832052r.js";
|
|
54
|
-
import"./index-
|
|
55
|
-
import"./index-
|
|
54
|
+
import"./index-gqx0rq53.js";
|
|
55
|
+
import"./index-rqgnad5w.js";
|
|
56
56
|
import"./index-cpg98bh1.js";
|
|
57
57
|
import"./index-9e6fdz2h.js";
|
|
58
58
|
import"./index-4rhhvd1a.js";
|
|
@@ -61,10 +61,10 @@ import"./index-z6xqpmqg.js";
|
|
|
61
61
|
import"./index-zj6t9zgx.js";
|
|
62
62
|
import"./index-zjygnfay.js";
|
|
63
63
|
import"./index-ae75rja9.js";
|
|
64
|
-
import"./index-
|
|
65
|
-
import"./index-
|
|
64
|
+
import"./index-f75qjtn5.js";
|
|
65
|
+
import"./index-8py21zn6.js";
|
|
66
66
|
import"./index-bk5tah7q.js";
|
|
67
|
-
import"./index-
|
|
67
|
+
import"./index-hw1yghpg.js";
|
|
68
68
|
import"./index-6q35swn2.js";
|
|
69
69
|
import"./index-q81s0m8k.js";
|
|
70
70
|
import"./index-7g4c7s5r.js";
|