Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
docs(w4): keep llms-full.txt under its 800 KB budget after the failed-writes and reindex consent rows
time-attackcc156f4a4497
diff --git a/docs/guides/repair.md b/docs/guides/repair.mdindex 3ea708e6e9..88d11b4606 100644--- a/docs/guides/repair.md+++ b/docs/guides/repair.md@@ -611,10 +611,10 @@ candidate one class:| `replay` | No later write supersedes it. | Replayed on apply. || `already_written` | A later request with the same intent committed, or an earlier apply replayed it. | Kept. || `duplicate` | A later request with the same intent exists; that one is the candidate. | Kept. |-| `superseded` | A later write or delete of the page committed or is still pending; for `put_page`, also a later failed `put_page` of the page (the newer content) or a page that changed after the revision the caller read. | Kept. Read the page and re-issue the change by hand if it is still wanted. |+| `superseded` | A later write or delete of the page committed or is pending; for `put_page`, also a later failed `put_page` (newer content) or a page changed since the caller read it. | Kept; re-issue by hand if still wanted. || `unpinned_target` | A `remember` saved unattributed; replaying would infer its subject again and could pick another page. | Kept. Re-issue it with an explicit `entity` if it is still wanted. |-| `file_database_drift` | Its last replay was refused `source_changed`: the page's file and the database differ (an edit made in the file only), and the page has not been written since. | Kept. Reconcile the page first (`gbrain sources reconcile <source> <slug> --preview`, which the listing names); the next preview lists the write as `replay` again once the page changes. An apply that hits the same refusal reports `file_database_drift` too. |-| `producer_owned` | gbrain produced it (sync or file import, reconcile, relink, maintenance page, job). | Kept. The preview prints the command that produces it again from current content, such as `gbrain sync --source <id> --no-pull --retry-failed --json`. |+| `file_database_drift` | Its last replay hit `source_changed` (file and database differ). | Kept until the page changes; reconcile it first. |+| `producer_owned` | gbrain produced it (sync or file import, reconcile, relink, maintenance page, job). | Kept. The preview prints the command that produces it again from current content (sync: `gbrain sync --source <id> --no-pull --retry-failed`). |The apply replays exactly the previewed set. Each write is classified againand its original caller's authority is checked again first: a write thatdiff --git a/docs/operations/spend-controls.md b/docs/operations/spend-controls.mdindex be75ddddf8..999526f3fd 100644--- a/docs/operations/spend-controls.md+++ b/docs/operations/spend-controls.md@@ -146,7 +146,7 @@ line naming the cap, its source and how to remove it, e.g.| Backfill per-job budget | `embed.backfill_max_usd` | `10` | caps the job's tracker | `off` (`0`/garbage → default, fail-closed) | uncapped (still ledgered) || Backfill cooldown | `embed.backfill_cooldown_min` | `10` | skips re-submission inside window | — (latency knob, not spend) | **not** bypassed || `reindex-code` cost gate | — (preview before re-embed) | — | TTY prompt / non-TTY refuse + exit 3 (`confirmation_required`) | `--max-cost off` | runs uncapped (still ledgered) |-| `reindex --markdown` consent gate | — (page count + estimate before re-embed) | — | TTY prompt / non-TTY refuse + exit 3 (`confirmation_required`); `--yes` runs under the derived cap, `--max-usd` sets it; a queued `reindex` job runs only with the approval stored by `jobs submit reindex ... --yes` or the search-mode switch prompt | `--dry-run`, `--no-embed` (free) | authorizes under the derived cap |+| `reindex --markdown` consent gate | — | — | TTY prompt / non-TTY exit 3; a queued job needs the approval stored at submit | `--dry-run`, `--no-embed` | derived cap || `migrate embeddings` consent gate | — (plan + estimate before provider migration) | — | TTY y/N prompt / non-TTY refuse + exit 3 (`confirmation_required`) | `--yes` | estimate marked informational, but **still prompts** (guards a destructive schema rebuild, not just spend) || `enrich` / `onboard --auto` | `--max-usd` (per-call) | — | non-TTY without `--yes`/`--max-usd`: refuse + exit 3 (`confirmation_required`); `--yes` runs under the derived cap | `--max-usd off` | runs uncapped (still ledgered) || Image-OCR per-run ceiling | `embedding_image_ocr_max_images` / `embedding_image_ocr_max_usd` | `200` images / `$1.00` (estimated) | skips OCR over-cap (import continues; skips counted in `ocr_skipped_budget`, surfaced by doctor `ocr_health`) | `0` disables that cap | **not** bypassed (per-run cap, not a tracker gate) |