Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

Merge eval-wave lane A (GBRA-27) into fix wave 5; fold its notes into the v0.60.28.0 CHANGELOG and upgrade note

garrytanec8d2221fa28
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0521690434..a0d0442842 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,10 +12,12 @@ identifiers and attribution are available in the pre-removal Git revision
## [0.60.28.0] - 2026-10-01
-**Fix wave 5: session start stops showing another session's text, big brain repos onboard again, old queued jobs stop wedging synthesize, and the cleanups promised last wave ship.**
+**Fix wave 5: session start stops showing another session's text, private pages stay out of ambient recall, big brain repos onboard again, old queued jobs stop wedging synthesize, and the cleanups promised last wave ship.**
Session start used to print a "Last session activity" line taken from whichever session on the machine wrote last. On a host where several agents or people share one machine, that could put one session's private text in front of another. The line is gone, along with the buffer behind it, and nothing turns it back on.
+A second privacy leak: `volunteer_context`, the per-turn hook block and `gbrain compile-context` could surface a `visibility: private` page's title and synopsis, including to remote MCP callers. Ambient recall now hides private pages the same way remote search does.
+
Brain repos with more than about 10,000 files could not be added, claimed or moved: every attempt failed with a "1 MiB" error. That limit is gone. A 50,000-file repo now adds in under a second on our test machine.
If you upgraded across v0.50, old queued jobs from before that release blocked every worker, so synthesize failed on every run and captures to `/ingest` returned a server error. Now old jobs are released or reused where that is safe, `/ingest` answers with a clear 409 and the fix, and `gbrain doctor` walks you through reviewing the rest.
@@ -25,6 +27,7 @@ And the leftovers. `gbrain repair stale-atoms` cleans up search atoms that quote
| After upgrading | Before | After |
| --- | --- | --- |
| Session start on a shared machine | could show another session's last message | shows only this workspace's own notes |
+| A private page in `volunteer_context`, the turn block or `compile-context` | title and synopsis shown | hidden (local CLI `volunteer_context` still sees it) |
| `sources add` on a 50,000-file repo | `request_too_large` | under 1 s (PGLite and Postgres) |
| A capture that hits a pre-v0.50 job | HTTP 500 | 202, or 409 with the recovery command |
| Search atoms of deleted or rewritten pages | stay searchable | retired by `gbrain repair stale-atoms` after you review them |
@@ -59,15 +62,18 @@ And the leftovers. `gbrain repair stale-atoms` cleans up search atoms that quote
gbrain repair extractor-facts --apply --expect <hash>
gbrain doctor
```
-4. **Several brains on one host:** re-run `gbrain autopilot --install` for each non-default brain (`GBRAIN_HOME=<brain parent>`), then for the default brain.
-5. **Your agent reads `skills/migrations/v0.60.28.0.md`** the next time you talk to it. The full symptom table is in [Recover after upgrading](docs/guides/repair.md#fix-wave-5).
-6. **If any step fails,** file an issue at https://github.com/garrytan/gbrain/issues with the output of `gbrain doctor` and `~/.gbrain/upgrade-errors.jsonl` if it exists.
+4. **Code indexes re-chunk once.** `CHUNKER_VERSION` moves 7 → 8 so short `const f = () =>` functions keep their own named chunk; the next sync or `gbrain embed --stale` re-chunks code pages once.
+5. **Several brains on one host:** re-run `gbrain autopilot --install` for each non-default brain (`GBRAIN_HOME=<brain parent>`), then for the default brain.
+6. **Your agent reads `skills/migrations/v0.60.28.0.md`** the next time you talk to it. The full symptom table is in [Recover after upgrading](docs/guides/repair.md#fix-wave-5).
+7. **If any step fails,** file an issue at https://github.com/garrytan/gbrain/issues with the output of `gbrain doctor` and `~/.gbrain/upgrade-errors.jsonl` if it exists.
**Say to your agent:** *"We upgraded gbrain. Restart what runs it, then walk me through what doctor finds, in order, before changing anything."* or *"Preview the stale atoms in my brain and tell me what you'd retire."*
### Behavior changes
- Session start never shows another session's activity. The `Last session activity` line and the stop-hook buffer behind it are removed, with deliberately no opt-in to restore them (#5558). Buffers an older release left in `~/.gbrain/transcripts/live/` are deleted by the stop hook after 7 days.
+- `volunteer_context` (for remote callers, honoring `search.remote_private_pages` like search), the per-turn hook block, the serve IPC `resolve` handler and `gbrain compile-context` exclude private pages, including derived-private atoms and concepts. The trusted local CLI still sees them in `volunteer_context`.
+- `CHUNKER_VERSION` 7 → 8: code pages re-chunk once.
- `POST /ingest` returns 409 `{error: "permission_denied", message, hint, docs_url}` instead of 500 when a capture's key (or waiting cap) lands on a job row from before v0.50; completed legacy keys are reused (202) and dead or cancelled ones released.
- Resubmitting over a job key from before v0.50 no longer fails: dead or cancelled keys are released, completed or failed rows are reused by local producers, and remote `submit_job` callers are refused over terminal legacy keys and resubmit with a new key.
- `gbrain repair --all`, `gbrain repair` with no kind, the remediation plan and `gbrain doctor --remediate` exclude the explicit-only kinds `stale-atoms` and `extractor-facts`: they are listed with their preview command (`explicit_kind_required`) and never run. A finding only they clear does not fail `--remediate`'s exit status.
@@ -140,6 +146,15 @@ And the leftovers. `gbrain repair stale-atoms` cleans up search atoms that quote
- **`sources writer deactivate` carries held connector items** into classic mode instead of refusing.
- **An autopilot cycle no longer stales a `sources reconcile` preview:** the reconcile policy digest ignores the cycle stamps.
+#### Ambient recall, transcripts and code intelligence (from the eval-category wave)
+
+- **Private pages stay out of ambient recall (N8).** `resolveEntitiesToPointers` applies the remote-search private-page predicate on every arm (title, slug, surname, alias, CJK), so `volunteer_context` and the turn block no longer return a private page's title or synopsis; `compile-context` no longer writes private titles and excerpts into `.claude/gbrain-context.md` or `AGENTS.md`.
+- **Open-loop nudges measure grace from the oldest unanswered message (N7).** A run that started days ago is no longer hidden by a fresh follow-up; CC-only mail does not start the clock.
+- **Bold labels are not a conversation (N12).** A body with three or more `**Name**` turns where no speaker speaks twice no longer parses as a chat.
+- **Offset timestamps import on the right day (N12).** Transcript render and the Claude export, Claude Code, Codex and OpenClaw adapters normalize offset-bearing timestamps to UTC; UTC strings pass through unchanged.
+- **Short arrow functions keep their names in code search (N13).** `const f = () =>` and function-expression declarations keep a named chunk instead of merging into a const run.
+- **Code intelligence reports resolved edges as resolved, and a walk ignores other languages' namesakes (N13).**
+
#### Models, skills and summaries
- **Claude Opus 5.5 is priced (#5359, #5494):** $4 in, $20 out per million tokens, so `--max-cost` runs on it estimate instead of failing with `no_pricing`.
diff --git a/docs/fix-wave-notes/capy-evalwave-fixes-a.md b/docs/fix-wave-notes/capy-evalwave-fixes-a.md
deleted file mode 100644
index 682976b686..0000000000
--- a/docs/fix-wave-notes/capy-evalwave-fixes-a.md
+++ /dev/null
@@ -1,118 +0,0 @@
-# Eval-category wave, fix lane A (`capy/evalwave-fixes-a`)
-
-Bugs from gbrain-evals (branches `capy/wave-n7-n8` and `capy/wave-n12-n13`,
-ledger `docs/benchmarks/2026-10-01-wave-bugs.md`). Every item has a failing
-test first (the ported repro), then a root-cause fix. No version bump or
-CHANGELOG entry: the integrator owns those.
-
-## N8-1 / N8-2 — private pages in ambient recall (privacy)
-
-`resolveEntitiesToPointers` (`src/core/context/retrieval-reflex.ts`) queried
-`pages` with no visibility predicate, so `volunteer_context` returned a
-`visibility: private` page's title and synopsis to remote callers, and the
-turn hook block (`assembleTurnContext`, turn mode) injected it.
-
-- The resolver now takes `excludePrivate` (default **true**, fail-closed) and
- applies `privatePagesFilterFragment` — the remote-search predicate,
- including derived-private atoms and concepts — on every arm: the alias
- liveness check (so a hidden page also stops counting toward alias
- uniqueness), the title/slug/surname query, alias hydration and the CJK arm.
-- `volunteer_context` passes `resolveExcludePrivatePages(ctx.engine,
- ctx.remote)`: remote callers on stdio and HTTP are filtered (honouring the
- operator's `search.remote_private_pages` opt-out exactly like search); the
- trusted local CLI still sees private pages.
-- `assembleTurnContext` turn mode passes `excludePrivate: true` explicitly
- for pointers and volunteered pages (documented world-only posture).
-- Audit of the other context/reflex paths: the serve IPC `resolve` handler,
- the direct-Postgres reflex rung, `gbrain watch` and the BrainBench adapters
- all call the resolver without the option, so they inherit the world-only
- default. `pack`/`delta` modes were already filtered (entity cards and
- `listPages({excludePrivate})`). `recall-needed.ts` already passed
- `excludePrivate: true`. **`compile-context` had the same gap**: it listed
- pages without a visibility filter and wrote private titles and excerpts
- into `.claude/gbrain-context.md` / `AGENTS.md`; every `listPages` arm in
- `compile-view.ts` now passes `excludePrivate: true`.
-- Tests: `test/reflex-private-visibility.test.ts` (title, alias, surname and
- derived-atom windows; stdio and HTTP remote callers; local presence
- control; turn block; resolver default vs explicit widen), run on PGLite and
- on Postgres via `test/e2e/reflex-private-visibility-postgres.test.ts`;
- `test/compile-view.test.ts` private-page case.
-
-## N7-1 — a nudge hid an overdue request on first sight
-
-`detectThreadLoop` measured the 24h/72h grace windows from the last message.
-They now run from the oldest message in the trailing run (substantive
-messages since the last turn flip) that carries the obligation: the first
-inbound message with me in To:, or my first outbound question. A fresh run
-stays inside grace; a run that started after my reply restarts the clock;
-CC-only mail does not start it. Corpus cases added to
-`test/google-loop-detect.test.ts`; `docs/guides/open-loops.md` states the rule.
-
-## N12-1 — bold labels parsed as a conversation
-
-New `PatternEntry.repeat_speaker_min_turns`, set to 3 on `bold-name-no-time`:
-when the parsed body has at least three turns and no speaker ever speaks
-twice, the orchestrator returns `no_match`. Density scoring cannot see this
-shape (3 of 26 lines clears the 0.05 floor). All 61 conversation-format
-fixtures (`test/fixtures/conversation-formats/*.jsonl`) give the same result
-before and after; single-line and two-turn bodies are unaffected.
-
-## N12-2 — offset timestamps re-parsed one day early
-
-`renderSessionParts`' `anchorTimestamp` paired the date sliced from the raw
-string with the UTC hour. It now takes both from the same UTC instant, and the
-session date (slug, frontmatter `date`) is normalized too. The claude-export,
-claude-code, codex and openclaw adapters normalize offset-bearing timestamps
-to UTC through the shared `utcTimestamp` helper (`transcripts/types.ts`);
-UTC strings pass through byte-identical, so existing imports do not churn.
-Test: `test/transcript-offset-timestamps.test.ts`.
-
-## N13-1 — short `const f = () =>` functions lost their names
-
-`mergeSmallSiblings` treated a function-valued `lexical declaration` as a
-mergeable const run. `declaresFunctionValue` (`chunkers/def-types.ts`) marks
-TS/JS declarations whose declarator value is an arrow function, function
-expression or generator; the chunker stamps `definesFunction` and the merge
-guard protects those chunks. Plain const value runs still merge.
-`CHUNKER_VERSION` 7 → 8 so existing indexes re-chunk (version-pin tests
-updated). Tests in `test/chunkers/code-merge-defs.test.ts`.
-
-## N13-2 — `resolved: false` on resolved edges
-
-The shared row mapper (`engine-sql/code-edges.ts`, now also used by the
-PGLite `getEdgesByChunk`) reports `resolved: true` for a `code_edges_symbol`
-row the resolver stamped with `edge_metadata.resolved_chunk_id`.
-`to_chunk_id` still reports the stored column, so two-pass retrieval is
-unchanged.
-
-## N13-3 — language gate picked an arbitrary namesake
-
-`runRecursiveWalk` read the language of one arbitrary chunk carrying the
-qualified name. It now reads every defining chunk's language and refuses only
-when none is supported. When an unsupported-language namesake shares the
-name, edges whose origin chunk is not in a supported language are dropped,
-so a Python walk does not list the Go callers. Tests:
-`test/code-intel/n13-edge-resolution.test.ts` (PGLite) and
-`test/e2e/code-intel-n13-postgres.test.ts`.
-
-Overlap note: open community PR #5835 also edits
-`src/core/code-intel/recursive-walk.ts` (remote read policy); expect a small
-textual merge there.
-
-## N12-7 — legacy pack attendance
-
-Handed to lane B (owns `link-extraction.ts` attendance and direction); not
-touched here.
-
-## Repro results (gbrain-evals scripts against this checkout)
-
-| Item | Before (3a284ae) | After |
-|---|---|---|
-| N8-1 | private page + synopsis returned to remote caller | `[]` |
-| N8-2 | block lists the private page and synopsis | `""` |
-| N7-1 | `open=[]` | `open=[["unanswered_inbound","[email protected]"]]` |
-| N12-1 | exit 1, 3 fake speakers | exit 0, `no_match` |
-| N12-2 | exit 1, re-parsed `2026-08-10T05:30Z` | exit 0, `2026-08-11T05:30Z` |
-| N13-1 | exit 1, `code_def_count: 0` | exit 0, `src/sample.ts:3` |
-| N13-2 | exit 1, `resolved: false` | exit 0, `resolved: true` |
-| N13-3 | exit 1, `unsupported_language` | exit 0, `ok` |
diff --git a/skills/migrations/v0.60.28.0.md b/skills/migrations/v0.60.28.0.md
index 2d64dc68c1..70be3f0296 100644
--- a/skills/migrations/v0.60.28.0.md
+++ b/skills/migrations/v0.60.28.0.md
@@ -12,6 +12,10 @@ authorize or cancel jobs, or change a key on the user's behalf without asking.
- Session start no longer shows a `Last session activity` line. It was taken
from whichever session on the machine wrote last (#5558). Nothing restores
it, by design.
+- Ambient recall (`volunteer_context` for remote callers, the per-turn hook
+ block) and `gbrain compile-context` no longer show private pages.
+- Code pages re-chunk once (`CHUNKER_VERSION` 7 → 8) on the next sync or
+ `gbrain embed --stale`.
- `gbrain doctor` may report `legacy_job_authority`,
`text_projection_readiness`, `atom_provenance_drift`,
`extractor_facts_expired` or `embedding_key_source`.
diff --git a/skills/skills.lock.json b/skills/skills.lock.json
index d8b6ebcb83..fa90561364 100644
--- a/skills/skills.lock.json
+++ b/skills/skills.lock.json
@@ -154,7 +154,7 @@
"migrations/v0.60.11.0.md": "ad3086df4eceff272f08bf16d674be404b97963292729b280f44268c583f77c5",
"migrations/v0.60.20.0.md": "9266863a9f76164c64a72b1be17b8ddb3bb97e1c3c5db9f666b69ebc7a228fdd",
"migrations/v0.60.26.0.md": "30d761ef5a2361bad66053f97b7b659304a591274be33e281f4f6df0d7d5566e",
- "migrations/v0.60.28.0.md": "5fb5491d60067f69dd3d49496b0ac08ac4013f473b10e7cf38b3e5c794d7c60e",
+ "migrations/v0.60.28.0.md": "f7fa936066fb188f6f3f54bb6c720f57743792e4371d0b98dd3cb5a57d1bd9c9",
"migrations/v0.60.5.0.md": "0d3ee19359a2740de08ac9ec388ddc15e7c72d663afe33832e1e54170528acab",
"migrations/v0.60.6.0.md": "1cbfca2c899e1348acbd61f0baa4c8e723b5283ff868c710c74e116c0cb6726e",
"migrations/v0.7.0.md": "97c2740445a10b1c5c7123c17dbd625fa27a94095b85d27c2b278da756c4c59a",