Skip to content

[codex] harden familiar mnesia recovery#21

Merged
deepfates merged 4 commits into
mainfrom
codex/harden-mnesia-recovery
Jul 6, 2026
Merged

[codex] harden familiar mnesia recovery#21
deepfates merged 4 commits into
mainfrom
codex/harden-mnesia-recovery

Conversation

@deepfates

Copy link
Copy Markdown
Owner

Summary

  • configure workspace Mnesia core dumps under .cantrip/mnesia/cores instead of the repo root
  • set bounded Mnesia dump thresholds for workspace Familiar launches
  • add a test pinning the workspace Mnesia environment

Root cause

A corrupt/truncated Mnesia transaction log can fatal during previous_log dumping. Each retry wrote a full MnesiaCore.* diagnostic file in the repo root, which amplified the disk-full failure mode.

Validation

  • mix format --check-formatted lib/mix/tasks/cantrip.familiar.ex test/mix_cantrip_familiar_test.exs
  • mix test test/mix_cantrip_familiar_test.exs --exclude mnesia_restart
  • mix test test/mix_cantrip_familiar_test.exs --only mnesia_restart

@deepfates deepfates marked this pull request as ready for review July 6, 2026 01:18
@deepfates deepfates force-pushed the codex/harden-mnesia-recovery branch from dcc827b to 39d929d Compare July 6, 2026 01:25
@deepfates deepfates force-pushed the codex/harden-mnesia-recovery branch from 39d929d to 70ddf72 Compare July 6, 2026 01:54
@deepfates

Copy link
Copy Markdown
Owner Author

Added one commit on top of this branch: 11d2e5b — Mnesia appends now prefer sync_transaction (data hits disk before the call returns), with a regression test that fails if the async path is ever used. Context: this PR's hardening (honest corruption errors + quarantine) plus that commit together close the crash-safety story from the 2026-07-05 cold-read finding (157-turn loom stranded by a corrupted LATEST.LOG). Full evidence trail: portfolio-audit-20260701/cold-reads/familiar.md and .tickets/dee-loom.md in the fleet repo. Verified independently: storage suite green, full suite 650 tests green. Merging this PR lands the whole fix.

Same-repo PRs have secrets and no fork risk; the suite costs ~1min of
Haiku. A gate belongs before the merge — post-merge red on main
propagates into every branch cut from it.
@deepfates deepfates merged commit 9ed426f into main Jul 6, 2026
2 checks passed
@deepfates deepfates deleted the codex/harden-mnesia-recovery branch July 6, 2026 06:25
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