Swarm worker close-report envelope + claim gates on issue-close #444
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#444
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Learning L1 of
docs/research/2026-08-11-software-factory-learnings.md: the swarm's false-green class (drive 15, drive 185108ZGREEN-with-faulted-leg, the all-skipped deploy masquerading as S5x, #435
green-and-empty) shares one root: the worker's verdict is accepted at
issue-close on its word, and audited only later (code-review / design-verify /
eyeballs). SSSF's answer is "agent proposes, code disposes": typed output +
deterministic gates that verify the agent's claims after the fact.
What to build
Before a swarm worker may close a ticket, it must emit a structured
close-report envelope (JSON), and deterministic code in the swarm harness
(
.sandcastle/run-swarm.shor a newclose-report-lib.sh, NOT an agent) mustverify the claims before the close is allowed to stand.
Envelope fields (minimum):
issue: the ticket number being closedstatus:success | blocked | refused— a refusal/blocked MUST name a reasoncommits: list of commit SHAs produced for this ticketchanged_files: paths the worker claims it changedtests: list of{command, exit_code}actually runcriteria: map of the ticket's acceptance criteria (or a summary of each) tothe evidence satisfying it (commit, file, test, or comment link)
summary: one sentenceClaim gates (all deterministic, all must pass before close):
commitsis reachable from the pushed head ofmainchanged_filesappears in the union diff of those commitsstatus: successrequires at least one commit OR an explicitno-code-changemarker with a reasontestsentry claiming pass hasexit_code: 0;status: successwith anon-zero test exit is refuted
status: successwith unresolved blocking items namedanywhere in the envelope is refuted;
status: refused|blockedwith noreason is refuted (this is the 165115Z "label refusals loud" fix made law
for every verdict producer)
On gate failure: the worker gets the verbatim violation list back (same
iteration if feasible), bounded retries (2), then the ticket goes
agent-blockedwith the envelope + violations posted as a comment. Theenvelope (valid or not) is always posted as the close comment / a comment, so
the issue thread carries the evidence.
Acceptance criteria
.sandcastle/prompt.md) requires the envelope at close;format documented in the prompt itself
demonstrably refused in a test fixture under
.sandcastle/tests/docs/GOTCHAS.mdgains an entry only if a hazard is discovered whilebuilding this (per ADR 0160)
References
docs/research/2026-08-11-software-factory-learnings.md(L1)gates.py(verdict_consistent,artifacts_exist,diff_matches_claims) andreferences/handoff.mdindisler/super-simple-software-factory— the pattern sourceclose-report for #444 — status
success✅ close-report gates passed — every claim verified against main; closing.
envelope