fix: resolve 5 deployment blockers (runtime-fallback race, hashline legacy, tmux spawn, db open)

- runtime-fallback: guard session.error with sessionRetryInFlight to prevent
  double-advance during active retry; expand session.stop abort to include
  sessionAwaitingFallbackResult; remove premature pendingFallbackModel clearing
  from auto-retry finally block
- hashline-edit: add HASHLINE_LEGACY_REF_PATTERN for backward-compatible
  LINE:HEX dual-parse in parseLineRef and normalizeLineRef
- tmux-subagent: defer session on null queryWindowState; unconditionally
  re-queue deferred session on spawn failure (not just close+spawn)
- ultrawork-db: wrap new Database(dbPath) in try/catch to handle corrupted DB
- event: add try/catch guards around model-fallback logic in message.updated,
  session.status, and session.error handlers
This commit is contained in:
YeonGyu-Kim
2026-02-21 05:59:30 +09:00
parent 546cefd8f8
commit 8623f58a38
11 changed files with 601 additions and 168 deletions
+6 -11
View File
@@ -345,7 +345,8 @@ export class TmuxSessionManager {
try {
const state = await queryWindowState(sourcePaneId)
if (!state) {
log("[tmux-session-manager] failed to query window state")
log("[tmux-session-manager] failed to query window state, deferring session")
this.enqueueDeferredSession(sessionId, title)
return
}
@@ -407,10 +408,6 @@ export class TmuxSessionManager {
}
}
const closeActionSucceeded = result.results.some(
({ action, result: actionResult }) => action.type === "close" && actionResult.success,
)
if (result.success && result.spawnedPaneId) {
const sessionReady = await this.waitForSessionReady(sessionId)
@@ -445,12 +442,10 @@ export class TmuxSessionManager {
})),
})
if (closeActionSucceeded) {
log("[tmux-session-manager] re-queueing deferred session after close+spawn failure", {
sessionId,
})
this.enqueueDeferredSession(sessionId, title)
}
log("[tmux-session-manager] re-queueing deferred session after spawn failure", {
sessionId,
})
this.enqueueDeferredSession(sessionId, title)
if (result.spawnedPaneId) {
await executeAction(