[P1] Preserve failure reporting after hard stops #895

Open
opened 2026-07-24 21:37:56 -05:00 by jcwalker3 · 0 comments
Owner

Parent epic: #887
Priority: P1

Problem

When a gate fails, the same closure that stops the mutation also forbids posting the diagnostic handoff. The run therefore ends with the failure recorded nowhere durable, and the next worker — frequently a different LLM client — rediscovers it from scratch. Multiple identical blocked cycles have been burned this way.

Acceptance criteria

  • Add an append-only report_workflow_failure operation.
  • It remains available after ordinary mutation gates close, including after stop_required: true.
  • It cannot alter code, labels, issue state, ownership, or leases — append only, enforced, not conventional.
  • Reports are sanitized (no credentials, no tokens, no raw env) and idempotent.
  • Each report is linked to issue, session, and ownership generation.
  • Repeated identical failures are correlated onto one incident rather than duplicated.
  • Controller inventory exposes unresolved workflow incidents so the next worker sees them before picking work.

Duplicate verdict

VERIFIED not covered. gitea_capability_stop_terminal_report is read-only and returns only a template after reviewer capability denial (#197); it persists nothing and is inert outside terminal mode. Posting the report still requires create_issue_comment, which is exactly what the closed gate forbids. #712 covers failing closed on conflicting queued commands, not reporting.

Parent epic: #887 Priority: P1 ## Problem When a gate fails, the same closure that stops the mutation also forbids posting the diagnostic handoff. The run therefore ends with the failure recorded nowhere durable, and the next worker — frequently a different LLM client — rediscovers it from scratch. Multiple identical blocked cycles have been burned this way. ## Acceptance criteria - Add an append-only `report_workflow_failure` operation. - It remains available after ordinary mutation gates close, including after `stop_required: true`. - It cannot alter code, labels, issue state, ownership, or leases — append only, enforced, not conventional. - Reports are sanitized (no credentials, no tokens, no raw env) and idempotent. - Each report is linked to issue, session, and ownership generation. - Repeated identical failures are correlated onto one incident rather than duplicated. - Controller inventory exposes unresolved workflow incidents so the next worker sees them before picking work. ## Duplicate verdict VERIFIED not covered. `gitea_capability_stop_terminal_report` is read-only and returns only a *template* after reviewer capability denial (#197); it persists nothing and is inert outside terminal mode. Posting the report still requires `create_issue_comment`, which is exactly what the closed gate forbids. #712 covers failing closed on conflicting queued commands, not reporting.
jcwalker3 added the type:featurestatus:readyworkflow-hardeningsafetyobservability labels 2026-07-24 21:37:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#895