Skip to content

fix: retry unsuccessful idempotent subject turns #470

Description

@neubig

Actual Behavior

Run uv run pytest -q tests/test_subject_turns.py after reproducing a failed, canceled, or skipped subject attempt and resubmitting its original idempotency key. The later submission is deduplicated against the unsuccessful run, so the external issue or pull request cannot make progress. A timed-out subject behaves the same way after its runtime is released.

Desired Behavior

A stable subject submission should remain idempotent while work is active or successful, but it should be retryable after an unsuccessful attempt no longer owns a runtime.

Acceptance Criteria

  • Repeated submissions remain deduplicated while the original subject run is queued, running, completed successfully, or still owns an unreleased runtime.
  • The same idempotency key creates a new attempt after a failed, canceled, or skipped run has released its runtime.
  • A run skipped before dispatch is treated as having no runtime and can be retried.
  • The retry uses the same deterministic subject conversation identity.
  • The unique idempotency record points to the current attempt while superseded runs remain in run history.
  • Tests cover failed, canceled, skipped-before-start, and successful or active deduplication behavior.

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

    bugSomething isn't workingready-for-devScoped for contribution; managed by repository readiness checks.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions