Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(orchestrator): report terminal runs after wait timeout #11156

Closedkiiwee(GitHub profile, opens in a new tab)wants to merge 250+ commits intot3code/codex-turn-mapping fromrefs/pull/11156/headopened View on GitHub

What Changed

Recompute the wait result's timedOut flag from the run status returned by the final projection read.

Why

A run can finish while waitForThread is handling its timeout. The final read then returns a completed run, but the response previously still reported timedOut: true. This focused Orchestrator V2 (#2829) fix reports completion consistently while preserving active-run timeouts and the missing-run error.

Validation

  • Reproduced the completed-run mismatch before the fix; active and missing-run controls passed.
  • vp test run apps/server/src/orchestration-v2/ThreadManagementService.test.ts — 10 passed, using Deferred and TestClock for deterministic timeout coverage.
  • Targeted type-aware lint/type checking and formatting passed for both changed files.
  • Rebased onto the latest V2 branch before publishing.

Implemented by Grok 4.6 through Grok Build, with Codex supervision, fixture compatibility corrections, patch application, and verification.

    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    2. Approvability

      Verdict: Approved at 3e53963

      Macroscope's review found this PR approvable — This is a small, self-contained Orchestrator V2 bug fix that corrects the timeout flag when the final read already observes a terminal run, while preserving active-run timeouts and missing-run errors. The added tests cover all three outcomes deterministically, with no schema, deployment, security, billing, or default changes.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. Duplicate of #11574 — identical timedOut: !isTerminalRunStatus(run.status) fix; that PR is rebased and carries extra regression coverage. Thanks!

    4. juliusmarminge closed this

Sign in to join this conversation.