Field hardening: link graph fix, weekly lint, nightly backup + embed split, reflection retry - #9
Merged
Merged
Conversation
…sync/embed split - graph: every skeleton dir (Team/, Agents/, Decisions/, Skills/, Journal/…) is outside gbrain's entity-dir whitelist, so wikilinks were silently dropped and the graph stayed empty. install.sh sets link_resolution.global_basename=true for new installs; the nightly sets it idempotently so existing installs pick it up. Skeleton CLAUDE.md files document the convention: bare-basename wikilinks + a See also per page. Field-tested 2026-07-23 on a 562-page vault: 0 -> 185 edges. - nightly: best-effort git push of the vault after the nightly commit (local commits are worth little if the disk dies); never blocks the cycle. - nightly: split sync (--no-embed) + embed --stale — sync's inline embed path fails against zembed-1 with a misleading parse error and silently stops ingesting the vault; split, both phases pass. Claude-Session: https://claude.ai/code/session_013ERfM4utJGsw4McARGJt6a
The nightly maintains the brain but reports to a log nobody reads — a silently-failing maintenance job looks exactly like a healthy one. The weekly lint runs doctor / lint / orphans / anomalies / back-links / stats, checks the nightly actually ran in the last 48h, and surfaces a 🟢/🟠/🔴 verdict where it gets read: full report in Profile/lint.md, one-line block pinned in Profile/memory.md. Pure CLI, no LLM pass — immune to transient API failures. Claude-Session: https://claude.ai/code/session_013ERfM4utJGsw4McARGJt6a
Transient API failures ("Connection closed mid-response") kill headless
runs often enough that an unretried cron silently loses a whole day of
journal — hit twice in one week in the field. Each failed attempt is
logged to daily-reflection-errors.log.
Claude-Session: https://claude.ai/code/session_013ERfM4utJGsw4McARGJt6a
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.
Four hardenings from running brain-in-a-box daily in the field, so every install benefits.
1. The link graph was silently empty for everyone — fixed
gbrain's link extractor only auto-recognizes English "entity" dirs (
people/,companies/,projects/…). Every skeleton dir (Team/,Agents/,Decisions/,Skills/,Journal/…) is outside that whitelist, so all wikilinks were dropped silently: empty graph, no error, forever.install.shnow setslink_resolution.global_basename=true; the nightly sets it idempotently so existing installs pick it up on their next update. SkeletonCLAUDE.mds document the convention (bare-basename wikilinks +## See alsoper page). Field-tested on a 562-page vault: 0 → 185 edges.2. Weekly lint — verify-and-surface (new launchd job, Monday 08:00)
The nightly maintains the brain but reports to a log nobody reads — a silently-failing maintenance job looks exactly like a healthy one (this exact failure mode hid a broken embed pipeline for weeks). The weekly lint runs doctor / lint / orphans / anomalies / back-links / stats, checks the nightly actually ran in the last 48h, and pins a 🟢/🟠/🔴 verdict in
Profile/memory.md(idempotent marker block) with the full report inProfile/lint.md. Pure CLI, no LLM pass.3. Nightly: off-machine backup + sync/embed split
sync --no-embed+embed --stale: sync's inline embed path fails againstzembed-1with a misleading parse error and silently stops ingesting the vault. Split, both phases pass.4. Reflection: retry the headless claude run
Transient API failures ("Connection closed mid-response") killed the cron twice in one week in the field, silently losing whole days of journal. Now 3 attempts, 60s apart, failures logged.
test-hooks.sh: 15/15 green.https://claude.ai/code/session_013ERfM4utJGsw4McARGJt6a