Issue #67: Bug hunt — middleware and agent defects proven with red-first tests #74

Merged
gotoi-agent merged 3 commits from issue/67-bug-hunt into agent-develop 2026-10-08 06:35:33 +02:00
Collaborator
No description provided.
A retry that applyResult already resolved as already_done still fell through to
recordOutcome, the circuit breaker, rollback, recheck, and incident writes — so
duplicate POSTs inflated plan.verifiedStreak/totalVerified, double-counted
failures, and recordSuccess cleared a tripped circuit key (fail-open).

Return early on already_done, matching UC-OP-04 and UC-AG-10.

Refs #67
POST /agents/bulk group-add/group-remove checked only the agent rows, so any
operator could write another org's group hostnames. GET /plans/:id/executions,
/compatibility, and /health returned sibling-org rows for shared plans
(disk-cleanup). Both now resolve visibility against the active organization.

Refs #67
The compatibility guard was 'counted <= 1', which still passes when a single
sibling-org agent leaks, and /plans/:id/health (also filtered by 30fa4e2) had
no assertion at all. Pin rows.length, compatibility count, and health.executions
to 0 for a reader outside the owning org.

Refs #67
gotoi-agent merged commit d1884b4c49 into agent-develop 2026-10-08 06:35:33 +02:00
Sign in to join this conversation.
No description provided.