Skip to content

fix(coordinator): recover non-resident outcome-spec revision gates #1622

Description

@sabbour

Summary

A coordinator run can report status=in_progress and coordinator_status=awaiting_confirmation with a persisted outcome spec, while every POST /api/runs/{id}/outcome-spec/revise attempt returns 409 run_not_active. The review gate is visible but cannot be exercised.

Live reproduction

  • Deployed dev SHA: f9b7e77d2d146bd9c6c2298e8fd3e0a02484a5d1
  • Project: 57f08d70-db91-4d08-9d19-d6a28de2594f
  • Run: 44c2eed4-7e3e-49a6-89c5-369b381dd94c
  • Final run state: in_progress, coordinator status awaiting_confirmation
  • Last event: sequence 118, coordinator.outcome_spec
  • Transcript: scripts/api-harness/transcripts/jordan-1612-acceptance-20260926T1910Z.jsonl
  • Transcript SHA-256: 2CBBC81B2295E929119A9EE196F3F7817B4B75C57185C87D2C707C9828C497FF

Reproduction

  1. Create a blank project from blueprint-software-development.
  2. Start a defineOutcome orchestration with autopilot=false and auto_approve_tools=false.
  3. Wait for the run to persist coordinator.outcome_spec and report awaiting_confirmation.
  4. Obtain the guarded execution context requested by the revise endpoint. The endpoint first returns typed model_provider_changed with replacement orchestration context.
  5. Resend the same grounded revision with that replacement context.

Actual

The resend returns:

{"error":"run_not_active","detail":null,"message":"The coordinator run is not active and cannot be revised."}

The authoritative run record remains in_progress / awaiting_confirmation, the outcome spec is unchanged, and no event is persisted after sequence 118. This reproduced for two distinct grounded revision requests.

Expected

A run advertised as awaiting_confirmation and steerable must have a durable active confirmation/revision path. The revision should either be accepted and re-draft, or return a typed attributable recovery diagnostic that explains why the gate cannot be resumed. It must not expose an actionable gate that consistently rejects as inactive.

Acceptance

  • Reproduce with a restart/replica or non-resident confirmation gate.
  • Make revise/confirm recover the durable gate without duplicate draft effects.
  • Preserve cancellation and lifecycle-generation fencing.
  • Add regression coverage for a persisted awaiting_confirmation run with no resident registry entry.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions