Skip to content

Log durability failures instead of swallowing catches - #326

Merged
TheGreatAxios merged 3 commits into
mainfrom
cl-5351-durability-catches
Aug 5, 2026
Merged

Log durability failures instead of swallowing catches#326
TheGreatAxios merged 3 commits into
mainfrom
cl-5351-durability-catches

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • CL-5351 slice A: stop silently swallowing durability catches in exec/TUI runners
  • saveState and dispatchPostRun now log (and post-run notes stderr)
  • Settings write-backs distinguish absent vs unreadable files so we never clobber corrupt settings
  • Resume loadRecentTurns failures log + surface a one-line transcript error block
  • Crash finalize flush/saveState failures log + stderr without failing the exit path

Context

Part of CL-5351 (durability catches only). Hooks and IIFE cleanups are separate PRs (#324, #325).

Test plan

  • bun run typecheck
  • bun test ./tests/unit/exec/runner.test.ts ./tests/unit/tui/runner.test.ts ./src/settings.test.ts

@linear-code

linear-code Bot commented Aug 5, 2026

Copy link
Copy Markdown

CL-5351

@TheGreatAxios

Copy link
Copy Markdown
Collaborator Author

Hard review (greybeard + CTO)

Verdict: APPROVE

Greybeard

High-priority durability catches now log; settings write-back paths stop silent clobber; resume hydrate and crash finalize are no longer black holes. Medium catch sites got the same treatment without turning intentional queue-chain silence into noise.

CTO

This is ops hygiene that pays for itself the first time saveState fails in the wild. Ship with the 5351 set.

No blockers.

CL-5351 slice A: surface saveState/post-run, settings write-back,
resume hydrate, and crash-finalize failures without clobbering files.
Surface Codex refresh, pricing seed/refresh, teardown close, and
non-ENOENT settings load failures at least as debug/warn logs. Profile
unlink ignores ENOENT only. Keep non-throwing fire-and-forget behavior.
max-concurrent and wait-for-approval paths already used
loadGlobalSettingsWriteBase but returned silently on null.
Match the plugin/compaction/session-mode warn with path.
@TheGreatAxios
TheGreatAxios force-pushed the cl-5351-durability-catches branch from f7d2cc2 to 4288c24 Compare August 5, 2026 06:14
@TheGreatAxios
TheGreatAxios merged commit 8ecb2c9 into main Aug 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant