opencode-swarm 7.195.0 → 7.197.0
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/brainstorm/SKILL.md +2 -1
- package/.opencode/skills/ci-failure-batching/SKILL.md +2 -1
- package/.opencode/skills/ci-fix-monitor/SKILL.md +2 -1
- package/.opencode/skills/clarify/SKILL.md +2 -1
- package/.opencode/skills/clarify-spec/SKILL.md +2 -1
- package/.opencode/skills/codebase-review-swarm/SKILL.md +1 -1
- package/.opencode/skills/commit-pr/SKILL.md +3 -2
- package/.opencode/skills/consult/SKILL.md +2 -1
- package/.opencode/skills/council/SKILL.md +2 -1
- package/.opencode/skills/critic-gate/SKILL.md +2 -1
- package/.opencode/skills/deep-dive/SKILL.md +2 -1
- package/.opencode/skills/deep-research/SKILL.md +2 -1
- package/.opencode/skills/design-docs/SKILL.md +2 -1
- package/.opencode/skills/discover/SKILL.md +2 -1
- package/.opencode/skills/durable-session-state/SKILL.md +2 -1
- package/.opencode/skills/engineering-conventions/SKILL.md +2 -1
- package/.opencode/skills/execute/SKILL.md +2 -1
- package/.opencode/skills/fork-pr-operations/SKILL.md +2 -1
- package/.opencode/skills/gate-attribution/SKILL.md +2 -1
- package/.opencode/skills/issue-ingest/SKILL.md +2 -1
- package/.opencode/skills/issue-tracer/SKILL.md +1 -1
- package/.opencode/skills/loop/SKILL.md +2 -1
- package/.opencode/skills/merge-queue-readiness/SKILL.md +2 -1
- package/.opencode/skills/orchestrating-subagents/SKILL.md +2 -1
- package/.opencode/skills/parallel-work-check/SKILL.md +17 -16
- package/.opencode/skills/phase-wrap/SKILL.md +2 -1
- package/.opencode/skills/pre-phase-briefing/SKILL.md +2 -1
- package/.opencode/skills/running-tests/SKILL.md +2 -1
- package/.opencode/skills/skill-edit-validation/SKILL.md +2 -1
- package/.opencode/skills/specify/SKILL.md +2 -1
- package/.opencode/skills/swarm/SKILL.md +2 -1
- package/.opencode/skills/swarm-ci-monitor/SKILL.md +3 -2
- package/.opencode/skills/swarm-implement/SKILL.md +2 -1
- package/.opencode/skills/swarm-plan/SKILL.md +2 -1
- package/.opencode/skills/swarm-pr-feedback/SKILL.md +9 -162
- package/.opencode/skills/swarm-pr-feedback/references/gate-evidence-scope.md +20 -0
- package/.opencode/skills/swarm-pr-feedback/references/intake-surfaces.md +107 -0
- package/.opencode/skills/swarm-pr-feedback/references/preflight-checkout.md +67 -0
- package/.opencode/skills/swarm-pr-review/SKILL.md +12 -344
- package/.opencode/skills/swarm-pr-review/references/council-mode.md +38 -0
- package/.opencode/skills/swarm-pr-review/references/explorer-output-format.md +54 -0
- package/.opencode/skills/swarm-pr-review/references/findings-persistence-detail.md +15 -0
- package/.opencode/skills/swarm-pr-review/references/parser-candidate-extraction.md +75 -0
- package/.opencode/skills/swarm-pr-review/references/phase0a-intake.md +61 -0
- package/.opencode/skills/swarm-pr-review/references/scope-detection.md +103 -0
- package/.opencode/skills/swarm-pr-review/references/writeback-phases.md +68 -0
- package/.opencode/skills/swarm-pr-subscribe/SKILL.md +3 -2
- package/.opencode/skills/swarm-resume/SKILL.md +2 -1
- package/.opencode/skills/test-file-split/SKILL.md +2 -1
- package/.opencode/skills/worktree-retry-cleanup/SKILL.md +2 -1
- package/.opencode/skills/writing-tests/SKILL.md +7 -437
- package/.opencode/skills/writing-tests/references/cross-platform-patterns.md +237 -0
- package/.opencode/skills/writing-tests/references/mock-tiers.md +207 -0
- package/README.md +1 -1
- package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/cli/{auto-checkpoint-anf21wwa.js → auto-checkpoint-s05sxmg6.js} +4 -4
- package/dist/cli/{checkpoint-ngdw2qx2.js → checkpoint-kzyy9b7y.js} +8 -8
- package/dist/cli/{coder-settlement-bqb059y2.js → coder-settlement-d1qqfgdm.js} +3 -3
- package/dist/cli/{config-doctor-vetg215g.js → config-doctor-yrven0ya.js} +7 -7
- package/dist/cli/{core-8qgvsm6x.js → core-qpmksfae.js} +1 -1
- package/dist/cli/{curator-drift-3gjycbkv.js → curator-drift-2h6nf0mw.js} +5 -5
- package/dist/cli/{curator-llm-factory-d17ybmgm.js → curator-llm-factory-kt3jhgs9.js} +25 -25
- package/dist/cli/{curator-hh0n9wgz.js → curator-mqnqst1g.js} +25 -25
- package/dist/cli/{doctor-knowledge-receipt-phase-id-1d465vkg.js → doctor-knowledge-receipt-phase-id-d8arz38j.js} +4 -4
- package/dist/cli/{evidence-summary-service-rkd3yc5x.js → evidence-summary-service-gjs4zssz.js} +9 -9
- package/dist/cli/{gate-evidence-wtjrerkh.js → gate-evidence-9n5r17hq.js} +2 -2
- package/dist/cli/{guardrail-explain-8xh3r0dn.js → guardrail-explain-g4wcr664.js} +26 -26
- package/dist/cli/{guardrail-log-jrey2myg.js → guardrail-log-0hy23f7d.js} +3 -3
- package/dist/cli/{guardrail-reset-m5qbg30j.js → guardrail-reset-9z5rmp3f.js} +25 -25
- package/dist/cli/{hive-promoter-36yhdfre.js → hive-promoter-w8f840ah.js} +25 -25
- package/dist/cli/{index-gz16dke1.js → index-1cks27mv.js} +6 -6
- package/dist/cli/{index-epdzvp4w.js → index-1gnrtz76.js} +5 -5
- package/dist/cli/{index-jn4mmhqc.js → index-20m9q2z9.js} +1 -1
- package/dist/cli/{index-yryy781f.js → index-29xr45xr.js} +153 -52
- package/dist/cli/{index-bpq6z8qe.js → index-3qqnz0jg.js} +3 -3
- package/dist/cli/{index-kmvy5fr8.js → index-401a12w5.js} +1 -1
- package/dist/cli/{index-jatgbm7k.js → index-5p0jhn2s.js} +1 -1
- package/dist/cli/{index-gns3gc87.js → index-67w61x1b.js} +3 -3
- package/dist/cli/{index-ha8xc5d3.js → index-8ahnfc03.js} +2 -2
- package/dist/cli/{index-akb436kn.js → index-8zwmfh9d.js} +1 -1
- package/dist/cli/{index-3k65kdfp.js → index-9px1knpj.js} +1 -1
- package/dist/cli/{index-1hcjxz6w.js → index-9sqcmzc2.js} +2 -2
- package/dist/cli/{index-9teqkkp4.js → index-agvmmvdt.js} +25 -25
- package/dist/cli/{index-tc8x0zc5.js → index-avbvxmw2.js} +1 -1
- package/dist/cli/{index-c6hyd8hg.js → index-bpnpvhja.js} +1 -1
- package/dist/cli/{index-8448vj9w.js → index-dgvf1jey.js} +1 -1
- package/dist/cli/{index-bftpd2m5.js → index-eabxecjf.js} +2 -2
- package/dist/cli/{index-6vpqe4ws.js → index-fzx1wfxn.js} +1 -1
- package/dist/cli/{index-h7275akd.js → index-g1r94prs.js} +27 -27
- package/dist/cli/{index-82aj6gaj.js → index-g749xs7c.js} +2 -2
- package/dist/cli/{index-7kbpzg05.js → index-jvpvghyh.js} +328 -224
- package/dist/cli/{index-780g1hht.js → index-jvzfw0n5.js} +1 -1
- package/dist/cli/{index-479kf368.js → index-mbdkr2sh.js} +1 -1
- package/dist/cli/{index-c4hx57tz.js → index-ng6me2hh.js} +2 -2
- package/dist/cli/{index-fk4j26km.js → index-njfkqr77.js} +3 -3
- package/dist/cli/{index-peyz4k9k.js → index-t3tzk566.js} +1 -1
- package/dist/cli/{index-z59414gv.js → index-v8jhmn8x.js} +1 -1
- package/dist/cli/{index-5gf2wx2c.js → index-xb3h5tvj.js} +4 -4
- package/dist/cli/{index-xs9cn3c0.js → index-xf6tdsyr.js} +3 -3
- package/dist/cli/{index-863hst4e.js → index-ysbmrmzk.js} +1 -1
- package/dist/cli/index.js +26 -26
- package/dist/cli/{knowledge-escalator-6sgrjbcj.js → knowledge-escalator-42cvn0ec.js} +7 -7
- package/dist/cli/{knowledge-events-hztjt63y.js → knowledge-events-v0xavjkd.js} +5 -5
- package/dist/cli/{knowledge-store-3sd2034v.js → knowledge-store-s01cread.js} +1 -1
- package/dist/cli/{knowledge-validator-3fe82zy4.js → knowledge-validator-kvtcqpke.js} +2 -2
- package/dist/cli/{mcp-spbx3efe.js → mcp-ff73w9z7.js} +1 -1
- package/dist/cli/{model-preflight-k2bw7rt1.js → model-preflight-0k8bd388.js} +25 -25
- package/dist/cli/{pending-delegations-kcvd9t41.js → pending-delegations-bmj7djk1.js} +2 -2
- package/dist/cli/{pr-subscriptions-nqby87en.js → pr-subscriptions-9dbrw7ky.js} +1 -1
- package/dist/cli/{pr-workflow-gate-cgbc0x1z.js → pr-workflow-gate-wg003fkd.js} +25 -25
- package/dist/cli/{scan-cursor-sphr9phs.js → scan-cursor-d93q0q3s.js} +2 -2
- package/dist/cli/{schema-x892aatt.js → schema-0ny9ef6s.js} +1 -1
- package/dist/cli/{scope-persistence-n9xksct2.js → scope-persistence-ekcfq34x.js} +5 -5
- package/dist/cli/{server-am2y11yn.js → server-rpx7pkg1.js} +25 -25
- package/dist/cli/{skill-generator-p71b6h5k.js → skill-generator-h1w7s5dh.js} +8 -8
- package/dist/cli/{snapshot-coordination-init-x9b4t9sk.js → snapshot-coordination-init-f6ecsn9c.js} +25 -25
- package/dist/cli/{speckit-checkoff-xp9vsp9k.js → speckit-checkoff-kf0zkpdw.js} +3 -3
- package/dist/cli/{worktree-collision-ownership-2pmyww6g.js → worktree-collision-ownership-p7zmj4ag.js} +2 -2
- package/dist/cli/{worktree-isolation-379tmkta.js → worktree-isolation-nz90xvw5.js} +25 -25
- package/dist/commands/registry.d.ts +1 -1
- package/dist/config/skill-contract-digest.d.ts +6 -0
- package/dist/epic/start.d.ts +5 -4
- package/dist/hooks/skill-scoring.d.ts +1 -1
- package/dist/hooks/skill-usage-log.d.ts +2 -0
- package/dist/host/v2/agents-commands.d.ts +13 -3
- package/dist/index.js +103 -98
- package/dist/sbom/detectors/index.d.ts +15 -0
- package/dist/services/skill-evaluator.d.ts +2 -0
- package/dist/services/skill-generator.d.ts +13 -0
- package/dist/tools/sbom-generate.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: swarm-pr-feedback
|
|
3
|
-
audience: swarm-plugin
|
|
4
3
|
description: >
|
|
5
4
|
Ingest and resolve known pull request feedback with skeptical source verification.
|
|
6
5
|
Use when addressing pasted PR feedback, GitHub review comments or threads,
|
|
@@ -12,7 +11,9 @@ description: >
|
|
|
12
11
|
(structural pre-checks) and Stage B (reviewer + test_engineer) gates and the
|
|
13
12
|
reviewer + critic closeout gate are MANDATORY for any change made as part of
|
|
14
13
|
this process.
|
|
15
|
-
|
|
14
|
+
metadata:
|
|
15
|
+
audience: swarm-plugin
|
|
16
|
+
swarm-contract-digest: "a7fade5b1c40"
|
|
16
17
|
---
|
|
17
18
|
|
|
18
19
|
# Swarm PR Feedback
|
|
@@ -156,36 +157,11 @@ Controller-tool absence is NOT a blocker; Profiles B and C are first-class
|
|
|
156
157
|
execution paths. BLOCKED is reserved for bypassing an active controller and
|
|
157
158
|
for verification or coverage gaps that stay unclosable after bounded retries.
|
|
158
159
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
Before verifying any claim or making any fix, ensure the PR branch is the working
|
|
162
|
-
tree:
|
|
163
|
-
|
|
164
|
-
- If `head_ref` is a remote branch that is not checked out locally, fetch it
|
|
165
|
-
(`git fetch origin <head_ref>`).
|
|
166
|
-
- **Check for parallel work first.** Before checkout, use the repository or
|
|
167
|
-
runtime's parallel-work check. When the bundled
|
|
168
|
-
`parallel-work-check` skill exists, it is one conditional implementation to
|
|
169
|
-
detect concurrent pushes from other agents (for example the repo's
|
|
170
|
-
auto-review bot following up, a maintainer pushing fixes, or parallel swarm
|
|
171
|
-
work). If remote has new commits: read `git log local..remote`, evaluate whether the parallel work
|
|
172
|
-
supersedes your planned fixes, and prefer the parallel work if it's more
|
|
173
|
-
comprehensive (more tests, better edge coverage, clearer error handling).
|
|
174
|
-
Abort your rebase, take the remote state, then add minor improvements on top.
|
|
160
|
+
Detailed reference material moved to `.opencode/skills/swarm-pr-feedback/references/preflight-checkout.md` (issue #2907 progressive-disclosure budget).
|
|
161
|
+
|
|
175
162
|
- Verify the working tree is clean first (`git status --porcelain`). If any
|
|
176
163
|
tracked or untracked changes exist, call `prepare_pr_workflow_checkout`
|
|
177
|
-
before binding (Profile A). Omit `paths` to auto-discover and atomically
|
|
178
164
|
preserve every dirty path, including untracked files; pass explicit `paths`
|
|
179
|
-
only for an exact bounded tracked-file set. It creates an auditable stash
|
|
180
|
-
receipt containing the original branch/HEAD and a structured
|
|
181
|
-
`operation: "restore"` recovery instruction. Do not issue `git stash`
|
|
182
|
-
through shell.
|
|
183
|
-
Without the controller, surface dirty state to the user or abort the checkout
|
|
184
|
-
— do not blind-stash.
|
|
185
|
-
- Treat `recovery-required` and `indeterminate` controller results as terminal
|
|
186
|
-
for the current attempt: report the typed `required_action`, abort/clear any
|
|
187
|
-
already-active gate, and stop. Only `stashable` permits one preparation call;
|
|
188
|
-
retry only when the controller explicitly returns `retryable: true`.
|
|
189
165
|
- **Check out the head branch locally before dispatching feedback lanes.** Feedback verification reads the working-tree
|
|
190
166
|
filesystem (`Read`/`Glob`/`Grep`), and fixes must land on the PR branch — without a
|
|
191
167
|
checkout you would verify and patch the base branch's code instead. Record the
|
|
@@ -193,8 +169,6 @@ tree:
|
|
|
193
169
|
- Pass the exact `merge_base...head_ref` commit range in every read-only verification or
|
|
194
170
|
explorer/advisory-lane delegation so lane agents can inspect specific revisions
|
|
195
171
|
with `git show` when needed.
|
|
196
|
-
- If no PR reference was provided (a pasted-feedback session on the current branch),
|
|
197
|
-
confirm the current branch is the intended PR branch before editing.
|
|
198
172
|
- A detached checkout at the authoritative full PR head is a valid pre-bind
|
|
199
173
|
intake state. On the first Profile-A bind, the controller attaches it only
|
|
200
174
|
when Git reports exactly one safe candidate: an existing local branch at
|
|
@@ -203,15 +177,6 @@ tree:
|
|
|
203
177
|
candidates, multiple candidates, a linked-worktree-owned local branch, or an
|
|
204
178
|
existing mismatched upstream fails closed without publishing the bind. Retry
|
|
205
179
|
is idempotent if switching succeeded but state persistence failed.
|
|
206
|
-
- The existing constrained tracked-branch and safe `gh pr checkout` pre-bind
|
|
207
|
-
forms remain supported on every profile after proving the exact SHA and a
|
|
208
|
-
unique intended remote ref. Never use force, submodule-recursive, or detached
|
|
209
|
-
`gh pr checkout` variants.
|
|
210
|
-
- Immediately after the first bind and before feedback verification dispatch,
|
|
211
|
-
prove that `git rev-parse HEAD` equals the authoritative full `pr_head_sha`,
|
|
212
|
-
`git status --porcelain` is empty, and the current branch tracks the intended
|
|
213
|
-
PR head remote/branch. A detached exact-head checkout is intake-only; the
|
|
214
|
-
bind must attach it before feedback dispatch or publication.
|
|
215
180
|
|
|
216
181
|
When a verification lane result includes `output_ref`, treat `output` as a
|
|
217
182
|
preview and call `retrieve_lane_output` before using it to classify, resolve,
|
|
@@ -298,111 +263,12 @@ Build a complete feedback ledger before editing. Include every available source:
|
|
|
298
263
|
|
|
299
264
|
If a source is unavailable, retry with alternative access paths. If unavailable after retry, the source is a coverage gap that must be reported to the user — do not silently "record that limitation" and proceed as if the source doesn't matter.
|
|
300
265
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
After the complete feedback ledger exists and before editing, run independent
|
|
304
|
-
read-only verification lanes. Under Profile A, use
|
|
305
|
-
`dispatch_lanes_async` with `mode: "swarm-pr-feedback:verification"`, the
|
|
306
|
-
complete immutable `feedback_inventory` ID list, the exact current
|
|
307
|
-
`pr_head_sha`, and each lane's exact
|
|
308
|
-
`feedback_item_ids` ownership list for independent read-only verification lanes:
|
|
309
|
-
comment classification, CI/log root-cause inspection, test impact mapping,
|
|
310
|
-
release/docs claim checks, and stale-branch/conflict analysis. Partition the
|
|
311
|
-
ledger so each `FB-###` item is owned by exactly one verification lane and the
|
|
312
|
-
union of lanes covers the entire ledger — no feedback item may be left
|
|
313
|
-
unassigned to a lane; state each lane's owned IDs both structurally and in its
|
|
314
|
-
prompt. The runtime rejects missing, duplicate, overlapping, or unknown item
|
|
315
|
-
ownership and blocks mutation until the verification batch settles. Scale
|
|
316
|
-
the lane count to the ledger size: a 1–3 item round may use a single combined
|
|
317
|
-
lane, while a large multi-round intake may warrant one lane per category above.
|
|
266
|
+
Detailed reference material moved to `.opencode/skills/swarm-pr-feedback/references/intake-surfaces.md` (issue #2907 progressive-disclosure budget).
|
|
267
|
+
|
|
318
268
|
Cap each `dispatch_lanes_async` batch at 8 lanes (`MAX_LANES`); if the ledger
|
|
319
269
|
needs more than 8 verification lanes, dispatch in sequential batches and settle
|
|
320
270
|
each batch's COVERAGE GATE before the next — do not over-spawn lanes for a
|
|
321
|
-
trivial round.
|
|
322
|
-
architect work: normalize feedback IDs, gather deterministic PR metadata, prepare
|
|
323
|
-
reproduction commands, and plan likely fix groups. Do not edit, close items, or
|
|
324
|
-
mark feedback resolved from running lanes.
|
|
325
|
-
|
|
326
|
-
Every verification lane must end with one parseable row for each owned item:
|
|
327
|
-
|
|
328
|
-
```text
|
|
329
|
-
[FEEDBACK-VERIFIED] | FB-### | CONFIRMED/PARTIAL/DISPROVED/PRE_EXISTING/NEEDS_MORE_EVIDENCE/NEEDS_USER_DECISION | evidence
|
|
330
|
-
```
|
|
331
|
-
|
|
332
|
-
Non-empty prose without this marker contract is not a settled verification
|
|
333
|
-
artifact and cannot unlock mutation.
|
|
334
|
-
|
|
335
|
-
Before the Verification step can mark any item `CONFIRMED`, `PARTIAL`,
|
|
336
|
-
`DISPROVED`, `PRE_EXISTING`, `NEEDS_MORE_EVIDENCE`, or `NEEDS_USER_DECISION`,
|
|
337
|
-
every open verification batch must be fully settled. Poll with
|
|
338
|
-
`collect_lane_results` (wait omitted or `false`) to process settled lanes
|
|
339
|
-
incrementally — clustering confirmed items and pre-reading files for settled
|
|
340
|
-
findings while ledger-safe work remains — then issue a final
|
|
341
|
-
`collect_lane_results` with `wait: true` per batch once independent work is
|
|
342
|
-
exhausted, to confirm every lane is settled.
|
|
343
|
-
Missing, stale, cancelled, or failed lanes are coverage gaps that must be closed
|
|
344
|
-
before marking any item CONFIRMED/PARTIAL/DISPROVED/PRE_EXISTING. Apply the
|
|
345
|
-
COVERAGE GATE:
|
|
346
|
-
retry failed lanes (max 2) as another
|
|
347
|
-
`swarm-pr-feedback:verification` async batch with the same immutable inventory,
|
|
348
|
-
exact `pr_head_sha`, agent type, prompt, scope, and isolation, or stop and
|
|
349
|
-
surface the lane failure to the user as BLOCKED. Under Profile A, blocking and
|
|
350
|
-
direct-Task fallbacks are rejected because they cannot satisfy the durable
|
|
351
|
-
ownership and head-provenance gate.
|
|
352
|
-
Do not proceed with "blocking verification and record that async advisory lanes
|
|
353
|
-
were unavailable" — record-and-continue is not coverage closure.
|
|
354
|
-
|
|
355
|
-
Under Profile B, partition the same immutable inventory across fresh read-only
|
|
356
|
-
verification subagents — every `FB-###` item owned by exactly one lane and the
|
|
357
|
-
union of lanes covering the entire ledger — with each prompt stating its owned
|
|
358
|
-
IDs and the exact `pr_head_sha`, and each lane returning one
|
|
359
|
-
`[FEEDBACK-VERIFIED]` row per owned item. Under Profile C, verify the ledger
|
|
360
|
-
in sequential category passes with the same one-row-per-item contract. On
|
|
361
|
-
every profile, no item may be classified until its verification lane or pass
|
|
362
|
-
has settled, and unclosable verification gaps are surfaced as BLOCKED.
|
|
363
|
-
|
|
364
|
-
### CI matrix cascade check (do this before fixing)
|
|
365
|
-
|
|
366
|
-
When the PR's `unit` job is a matrix across multiple OSes and downstream jobs
|
|
367
|
-
(`integration`, `smoke`) have `needs: unit`, an OS leg failure blocks the
|
|
368
|
-
entire pipeline. Before triaging, check:
|
|
369
|
-
|
|
370
|
-
1. Are `integration` or `smoke` jobs in `skipped` or `cancelled` state rather
|
|
371
|
-
than `failed`? That signals a unit matrix cascade — the unit job failed
|
|
372
|
-
on one OS leg, blocking the downstream jobs from running on the current
|
|
373
|
-
HEAD.
|
|
374
|
-
2. If a unit OS leg is the blocker, classify the failure:
|
|
375
|
-
- **Code issue** — the test itself fails. Reproduce locally; if the
|
|
376
|
-
test passes locally, the runner is the problem.
|
|
377
|
-
- **Runner performance** — the test step exceeds the configured timeout.
|
|
378
|
-
Run all files in the step locally with per-file timing; if cumulative
|
|
379
|
-
local runtime is <10 min and the runner can't complete in 60+ min, the
|
|
380
|
-
issue is runner performance. Bump the CI timeout as a stopgap and file
|
|
381
|
-
a follow-up issue for parallelization. Do not loop bumping the timeout
|
|
382
|
-
past 90 min without filing the follow-up.
|
|
383
|
-
3. Surface cascade failures to the user explicitly. The downstream jobs'
|
|
384
|
-
results don't exist; the code's coverage of the current HEAD cannot be
|
|
385
|
-
confirmed by CI alone.
|
|
386
|
-
|
|
387
|
-
### PR body claim verification
|
|
388
|
-
|
|
389
|
-
The `.swarm/evidence/` paths below apply only when the reviewed repository uses
|
|
390
|
-
this plugin's council evidence contract. For any other repository, locate the
|
|
391
|
-
authoritative CI attestation, code-host review record, or repository-declared
|
|
392
|
-
evidence store; the universal rule is that an approval claim needs a real,
|
|
393
|
-
retrievable provenance artifact.
|
|
394
|
-
|
|
395
|
-
PR body text like "PHASE 2 council APPROVED (5/5, round 2)" or "Final council
|
|
396
|
-
APPROVED" must be backed by an evidence file under `.swarm/evidence/` — phase
|
|
397
|
-
councils write `.swarm/evidence/{phaseNumber}/phase-council.json`; the final
|
|
398
|
-
council writes the flat `.swarm/evidence/final-council.json`. Bot-generated PR
|
|
399
|
-
bodies commonly auto-fill these claims without real review. Before accepting
|
|
400
|
-
such a claim as part of triage:
|
|
401
|
-
|
|
402
|
-
1. Check whether the corresponding evidence file exists with `verdict:APPROVED`.
|
|
403
|
-
2. If the claim is unsupported, mark the closure ledger item as
|
|
404
|
-
`NEEDS_MORE_EVIDENCE` rather than `CONFIRMED`. Do not silently drop the
|
|
405
|
-
claim — it indicates the PR body was generated without a real review.
|
|
271
|
+
trivial round.
|
|
406
272
|
|
|
407
273
|
## Feedback Ledger
|
|
408
274
|
|
|
@@ -752,26 +618,7 @@ digest change, still wipes every recorded gate batch and un-arms publication
|
|
|
752
618
|
exactly as before — a controller cannot narrow what it declares in order to
|
|
753
619
|
dodge re-verification.
|
|
754
620
|
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
Stage A, Stage B, and closeout evidence invalidate as whole gate batches, not
|
|
758
|
-
per feedback item, and that is a deliberate design decision, not unfinished
|
|
759
|
-
work:
|
|
760
|
-
|
|
761
|
-
- **No trustworthy item-to-file mapping exists to key invalidation on.** The
|
|
762
|
-
file scope a caller declares for a feedback item is caller-asserted and
|
|
763
|
-
only path-sanitized — it is never intersected with the actual changed-file
|
|
764
|
-
set, and it carries no persisted binding back to feedback item IDs. Keying
|
|
765
|
-
invalidation on that declaration would let a controller dodge
|
|
766
|
-
re-verification by under-declaring scope, turning a fail-closed guarantee
|
|
767
|
-
into a fail-open one (AGENTS.md invariant 9) — the same failure class that
|
|
768
|
-
already ruled out keying digest invalidation on `git diff --raw` blob OIDs.
|
|
769
|
-
- **The four gate phases are holistic by contract.** Each recorded batch must
|
|
770
|
-
own every inventory item exactly once and in declared order. Retaining
|
|
771
|
-
evidence for a subset of items per gate would re-partition that
|
|
772
|
-
independent-review contract itself, and would need its own
|
|
773
|
-
collusion/independence analysis before it could be trusted — it is not a
|
|
774
|
-
drop-in extension of the revision-level retention above.
|
|
621
|
+
Detailed reference material moved to `.opencode/skills/swarm-pr-feedback/references/gate-evidence-scope.md` (issue #2907 progressive-disclosure budget).
|
|
775
622
|
|
|
776
623
|
### Stage B — reviewer + test_engineer (mandatory after Stage A passes)
|
|
777
624
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Why gate evidence is not item-scoped
|
|
2
|
+
|
|
3
|
+
Stage A, Stage B, and closeout evidence invalidate as whole gate batches, not
|
|
4
|
+
per feedback item, and that is a deliberate design decision, not unfinished
|
|
5
|
+
work:
|
|
6
|
+
|
|
7
|
+
- **No trustworthy item-to-file mapping exists to key invalidation on.** The
|
|
8
|
+
file scope a caller declares for a feedback item is caller-asserted and
|
|
9
|
+
only path-sanitized — it is never intersected with the actual changed-file
|
|
10
|
+
set, and it carries no persisted binding back to feedback item IDs. Keying
|
|
11
|
+
invalidation on that declaration would let a controller dodge
|
|
12
|
+
re-verification by under-declaring scope, turning a fail-closed guarantee
|
|
13
|
+
into a fail-open one (AGENTS.md invariant 9) — the same failure class that
|
|
14
|
+
already ruled out keying digest invalidation on `git diff --raw` blob OIDs.
|
|
15
|
+
- **The four gate phases are holistic by contract.** Each recorded batch must
|
|
16
|
+
own every inventory item exactly once and in declared order. Retaining
|
|
17
|
+
evidence for a subset of items per gate would re-partition that
|
|
18
|
+
independent-review contract itself, and would need its own
|
|
19
|
+
collusion/independence analysis before it could be trusted — it is not a
|
|
20
|
+
drop-in extension of the revision-level retention above.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Intake Surfaces detail (async advisory lanes, CI matrix cascade, PR body claim verification)
|
|
2
|
+
|
|
3
|
+
### Async advisory verification lanes
|
|
4
|
+
|
|
5
|
+
After the complete feedback ledger exists and before editing, run independent
|
|
6
|
+
read-only verification lanes. Under Profile A, use
|
|
7
|
+
`dispatch_lanes_async` with `mode: "swarm-pr-feedback:verification"`, the
|
|
8
|
+
complete immutable `feedback_inventory` ID list, the exact current
|
|
9
|
+
`pr_head_sha`, and each lane's exact
|
|
10
|
+
`feedback_item_ids` ownership list for independent read-only verification lanes:
|
|
11
|
+
comment classification, CI/log root-cause inspection, test impact mapping,
|
|
12
|
+
release/docs claim checks, and stale-branch/conflict analysis. Partition the
|
|
13
|
+
ledger so each `FB-###` item is owned by exactly one verification lane and the
|
|
14
|
+
union of lanes covers the entire ledger — no feedback item may be left
|
|
15
|
+
unassigned to a lane; state each lane's owned IDs both structurally and in its
|
|
16
|
+
prompt. The runtime rejects missing, duplicate, overlapping, or unknown item
|
|
17
|
+
ownership and blocks mutation until the verification batch settles. Scale
|
|
18
|
+
the lane count to the ledger size: a 1–3 item round may use a single combined
|
|
19
|
+
lane, while a large multi-round intake may warrant one lane per category above.
|
|
20
|
+
Cap each `dispatch_lanes_async` batch at 8 lanes (`MAX_LANES`); if the ledger
|
|
21
|
+
needs more than 8 verification lanes, dispatch in sequential batches and settle
|
|
22
|
+
each batch's COVERAGE GATE before the next — do not over-spawn lanes for a
|
|
23
|
+
trivial round. Record each returned `batch_id`, then continue only ledger-safe
|
|
24
|
+
architect work: normalize feedback IDs, gather deterministic PR metadata, prepare
|
|
25
|
+
reproduction commands, and plan likely fix groups. Do not edit, close items, or
|
|
26
|
+
mark feedback resolved from running lanes.
|
|
27
|
+
|
|
28
|
+
Every verification lane must end with one parseable row for each owned item:
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
[FEEDBACK-VERIFIED] | FB-### | CONFIRMED/PARTIAL/DISPROVED/PRE_EXISTING/NEEDS_MORE_EVIDENCE/NEEDS_USER_DECISION | evidence
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Non-empty prose without this marker contract is not a settled verification
|
|
35
|
+
artifact and cannot unlock mutation.
|
|
36
|
+
|
|
37
|
+
Before the Verification step can mark any item `CONFIRMED`, `PARTIAL`,
|
|
38
|
+
`DISPROVED`, `PRE_EXISTING`, `NEEDS_MORE_EVIDENCE`, or `NEEDS_USER_DECISION`,
|
|
39
|
+
every open verification batch must be fully settled. Poll with
|
|
40
|
+
`collect_lane_results` (wait omitted or `false`) to process settled lanes
|
|
41
|
+
incrementally — clustering confirmed items and pre-reading files for settled
|
|
42
|
+
findings while ledger-safe work remains — then issue a final
|
|
43
|
+
`collect_lane_results` with `wait: true` per batch once independent work is
|
|
44
|
+
exhausted, to confirm every lane is settled.
|
|
45
|
+
Missing, stale, cancelled, or failed lanes are coverage gaps that must be closed
|
|
46
|
+
before marking any item CONFIRMED/PARTIAL/DISPROVED/PRE_EXISTING. Apply the
|
|
47
|
+
COVERAGE GATE:
|
|
48
|
+
retry failed lanes (max 2) as another
|
|
49
|
+
`swarm-pr-feedback:verification` async batch with the same immutable inventory,
|
|
50
|
+
exact `pr_head_sha`, agent type, prompt, scope, and isolation, or stop and
|
|
51
|
+
surface the lane failure to the user as BLOCKED. Under Profile A, blocking and
|
|
52
|
+
direct-Task fallbacks are rejected because they cannot satisfy the durable
|
|
53
|
+
ownership and head-provenance gate.
|
|
54
|
+
Do not proceed with "blocking verification and record that async advisory lanes
|
|
55
|
+
were unavailable" — record-and-continue is not coverage closure.
|
|
56
|
+
|
|
57
|
+
Under Profile B, partition the same immutable inventory across fresh read-only
|
|
58
|
+
verification subagents — every `FB-###` item owned by exactly one lane and the
|
|
59
|
+
union of lanes covering the entire ledger — with each prompt stating its owned
|
|
60
|
+
IDs and the exact `pr_head_sha`, and each lane returning one
|
|
61
|
+
`[FEEDBACK-VERIFIED]` row per owned item. Under Profile C, verify the ledger
|
|
62
|
+
in sequential category passes with the same one-row-per-item contract. On
|
|
63
|
+
every profile, no item may be classified until its verification lane or pass
|
|
64
|
+
has settled, and unclosable verification gaps are surfaced as BLOCKED.
|
|
65
|
+
|
|
66
|
+
### CI matrix cascade check (do this before fixing)
|
|
67
|
+
|
|
68
|
+
When the PR's `unit` job is a matrix across multiple OSes and downstream jobs
|
|
69
|
+
(`integration`, `smoke`) have `needs: unit`, an OS leg failure blocks the
|
|
70
|
+
entire pipeline. Before triaging, check:
|
|
71
|
+
|
|
72
|
+
1. Are `integration` or `smoke` jobs in `skipped` or `cancelled` state rather
|
|
73
|
+
than `failed`? That signals a unit matrix cascade — the unit job failed
|
|
74
|
+
on one OS leg, blocking the downstream jobs from running on the current
|
|
75
|
+
HEAD.
|
|
76
|
+
2. If a unit OS leg is the blocker, classify the failure:
|
|
77
|
+
- **Code issue** — the test itself fails. Reproduce locally; if the
|
|
78
|
+
test passes locally, the runner is the problem.
|
|
79
|
+
- **Runner performance** — the test step exceeds the configured timeout.
|
|
80
|
+
Run all files in the step locally with per-file timing; if cumulative
|
|
81
|
+
local runtime is <10 min and the runner can't complete in 60+ min, the
|
|
82
|
+
issue is runner performance. Bump the CI timeout as a stopgap and file
|
|
83
|
+
a follow-up issue for parallelization. Do not loop bumping the timeout
|
|
84
|
+
past 90 min without filing the follow-up.
|
|
85
|
+
3. Surface cascade failures to the user explicitly. The downstream jobs'
|
|
86
|
+
results don't exist; the code's coverage of the current HEAD cannot be
|
|
87
|
+
confirmed by CI alone.
|
|
88
|
+
|
|
89
|
+
### PR body claim verification
|
|
90
|
+
|
|
91
|
+
The `.swarm/evidence/` paths below apply only when the reviewed repository uses
|
|
92
|
+
this plugin's council evidence contract. For any other repository, locate the
|
|
93
|
+
authoritative CI attestation, code-host review record, or repository-declared
|
|
94
|
+
evidence store; the universal rule is that an approval claim needs a real,
|
|
95
|
+
retrievable provenance artifact.
|
|
96
|
+
|
|
97
|
+
PR body text like "PHASE 2 council APPROVED (5/5, round 2)" or "Final council
|
|
98
|
+
APPROVED" must be backed by an evidence file under `.swarm/evidence/` — phase
|
|
99
|
+
councils write `.swarm/evidence/{phaseNumber}/phase-council.json`; the final
|
|
100
|
+
council writes the flat `.swarm/evidence/final-council.json`. Bot-generated PR
|
|
101
|
+
bodies commonly auto-fill these claims without real review. Before accepting
|
|
102
|
+
such a claim as part of triage:
|
|
103
|
+
|
|
104
|
+
1. Check whether the corresponding evidence file exists with `verdict:APPROVED`.
|
|
105
|
+
2. If the claim is unsupported, mark the closure ledger item as
|
|
106
|
+
`NEEDS_MORE_EVIDENCE` rather than `CONFIRMED`. Do not silently drop the
|
|
107
|
+
claim — it indicates the PR body was generated without a real review.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Pre-flight PR branch checkout
|
|
2
|
+
|
|
3
|
+
## Pre-flight: Check Out the PR Branch Locally
|
|
4
|
+
|
|
5
|
+
Before verifying any claim or making any fix, ensure the PR branch is the working
|
|
6
|
+
tree:
|
|
7
|
+
|
|
8
|
+
- If `head_ref` is a remote branch that is not checked out locally, fetch it
|
|
9
|
+
(`git fetch origin <head_ref>`).
|
|
10
|
+
- **Check for parallel work first.** Before checkout, use the repository or
|
|
11
|
+
runtime's parallel-work check. When the bundled
|
|
12
|
+
`parallel-work-check` skill exists, it is one conditional implementation to
|
|
13
|
+
detect concurrent pushes from other agents (for example the repo's
|
|
14
|
+
auto-review bot following up, a maintainer pushing fixes, or parallel swarm
|
|
15
|
+
work). If remote has new commits: read `git log local..remote`, evaluate whether the parallel work
|
|
16
|
+
supersedes your planned fixes, and prefer the parallel work if it's more
|
|
17
|
+
comprehensive (more tests, better edge coverage, clearer error handling).
|
|
18
|
+
Abort your rebase, take the remote state, then add minor improvements on top.
|
|
19
|
+
- Verify the working tree is clean first (`git status --porcelain`). If any
|
|
20
|
+
tracked or untracked changes exist, call `prepare_pr_workflow_checkout`
|
|
21
|
+
before binding (Profile A). Omit `paths` to auto-discover and atomically
|
|
22
|
+
preserve every dirty path, including untracked files; pass explicit `paths`
|
|
23
|
+
only for an exact bounded tracked-file set. It creates an auditable stash
|
|
24
|
+
receipt containing the original branch/HEAD and a structured
|
|
25
|
+
`operation: "restore"` recovery instruction. Do not issue `git stash`
|
|
26
|
+
through shell.
|
|
27
|
+
Without the controller, surface dirty state to the user or abort the checkout
|
|
28
|
+
— do not blind-stash.
|
|
29
|
+
- Treat `recovery-required` and `indeterminate` controller results as terminal
|
|
30
|
+
for the current attempt: report the typed `required_action`, abort/clear any
|
|
31
|
+
already-active gate, and stop. Only `stashable` permits one preparation call;
|
|
32
|
+
retry only when the controller explicitly returns `retryable: true`.
|
|
33
|
+
- **Check out the head branch locally before dispatching feedback lanes.** Feedback verification reads the working-tree
|
|
34
|
+
filesystem (`Read`/`Glob`/`Grep`), and fixes must land on the PR branch — without a
|
|
35
|
+
checkout you would verify and patch the base branch's code instead. Record the
|
|
36
|
+
exact `merge_base...head_ref` range for diff-scoped inspection.
|
|
37
|
+
- Pass the exact `merge_base...head_ref` commit range in every read-only verification or
|
|
38
|
+
explorer/advisory-lane delegation so lane agents can inspect specific revisions
|
|
39
|
+
with `git show` when needed.
|
|
40
|
+
- If no PR reference was provided (a pasted-feedback session on the current branch),
|
|
41
|
+
confirm the current branch is the intended PR branch before editing.
|
|
42
|
+
- A detached checkout at the authoritative full PR head is a valid pre-bind
|
|
43
|
+
intake state. On the first Profile-A bind, the controller attaches it only
|
|
44
|
+
when Git reports exactly one safe candidate: an existing local branch at
|
|
45
|
+
that SHA whose upstream is an exact remote ref at the same SHA, or one exact
|
|
46
|
+
remote-tracking ref. It never guesses a remote/name boundary. Zero
|
|
47
|
+
candidates, multiple candidates, a linked-worktree-owned local branch, or an
|
|
48
|
+
existing mismatched upstream fails closed without publishing the bind. Retry
|
|
49
|
+
is idempotent if switching succeeded but state persistence failed.
|
|
50
|
+
- The existing constrained tracked-branch and safe `gh pr checkout` pre-bind
|
|
51
|
+
forms remain supported on every profile after proving the exact SHA and a
|
|
52
|
+
unique intended remote ref. Never use force, submodule-recursive, or detached
|
|
53
|
+
`gh pr checkout` variants.
|
|
54
|
+
- Immediately after the first bind and before feedback verification dispatch,
|
|
55
|
+
prove that `git rev-parse HEAD` equals the authoritative full `pr_head_sha`,
|
|
56
|
+
`git status --porcelain` is empty, and the current branch tracks the intended
|
|
57
|
+
PR head remote/branch. A detached exact-head checkout is intake-only; the
|
|
58
|
+
bind must attach it before feedback dispatch or publication.
|
|
59
|
+
|
|
60
|
+
When a verification lane result includes `output_ref`, treat `output` as a
|
|
61
|
+
preview and call `retrieve_lane_output` before using it to classify, resolve,
|
|
62
|
+
disprove, or group feedback items. If the result is `output_degraded`,
|
|
63
|
+
`transcript_incomplete`, or truncated without a usable ref, keep the affected
|
|
64
|
+
ledger items as `NEEDS_MORE_EVIDENCE` or re-dispatch a narrower read-only lane.
|
|
65
|
+
(Profile A. On Profiles B/C, read each verification subagent's or pass's full
|
|
66
|
+
report directly — a truncated or summary-only report is a preview, not
|
|
67
|
+
verification evidence, and keeps its items open the same way.)
|