Skip to content

fix: harden event journal persistence - #123

Merged
dmoliveira merged 1 commit into
mainfrom
fix/event-journal-file-safety
Jul 30, 2026
Merged

dmoliveira merged 1 commit into
mainfrom
fix/event-journal-file-safety

Conversation

@dmoliveira

Copy link
Copy Markdown
Owner

Summary

  • anchor event-journal appends to validated directory descriptors and reject unsafe retirement, loop, state, or journal entries
  • accept existing journals only at 0600 or legacy 0644, normalize successful appends to 0600, and preserve established error/False precedence
  • retry short writes, propagate file write/fsync failures, and retain best-effort parent-directory fsync and cleanup behavior
  • add adversarial coverage for unsafe entry types, modes, replacement races, partial writes, fsync failures, and descriptor cleanup

Validation

  • uv run --frozen ruff check .
  • uv run python -m py_compile src/ailoop/state.py tests/test_state_safety.py
  • focused: 194 passed
  • full suite: 553 passed, 85% coverage
  • Oracle: GO
  • Reviewer: APPROVE

Runtime-Session: ses_057afdc3effemiOJ2zfmjJiDqe

Runtime-Session: ses_057afdc3effemiOJ2zfmjJiDqe
@dmoliveira

Copy link
Copy Markdown
Owner Author

Temporarily closing and reopening to retrigger the missing pull_request CI event. Runtime-Session: ses_057afdc3effemiOJ2zfmjJiDqe

@dmoliveira dmoliveira closed this Jul 30, 2026
@dmoliveira dmoliveira reopened this Jul 30, 2026
@dmoliveira
dmoliveira merged commit f93796d into main Jul 30, 2026
2 of 4 checks passed
@dmoliveira
dmoliveira deleted the fix/event-journal-file-safety branch July 30, 2026 07:55
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