Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
docs(#6865): unindexed-files guide in repair.md (outside the llms-full bundle); shorter runbook line
garrytand93009ab0259
diff --git a/docs/guides/repair.md b/docs/guides/repair.mdindex 23b46e8999..41217b97b7 100644--- a/docs/guides/repair.md+++ b/docs/guides/repair.md@@ -1887,6 +1887,19 @@ the next maintenance run, so pause first if you want to keep the original.| `models.fence_repair` | unset: the first measured model with a key (`openai:gpt-6.1-sol` with an OpenAI key, else `anthropic:claude-opus-5-5` with an Anthropic key), else none | The model Tier 3 calls (`gbrain models` shows it). A model you set always runs; one gbrain has no price for runs under the default caps at an estimated ceiling (the highest chat rate gbrain knows; `gbrain pricing set` makes it exact) and waits for its price under a cap you set. || `fences.normalize` | `true` | `false` stops the inline rewrite on writes and syncs: a fixable fence is held or refused like any other. |+<a id="unindexed-files"></a>+### Unindexed files++A file an older gbrain refused before refusals became holds has no page and no+hold; incremental sync never revisits it. The+maintenance phase `unindexed_files` finds such files (bounded, never+clean while incomplete) and schedules a re-screen; doctor+`unindexed_files` reports them. Run `gbrain sources retry-held <id> --unindexed`, then the sync it prints: each file imports or becomes a+[hold](#held-files). `slug_taken` stays until one of the two files is renamed.+`metafile_skipped` (never scheduled) lists titled scaffolding files sync skips+on purpose (`index.md`, `README.md`, ...): rename one+(`investors/fund-a/index.md` to `investors/fund-a.md`), commit and sync.+## ResumeRuns are resumable. After each page commits, the position is saved under thediff --git a/docs/guides/sync-unblock-runbook.md b/docs/guides/sync-unblock-runbook.mdindex 6cfbf013a7..50084a5f2e 100644--- a/docs/guides/sync-unblock-runbook.md+++ b/docs/guides/sync-unblock-runbook.md@@ -111,7 +111,7 @@ Every hold and error has three fields, from one table| `preparation_stalled` | page | retry, upgrade | no | 3 failed attempts over 24 h, or writer status names a step that never finishes || `invalid_fence` | page | repair | no | the fence repair preview offers no plan (a manual reason) || `invalid_frontmatter` | page | repair | no | the repair preview needs an interpretation (--include-ambiguous) |-| `frontmatter_slug_conflict` | page | repair | no | the lane recorded what it could not do (a live named page, other fixes, a hand edit) |+| `frontmatter_slug_conflict` | page | repair | no | the lane recorded why it could not decide || `rename_held` | page | repair | no | the repair preview needs an interpretation || `file_too_large` | page | none | yes | always || `content_rejected` | page | none | yes | always |@@ -215,9 +215,8 @@ it and kept going; the receipt lists the hold (`held`, `held_count`) and`gbrain sources writer status --source <id> --json` names the step.`unblock --apply` schedules the re-screen.- `invalid_fence` and `frontmatter_slug_conflict`: the content-repair lane- clears them. A managed sync drops a `slug:` line naming no page or file- itself (#6865, `sync.slug_conflicts.auto_remove`).- `unblock --apply` runs it on the held paths now; the maintenance+ clears them. Managed sync drops a `slug:` line naming no page or file+ (#6865). `unblock --apply` runs it on the held paths now; the maintenancerun's `fence_repair` and `content_repair` phases run it by themselves;`gbrain repair content --source <id>` previews it. A hold the lane will notdecide is `needs_human` with the paragraph in `human_reason`diff --git a/docs/guides/troubleshooting.md b/docs/guides/troubleshooting.mdindex 600765a6a7..a42e86df71 100644--- a/docs/guides/troubleshooting.md+++ b/docs/guides/troubleshooting.md@@ -29,7 +29,6 @@| [Doctor residue (`timeline_history`, `derived_visibility`, `safe_index_pending`)](#doctor-residue) | preview `gbrain doctor --remediation-plan --json` or `gbrain repair`; then `gbrain repair <kind> --apply` | brain host, after the user agrees | `destructive` (rewrites derived rows) | `gbrain doctor --only timeline_history,derived_visibility,safe_index_pending --json` || Low health score | preview `gbrain doctor --remediation-plan --json`; then `gbrain doctor --remediate --yes --target-score 90 --max-usd 5` | agent, after the user agrees | `paid`; `destructive` with `--include-repairs` (approve with `--expect <plan_hash>` from the preview) | `gbrain doctor --json` || [Sync held a file (`Held <path>: invalid_frontmatter …`, `git_held_files`)](#held-files) | `gbrain sources status <id>`, then preview `gbrain repair frontmatter --source <id>` and apply the printed `--apply --expect <hash> --yes` | agent; the apply after the user agrees | `destructive` (rewrites the previewed lines of the files) | `gbrain doctor --only git_held_files --json` |-| [Committed file with no page or hold (`unindexed_files`)](#unindexed-files) | `gbrain sources retry-held <id> --unindexed`, then the sync it prints | agent | none | `gbrain doctor --only unindexed_files --json` || [Sync held a file for its facts or takes fence (`Held <path>: invalid_fence …`)](#held-fence-files) | nothing for most holds: the next maintenance run repairs and commits the fence. To see or do it now, preview `gbrain repair fences --source <id>` and run its printed `--apply --expect <hash>`; to pause automatic repair, `gbrain config set fences.repair.enabled false` (ask the user first). A `manual` reason needs the edit the hold names | agent; the apply needs no extra consent | none (model repair spends within the `fences.repair.*` caps; raising them is `paid`, the user's call) | `gbrain doctor --only fence_integrity --json` || A managed catch-up on a live checkout keeps dying (`revision_conflict`, `pinned_git_worktree_conflict`, `page_identity_changed`, `write ECONNABORTED`), or you want an agent to drive the recovery | `gbrain sync status --source <id> --json` (cursor, `committed_last_10m`, each hold and the last error with `class` / `safe_actions` / `needs_human`); when nothing moved and `needs_human` is false, `gbrain sync unblock --source <id> --apply`, then the sync it prints ([runbook](sync-unblock-runbook.md)) | agent; a person only when `needs_human` names a slug | none | `gbrain sync status --source <id> --json` || [Every write on a source stays pending; writer status shows a request `recovering` with `unexpected_file_bytes`](repair.md#stuck-recovery) | preview `gbrain repair stuck-recovery --source <id>` on the owner host, show the user the diff it prints, then run the choice they pick: `--keep prior` or `--keep disk` with `--apply --expect <hash> --yes`; never delete the file to unblock it | agent; the apply after the user picks a version | `destructive` (both versions are backed up first) | `gbrain sources writer status --source <id> --json` shows no recovering request |@@ -580,20 +579,6 @@ three-step check, and the skip codes. `gbrain doctor` reports it as the`auto_chronicle` check. To turn it off, run`gbrain config set auto_chronicle false`.-## Unindexed files--<a id="unindexed-files"></a>--A file an older gbrain refused before refusals became holds has no page and no-hold; incremental sync never revisits it. The-maintenance phase `unindexed_files` finds such files (bounded, never-clean while incomplete) and schedules a re-screen; doctor-`unindexed_files` reports them. Run `gbrain sources retry-held <id> --unindexed`, then the sync it prints: each file imports or becomes a-[hold](#held-files). `slug_taken` stays until one of the two files is renamed.-`metafile_skipped` (never scheduled) lists titled scaffolding files sync skips-on purpose (`index.md`, `README.md`, ...): rename one-(`investors/fund-a/index.md` to `investors/fund-a.md`), commit and sync.-## Sync freshness: no successful sync recorded<a id="sync-freshness-no-successful-sync"></a>diff --git a/llms-full.txt b/llms-full.txtindex 69f489bad5..ecc172ab5a 100644--- a/llms-full.txt+++ b/llms-full.txt@@ -7401,7 +7401,7 @@ Every hold and error has three fields, from one table| `preparation_stalled` | page | retry, upgrade | no | 3 failed attempts over 24 h, or writer status names a step that never finishes || `invalid_fence` | page | repair | no | the fence repair preview offers no plan (a manual reason) || `invalid_frontmatter` | page | repair | no | the repair preview needs an interpretation (--include-ambiguous) |-| `frontmatter_slug_conflict` | page | repair | no | the lane recorded what it could not do (a live named page, other fixes, a hand edit) |+| `frontmatter_slug_conflict` | page | repair | no | the lane recorded why it could not decide || `rename_held` | page | repair | no | the repair preview needs an interpretation || `file_too_large` | page | none | yes | always || `content_rejected` | page | none | yes | always |@@ -7505,9 +7505,8 @@ it and kept going; the receipt lists the hold (`held`, `held_count`) and`gbrain sources writer status --source <id> --json` names the step.`unblock --apply` schedules the re-screen.- `invalid_fence` and `frontmatter_slug_conflict`: the content-repair lane- clears them. A managed sync drops a `slug:` line naming no page or file- itself (#6865, `sync.slug_conflicts.auto_remove`).- `unblock --apply` runs it on the held paths now; the maintenance+ clears them. Managed sync drops a `slug:` line naming no page or file+ (#6865). `unblock --apply` runs it on the held paths now; the maintenancerun's `fence_repair` and `content_repair` phases run it by themselves;`gbrain repair content --source <id>` previews it. A hold the lane will notdecide is `needs_human` with the paragraph in `human_reason`@@ -10635,7 +10634,6 @@ Source: https://raw.githubusercontent.com/garrytan/gbrain/master/docs/guides/tro| [Doctor residue (`timeline_history`, `derived_visibility`, `safe_index_pending`)](#doctor-residue) | preview `gbrain doctor --remediation-plan --json` or `gbrain repair`; then `gbrain repair <kind> --apply` | brain host, after the user agrees | `destructive` (rewrites derived rows) | `gbrain doctor --only timeline_history,derived_visibility,safe_index_pending --json` || Low health score | preview `gbrain doctor --remediation-plan --json`; then `gbrain doctor --remediate --yes --target-score 90 --max-usd 5` | agent, after the user agrees | `paid`; `destructive` with `--include-repairs` (approve with `--expect <plan_hash>` from the preview) | `gbrain doctor --json` || [Sync held a file (`Held <path>: invalid_frontmatter …`, `git_held_files`)](#held-files) | `gbrain sources status <id>`, then preview `gbrain repair frontmatter --source <id>` and apply the printed `--apply --expect <hash> --yes` | agent; the apply after the user agrees | `destructive` (rewrites the previewed lines of the files) | `gbrain doctor --only git_held_files --json` |-| [Committed file with no page or hold (`unindexed_files`)](#unindexed-files) | `gbrain sources retry-held <id> --unindexed`, then the sync it prints | agent | none | `gbrain doctor --only unindexed_files --json` || [Sync held a file for its facts or takes fence (`Held <path>: invalid_fence …`)](#held-fence-files) | nothing for most holds: the next maintenance run repairs and commits the fence. To see or do it now, preview `gbrain repair fences --source <id>` and run its printed `--apply --expect <hash>`; to pause automatic repair, `gbrain config set fences.repair.enabled false` (ask the user first). A `manual` reason needs the edit the hold names | agent; the apply needs no extra consent | none (model repair spends within the `fences.repair.*` caps; raising them is `paid`, the user's call) | `gbrain doctor --only fence_integrity --json` || A managed catch-up on a live checkout keeps dying (`revision_conflict`, `pinned_git_worktree_conflict`, `page_identity_changed`, `write ECONNABORTED`), or you want an agent to drive the recovery | `gbrain sync status --source <id> --json` (cursor, `committed_last_10m`, each hold and the last error with `class` / `safe_actions` / `needs_human`); when nothing moved and `needs_human` is false, `gbrain sync unblock --source <id> --apply`, then the sync it prints ([runbook](sync-unblock-runbook.md)) | agent; a person only when `needs_human` names a slug | none | `gbrain sync status --source <id> --json` || [Every write on a source stays pending; writer status shows a request `recovering` with `unexpected_file_bytes`](repair.md#stuck-recovery) | preview `gbrain repair stuck-recovery --source <id>` on the owner host, show the user the diff it prints, then run the choice they pick: `--keep prior` or `--keep disk` with `--apply --expect <hash> --yes`; never delete the file to unblock it | agent; the apply after the user picks a version | `destructive` (both versions are backed up first) | `gbrain sources writer status --source <id> --json` shows no recovering request |@@ -11186,20 +11184,6 @@ three-step check, and the skip codes. `gbrain doctor` reports it as the`auto_chronicle` check. To turn it off, run`gbrain config set auto_chronicle false`.-## Unindexed files--<a id="unindexed-files"></a>--A file an older gbrain refused before refusals became holds has no page and no-hold; incremental sync never revisits it. The-maintenance phase `unindexed_files` finds such files (bounded, never-clean while incomplete) and schedules a re-screen; doctor-`unindexed_files` reports them. Run `gbrain sources retry-held <id> --unindexed`, then the sync it prints: each file imports or becomes a-[hold](#held-files). `slug_taken` stays until one of the two files is renamed.-`metafile_skipped` (never scheduled) lists titled scaffolding files sync skips-on purpose (`index.md`, `README.md`, ...): rename one-(`investors/fund-a/index.md` to `investors/fund-a.md`), commit and sync.-## Sync freshness: no successful sync recorded<a id="sync-freshness-no-successful-sync"></a>diff --git a/src/commands/doctor/checks/unindexed-files.ts b/src/commands/doctor/checks/unindexed-files.tsindex 970d07692b..abd420627e 100644--- a/src/commands/doctor/checks/unindexed-files.ts+++ b/src/commands/doctor/checks/unindexed-files.ts@@ -25,7 +25,7 @@ import { managedPersistenceEnabled } from '../../../core/persistence/ownership.timport { judgeUnindexedFiles, type UnindexedState } from '../../../core/persistence/unindexed-files.ts';import { gitFollowUpSync } from '../../sources-retry-held.ts';-const DOCS = 'docs/guides/troubleshooting.md#unindexed-files';+const DOCS = 'docs/guides/repair.md#unindexed-files';const hours = (ms: number | null) => ms === null ? null : Math.round(ms / 3_600_000);