Skip to content

Field hardening: link graph fix, weekly lint, nightly backup + embed split, reflection retry - #9

Merged
Chad-Mufasax merged 4 commits into
masterfrom
update/field-hardening-2026-07
Jul 23, 2026
Merged

Field hardening: link graph fix, weekly lint, nightly backup + embed split, reflection retry#9
Chad-Mufasax merged 4 commits into
masterfrom
update/field-hardening-2026-07

Conversation

@Chad-Mufasax

Copy link
Copy Markdown
Contributor

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.sh now sets link_resolution.global_basename=true; the nightly sets it idempotently so existing installs pick it up on their next update. Skeleton CLAUDE.mds document the convention (bare-basename wikilinks + ## See also per 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 in Profile/lint.md. Pure CLI, no LLM pass.

3. Nightly: off-machine backup + sync/embed split

  • Vault is pushed to its git remote after the nightly commit (best-effort, never blocks the cycle) — local commits are worth little if the disk dies.
  • 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.

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

…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
@Chad-Mufasax
Chad-Mufasax merged commit 807c04d into master Jul 23, 2026
1 check passed
@Chad-Mufasax
Chad-Mufasax deleted the update/field-hardening-2026-07 branch July 23, 2026 12:11
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