Skip to content

feat: crash if sessions directory missing after init - #99

Merged
avoidwork merged 2 commits into
mainfrom
feat/crash-if-session-dir-missing
Jun 4, 2026
Merged

feat: crash if sessions directory missing after init#99
avoidwork merged 2 commits into
mainfrom
feat/crash-if-session-dir-missing

Conversation

@avoidwork

Copy link
Copy Markdown
Owner

Description

Move directory creation from saveSession() (called on every message) to a single ensureSessionsDir() call at app init. At runtime, if the sessions directory disappears after init, saveSession() validates via stat() and crashes with a fatal error instead of silently creating the directory.

Type of Change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional changes)
  • Performance improvement
  • CI / build / tooling

Testing

  • OpenSpec change artifacts generated (proposal, design, specs, tasks)
  • Pre-commit hooks (oxlint, oxfmt, coverage) passed on commit. Unit tests for ensureSessionsDir, saveSession validation, and handleShutdown error propagation.

Coverage

  • 100% line coverage maintained

Checklist

  • npm run lint passes
  • Tests pass with 100% line coverage
  • No forbidden patterns used
  • Conventional Commit style applied

@avoidwork avoidwork self-assigned this Jun 4, 2026
@avoidwork
avoidwork merged commit 3ae3bc6 into main Jun 4, 2026
@avoidwork
avoidwork deleted the feat/crash-if-session-dir-missing branch June 4, 2026 21:41
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