A snapshot: read at commit 707a04c7ce8 on 2026-10-18T00:06:01Z by majordomus 0.29.0. Nothing on this page is read again. See it live
I2137
An accepted mesh event is on disk before it counts, and a damaged journal line is reported, never fused or dropped silently
Where it stands
devtask.issue- Readiness
- complete completion is recorded and every required evidence token is present
- Status
- DONE
- Can start
- not now
- Milestone
- Milestone status
- ACTIVE
- Wave
0- Waiting on
- none
- Holds back
- Behind it in all
1- Evidence
3of3
Moves
plan.transitionWhat it is
- Objective
- Make journal appends and compaction rewrites durable and failure-reporting, and make reload survive a torn tail without losing or fusing a complete event.
- Why
- Journal::persist ignores write errors (apps/majordomus-cli/src/mesh/journal.rs:1984, let _ = file.write_all) and never fsyncs; reload reads the whole file with read_to_string and drops every unparsable line silently (apps/majordomus-cli/src/mesh/journal.rs:1407-1413); an append after a torn tail with no trailing newline fuses the next event into the corrupt line (apps/majordomus-cli/src/mesh/journal.rs:1969-1984), so one crash also loses the event after it. The compaction rewrite (apps/majordomus-cli/src/mesh/journal.rs:2250-2264) has the same properties, and the file is created at the default umask. The only reload test uses a clean file (apps/majordomus-cli/src/mesh/journal.rs:2655, a_reloaded_journal_keeps_events_and_resurrects_no_liveness). Disk full is handled nowhere on this path; the only sync_all in the crate is apps/majordomus-cli/src/economics/runner.rs:1035. The journal holds other runtimes' events and handover bodies (apps/majordomus-cli/src/mesh/journal.rs:1961-1985), so a lost line is lost cooperation. Baseline audit of 2026-10-09 at master 1fb8d6be44, failure gap 4 and the failure-class rows disk full, truncated journal and partial write.
- Now
- Writes are best effort and unreported; a torn tail corrupts the next event; unreadable lines vanish on reload.
- Wanted
- An append writes a missing trailing newline first (a torn tail stays one unreadable line), syncs, and counts a failure in JournalTallies.write_failures instead of discarding it; reload counts unreadable lines (JournalTallies.unreadable); compaction writes a synced file and renames it over the old one, then syncs the directory; the file is created owner-only (0600); mesh doctor fails its journal check while either count is nonzero. The deferred part, a reload size bound and refusing to acknowledge an own event whose append failed, is I2706.
- Done when
- unknown: the record declares no `completion`
- Risk
- unknown: the record declares no `risk`
Acceptance
- A journal whose last line is torn reloads every complete event, reports one unreadable line, and the next append is readable on the following reload
- A failed write on a read-only or full file system in a test is counted and reported by mesh doctor
- A kill during compaction leaves the old or the new journal, never a mix
- The journal file is created with owner-only permissions
- Validation
bin/majordomus plan validatecargo test --lib mesh::journalcargo test --test mesh_compactionMJ_TEST_JOBS=4 bash test/run.sh 493_mesh_compaction_keeps_what_is_live- Evidence required
torn_tail_reload_testwrite_failure_reported_testcompaction_crash_test- Evidence present
torn_tail_reload_testwrite_failure_reported_testcompaction_crash_test
Scope
- Touches
apps/majordomus-cli/src/mesh/journal.rsapps/majordomus-cli/src/mesh/doctor.rsapps/majordomus-cli/src/capability/builtin/mesh.rsapps/majordomus-cli/tests/mesh_compaction.rstest/casesdocs/MESH.md- Not
- unknown: the record declares no `non_scope`
- Depends on
- none
- Priority
- p0
- Profile
- implementation
- Parallel safe
- false
- Owner
- unknown: the record declares no `owner`
The work so far
- Branches
- none
- Merged
- none
- Commits
0- Trunk
- master
- Sessions
- none
- Created
- 2026-10-09
- Updated
- 2026-10-14T10:03:17Z
- Started
- 2026-10-14T10:03:06Z
- Verified
- unknown: the record declares no `verified_at`
- Completed
- 2026-10-14T10:03:17Z
Synchronisation
- Adapter
scripts/github-sync- Repository
- unknown: the derived plan's header carries no repository
- External issue
- unknown: a live GitHub state; this executable makes no network call, so only `scripts/github-sync --check` can answer it
- State there
- unknown: a live GitHub state; this executable makes no network call, so only `scripts/github-sync --check` can answer it
Findings
Nothing is wrong with these records.