Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
docs(todos): GBRA-35 wave 2 follow-ups
garrytan62fed42d5234
diff --git a/TODOS.md b/TODOS.mdindex 7d2ba4e437..650151d7c6 100644--- a/TODOS.md+++ b/TODOS.md@@ -1,5 +1,42 @@# TODOS+## Memory, search and connector fix wave follow-ups (filed 2026-10-02, GBRA-35 wave 2; notes: docs/fix-wave-notes/capy-gbra35w2-fix-wave.md)++- [ ] **P2 — Honest `waiting` completeness while loop analysis is pending.**+ **What:** `gbrain waiting` reports `completeness: "partial"` only for held Gmail threads. Threads still queued for `loops_extract`, still inside the managed 30-day catch-up, or grace-held are not reflected, so a brain mid-backfill can answer "You are clean". **Fix:** a pending-analysis count beside the held-thread note, read from the catch-up cursor, the waiting `loops_extract` depth and `loop_grace_holds`. The message sits beside `rankGroups` (wave 7's area), so coordinate. **Effort:** S. **Priority:** P2.+- [ ] **P2 — Loop freshness field on `open_loops` / `waiting`.**+ **What:** the result carries source sync ages but not when loop analysis last caught up. **Fix:** `loops_analyzed_through` (the newest thread revision with a recorded `loops_extract` outcome) per source, rendered next to the sync age. Pairs with the completeness entry above. **Effort:** S. **Priority:** P2.+- [ ] **P2 — Answer-quality before/after gate for capture dedup, gather breadth and windowed extraction (V13).**+ **What:** #5888, #5890 and #5887 were proven by discriminating unit tests, not by answer quality. **Fix:** one gbrain-evals run (recall + think over a seeded conversation corpus) before and after the wave, recorded in the evals repo. **Effort:** M. **Priority:** P2.+- [ ] **P2 — Static guard against raw guarded-table writes and swallowed `managed_writer_guard` refusals (V15).**+ **What:** #5869 and #5904 were raw `UPDATE facts` / `INSERT INTO timeline_entries` calls refused on managed brains with the error swallowed. **Fix:** a lint over `src/` that flags raw writes to guarded tables outside `withCoordinatedWrite`/coordinator publication and `catch` blocks that drop a `managed_writer_guard` error, with an allow-list file. **Effort:** M. **Priority:** P2.+- [ ] **P2 — `extract-conversation-facts` dead-letters when `facts.extraction_enabled=false`.**+ **What:** found by the managed connector job contract harness, which turns facts extraction off outside its facts-lane cases: a queued `extract-conversation-facts` job dead-letters instead of completing as a typed skip. **Fix:** check the switch at handler entry and complete with `skipped: extraction_disabled`; add the case to `test/helpers/managed-connector-job-contract.ts`. **Effort:** S. **Priority:** P2.+- [ ] **P2 — `extract timeline --from-meetings` on managed brains.**+ **What:** `extract timeline --source db` now publishes through the coordinator, but the `--from-meetings` pass (`src/core/extract-timeline-from-meetings.ts`) still writes through `engine.addTimelineEntriesBatch` outside the coordinator, which `managed_writer_guard` refuses on a managed brain. **Fix:** route its rows through the same per-page maintenance request (`commands/extract-timeline-db.ts`) and exit non-zero on refusal. **Effort:** S. **Priority:** P2.+- [ ] **P3 — Stopword-only title probe.**+ **What:** a page titled only with stopwords ("The Who", "It") cannot be found by the title arm, because `websearch_to_tsquery` drops every term. **Fix:** an exact-title probe on `lower(btrim(title))` when the tsquery is empty. **Effort:** S. **Priority:** P3.+- [ ] **P3 — `projects/` entity boost (eval first).**+ **What:** project identity pages rank like ordinary notes on a name query. **Fix:** measure a small `projects/` boost against the retrieval evals before changing defaults; ship only on a measured win. **Effort:** M. **Priority:** P3.+- [ ] **P3 — Single write-target resolver for connector sources.**+ **What:** six resolvers decide whether a writer publishes to a checkout, the database or `connector_database`; #5856 was one of them disagreeing. **Fix:** one exported resolver used by atoms, facts, timeline, synthesis, links and connector sync, with a table test. **Effort:** M. **Priority:** P3.+- [ ] **P3 — claude-cli provider as a native `LanguageModelV3`.**+ **What:** the claude-cli model runs through the AI SDK's v2 compatibility path, which emits a warning on every process's first call (now routed to stderr). **Fix:** implement `LanguageModelV3` directly and drop the compat warning. **Effort:** M. **Priority:** P3.+- [ ] **P3 — Explicit, cost-previewed backfill of legacy head-only transcript tails.**+ **What:** transcripts marked done before windowed extraction keep their tails past the first 8,000 characters unextracted; only turns added after the upgrade are extracted. **Fix:** an opt-in command that lists those files with an estimated window count and cost, and extracts after confirmation under the per-sweep caps. **Effort:** M. **Priority:** P3.+- [ ] **P3 — Escape `[user]` / `[assistant]` role markers inside user text (E27).**+ **What:** the window splitter treats only the exact `\n\n[user]\n` and `\n\n[assistant]\n` markers as turn boundaries, but a user who types that exact line forges a boundary. **Fix:** escape the markers in `toCorpusText` and unescape in the splitter, with a corpus-version bump. **Effort:** S. **Priority:** P3.+- [ ] **P3 — Measure the upgrade journey (Pass 8).**+ **What:** the time from the end of `gbrain upgrade` to both new repairs previewed was estimated (target under 5 minutes), not measured. **Fix:** time it once on a seeded PGLite brain with `captured_facts_active` and `loop_facts_drift` present and record it in the upgrade guide. **Effort:** XS. **Priority:** P3.+- [ ] **P3 — Explicit lanes lose corrections at cosine 0.95 (V1).**+ **What:** `remember` and `extract_facts` keep the unguarded same-entity cosine ≥ 0.95 drop. Measured with voyage-4, about 4 of 20 correction pairs score ≥ 0.95, so an explicit correction ("is not moving", a changed amount) can be dropped as a duplicate. Capture lanes already apply the negation/number/date guard. **Fix:** apply `claimsDiverge` to the explicit lanes' cosine drop, with the V1 pairs as the test table. **Effort:** S. **Priority:** P3.+- [ ] **P3 — JIT off for the remote title arm.**+ **What:** on a 40k-page Postgres brain most of the remaining common-term title-arm latency is JIT compilation (for example 17 ms execution, 504 ms JIT): the visibility subplans push the cost estimate past `jit_above_cost`. **Fix:** `SET LOCAL jit = off` around the remote title statement, measured against the same benchmark before shipping. **Effort:** S. **Priority:** P3.+- [ ] **P3 — Move `captured-facts` database-only expiry onto the loop-fact retirement mutation.**+ **What:** `repair captured-facts` expires database-only rows through its own maintenance request, while `loops_close` and `repair loop-facts` share `persistence/loop-fact-retirement.ts`. **Fix:** one coordinated fact-retirement mutation for all three, so the expiry rules and receipts cannot drift. **Effort:** S. **Priority:** P3.+- [ ] **P3 — Throttle autopilot's per-tick `git fetch` while an upgrade is held.**+ **What:** on a bun-link install held for an unmet Bun floor, each self-upgrade tick fetches upstream to re-read the floor. **Fix:** back off the floor read while the hold's target is unchanged (for example once per quiet-hours window), resetting when the host's Bun changes. **Effort:** S. **Priority:** P3.+## Secret redaction and Google file modes follow-ups (filed 2026-10-01, follow-up from v0.60.31.0)- [ ] **P2 — Sanitize text sent to configured providers (reranker, embeddings, synthesis).**