Skip to content

fix(server): retry transient V2 initial title failures - #9908

Open
saphid wants to merge 391 commits into
pingdotgg:t3code/codex-turn-mappingfrom
saphid:fix/v2-initial-title-retries-20260905
Open

fix(server): retry transient V2 initial title failures#9908
saphid wants to merge 391 commits into
pingdotgg:t3code/codex-turn-mappingfrom
saphid:fix/v2-initial-title-retries-20260905

Conversation

@saphid

@saphid saphid commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Initial V2 title generation now retries transient provider failures twice with exponential backoff, rechecking that the request is current. Missing-provider and missing-CLI failures use distinct typed errors and do not retry. Exhaustion keeps the existing title and clears the marker; explicit regeneration remains single-attempt. JSON title envelopes are decoded before normalization and truncation.

Current head 988aa940d includes current V2 base 7dd9873ed and the shared test-only prerequisite #10865. Merge #10865 first; the topic itself changes 10 files. This rebuild removes the obsolete merged-base history from the PR diff.

Validation: 113 focused tests pass across the affected feature and foundation persistence coverage. Scoped server typecheck passes (plus contracts for title generation); targeted lint, formatting and diff checks pass. New-head CI is pending.

Independent cross-provider review was unavailable: the direct Claude Opus 5 high launcher in this audit exited 1 with expired OAuth before inference. No Claude review is claimed.

Targets Orchestrator V2 in #2829. Updated with GPT-6 in Codex/T3.

@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Sep 5, 2026
Comment thread apps/server/src/orchestration-v2/ThreadTitleRegenerationService.ts
@github-actions github-actions Bot added the size:XS 0-9 changed lines (additions + deletions). label Sep 5, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 988aa94

Macroscope's review found this PR approvable — This is a narrowly scoped server fix that adds a bounded retry policy for transient initial title-generation failures and introduces additive typed error distinctions to avoid retrying unavailable providers or CLIs. Supporting tests cover recovery, retry exhaustion, and non-retryable failures, with no product-default or deployment changes.

You can add or adjust custom eligibility rules. Learn more.

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Sep 5, 2026
@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch 2 times, most recently from b82facd to 2ac9bfe Compare September 5, 2026 04:56
@saphid
saphid force-pushed the fix/v2-initial-title-retries-20260905 branch from 9b50fec to 57ba3e6 Compare September 5, 2026 05:07

@t3-code t3-code Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed diff and relevant surrounding code at 1d528851d9e0a5b6e3171da0b8b29bfdd7f678ed. no blocking findings.

retry wraps the request-id check, so each attempt rechecks staleness. retries remain bounded and initial-only; explicit non-retryable errors and interruption retain their separate paths. reviewed the recovery/exhaustion/non-retryable tests and the resolved prior finding. no code changes needed. the effect suite was not rerun locally.

ci snapshot: no failing or pending checks; some checks are skipped. this is a comment review, not an approval or merge.

saphid added a commit to saphid/t3code that referenced this pull request Sep 7, 2026
Comment thread packages/contracts/src/git.ts Outdated
Comment thread apps/server/src/orchestration-v2/ThreadTitleRegenerationService.ts Outdated
@macroscopeapp

This comment has been minimized.

@cursor

cursor Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@macroscopeapp
macroscopeapp Bot dismissed their stale review September 7, 2026 08:45

Dismissing prior approval to re-evaluate e3e526a

@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:XS 0-9 changed lines (additions + deletions). labels Sep 7, 2026
Comment thread packages/contracts/src/git.ts Outdated
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Sep 7, 2026
@cursor

cursor Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@macroscopeapp
macroscopeapp Bot dismissed their stale review September 7, 2026 08:59

Dismissing prior approval to re-evaluate f99466c

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Sep 7, 2026
Comment thread packages/contracts/src/git.ts Outdated
@macroscopeapp

This comment has been minimized.

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Sep 7, 2026
@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch 2 times, most recently from 9242b91 to 3d81172 Compare September 8, 2026 03:31
@macroscopeapp
macroscopeapp Bot dismissed their stale review September 8, 2026 05:58

Dismissing prior approval to re-evaluate e0357f4

Comment thread apps/server/src/textGeneration/TextGenerationUtils.ts Outdated
Port main's pull-request discovery, active thread ordering, async question dismissal, settlement fixes, provider-session import, attachment context, and provider correctness changes into orchestration v2.

Keep the branch's intentional composer and subagent behavior while adopting main's web and mobile fixes. Prevent headless setup terminals from hanging on the color probe, and move the v2 migration block to 050-061 after main claimed 048-049.
Restore the failed-before-start timer guard, align two server fixtures with the reconciled behavior, and remove dead files, exports, and dependencies surfaced by Knip.

Drop the temporary branch push trigger now that the PR is mergeable, so each update runs the pull-request workflow once.
Keep main's batch machine-update banner and update action while preserving the v2 runtime-based environment lock used by draft load balancing.
Adopt TypeScript 7 and Effect rc.112 across orchestration v2, including the TaggedError API migration and updated Effect-aware tests. Restore main's composer-aware scroll-to-end clearance while retaining selected-model settings sync, preview recording transfer, image galleries, desktop context menus, and layout hit targets. Regenerate the lockfile on the upgraded dependency baseline.
@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch from efd9994 to 6102d00 Compare September 8, 2026 06:23
@macroscopeapp

macroscopeapp Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Macroscope has since reviewed this pull request. An earlier review was skipped by a cost limit; a review has now completed, so that notice no longer applies.

@github-actions github-actions Bot added size:XXL 1,000+ changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Sep 8, 2026
@saphid
saphid force-pushed the fix/v2-initial-title-retries-20260905 branch from 1d0f07e to 2dcd771 Compare September 9, 2026 00:01
@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:XXL 1,000+ changed lines (additions + deletions). labels Sep 9, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Sep 9, 2026
juliusmarminge and others added 4 commits September 8, 2026 17:04
Advertise bounded socket snapshots and authoritative dispatch validation, omit raw command output and inline file bodies at the wire boundary, and preserve compact status metadata across web and mobile. Add transport-budget coverage for snapshots, resume, commands, legacy import, and projection maintenance.
@cursor

cursor Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@macroscopeapp
macroscopeapp Bot dismissed their stale review September 9, 2026 00:18

Dismissing prior approval to re-evaluate 988aa94

@juliusmarminge
juliusmarminge force-pushed the t3code/codex-turn-mapping branch from 8187b17 to ada72ce Compare September 9, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants