Repository navigation
feat: add daily brain journal export timer - #20
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Phase 0 item LR3 of the live rollout plan (~/dev/firstmate/data/live-rollout-plan/report.md), part of the hardening build: smallest durable best-practice fix, never a today-only patch, never over-engineered. Under the five rooms, the nightly brain journal (04:05 UTC) reads only /srv/brain/journal-input, which Firstmate fills with
FM_BRAIN_DESK_ENABLED=1 bin/fm-brain-desk.py journal-export(merged in #15). Nothing schedules that export today.(Substance of the referenced items: the rollout plan's LR3 says something must run
FM_BRAIN_DESK_ENABLED=1 bin/fm-brain-desk.py journal-exportdaily before the 04:05 UTC brain journal, because under the brain rooms the journal reads only /srv/brain/journal-input and nothing schedules the export today; until it ships it is run by hand. PR 15 added bin/fm-brain-desk.py, whose journal-export operation copies the home's backlog, done archive, captain, learnings and task reports into that journal-input directory and is off unless FM_BRAIN_DESK_ENABLED=1.)What Changed
journal-exportdaily at 03:45 UTC with explicitFM_HOMEand brain-desk opt-in, catching up missed runs before the 04:05 UTC journal.Risk Assessment
✅ Low: The bounded timer schedules the existing exporter before 04:05 UTC with explicit home and opt-in settings; no material correctness, privacy, or intent-conformance issues were found.
Testing
The focused suite and manual CLI checks passed, with transcripts showing installed units, UTC calendar evaluation, exported records, refreshes and refusals. Isolated systemd startup was blocked by cgroup permissions, leaving automatic firing, catch-up and failed-unit reporting untested. Temporary files were removed and the worktree is clean.
Evidence: Focused product test transcript
Source: Focused product test transcript
Evidence: Installed units, evaluated calendar, exported records and refusals
Source: Installed units, evaluated calendar, exported records and refusals
Evidence: Isolated systemd startup blocker
Source: Isolated systemd startup blocker
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
bin/fm-brain-journal-export-service.sh- The core automatic scheduling requirement remains unproven. A workspace-local systemd manager launched through bubblewrap exited because it could not write cgroup.procs. Supply a disposable Linux systemd host or container with writable delegated cgroups and authorization for its isolated systemd state writes to validate timer firing, missed-run catch-up and failed-unit visibility.TMPDIR="$PWD/.test-journal-export/tmp" bin/fm-test-run.sh tests/fm-brain-desk.test.shPYTHONDONTWRITEBYTECODE=1 python3 .test-journal-export/manual.pydrove installation, generated-command exports, refreshes and adversarial refusals.systemd-analyze verify <installed-service> <installed-timer>TZ=Asia/Kolkata systemd-analyze calendar --base-time='2026-10-09 00:00:00 UTC' --iterations=3 '*-*-* 03:45:00 UTC'unshare --user --map-root-user --pid --fork trueDownloaded systemd withapt-get download systemd, extracted it locally withdpkg-deb -x, and attempted isolatedsystemd --user --unit=basic.targetthroughbwrap --unshare-all; repeated withstrace -e trace=file,writeto identify the blocker.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.