feat(hub): per-turn title fallback for flavors without native rename tools #2317
All Vouch review confidence checks passed
Residual risk 0.26 = Change Risk (0.48) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 366 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 93% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.353
Shallow Review Depth
shallow_review_depth
0.344
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #2317"
general
weight: 0.35
github-actions[bot]
Problem
The
autoTitlePerTurnsetting (#1976) makes session titles regenerate every turn — but only for flavors whose CLI prompt includes a rename tool (claude, codex, opencode, grok, pi). The steer is a system-prompt instruction; flavors without a native tool (dsh, kimi, cursor, copilot, agy) never receive it, so with the toggle on their titles stay frozen at the first-turnsummaryforever. The hub's automatic fallback is first-turn-only by design (titleSuggestionAutoAttemptedAtis claimed once), so it never revisits them either.Fix
Add a hub-side per-turn branch to
AutomaticTitleSuggestionService.onTurnCompleted, gated on all of:1. the hub
autoTitlePerTurnsetting is enabled (samereadAutoTitlePerTurnEnabledthe CLI reads — one web switch governs both paths);2. the session's
metadata.flavoris inFLAVORS_WITHOUT_NATIVE_TITLE_TOOLS(flavors with a native tool keep using the CLI steer);3. no manual pin holds the title.
When gated in, the hub asks the configured title provider after each completed turn and rewrites
metadata.namevia the newSessionCache.updatePerTurnSessionTitle. Manual pins always win:nameLocked/titleLockedon the raw store row (isSessionNamePinned) — the sanitized cache/wire view strips hub-owned fields, so a cache-view check would be blind to pins;session-updatedmetadata patch (same pattern asupdatePromptTitle) so connected web clients see the new title without a refetch.The per-turn branch runs before the first-turn chain and returns early, so turn 1 of a gated session writes
namedirectly instead of claiming the one-shotsummaryfallback. When the gate option is absent the code path is byte-identical to before (the absent-gate check is synchronous, preserving the existing microtask ordering the in-flight tests rely on).Depends on #2316 (paged conversation collection) so the per-turn regeneration also works on long sessions whose newest window is all tool output.
Tests
metadata.namerewritten after each of two turns;summary/titleSuggestionAutoAttemptedAtuntouched.summarypath as before).summarypath as before.renameSession, the hub-owned pin path): provider never called.🤖 Generated with Claude Code