Fixes silent rename-event loss on large folder trees. Previously
on_created/on_moved/on_deleted handlers ran synchronously inside
watchdog's own callback thread (git commits, network calls, sleeps),
starving the inotify reader under bursty activity. When the reader
falls behind, watchdog can't pair moved_from+moved_to within its
matching window and drops the rename entirely instead of firing a
degraded delete+create -- so large renames vanished with no log line
and no ntfy at all.
Fix: watchdog handlers now just enqueue (kind, path) tuples onto a
queue.Queue and return immediately; a single dedicated worker thread
drains the queue and does all the slow work. Reader thread never
blocks regardless of downstream latency.
Also adds file-level journal frontmatter automation: new dated entries
under R.16.11 (YYYY-MM-DD.md) get auto-injected
if missing (matches existing corpus format exactly -- full month name,
no zero-padded day). Idempotent: files that already have a title are
left untouched; files with other frontmatter get title prepended.
Verified: reran the exact 300-subfolder rename repro that silently
failed before the fix -- now completes as a single clean MIRRORED
rename with no orphaned /data state.
Forward (/vault->/data) mirroring was gated to only AREA/CATEGORY/ID-shaped
names, so arbitrary sub-structure Ryan creates inside an ID (e.g. dated trip
folders under F.21.21) never propagated to /data. Removed the name-shape
gate; the existing parent-must-exist check is sufficient safety, plus an
explicit '0 System area' exclusion since that tree has no /data root at all.
- vault move now accepts any JD code kind (area/cat/ID) on both old and
new, not just ID->ID. Enables e.g. 'vault move F.50.09 F.59' to promote
an ID to a standalone category.
- Refuses if the source has nested JD-coded children (would orphan their
codes -- that's a bulk renumber, a different and riskier operation).
- Also commits vault_sync_daemon.py (inotify bidirectional /vault<->/data
sync service, with ntfy notifications on rename/archive/stub/error).
Local commits (auto-fix per-op + Inbox flag commit) are invisible to Ryan and
Obsidian sync until pushed. Add explicit final-step 'git push origin master',
with instruction to report push failure rather than claim changes landed.
Was written for the hermes -z report-only path (no tools). Now that the nightly
is a full agent session with tool access:
- fix stale paths (vault CLI is on $PATH via Nix, not /var/lib/hermes; use
'vault report --pretty' not the raw python script)
- REMOVE the 'git add -A && commit' step — every vault --execute auto-commits
per-op, and git add -A would sweep up Ryan's uncommitted journal/Obsidian edits
- flag delivery is now TWO places: append a dated section to the 00.01 Inbox note
(committed as a single targeted file, safe on a dirty tree), and the agent's
final response auto-delivers to the Matrix room
Opus draws the auto-fix/flag line correctly (Haiku over-fixed on judgment
calls, verified apples-to-apples against the same vault baseline). At ~$0.14/run
it's cheap enough to run nightly. --sonnet/--haiku now step DOWN; --opus kept as
an explicit identity flag; raw -m/--provider still override entirely.
Hermes host defaults (config.yaml default preset, delegation/compression models)
are unchanged — this only affects which model the vault CLI's own hermes -z spawn uses.
vault analyze now defaults to Haiku/Bedrock (cheap+fast, the nightly tier)
instead of the profile default. --sonnet and --opus step intelligence/cost up
for harder judgment calls; raw -m/--provider still override entirely. Provider
is forced to bedrock only for the haiku (us.anthropic.*) tier; the
global.anthropic.* sonnet/opus IDs use the profile default provider. Adds an
alive banner to stderr (headless -z buffers, so a pass is silent 1-3 min).
- vault analyze now accepts -m MODEL and --provider PROVIDER, passed through to
hermes -z, so intelligence/spend can be dialed inline per cadence (nightly cheap
on Haiku/bedrock, ad-hoc on the default smart model).
- sync-data --execute now git-commits like the other write ops (was the only
mutating op that skipped the commit).
- gitignore + untrack __pycache__/*.pyc build artifacts.
Adds packages/vault-cli (the `vault` CLI: search/show/tree, clobber-safe
create/move/rename across both /vault and /data + manifest regen, sync-data,
report, analyze) and wires it onto $PATH via modules/hosts/core/vault.nix for
server + vault-client hosts. Scripts self-locate siblings via realpath so they
run from the Nix store. Includes the deterministic $0 report generator, the
topology-manifest generator, and the shared Librarian prompt.