Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix: restore behavior-change rows after the master merge (placeholder since 0.60.270.0); regenerate the flag registry

garrytanb4ff825a1ba3
diff --git a/src/core/behavior-change-notice.ts b/src/core/behavior-change-notice.ts
index c73630fd83..eadec2ba7a 100644
--- a/src/core/behavior-change-notice.ts
+++ b/src/core/behavior-change-notice.ts
@@ -308,931 +308,623 @@ export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText }
{ since: '0.60.107.0', text: 'A quarantined page is no longer offered to automatic fact extraction (`facts_backstop.skipped: quarantined`) and its facts and takes fences are not projected; rows projected before it was quarantined stay.' },
{ since: '0.60.107.0', text: '`get_page` and `fetch` of a quarantined page carry `quarantined` (fetch: `metadata.quarantined`) and a `page_quarantined` notice, and remote callers get no body or text unless an admin-scoped caller passes `include_quarantined: true`; a quarantined `put_page` now reports `quarantined: { reason, detail }`.' },
{ since: '0.60.108.0', text: 'Managed brains now extract conversation facts from meetings, transcripts and email threads through receipted batch requests (up to 25 pages each), and record single emails, prose notes and undated pages as not extractable for good. Nothing runs on its own: preview with `gbrain extract-conversation-facts --source-id <id> --dry-run`. A run stops with `maintenance_backpressure` (exit 12) before the writer passes 80% of its request or receipt capacity; `gbrain sources writer status --json` shows it.' },
- { since: '0.60.108.0', text: 'Re-extracting a conversation page now keeps facts that an open loop or a superseding fact references, as expired history, instead of deleting them.' }One-time disclosure of the behavior changes an upgrade turns on (safety
- * notice `behavior_changes`, agent operator contract v1). Disclosure only:
- * every change stays on, nothing waits for an answer, and delivery is never
- * recorded as the user's consent.
- *
- * BEHAVIOR_CHANGES is the one table of disclosed changes, each with the
- * release that introduced it:
- * 0.60.68.0 a non-empty `chat_fallback_chain` is walked on every non-pinned
- * chat call (only when a chain is set; a remote (HTTP) caller
- * sees only that a chain is configured), managed-brain autopilot
- * lint writes its repairs, transcript re-ingest makes smaller
- * parts, the mention linker rebuilds its resume state once.
- * 0.60.74.0 fix wave 9: shell jobs reap leftover processes, the
- * declaring-pack extract_atoms auto-drain, the 90-day OAuth
- * access-token cap, the writer-status `local_process_ingress`
- * rename, `jobs work` exit codes, the longer retention of
- * unextracted corpus files.
- * 0.60.77.0 quote grounding on by default (think, syntheses, concepts,
- * patterns); forget's `similar_active` and the TypeSafe-gated
- * overnight withdrawal review.
- * 0.60.87.0 the save-before-compaction notice in Claude Code and OpenClaw
- * sessions (core memory ships off, so it is not a change).
- * A release that changes behavior appends its rows; a shipped row's release
- * never changes.
- *
- * Identity: notice id (`behavior_changes@<BEHAVIOR_NOTICE_SINCE>`, the newest
- * row's release, never the running VERSION) × brain × channel, plus the
- * authenticated client on HTTP. A release with no new rows re-notifies
- * nobody. Content: only the rows introduced after the last notice release
- * this brain × channel (× client) was shown, or after the brain's baseline
- * when it was never shown one. The baseline (the first gbrain version that
- * saw it, `0` when it already existed) is recorded once under GBRAIN_HOME:
- * `gbrain init` stamps a database it creates with this version; otherwise
- * the first look decides from the recorded upgrade history
- * (`upgrade-state.json` `from` below the newest row) or the brain's own
- * creation time (its oldest `sources.created_at` more than
- * FRESH_BRAIN_GRACE_MS ago). A fresh install sees no notice.
- *
- * Markers:
- * - CLI and stdio: one file per notice × brain × channel under
- * GBRAIN_HOME/notices/behavior-changes/, created exclusively (`wx`), so
- * concurrent processes deliver it once; the newest marker names the last
- * release shown. A home that cannot be written still gets the notice
- * (once per process).
- * - HTTP: one bounded `config` row in the brain DB
- * (`notices.behavior_changes.http`: up to HTTP_SHOWN_CAP client ids, each
- * with the release it was shown, oldest dropped first). No migration: the
- * row reuses the key/value table every brain has.
- * `gbrain doctor --only behavior_changes` reads every row newer than the
- * brain's baseline again and writes nothing.
- */
-import { createHash } from 'node:crypto';
-import { mkdirSync, readdirSync, readFileSync, writeFileSync } from 'node:fs';
-import { dirname, join } from 'node:path';
-import type { BrainEngine } from './engine.ts';
-import type { Action, Notice } from './agent-output.ts';
-import { gbrainPath, type GBrainConfig } from './config.ts';
-import { VERSION } from '../version.ts';
-import {
- CHAT_FALLBACK_PLANE_LABEL,
- chatFallbackRemovalFix,
- diagnoseChatFallbackEntry,
- readChatFallbackPlanes,
- type ChatFallbackPlane,
-} from './ai/chat-fallback-planes.ts';
-import { mergedProviderEnv } from './ai/provider-env.ts';
-import { FENCE_REPAIR_MEASURED } from './fence-repair/measured.ts';
-import { CONTENT_REPAIR_MEASURED } from './content-repair/measured.ts';
-
-/** The measured re-ingest page multiplier, as prose (scripts/measure-transcript-split-cost.ts: 4 → 27 pages on a 1 MB session). */
-export const TRANSCRIPT_REINGEST_MULTIPLIER = 'about 6.75x';
-export const BEHAVIOR_NOTICE_CODE = 'behavior_changes';
-/** A brain created this recently, with no recorded baseline, counts as a fresh install. */
-export const FRESH_BRAIN_GRACE_MS = 60 * 60 * 1000;
-export const HTTP_SHOWN_KEY = 'notices.behavior_changes.http';
-export const HTTP_SHOWN_CAP = 500;
-const CLIENT_ID_MAX = 128;
-/** The baseline recorded for a brain that existed before baselines were kept. */
-const PREDATES = '0';
-const RELEASE = /^\d+(\.\d+)*$/;
-
-export type BehaviorChannel = 'cli' | 'stdio' | 'http';
-
-/** Release order over every numeric segment (`0.60.65.0` style; missing segments are 0). */
-export function compareReleases(a: string, b: string): number {
- const pa = a.split('.').map(n => parseInt(n, 10) || 0);
- const pb = b.split('.').map(n => parseInt(n, 10) || 0);
- for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
- const d = (pa[i] ?? 0) - (pb[i] ?? 0);
- if (d !== 0) return d < 0 ? -1 : 1;
- }
- return 0;
-}
-
-function noticeDir(): string {
- return gbrainPath('notices', 'behavior-changes');
-}
-
-const safe = (s: string) => s.replace(/[^A-Za-z0-9_.-]/g, '_');
-
-/** Brain identity under GBRAIN_HOME: the brain id plus a hash of its database location (never the location itself). */
-export function behaviorBrainKey(cfg: GBrainConfig | null | undefined, brainId = 'host'): string {
- const location = cfg?.database_url ?? cfg?.database_path ?? '';
- return `${safe(brainId)}-${createHash('sha256').update(location).digest('hex').slice(0, 12)}`;
-}
-
-let brainIdMemo: Promise<string> | null = null;
-
-/** The brain id this process routes to (`--brain`, GBRAIN_BRAIN_ID, .gbrain-mount), `host` when unresolvable; resolved once per process. */
-export function currentBrainId(): Promise<string> {
- brainIdMemo ??= (async () => {
- try {
- const { resolveBrainId } = await import('./brain-resolver.ts');
- const { getCliOptions } = await import('./cli-options.ts');
- return resolveBrainId(getCliOptions().brain);
- } catch {
- return 'host';
- }
- })();
- return brainIdMemo;
-}
-
-// ── eligibility ─────────────────────────────────────────────────────────────
-
-const baselinePath = (brainKey: string) => join(noticeDir(), `${brainKey}.baseline`);
-
-function readBaseline(brainKey: string): string | null {
- try {
- const v = readFileSync(baselinePath(brainKey), 'utf8').trim();
- return RELEASE.test(v) ? v : null;
- } catch {
- return null;
- }
-}
-
-/** Record a baseline; `exclusive` keeps an existing one (first writer wins). Never throws. */
-function writeBaseline(brainKey: string, since: string, exclusive: boolean): void {
- try {
- mkdirSync(noticeDir(), { recursive: true });
- writeFileSync(baselinePath(brainKey), `${since}\n`, { mode: 0o600, flag: exclusive ? 'wx' : 'w' });
- } catch { /* unwritable home or a concurrent first writer: eligibility is re-derived next time */ }
-}
-
-/** `gbrain init` created this brain's database: it is a fresh install at this version. */
-export function stampFreshBrainBaseline(brainKey: string): void {
- writeBaseline(brainKey, VERSION, false);
-}
-
-/** `gbrain upgrade` recorded an upgrade from a release older than the newest disclosed change. */
-function upgradedAcrossRelease(): boolean {
- try {
- const state = JSON.parse(readFileSync(gbrainPath('upgrade-state.json'), 'utf8')) as { last_upgrade?: { from?: unknown } };
- const from = state.last_upgrade?.from;
- return typeof from === 'string' && compareReleases(from, BEHAVIOR_NOTICE_SINCE) < 0;
- } catch {
- return false;
- }
-}
-
-async function brainCreatedBefore(engine: BrainEngine, cutoffMs: number): Promise<boolean> {
- try {
- const rows = await engine.executeRaw<{ at: string | Date | null }>(`SELECT MIN(created_at) AS at FROM sources`);
- const at = rows[0]?.at;
- if (at === null || at === undefined) return false;
- const ms = new Date(at).getTime();
- return Number.isFinite(ms) && ms < cutoffMs;
- } catch {
- return false;
- }
-}
-
-/**
- * The brain's baseline release (`0` when it predates baselines). Reads the
- * recorded baseline; without one, derives it and (when `persist`) records it,
- * so a fresh brain stays fresh after the grace window. `persist: false`
- * (doctor) writes nothing.
- */
-export async function brainBaseline(
- engine: BrainEngine | null,
- brainKey: string,
- opts: { persist: boolean; now?: number },
-): Promise<string> {
- const recorded = readBaseline(brainKey);
- if (recorded) return recorded;
- const now = opts.now ?? Date.now();
- const predates = upgradedAcrossRelease() || (engine !== null && await brainCreatedBefore(engine, now - FRESH_BRAIN_GRACE_MS));
- const since = predates ? PREDATES : VERSION;
- if (!opts.persist) return since;
- writeBaseline(brainKey, since, true);
- return readBaseline(brainKey) ?? since;
-}
-
-const laterRelease = (a: string, b: string) => (compareReleases(a, b) >= 0 ? a : b);
-
-// ── content ─────────────────────────────────────────────────────────────────
-
-export interface ChainDisclosure {
- plane: ChatFallbackPlane;
- entries: string[];
- providers: string[];
- onRefusal: boolean;
- filePath: string;
-}
-
-/** The effective chain as disclosed to the local owner, or null when no chain is set. Never throws. */
-export async function chainDisclosure(engine: BrainEngine | null, cfg: GBrainConfig | null): Promise<ChainDisclosure | null> {
- try {
- const planes = await readChatFallbackPlanes(engine);
- if (!planes.effective) return null;
- const env = mergedProviderEnv(cfg, process.env);
- const providers = [...new Set(planes.effective.chain
- .map(entry => diagnoseChatFallbackEntry(entry, { env, userCapKeys: [] }).provider)
- .filter((p): p is string => !!p))];
- return { plane: planes.effective.plane, entries: planes.effective.chain, providers, onRefusal: planes.onRefusal.value, filePath: planes.filePath };
- } catch {
- return null;
- }
-}
-
-const DOCTOR_ARGV = ['gbrain', 'doctor', '--only', BEHAVIOR_NOTICE_CODE, '--json'];
-
-type ChangeText = string | ((chain: ChainDisclosure | null, remote: boolean) => string | null);
-
-/** Every disclosed behavior change, with the release that introduced it. Append new rows; never edit a shipped `since`. */
-export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText }> = [
- { since: '0.60.68.0', text: (chain, remote) => {
- if (!chain) return null;
- if (remote) return 'A chat fallback chain is configured on this brain host: when a chat call\'s own model fails it is retried on other models. Its entries and providers are visible to the brain host operator in gbrain doctor --only chat_fallback_chain.';
- return `chat_fallback_chain is live (set in ${CHAT_FALLBACK_PLANE_LABEL[chain.plane]}): when a chat call's own model fails${chain.onRefusal ? ' or refuses' : ''}, gbrain retries it on ${chain.entries.join(', ')}, so ${chain.providers.length ? chain.providers.join(', ') : 'those providers'} receive that traffic. ` +
- (chain.onRefusal
- ? 'It falls back on refusals as well as errors, so content one provider refused is sent to the next; `gbrain config set chat_fallback_on_refusal false` keeps outage fallback only.'
- : 'chat_fallback_on_refusal is false, so it falls back on errors only.') +
- ' Removing the chain is optional; ask the user (gbrain doctor --only chat_fallback_chain has the per-plane steps).';
- } },
- { since: '0.60.68.0', text: 'On a managed brain, autopilot\'s lint phase now writes its repairs instead of only reporting them; `gbrain config set cycle.lint_fix false` turns that off.' },
- { since: '0.60.68.0', text: `Transcript re-ingest now splits transcripts into smaller parts (45,000-byte target, previously 300,000 bytes): ${TRANSCRIPT_REINGEST_MULTIPLIER} as many part pages and about 9% more embedding tokens (measured on a 1 MB session), and each re-ingested transcript re-embeds once.` },
- { since: '0.60.68.0', text: 'The mention linker rebuilds its gazetteer resume state once, so the first mention-extraction run after upgrading rescans pages.' },
- { since: '0.60.74.0', text: 'A shell job\'s leftover processes (`cmd &` with no `wait`) are now terminated when the job ends; start long-lived processes under a service manager or detach them with `setsid`.' },
- { since: '0.60.74.0', text: 'On Postgres autopilot, a brain whose schema pack declares extract_atoms now gets the daily atom auto-drain, spending within autopilot.auto_drain.max_usd_per_day (default $2); `gbrain config set autopilot.auto_drain.enabled false` opts out.' },
- { since: '0.60.74.0', text: 'OAuth access tokens now last at most 90 days: stored client lifetimes were clamped and already-issued access tokens shortened to 90 days after issue, so a client with no refresh token reconnects; restart any running `gbrain serve --http`.' },
- { since: '0.60.74.0', text: '`gbrain sources writer status --json` renamed `ingress` to `local_process_ingress`; it describes only the process that answered.' },
- { since: '0.60.74.0', text: '`gbrain jobs work` exits 0 after a SIGTERM drain (was 143) and 17 when running claims had to be handed back.' },
- { since: '0.60.74.0', text: 'Captured session files nothing has extracted are kept up to 3x dream.synthesize.corpus_retention_days (90 days by default, was 30), so the corpus directory can use more disk; `gbrain sweep --once --budget-ms 600000` clears that backlog.' },
- { since: '0.60.77.0', text: 'think answers, saved syntheses, concept narratives and pattern pages check their quotes against their sources: a quote found nowhere loses its quotation marks and is marked [unverified]. It is not yet measured as a catch for made-up quotes. `gbrain config set think.quote_verify false` and `gbrain config set dream.quote_verify false` turn it off.' },
- { since: '0.60.77.0', text: 'forget responses list close active facts it did not withdraw (`similar_active`); with a TypeSafe key, forgetting also queues an overnight review that only proposes withdrawing rewordings (`gbrain decide proposals list`; `gbrain config set decide.slots.conflict.review_withdraw false` turns it off).' },
- { since: '0.60.78.0', text: 'On a brain with embedding turned off, search, query, recall, think and fact writes no longer send text to an embedding provider: reads run keyword-only and say so, and `gbrain doctor --json` names the enable command if the user wants semantic search back.' },
- { since: '0.60.79.0', text: 'Frontmatter is parsed as YAML 1.2: clock-like values such as `10:30` stay text (they were read as base-60 numbers, so 10:30 became 630), a leading zero is decimal (`010` is 10, not 8), `0o` marks octal, and `1_000` stays text. Re-syncing a page whose frontmatter used those forms stores the new values.' },
- { since: '0.60.87.0', text: 'Near automatic context compaction, Claude Code and OpenClaw sessions get one notice per compaction segment asking the agent to save what it needs with `remember` (up to 20 facts per call). In the held-out test it raised accuracy after compaction from 51.7% to 63.0% and cost about 28% more per question (5% more per correct answer). `gbrain config set memory.pressure.enabled false` turns it off. Always-loaded core memory is new and off; `gbrain config set memory.core.enabled true` turns it on.' },
- { since: '0.60.88.0', text: '`think` now answers with the current date (in `brain.timezone`) and each page\'s content date, so relative words like "last month" resolve against today and dates inside a page against that page. In the held-out test it raised accuracy from 74.2% to 88.2% with unchanged latency. Pass `reference_date` (MCP) or `--reference-date` (CLI) to answer as of another day.' },
- { since: '0.60.93.0', text: 'Links to pages that do not exist yet are now kept instead of dropped, including links in remote agents\' writes: `gbrain wanted` (MCP `wanted_pages`) lists them, most-linked first, and the edge appears once the page is created. Existing pages are re-extracted once to fill the list. In the held-out test no edge was lost and every withheld entity was listed. `gbrain config set wanted_pages.enabled false` turns it off.' },
- { since: '0.60.94.0', text: 'Fact extraction, dream synthesis, atom extraction and take proposals now rewrite relative dates ("last week", "3 days ago") as the actual date, resolved against when the text was written. In the held-out test, saved facts with an unresolved relative date fell from 9% to 2% with no loss in answer accuracy. Facts saved earlier keep their wording. `gbrain config set extraction.date_grounding false` turns it off.' },
- { since: '0.60.94.0', text: 'Saved facts now record who said them (you, the assistant or someone else), so an assistant recommendation is no longer saved as your plan; recall shows the speaker. In the held-out test, answers about what the assistant said rose from 44% to 96%. Expect about 41% more saved facts on assistant-heavy conversations. `gbrain config set facts.attribution false` turns it off.' },
- { since: '0.60.94.0', text: 'Facts extracted from a dated page (a meeting or daily note) are stored at the page date instead of the sync time.' }, { since: '0.60.97.0', text: 'A put_page of a new slug ending in `.md` or `.mdx` is refused with `invalid_params` naming the bare slug; a page that already exists under such a slug still updates and its response carries `slug_advisory`.' },
- { since: '0.60.97.0', text: '`gbrain config set` refuses an unregistered `search.*` or `content_sanity.*` key (exit 2) and names the nearest registered key; `--force` still writes it.' },
- { since: '0.60.97.0', text: '`gbrain transcripts ingest --facts` exits 1 when any page fails fact extraction, and `gbrain doctor --remediate` exits 1 when a repair preview failed; a plan approved while a preview failed refuses with `preview_changed` once that preview succeeds.' },
- { since: '0.60.97.0', text: 'With `facts.default_visibility` set to `world`, facts extracted from conversations are written world-visible; they were always private before.' },
- { since: '0.60.97.0', text: 'The take sanitizer no longer redacts the name or word "dan"; the uppercase acronym DAN, "dan mode" in any case and "do anything now" are still redacted.' },
- { since: '0.60.97.0', text: 'Google Calendar sync writes only events between `historyDays` back and 60 days ahead; `gbrain sync --full` removes pages for in-window events the calendar no longer lists (more than 200 is refused and reported partial).' },
- { since: '0.60.98.0', text: 'Managed sync now holds a file whose facts or takes fence cannot be imported (code `invalid_fence`; `gbrain sources status <id>` names the fence, section and rows) instead of blocking the whole source, and a source such a fence blocked before recovers on its next sync. Coordinated writes refuse such a fence with `invalid_fence` (wire `error` stays `invalid_params`, or `take_row_collision`). `gbrain config set sync.holds fail` keeps fail-closed blocking.' },
- { since: '0.60.99.0', text: 'Fixable facts and takes fences are now rewritten instead of held or refused: managed sync, put_page and the fact and take writers normalize a fence whose meaning is unambiguous (a missing end marker after the table, two-dash takes markers, zero or duplicate row numbers, header aliases, invented kinds and enum synonyms, assistant holders, percent confidences) without changing a claim or an existing row number, and managed sync commits the rewritten file. Results report `fences_normalized`; `gbrain sync --dry-run` lists `would_normalize`. `gbrain config set fences.normalize false` turns it off (such fences are then held or refused).' },
- { since: '0.60.100.0', text: '`gbrain doctor` has a new `fence_integrity` check: it counts malformed facts and takes fences still waiting (held files, stored pages, unsynced checkout files) by the tier that would fix them, and warns when a source had 20 or more fences normalized in 7 days. Each doctor run scans stored pages and source checkouts for up to 10 seconds (`GBRAIN_DOCTOR_FENCE_TIMEOUT_MS`) and resumes where it stopped; until a scan finishes the check reports partial instead of ok. New settings `fences.repair.max_usd_per_page` (0.05) and `fences.repair.max_usd_per_day` (1.00) cap model fence repair.' },
- { since: '0.60.102.0', text: `Malformed facts and takes fences are now repaired automatically: the maintenance run repairs held files and stored pages on the owner host, and its first run after upgrading repairs every malformed fence it finds in each source, rewriting and committing those files (\`gbrain doctor --only fence_integrity\` counts them; \`gbrain repair fences\` previews the plan). A fence only a rewrite can realign sends just its header and those rows, never the rest of the page, to the repair model, within $0.30 per page and $1.00 per day (\`fences.repair.max_usd_per_page\`, \`fences.repair.max_usd_per_day\`); every rewrite passes validation gates before it is written. With \`models.fence_repair\` unset, the repair model is the first model the fence-repair eval measured as accurate enough that has a provider key on the brain host (\`gbrain models\` names it); with none, model repair stays off until the user sets \`models.fence_repair\`. ${FENCE_REPAIR_MEASURED} \`gbrain config set fences.repair.llm false\` keeps fence rows away from the model; \`gbrain config set fences.repair.enabled false\` pauses automatic repair. On a managed source each repaired file is committed, so \`git revert\` undoes it (page history keeps the earlier version); turning these settings off stops future repairs and does not undo past ones.` },
- { since: '0.60.105.0', text: '`gbrain pages purge-deleted`, `cache clear|prune`, `schema use|downgrade|init|remove-*`, `integrity auto|reset-progress` and `search modes --reset` refuse an argument they would ignore (exit 2), and `--help` never runs them; preview with `gbrain pages purge-deleted --dry-run --json`.' },
- { since: '0.60.105.0', text: '`gbrain pages purge-deleted` asks first: without a terminal it exits 3 with an ask_user payload naming the `--yes` command. `gbrain call purge_deleted_pages` asks the same way; the top-level `gbrain purge-deleted` is gone.' },
- { since: '0.60.105.0', text: '`gbrain apply-migrations` exits 1 (`migrations_pending`) when it leaves the schema behind; run `gbrain apply-migrations --yes`, then `gbrain doctor --json` if that fails.' },
- { since: '0.60.105.0', text: 'Remote put_page and put_pages content with no Timeline section is refused (`timeline_rows_would_be_removed`) when it would delete dated rows; keep the section or pass `drop_timeline: true`.' },
- { since: '0.60.105.0', text: '`gbrain schema active --json` exits nonzero on `unknown_source` or `database_error`; check `gbrain sources list --json`.' },
- { since: '0.60.105.0', text: '`gbrain waiting --json` and `open_loops`: loops with no counterparty move to `no_counterparty`, and each group lists at most 5 loops (`loops_omitted` counts the rest).' },
- { since: '0.60.105.0', text: 'Frontmatter validation and `--fix` no longer flag or rewrite valid YAML (a block-scalar line shaped like `Key: "a", then "b"`); a file an earlier `gbrain frontmatter validate --fix` rewrote can be restored from its backup under ~/.gbrain/backups/frontmatter/.' },
- { since: '0.60.105.0', text: 'Facts the sweep extracts from a saved session file are dated when the file was written, not when the sweep ran; facts saved earlier keep their dates.' },
- { since: '0.60.105.0', text: 'Link extraction no longer types a link to a person, meeting or calendar page as `works_at` (or a meeting/calendar link as `founded`/`invested_in`) from a nearby role phrase; it becomes `mentions`. Existing edges change on re-extraction: `gbrain extract --stale`.' },
- { since: '0.60.105.0', text: 'In-cycle dream patterns runs are sized to the cycle budget from the last run\'s recorded cost (`dream.patterns.last_run`): a first run submits at most 25 reflections, and a run that cannot fit `min_evidence` reflections is skipped as `insufficient_cycle_budget` before any spend; `gbrain dream --phase patterns` still runs at full size.' },
- { since: '0.60.105.0', text: 'An explicit `memory.auto_writeback off` now stops every ambient capture lane: the compaction harvest (PreCompact segments and OpenClaw compactions) and SessionEnd transcripts stop extracting too, and session text banked under off is never extracted later, even after writeback is turned back on. Unset keeps both lanes running. An unreadable, drifted or unrecognized setting now holds them instead of extracting. Restart `gbrain serve`, cron or autopilot sweeps and OpenClaw gateways started on an older version; `gbrain bootstrap harness --remove` stops the hooks from banking session text at all.' },
- { since: '0.60.105.0', text: 'On a managed canonical worktree the session hooks no longer start `gbrain sources push` (it refuses there; heartbeat reason `push_managed_coordinator`), backup check no longer counts gbrain\'s `.gbrain-owner.json` as uncommitted work and points managed roots at `gbrain sources writer status --probe --json`, a root with no origin remote reads `no_remote` even after a recorded push refusal, and doctor `bootstrap_push_health` reports ok once a recorded push failure\'s tree matches its origin branch.' },
- { since: '0.60.105.0', text: 'The MCP initialize instructions are reordered so harnesses that read only the first 2,048 characters (Claude Code) get the essentials: with ambient writeback on, a one-line writeback contract now sits in the memory clause (the full rules stay last), the error protocol follows the data-not-instructions clause in a shorter form, and the forget caveat moved after the scope clause.' },
- { since: '0.60.105.0', text: '`gbrain skillpack scaffold --harness` prints its Update lens and remove hints with the `--dest`, `--scope` and `--workspace` you passed, and `gbrain skillpack reference --harness <h>` with no slug no longer exits 2 on the shared-dependency ledger entry.' },
- { since: '0.60.105.0', text: 'On a managed brain, doctor `pack_upgrade_available` is now an info row with a read-only preview instead of an apply step it could not run, and `unify-types` apply switches the pack when nothing needs retyping (it still refuses, now naming the counts, when pages would change).' },
- { since: '0.60.105.0', text: '`gbrain bootstrap harness --remove` now also deletes Claude Code hook entries that lost their `_gbrain` marker when their command is exactly what this install wrote, and lists each one it removed; a lookalike it did not write is left in place and removal exits 1 with `harness_hook_unowned`. Re-running the install converges to one entry per event instead of adding a second set. `gbrain bootstrap harness --remove --dry-run` previews the removal without writing anything.' },
- { since: '0.60.105.0', text: '`gbrain repair <kind> --apply` and `gbrain doctor --remediate` now wait for each publication with the CLI write wait (`--wait`, `GBRAIN_WRITE_WAIT_MS`, `persistence.write_wait_ms`, else 30 s) instead of 5 s, so one run repairs a slow source; `--wait 0` stops at the first pending write and the rerun resumes.' },
- { since: '0.60.105.0', text: '`gbrain sources reconcile` now identifies a private fact row by its row number and claim, so a page whose world row shares a private row\'s claim publishes instead of being refused; it now also refuses a world row that copies a stored private row\'s context (24 or more characters) verbatim, naming only the row number.' },
- { since: '0.60.105.0', text: '`gbrain repair failed-writes` now replays subagent and restricted-namespace writes (they were all refused "via subagent requires ctx.subagentId"), under the original writer\'s stored authority re-checked against its live grant; replayed writes are attributed to that original writer.' },
- { since: '0.60.105.0', text: 'Inline `[Source: ..., date]` citations no longer file an adjacent HTML comment (such as `<!-- AUTO:slack END -->`) as a timeline entry, and a timeline row carrying comment markup is never written back into a page (it would duplicate a section END marker); `gbrain repair timeline-comments --source <id>` previews and cleans rows and bullets stored before this release.' },
- { since: '0.60.105.0', text: 'On a managed brain, `gbrain files upload-raw` of a small file now refuses before creating anything (it used to leave an empty `.raw/` directory); configure a storage backend and use `gbrain files upload <file> --page <slug>`.' },
- { since: '0.60.105.0', text: 'A managed write that fails on an unexpected owner exception keeps its class, errno and source frame owner-only (the public `storage_error` message stays generic), the owner log line names the class and source frame, and `gbrain write-request <id>` (`owner_build`) says when the owner that ran it is on another build than the CLI and needs a restart.' },
- { since: '0.60.105.0', text: 'Doctor\'s new `persistence_write_stall` check warns when a managed write has held its claim longer than `persistence.max_claim_ms` (default 10 minutes) and names the stuck phase; `gbrain sources writer status --json` shows each running request\'s `claim` phase.' },
- { since: '0.60.105.0', text: 'On a brain whose managed persistence was never activated, `gbrain sources writer deactivate` now releases sources claimed before activation (the dry run lists them as `pre_activation_claims`), so classic `gbrain sync` of them works again; `gbrain sources writer deactivate --dry-run --json` previews it.' },
- { since: '0.60.105.0', text: 'Writer transfer, `gbrain sources set-path` and reclone now compare only the files Git tracks in a Git checkout, so ignored files such as `.env.local` are never read or need copying and a clean `git clone` verifies; a transfer prepared before this release is prepared again (`writer_manifest_rescope_required`), and upgrading drops the per-file path and hash maps older releases stored.' },
- { since: '0.60.105.0', text: 'A managed sync import that races a database-only write to the same page is now held with code `concurrent_write` (the sync finishes, the database version is kept) instead of leaving the source `blocked_by_failures`; `gbrain sources reconcile <source> <slug> --preview` resolves it.' },
- { since: '0.60.105.0', text: 'Hybrid search on CJK text now falls back to matching any query term when matching all terms finds too few rows (all-term matches still rank first), and its CJK keyword arm has one time budget, `search.cjk_keyword_deadline_ms` (default 3000); a cut arm reports degraded `keyword_candidates_incomplete`, so narrow with `--source-id` or raise the key.' },
- { since: '0.60.105.0', text: 'Filtered vector search on Postgres runs pgvector iterative scans in relaxed_order, which keeps closer in-filter matches strict order dropped; `gbrain config set search.hnsw_iterative_scan strict_order` and a restart of serve and autopilot restore the old mode.' },
- { since: '0.60.105.0', text: 'With retrieval feedback on, MCP search and query results carry one visible line with the answer id (`Rate after use: rate_answer { answer_id: "ans_…", rating: 1-5 }`), so hosts that hide `_meta` can still rate.' },
- { since: '0.60.105.0', text: 'Imported transcript pages now also redact a password typed after a credential label (`password: …`, `login alice / …`) as `<REDACTED:labeled_credential>`; pages imported earlier are not rewritten, so run `gbrain transcripts audit-secrets --json` to list them (doctor `transcript_secret_exposure`).' },
- { since: '0.60.106.0', text: 'A managed Git effect whose durability check fails (a git timeout, a damaged checkout, an unreadable hook) now stays queued with `git_unavailable` and retries instead of completing as `durability_not_enabled` without a commit or push; only a directory with no Git checkout at or above it reads as not durable. Check with `gbrain sources writer status --json`.' },
- { since: '0.60.106.0', text: '`gbrain embed --stale` and the embed-backfill job no longer stop when some pages still need a text projection: everything else embeds, and the blocked pages (often image pages) are counted and named with `gbrain embed --stale --images` or `gbrain sync --full`.' },
- { since: '0.60.106.0', text: '`gbrain sources reconcile` no longer refuses a page whose file name more than 100 other pages share; upgrading builds two indexes on `pages` (online on Postgres) for that check.' },
- { since: '0.60.106.0', text: 'A pending write\'s `poll_command` is now `gbrain write-request --brain <id> -- <request_id>`, the same command as the error\'s `fix`, instead of `gbrain call get_write_request ...`.' },
- { since: '0.60.106.0', text: '`gbrain quarantine clear` works on a managed brain, and `--force` records `quarantine_override` in the page frontmatter so the page stays cleared until its title, type or body changes; `quarantine scan --apply` refuses on a managed brain. Preview with `gbrain quarantine list`.' },
- { since: '0.60.106.0', text: 'An inline `[Source: A, date; B, date]` citation now files one timeline entry per dated source instead of one entry with the last date, and timeline summaries drop paired `**`, `__`, `*` and `_` emphasis markers. Rows stored under the older reading are deleted the next time their page is written or extracted, never written back into the page; a row someone gave its own detail stays. Pages nobody edits keep the old rows until the timeline prune-orphans cleanup runs (see `gbrain extract timeline --help`).' },
- { since: '0.60.106.0', text: '`gbrain edge-proposals list` now reads `--limit=N` and `--status=X` (they were ignored), and a `--limit` that is not a whole number from 1 up exits 2 instead of failing in the database or silently becoming 1.' },
- { since: '0.60.106.0', text: 'Dream atom and concept extraction no longer accept a model answer that stopped at the output cap or was refused (claude-cli included): such an answer counts as a failure, never as "nothing to extract" or a new concept narrative. On a managed brain the failed atom batch keeps the page\'s earlier atoms and waits for an approved retry (`gbrain jobs submit extract-atoms-drain --params \'{"sourceId":"<id>","retryRequestId":"<request>"}\'`); a concept that fails 3 times on unchanged atoms is skipped until they change (`gbrain config unset dream.concepts.failed_attempts` retries it now).' },
- { since: '0.60.106.0', text: 'The dream patterns breaker now counts deaths per source (`dream:patterns:source:<id>`), including runs cancelled at their timeout after paid work, so a brain whose patterns runs keep dying is refused at once after the upgrade; fix the cause, then `gbrain dream reset-key \'dream:patterns:source:<id>\'`. Pattern pages store a quarantined claim\'s reflection list once per page (`unverified_claim_sources`); the first patterns run rewrites existing pages that way (frontmatter only, no model call) before it pays for a run.' },
- { since: '0.60.106.0', text: 'Dream triage no longer re-judges a transcript every cycle after a truncated, refused or unparseable verdict: it waits 24 hours, doubling per repeat up to 7 days (`triage_unreliable_backoff`), and a content or triage-model change re-judges at once; `gbrain dream retriage --force` re-judges now and pays per file.' },
- { since: '0.60.106.0', text: 'A `gbrain dream` scoped to a source, including a bare `gbrain dream` on the default source, now also takes the brain-wide `gbrain-cycle` lease for synthesize, patterns, embed and the other brain-wide phases: while autopilot maintenance holds it, those phases are skipped as `maintenance_lock_busy` and the source phases still run, and autopilot maintenance skips its window while a dream holds it. `gbrain status --section locks --json` shows the holder.' },
- { since: '0.60.106.0', text: '`gbrain onboard --auto` (including cron runs), `doctor --remediate` and MCP `run_onboard` never submit a manual-only step: the schema-pack upgrade (`unify-types`) and the paid takes bootstrap (`extract-takes-from-pages`) are listed under `manual_only_skipped` with the command to run them yourself. A job of either kind an earlier run already queued still runs: find it with `gbrain jobs list --status waiting` and cancel it with `gbrain jobs cancel <id>` if you did not want it.' },
- { since: '0.60.106.0', text: '`gbrain reindex --markdown` asks before re-embedding (paid): without a terminal it exits 3 with an ask_user payload naming the page count, the estimate and the `--yes` command; `--yes` or `--max-usd <usd>` approves it, and `--dry-run`, `--no-embed` and a keyless brain never ask. A queued `reindex` job re-embeds only with the approval stored at submit time (`gbrain jobs submit reindex ... --yes`, or the search-mode switch prompt); one queued without it fails with `confirmation_required`.' },
- { since: '0.60.107.0', text: 'Search-hiding and other gate-owned frontmatter keys (`quarantine`, `content_flag`, `embed_skip`, `atoms_scan_hash`, `quarantine_override`) in a local `put_page`, a connector, an ingest event or any other non-owner write are now stripped instead of kept; sync and import of your own files, reindex, repair and `gbrain quarantine clear` keep them.' },
- { since: '0.60.107.0', text: 'A quarantined page is no longer offered to automatic fact extraction (`facts_backstop.skipped: quarantined`) and its facts and takes fences are not projected; rows projected before it was quarantined stay.' },
- { since: '0.60.107.0', text: '`get_page` and `fetch` of a quarantined page carry `quarantined` (fetch: `metadata.quarantined`) and a `page_quarantined` notice, and remote callers get no body or text unless an admin-scoped caller passes `include_quarantined: true`; a quarantined `put_page` now reports `quarantined: { reason, detail }`.' },
- { since: '0.60.108.0', text: 'Managed brains now extract conversation facts from meetings, transcripts and email threads through receipted batch requests (up to 25 pages each), and record single emails, prose notes and undated pages as not extractable for good. Nothing runs on its own: preview with `gbrain extract-conversation-facts --source-id <id> --dry-run`. A run stops with `maintenance_backpressure` (exit 12) before the writer passes 80% of its request or receipt capacity; `gbrain sources writer status --json` shows it.' },
- { since: '0.60.108.0', text: 'Re-extracting a conversation page now keeps facts that an open loop or a superseding fact references, as expired history, instead of deleting them.' }ime disclosure of the behavior changes an upgrade turns on (safety
- * notice `behavior_changes`, agent operator contract v1). Disclosure only:
- * every change stays on, nothing waits for an answer, and delivery is never
- * recorded as the user's consent.
- *
- * BEHAVIOR_CHANGES is the one table of disclosed changes, each with the
- * release that introduced it:
- * 0.60.68.0 a non-empty `chat_fallback_chain` is walked on every non-pinned
- * chat call (only when a chain is set; a remote (HTTP) caller
- * sees only that a chain is configured), managed-brain autopilot
- * lint writes its repairs, transcript re-ingest makes smaller
- * parts, the mention linker rebuilds its resume state once.
- * 0.60.74.0 fix wave 9: shell jobs reap leftover processes, the
- * declaring-pack extract_atoms auto-drain, the 90-day OAuth
- * access-token cap, the writer-status `local_process_ingress`
- * rename, `jobs work` exit codes, the longer retention of
- * unextracted corpus files.
- * 0.60.77.0 quote grounding on by default (think, syntheses, concepts,
- * patterns); forget's `similar_active` and the TypeSafe-gated
- * overnight withdrawal review.
- * 0.60.87.0 the save-before-compaction notice in Claude Code and OpenClaw
- * sessions (core memory ships off, so it is not a change).
- * A release that changes behavior appends its rows; a shipped row's release
- * never changes.
- *
- * Identity: notice id (`behavior_changes@<BEHAVIOR_NOTICE_SINCE>`, the newest
- * row's release, never the running VERSION) × brain × channel, plus the
- * authenticated client on HTTP. A release with no new rows re-notifies
- * nobody. Content: only the rows introduced after the last notice release
- * this brain × channel (× client) was shown, or after the brain's baseline
- * when it was never shown one. The baseline (the first gbrain version that
- * saw it, `0` when it already existed) is recorded once under GBRAIN_HOME:
- * `gbrain init` stamps a database it creates with this version; otherwise
- * the first look decides from the recorded upgrade history
- * (`upgrade-state.json` `from` below the newest row) or the brain's own
- * creation time (its oldest `sources.created_at` more than
- * FRESH_BRAIN_GRACE_MS ago). A fresh install sees no notice.
- *
- * Markers:
- * - CLI and stdio: one file per notice × brain × channel under
- * GBRAIN_HOME/notices/behavior-changes/, created exclusively (`wx`), so
- * concurrent processes deliver it once; the newest marker names the last
- * release shown. A home that cannot be written still gets the notice
- * (once per process).
- * - HTTP: one bounded `config` row in the brain DB
- * (`notices.behavior_changes.http`: up to HTTP_SHOWN_CAP client ids, each
- * with the release it was shown, oldest dropped first). No migration: the
- * row reuses the key/value table every brain has.
- * `gbrain doctor --only behavior_changes` reads every row newer than the
- * brain's baseline again and writes nothing.
- */
-import { createHash } from 'node:crypto';
-import { mkdirSync, readdirSync, readFileSync, writeFileSync } from 'node:fs';
-import { dirname, join } from 'node:path';
-import type { BrainEngine } from './engine.ts';
-import type { Action, Notice } from './agent-output.ts';
-import { gbrainPath, type GBrainConfig } from './config.ts';
-import { VERSION } from '../version.ts';
-import {
- CHAT_FALLBACK_PLANE_LABEL,
- chatFallbackRemovalFix,
- diagnoseChatFallbackEntry,
- readChatFallbackPlanes,
- type ChatFallbackPlane,
-} from './ai/chat-fallback-planes.ts';
-import { mergedProviderEnv } from './ai/provider-env.ts';
-import { FENCE_REPAIR_MEASURED } from './fence-repair/measured.ts';
-import { CONTENT_REPAIR_MEASURED } from './content-repair/measured.ts';
-
-/** The measured re-ingest page multiplier, as prose (scripts/measure-transcript-split-cost.ts: 4 → 27 pages on a 1 MB session). */
-export const TRANSCRIPT_REINGEST_MULTIPLIER = 'about 6.75x';
-export const BEHAVIOR_NOTICE_CODE = 'behavior_changes';
-/** A brain created this recently, with no recorded baseline, counts as a fresh install. */
-export const FRESH_BRAIN_GRACE_MS = 60 * 60 * 1000;
-export const HTTP_SHOWN_KEY = 'notices.behavior_changes.http';
-export const HTTP_SHOWN_CAP = 500;
-const CLIENT_ID_MAX = 128;
-/** The baseline recorded for a brain that existed before baselines were kept. */
-const PREDATES = '0';
-const RELEASE = /^\d+(\.\d+)*$/;
-
-export type BehaviorChannel = 'cli' | 'stdio' | 'http';
-
-/** Release order over every numeric segment (`0.60.65.0` style; missing segments are 0). */
-export function compareReleases(a: string, b: string): number {
- const pa = a.split('.').map(n => parseInt(n, 10) || 0);
- const pb = b.split('.').map(n => parseInt(n, 10) || 0);
- for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
- const d = (pa[i] ?? 0) - (pb[i] ?? 0);
- if (d !== 0) return d < 0 ? -1 : 1;
- }
- return 0;
-}
-
-function noticeDir(): string {
- return gbrainPath('notices', 'behavior-changes');
-}
-
-const safe = (s: string) => s.replace(/[^A-Za-z0-9_.-]/g, '_');
-
-/** Brain identity under GBRAIN_HOME: the brain id plus a hash of its database location (never the location itself). */
-export function behaviorBrainKey(cfg: GBrainConfig | null | undefined, brainId = 'host'): string {
- const location = cfg?.database_url ?? cfg?.database_path ?? '';
- return `${safe(brainId)}-${createHash('sha256').update(location).digest('hex').slice(0, 12)}`;
-}
-
-let brainIdMemo: Promise<string> | null = null;
-
-/** The brain id this process routes to (`--brain`, GBRAIN_BRAIN_ID, .gbrain-mount), `host` when unresolvable; resolved once per process. */
-export function currentBrainId(): Promise<string> {
- brainIdMemo ??= (async () => {
- try {
- const { resolveBrainId } = await import('./brain-resolver.ts');
- const { getCliOptions } = await import('./cli-options.ts');
- return resolveBrainId(getCliOptions().brain);
- } catch {
- return 'host';
- }
- })();
- return brainIdMemo;
-}
-
-// ── eligibility ─────────────────────────────────────────────────────────────
-
-const baselinePath = (brainKey: string) => join(noticeDir(), `${brainKey}.baseline`);
-
-function readBaseline(brainKey: string): string | null {
- try {
- const v = readFileSync(baselinePath(brainKey), 'utf8').trim();
- return RELEASE.test(v) ? v : null;
- } catch {
- return null;
- }
-}
-
-/** Record a baseline; `exclusive` keeps an existing one (first writer wins). Never throws. */
-function writeBaseline(brainKey: string, since: string, exclusive: boolean): void {
- try {
- mkdirSync(noticeDir(), { recursive: true });
- writeFileSync(baselinePath(brainKey), `${since}\n`, { mode: 0o600, flag: exclusive ? 'wx' : 'w' });
- } catch { /* unwritable home or a concurrent first writer: eligibility is re-derived next time */ }
-}
-
-/** `gbrain init` created this brain's database: it is a fresh install at this version. */
-export function stampFreshBrainBaseline(brainKey: string): void {
- writeBaseline(brainKey, VERSION, false);
-}
-
-/** `gbrain upgrade` recorded an upgrade from a release older than the newest disclosed change. */
-function upgradedAcrossRelease(): boolean {
- try {
- const state = JSON.parse(readFileSync(gbrainPath('upgrade-state.json'), 'utf8')) as { last_upgrade?: { from?: unknown } };
- const from = state.last_upgrade?.from;
- return typeof from === 'string' && compareReleases(from, BEHAVIOR_NOTICE_SINCE) < 0;
- } catch {
- return false;
- }
-}
-
-async function brainCreatedBefore(engine: BrainEngine, cutoffMs: number): Promise<boolean> {
- try {
- const rows = await engine.executeRaw<{ at: string | Date | null }>(`SELECT MIN(created_at) AS at FROM sources`);
- const at = rows[0]?.at;
- if (at === null || at === undefined) return false;
- const ms = new Date(at).getTime();
- return Number.isFinite(ms) && ms < cutoffMs;
- } catch {
- return false;
- }
-}
-
-/**
- * The brain's baseline release (`0` when it predates baselines). Reads the
- * recorded baseline; without one, derives it and (when `persist`) records it,
- * so a fresh brain stays fresh after the grace window. `persist: false`
- * (doctor) writes nothing.
- */
-export async function brainBaseline(
- engine: BrainEngine | null,
- brainKey: string,
- opts: { persist: boolean; now?: number },
-): Promise<string> {
- const recorded = readBaseline(brainKey);
- if (recorded) return recorded;
- const now = opts.now ?? Date.now();
- const predates = upgradedAcrossRelease() || (engine !== null && await brainCreatedBefore(engine, now - FRESH_BRAIN_GRACE_MS));
- const since = predates ? PREDATES : VERSION;
- if (!opts.persist) return since;
- writeBaseline(brainKey, since, true);
- return readBaseline(brainKey) ?? since;
-}
-
-const laterRelease = (a: string, b: string) => (compareReleases(a, b) >= 0 ? a : b);
-
-// ── content ─────────────────────────────────────────────────────────────────
-
-export interface ChainDisclosure {
- plane: ChatFallbackPlane;
- entries: string[];
- providers: string[];
- onRefusal: boolean;
- filePath: string;
-}
-
-/** The effective chain as disclosed to the local owner, or null when no chain is set. Never throws. */
-export async function chainDisclosure(engine: BrainEngine | null, cfg: GBrainConfig | null): Promise<ChainDisclosure | null> {
- try {
- const planes = await readChatFallbackPlanes(engine);
- if (!planes.effective) return null;
- const env = mergedProviderEnv(cfg, process.env);
- const providers = [...new Set(planes.effective.chain
- .map(entry => diagnoseChatFallbackEntry(entry, { env, userCapKeys: [] }).provider)
- .filter((p): p is string => !!p))];
- return { plane: planes.effective.plane, entries: planes.effective.chain, providers, onRefusal: planes.onRefusal.value, filePath: planes.filePath };
- } catch {
- return null;
- }
-}
-
-const DOCTOR_ARGV = ['gbrain', 'doctor', '--only', BEHAVIOR_NOTICE_CODE, '--json'];
-
-type ChangeText = string | ((chain: ChainDisclosure | null, remote: boolean) => string | null);
-
-/** Every disclosed behavior change, with the release that introduced it. Append new rows; never edit a shipped `since`. */
-export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText }> = [
- { since: '0.60.68.0', text: (chain, remote) => {
- if (!chain) return null;
- if (remote) return 'A chat fallback chain is configured on this brain host: when a chat call\'s own model fails it is retried on other models. Its entries and providers are visible to the brain host operator in gbrain doctor --only chat_fallback_chain.';
- return `chat_fallback_chain is live (set in ${CHAT_FALLBACK_PLANE_LABEL[chain.plane]}): when a chat call's own model fails${chain.onRefusal ? ' or refuses' : ''}, gbrain retries it on ${chain.entries.join(', ')}, so ${chain.providers.length ? chain.providers.join(', ') : 'those providers'} receive that traffic. ` +
- (chain.onRefusal
- ? 'It falls back on refusals as well as errors, so content one provider refused is sent to the next; `gbrain config set chat_fallback_on_refusal false` keeps outage fallback only.'
- : 'chat_fallback_on_refusal is false, so it falls back on errors only.') +
- ' Removing the chain is optional; ask the user (gbrain doctor --only chat_fallback_chain has the per-plane steps).';
- } },
- { since: '0.60.68.0', text: 'On a managed brain, autopilot\'s lint phase now writes its repairs instead of only reporting them; `gbrain config set cycle.lint_fix false` turns that off.' },
- { since: '0.60.68.0', text: `Transcript re-ingest now splits transcripts into smaller parts (45,000-byte target, previously 300,000 bytes): ${TRANSCRIPT_REINGEST_MULTIPLIER} as many part pages and about 9% more embedding tokens (measured on a 1 MB session), and each re-ingested transcript re-embeds once.` },
- { since: '0.60.68.0', text: 'The mention linker rebuilds its gazetteer resume state once, so the first mention-extraction run after upgrading rescans pages.' },
- { since: '0.60.74.0', text: 'A shell job\'s leftover processes (`cmd &` with no `wait`) are now terminated when the job ends; start long-lived processes under a service manager or detach them with `setsid`.' },
- { since: '0.60.74.0', text: 'On Postgres autopilot, a brain whose schema pack declares extract_atoms now gets the daily atom auto-drain, spending within autopilot.auto_drain.max_usd_per_day (default $2); `gbrain config set autopilot.auto_drain.enabled false` opts out.' },
- { since: '0.60.74.0', text: 'OAuth access tokens now last at most 90 days: stored client lifetimes were clamped and already-issued access tokens shortened to 90 days after issue, so a client with no refresh token reconnects; restart any running `gbrain serve --http`.' },
- { since: '0.60.74.0', text: '`gbrain sources writer status --json` renamed `ingress` to `local_process_ingress`; it describes only the process that answered.' },
- { since: '0.60.74.0', text: '`gbrain jobs work` exits 0 after a SIGTERM drain (was 143) and 17 when running claims had to be handed back.' },
- { since: '0.60.74.0', text: 'Captured session files nothing has extracted are kept up to 3x dream.synthesize.corpus_retention_days (90 days by default, was 30), so the corpus directory can use more disk; `gbrain sweep --once --budget-ms 600000` clears that backlog.' },
- { since: '0.60.77.0', text: 'think answers, saved syntheses, concept narratives and pattern pages check their quotes against their sources: a quote found nowhere loses its quotation marks and is marked [unverified]. It is not yet measured as a catch for made-up quotes. `gbrain config set think.quote_verify false` and `gbrain config set dream.quote_verify false` turn it off.' },
- { since: '0.60.77.0', text: 'forget responses list close active facts it did not withdraw (`similar_active`); with a TypeSafe key, forgetting also queues an overnight review that only proposes withdrawing rewordings (`gbrain decide proposals list`; `gbrain config set decide.slots.conflict.review_withdraw false` turns it off).' },
- { since: '0.60.78.0', text: 'On a brain with embedding turned off, search, query, recall, think and fact writes no longer send text to an embedding provider: reads run keyword-only and say so, and `gbrain doctor --json` names the enable command if the user wants semantic search back.' },
- { since: '0.60.79.0', text: 'Frontmatter is parsed as YAML 1.2: clock-like values such as `10:30` stay text (they were read as base-60 numbers, so 10:30 became 630), a leading zero is decimal (`010` is 10, not 8), `0o` marks octal, and `1_000` stays text. Re-syncing a page whose frontmatter used those forms stores the new values.' },
- { since: '0.60.87.0', text: 'Near automatic context compaction, Claude Code and OpenClaw sessions get one notice per compaction segment asking the agent to save what it needs with `remember` (up to 20 facts per call). In the held-out test it raised accuracy after compaction from 51.7% to 63.0% and cost about 28% more per question (5% more per correct answer). `gbrain config set memory.pressure.enabled false` turns it off. Always-loaded core memory is new and off; `gbrain config set memory.core.enabled true` turns it on.' },
- { since: '0.60.88.0', text: '`think` now answers with the current date (in `brain.timezone`) and each page\'s content date, so relative words like "last month" resolve against today and dates inside a page against that page. In the held-out test it raised accuracy from 74.2% to 88.2% with unchanged latency. Pass `reference_date` (MCP) or `--reference-date` (CLI) to answer as of another day.' },
- { since: '0.60.93.0', text: 'Links to pages that do not exist yet are now kept instead of dropped, including links in remote agents\' writes: `gbrain wanted` (MCP `wanted_pages`) lists them, most-linked first, and the edge appears once the page is created. Existing pages are re-extracted once to fill the list. In the held-out test no edge was lost and every withheld entity was listed. `gbrain config set wanted_pages.enabled false` turns it off.' },
- { since: '0.60.94.0', text: 'Fact extraction, dream synthesis, atom extraction and take proposals now rewrite relative dates ("last week", "3 days ago") as the actual date, resolved against when the text was written. In the held-out test, saved facts with an unresolved relative date fell from 9% to 2% with no loss in answer accuracy. Facts saved earlier keep their wording. `gbrain config set extraction.date_grounding false` turns it off.' },
- { since: '0.60.94.0', text: 'Saved facts now record who said them (you, the assistant or someone else), so an assistant recommendation is no longer saved as your plan; recall shows the speaker. In the held-out test, answers about what the assistant said rose from 44% to 96%. Expect about 41% more saved facts on assistant-heavy conversations. `gbrain config set facts.attribution false` turns it off.' },
- { since: '0.60.94.0', text: 'Facts extracted from a dated page (a meeting or daily note) are stored at the page date instead of the sync time.' }, { since: '0.60.97.0', text: 'A put_page of a new slug ending in `.md` or `.mdx` is refused with `invalid_params` naming the bare slug; a page that already exists under such a slug still updates and its response carries `slug_advisory`.' },
- { since: '0.60.97.0', text: '`gbrain config set` refuses an unregistered `search.*` or `content_sanity.*` key (exit 2) and names the nearest registered key; `--force` still writes it.' },
- { since: '0.60.97.0', text: '`gbrain transcripts ingest --facts` exits 1 when any page fails fact extraction, and `gbrain doctor --remediate` exits 1 when a repair preview failed; a plan approved while a preview failed refuses with `preview_changed` once that preview succeeds.' },
- { since: '0.60.97.0', text: 'With `facts.default_visibility` set to `world`, facts extracted from conversations are written world-visible; they were always private before.' },
- { since: '0.60.97.0', text: 'The take sanitizer no longer redacts the name or word "dan"; the uppercase acronym DAN, "dan mode" in any case and "do anything now" are still redacted.' },
- { since: '0.60.97.0', text: 'Google Calendar sync writes only events between `historyDays` back and 60 days ahead; `gbrain sync --full` removes pages for in-window events the calendar no longer lists (more than 200 is refused and reported partial).' },
- { since: '0.60.98.0', text: 'Managed sync now holds a file whose facts or takes fence cannot be imported (code `invalid_fence`; `gbrain sources status <id>` names the fence, section and rows) instead of blocking the whole source, and a source such a fence blocked before recovers on its next sync. Coordinated writes refuse such a fence with `invalid_fence` (wire `error` stays `invalid_params`, or `take_row_collision`). `gbrain config set sync.holds fail` keeps fail-closed blocking.' },
- { since: '0.60.99.0', text: 'Fixable facts and takes fences are now rewritten instead of held or refused: managed sync, put_page and the fact and take writers normalize a fence whose meaning is unambiguous (a missing end marker after the table, two-dash takes markers, zero or duplicate row numbers, header aliases, invented kinds and enum synonyms, assistant holders, percent confidences) without changing a claim or an existing row number, and managed sync commits the rewritten file. Results report `fences_normalized`; `gbrain sync --dry-run` lists `would_normalize`. `gbrain config set fences.normalize false` turns it off (such fences are then held or refused).' },
- { since: '0.60.100.0', text: '`gbrain doctor` has a new `fence_integrity` check: it counts malformed facts and takes fences still waiting (held files, stored pages, unsynced checkout files) by the tier that would fix them, and warns when a source had 20 or more fences normalized in 7 days. Each doctor run scans stored pages and source checkouts for up to 10 seconds (`GBRAIN_DOCTOR_FENCE_TIMEOUT_MS`) and resumes where it stopped; until a scan finishes the check reports partial instead of ok. New settings `fences.repair.max_usd_per_page` (0.05) and `fences.repair.max_usd_per_day` (1.00) cap model fence repair.' },
- { since: '0.60.102.0', text: `Malformed facts and takes fences are now repaired automatically: the maintenance run repairs held files and stored pages on the owner host, and its first run after upgrading repairs every malformed fence it finds in each source, rewriting and committing those files (\`gbrain doctor --only fence_integrity\` counts them; \`gbrain repair fences\` previews the plan). A fence only a rewrite can realign sends just its header and those rows, never the rest of the page, to the repair model, within $0.30 per page and $1.00 per day (\`fences.repair.max_usd_per_page\`, \`fences.repair.max_usd_per_day\`); every rewrite passes validation gates before it is written. With \`models.fence_repair\` unset, the repair model is the first model the fence-repair eval measured as accurate enough that has a provider key on the brain host (\`gbrain models\` names it); with none, model repair stays off until the user sets \`models.fence_repair\`. ${FENCE_REPAIR_MEASURED} \`gbrain config set fences.repair.llm false\` keeps fence rows away from the model; \`gbrain config set fences.repair.enabled false\` pauses automatic repair. On a managed source each repaired file is committed, so \`git revert\` undoes it (page history keeps the earlier version); turning these settings off stops future repairs and does not undo past ones.` },
- { since: '0.60.105.0', text: '`gbrain pages purge-deleted`, `cache clear|prune`, `schema use|downgrade|init|remove-*`, `integrity auto|reset-progress` and `search modes --reset` refuse an argument they would ignore (exit 2), and `--help` never runs them; preview with `gbrain pages purge-deleted --dry-run --json`.' },
- { since: '0.60.105.0', text: '`gbrain pages purge-deleted` asks first: without a terminal it exits 3 with an ask_user payload naming the `--yes` command. `gbrain call purge_deleted_pages` asks the same way; the top-level `gbrain purge-deleted` is gone.' },
- { since: '0.60.105.0', text: '`gbrain apply-migrations` exits 1 (`migrations_pending`) when it leaves the schema behind; run `gbrain apply-migrations --yes`, then `gbrain doctor --json` if that fails.' },
- { since: '0.60.105.0', text: 'Remote put_page and put_pages content with no Timeline section is refused (`timeline_rows_would_be_removed`) when it would delete dated rows; keep the section or pass `drop_timeline: true`.' },
- { since: '0.60.105.0', text: '`gbrain schema active --json` exits nonzero on `unknown_source` or `database_error`; check `gbrain sources list --json`.' },
- { since: '0.60.105.0', text: '`gbrain waiting --json` and `open_loops`: loops with no counterparty move to `no_counterparty`, and each group lists at most 5 loops (`loops_omitted` counts the rest).' },
- { since: '0.60.105.0', text: 'Frontmatter validation and `--fix` no longer flag or rewrite valid YAML (a block-scalar line shaped like `Key: "a", then "b"`); a file an earlier `gbrain frontmatter validate --fix` rewrote can be restored from its backup under ~/.gbrain/backups/frontmatter/.' },
- { since: '0.60.105.0', text: 'Facts the sweep extracts from a saved session file are dated when the file was written, not when the sweep ran; facts saved earlier keep their dates.' },
- { since: '0.60.105.0', text: 'Link extraction no longer types a link to a person, meeting or calendar page as `works_at` (or a meeting/calendar link as `founded`/`invested_in`) from a nearby role phrase; it becomes `mentions`. Existing edges change on re-extraction: `gbrain extract --stale`.' },
- { since: '0.60.105.0', text: 'In-cycle dream patterns runs are sized to the cycle budget from the last run\'s recorded cost (`dream.patterns.last_run`): a first run submits at most 25 reflections, and a run that cannot fit `min_evidence` reflections is skipped as `insufficient_cycle_budget` before any spend; `gbrain dream --phase patterns` still runs at full size.' },
- { since: '0.60.105.0', text: 'An explicit `memory.auto_writeback off` now stops every ambient capture lane: the compaction harvest (PreCompact segments and OpenClaw compactions) and SessionEnd transcripts stop extracting too, and session text banked under off is never extracted later, even after writeback is turned back on. Unset keeps both lanes running. An unreadable, drifted or unrecognized setting now holds them instead of extracting. Restart `gbrain serve`, cron or autopilot sweeps and OpenClaw gateways started on an older version; `gbrain bootstrap harness --remove` stops the hooks from banking session text at all.' },
- { since: '0.60.105.0', text: 'On a managed canonical worktree the session hooks no longer start `gbrain sources push` (it refuses there; heartbeat reason `push_managed_coordinator`), backup check no longer counts gbrain\'s `.gbrain-owner.json` as uncommitted work and points managed roots at `gbrain sources writer status --probe --json`, a root with no origin remote reads `no_remote` even after a recorded push refusal, and doctor `bootstrap_push_health` reports ok once a recorded push failure\'s tree matches its origin branch.' },
- { since: '0.60.105.0', text: 'The MCP initialize instructions are reordered so harnesses that read only the first 2,048 characters (Claude Code) get the essentials: with ambient writeback on, a one-line writeback contract now sits in the memory clause (the full rules stay last), the error protocol follows the data-not-instructions clause in a shorter form, and the forget caveat moved after the scope clause.' },
- { since: '0.60.105.0', text: '`gbrain skillpack scaffold --harness` prints its Update lens and remove hints with the `--dest`, `--scope` and `--workspace` you passed, and `gbrain skillpack reference --harness <h>` with no slug no longer exits 2 on the shared-dependency ledger entry.' },
- { since: '0.60.105.0', text: 'On a managed brain, doctor `pack_upgrade_available` is now an info row with a read-only preview instead of an apply step it could not run, and `unify-types` apply switches the pack when nothing needs retyping (it still refuses, now naming the counts, when pages would change).' },
- { since: '0.60.105.0', text: '`gbrain bootstrap harness --remove` now also deletes Claude Code hook entries that lost their `_gbrain` marker when their command is exactly what this install wrote, and lists each one it removed; a lookalike it did not write is left in place and removal exits 1 with `harness_hook_unowned`. Re-running the install converges to one entry per event instead of adding a second set. `gbrain bootstrap harness --remove --dry-run` previews the removal without writing anything.' },
- { since: '0.60.105.0', text: '`gbrain repair <kind> --apply` and `gbrain doctor --remediate` now wait for each publication with the CLI write wait (`--wait`, `GBRAIN_WRITE_WAIT_MS`, `persistence.write_wait_ms`, else 30 s) instead of 5 s, so one run repairs a slow source; `--wait 0` stops at the first pending write and the rerun resumes.' },
- { since: '0.60.105.0', text: '`gbrain sources reconcile` now identifies a private fact row by its row number and claim, so a page whose world row shares a private row\'s claim publishes instead of being refused; it now also refuses a world row that copies a stored private row\'s context (24 or more characters) verbatim, naming only the row number.' },
- { since: '0.60.105.0', text: '`gbrain repair failed-writes` now replays subagent and restricted-namespace writes (they were all refused "via subagent requires ctx.subagentId"), under the original writer\'s stored authority re-checked against its live grant; replayed writes are attributed to that original writer.' },
- { since: '0.60.105.0', text: 'Inline `[Source: ..., date]` citations no longer file an adjacent HTML comment (such as `<!-- AUTO:slack END -->`) as a timeline entry, and a timeline row carrying comment markup is never written back into a page (it would duplicate a section END marker); `gbrain repair timeline-comments --source <id>` previews and cleans rows and bullets stored before this release.' },
- { since: '0.60.105.0', text: 'On a managed brain, `gbrain files upload-raw` of a small file now refuses before creating anything (it used to leave an empty `.raw/` directory); configure a storage backend and use `gbrain files upload <file> --page <slug>`.' },
- { since: '0.60.105.0', text: 'A managed write that fails on an unexpected owner exception keeps its class, errno and source frame owner-only (the public `storage_error` message stays generic), the owner log line names the class and source frame, and `gbrain write-request <id>` (`owner_build`) says when the owner that ran it is on another build than the CLI and needs a restart.' },
- { since: '0.60.105.0', text: 'Doctor\'s new `persistence_write_stall` check warns when a managed write has held its claim longer than `persistence.max_claim_ms` (default 10 minutes) and names the stuck phase; `gbrain sources writer status --json` shows each running request\'s `claim` phase.' },
- { since: '0.60.105.0', text: 'On a brain whose managed persistence was never activated, `gbrain sources writer deactivate` now releases sources claimed before activation (the dry run lists them as `pre_activation_claims`), so classic `gbrain sync` of them works again; `gbrain sources writer deactivate --dry-run --json` previews it.' },
- { since: '0.60.105.0', text: 'Writer transfer, `gbrain sources set-path` and reclone now compare only the files Git tracks in a Git checkout, so ignored files such as `.env.local` are never read or need copying and a clean `git clone` verifies; a transfer prepared before this release is prepared again (`writer_manifest_rescope_required`), and upgrading drops the per-file path and hash maps older releases stored.' },
- { since: '0.60.105.0', text: 'A managed sync import that races a database-only write to the same page is now held with code `concurrent_write` (the sync finishes, the database version is kept) instead of leaving the source `blocked_by_failures`; `gbrain sources reconcile <source> <slug> --preview` resolves it.' },
- { since: '0.60.105.0', text: 'Hybrid search on CJK text now falls back to matching any query term when matching all terms finds too few rows (all-term matches still rank first), and its CJK keyword arm has one time budget, `search.cjk_keyword_deadline_ms` (default 3000); a cut arm reports degraded `keyword_candidates_incomplete`, so narrow with `--source-id` or raise the key.' },
- { since: '0.60.105.0', text: 'Filtered vector search on Postgres runs pgvector iterative scans in relaxed_order, which keeps closer in-filter matches strict order dropped; `gbrain config set search.hnsw_iterative_scan strict_order` and a restart of serve and autopilot restore the old mode.' },
- { since: '0.60.105.0', text: 'With retrieval feedback on, MCP search and query results carry one visible line with the answer id (`Rate after use: rate_answer { answer_id: "ans_…", rating: 1-5 }`), so hosts that hide `_meta` can still rate.' },
- { since: '0.60.105.0', text: 'Imported transcript pages now also redact a password typed after a credential label (`password: …`, `login alice / …`) as `<REDACTED:labeled_credential>`; pages imported earlier are not rewritten, so run `gbrain transcripts audit-secrets --json` to list them (doctor `transcript_secret_exposure`).' },
- { since: '0.60.106.0', text: 'A managed Git effect whose durability check fails (a git timeout, a damaged checkout, an unreadable hook) now stays queued with `git_unavailable` and retries instead of completing as `durability_not_enabled` without a commit or push; only a directory with no Git checkout at or above it reads as not durable. Check with `gbrain sources writer status --json`.' },
- { since: '0.60.106.0', text: '`gbrain embed --stale` and the embed-backfill job no longer stop when some pages still need a text projection: everything else embeds, and the blocked pages (often image pages) are counted and named with `gbrain embed --stale --images` or `gbrain sync --full`.' },
- { since: '0.60.106.0', text: '`gbrain sources reconcile` no longer refuses a page whose file name more than 100 other pages share; upgrading builds two indexes on `pages` (online on Postgres) for that check.' },
- { since: '0.60.106.0', text: 'A pending write\'s `poll_command` is now `gbrain write-request --brain <id> -- <request_id>`, the same command as the error\'s `fix`, instead of `gbrain call get_write_request ...`.' },
- { since: '0.60.106.0', text: '`gbrain quarantine clear` works on a managed brain, and `--force` records `quarantine_override` in the page frontmatter so the page stays cleared until its title, type or body changes; `quarantine scan --apply` refuses on a managed brain. Preview with `gbrain quarantine list`.' },
- { since: '0.60.106.0', text: 'An inline `[Source: A, date; B, date]` citation now files one timeline entry per dated source instead of one entry with the last date, and timeline summaries drop paired `**`, `__`, `*` and `_` emphasis markers. Rows stored under the older reading are deleted the next time their page is written or extracted, never written back into the page; a row someone gave its own detail stays. Pages nobody edits keep the old rows until the timeline prune-orphans cleanup runs (see `gbrain extract timeline --help`).' },
- { since: '0.60.106.0', text: '`gbrain edge-proposals list` now reads `--limit=N` and `--status=X` (they were ignored), and a `--limit` that is not a whole number from 1 up exits 2 instead of failing in the database or silently becoming 1.' },
- { since: '0.60.106.0', text: 'Dream atom and concept extraction no longer accept a model answer that stopped at the output cap or was refused (claude-cli included): such an answer counts as a failure, never as "nothing to extract" or a new concept narrative. On a managed brain the failed atom batch keeps the page\'s earlier atoms and waits for an approved retry (`gbrain jobs submit extract-atoms-drain --params \'{"sourceId":"<id>","retryRequestId":"<request>"}\'`); a concept that fails 3 times on unchanged atoms is skipped until they change (`gbrain config unset dream.concepts.failed_attempts` retries it now).' },
- { since: '0.60.106.0', text: 'The dream patterns breaker now counts deaths per source (`dream:patterns:source:<id>`), including runs cancelled at their timeout after paid work, so a brain whose patterns runs keep dying is refused at once after the upgrade; fix the cause, then `gbrain dream reset-key \'dream:patterns:source:<id>\'`. Pattern pages store a quarantined claim\'s reflection list once per page (`unverified_claim_sources`); the first patterns run rewrites existing pages that way (frontmatter only, no model call) before it pays for a run.' },
- { since: '0.60.106.0', text: 'Dream triage no longer re-judges a transcript every cycle after a truncated, refused or unparseable verdict: it waits 24 hours, doubling per repeat up to 7 days (`triage_unreliable_backoff`), and a content or triage-model change re-judges at once; `gbrain dream retriage --force` re-judges now and pays per file.' },
- { since: '0.60.106.0', text: 'A `gbrain dream` scoped to a source, including a bare `gbrain dream` on the default source, now also takes the brain-wide `gbrain-cycle` lease for synthesize, patterns, embed and the other brain-wide phases: while autopilot maintenance holds it, those phases are skipped as `maintenance_lock_busy` and the source phases still run, and autopilot maintenance skips its window while a dream holds it. `gbrain status --section locks --json` shows the holder.' },
- { since: '0.60.106.0', text: '`gbrain onboard --auto` (including cron runs), `doctor --remediate` and MCP `run_onboard` never submit a manual-only step: the schema-pack upgrade (`unify-types`) and the paid takes bootstrap (`extract-takes-from-pages`) are listed under `manual_only_skipped` with the command to run them yourself. A job of either kind an earlier run already queued still runs: find it with `gbrain jobs list --status waiting` and cancel it with `gbrain jobs cancel <id>` if you did not want it.' },
- { since: '0.60.106.0', text: '`gbrain reindex --markdown` asks before re-embedding (paid): without a terminal it exits 3 with an ask_user payload naming the page count, the estimate and the `--yes` command; `--yes` or `--max-usd <usd>` approves it, and `--dry-run`, `--no-embed` and a keyless brain never ask. A queued `reindex` job re-embeds only with the approval stored at submit time (`gbrain jobs submit reindex ... --yes`, or the search-mode switch prompt); one queued without it fails with `confirmation_required`.' },
- { since: '0.60.107.0', text: 'Search-hiding and other gate-owned frontmatter keys (`quarantine`, `content_flag`, `embed_skip`, `atoms_scan_hash`, `quarantine_override`) in a local `put_page`, a connector, an ingest event or any other non-owner write are now stripped instead of kept; sync and import of your own files, reindex, repair and `gbrain quarantine clear` keep them.' },
- { since: '0.60.107.0', text: 'A quarantined page is no longer offered to automatic fact extraction (`facts_backstop.skipped: quarantined`) and its facts and takes fences are not projected; rows projected before it was quarantined stay.' },
- { since: '0.60.107.0', text: '`get_page` and `fetch` of a quarantined page carry `quarantined` (fetch: `metadata.quarantined`) and a `page_quarantined` notice, and remote callers get no body or text unless an admin-scoped caller passes `include_quarantined: true`; a quarantined `put_page` now reports `quarantined: { reason, detail }`.' },
- { since: '0.60.108.0', text: 'Managed brains now extract conversation facts from meetings, transcripts and email threads through receipted batch requests (up to 25 pages each), and record single emails, prose notes and undated pages as not extractable for good. Nothing runs on its own: preview with `gbrain extract-conversation-facts --source-id <id> --dry-run`. A run stops with `maintenance_backpressure` (exit 12) before the writer passes 80% of its request or receipt capacity; `gbrain sources writer status --json` shows it.' },
- { since: '0.60.108.0', text: 'Re-extracting a conversation page now keeps facts that an open loop or a superseding fact references, as expired history, instead of deleting them.' }osure of the behavior changes an upgrade turns on (safety
- * notice `behavior_changes`, agent operator contract v1). Disclosure only:
- * every change stays on, nothing waits for an answer, and delivery is never
- * recorded as the user's consent.
- *
- * BEHAVIOR_CHANGES is the one table of disclosed changes, each with the
- * release that introduced it:
- * 0.60.68.0 a non-empty `chat_fallback_chain` is walked on every non-pinned
- * chat call (only when a chain is set; a remote (HTTP) caller
- * sees only that a chain is configured), managed-brain autopilot
- * lint writes its repairs, transcript re-ingest makes smaller
- * parts, the mention linker rebuilds its resume state once.
- * 0.60.74.0 fix wave 9: shell jobs reap leftover processes, the
- * declaring-pack extract_atoms auto-drain, the 90-day OAuth
- * access-token cap, the writer-status `local_process_ingress`
- * rename, `jobs work` exit codes, the longer retention of
- * unextracted corpus files.
- * 0.60.77.0 quote grounding on by default (think, syntheses, concepts,
- * patterns); forget's `similar_active` and the TypeSafe-gated
- * overnight withdrawal review.
- * 0.60.87.0 the save-before-compaction notice in Claude Code and OpenClaw
- * sessions (core memory ships off, so it is not a change).
- * A release that changes behavior appends its rows; a shipped row's release
- * never changes.
- *
- * Identity: notice id (`behavior_changes@<BEHAVIOR_NOTICE_SINCE>`, the newest
- * row's release, never the running VERSION) × brain × channel, plus the
- * authenticated client on HTTP. A release with no new rows re-notifies
- * nobody. Content: only the rows introduced after the last notice release
- * this brain × channel (× client) was shown, or after the brain's baseline
- * when it was never shown one. The baseline (the first gbrain version that
- * saw it, `0` when it already existed) is recorded once under GBRAIN_HOME:
- * `gbrain init` stamps a database it creates with this version; otherwise
- * the first look decides from the recorded upgrade history
- * (`upgrade-state.json` `from` below the newest row) or the brain's own
- * creation time (its oldest `sources.created_at` more than
- * FRESH_BRAIN_GRACE_MS ago). A fresh install sees no notice.
- *
- * Markers:
- * - CLI and stdio: one file per notice × brain × channel under
- * GBRAIN_HOME/notices/behavior-changes/, created exclusively (`wx`), so
- * concurrent processes deliver it once; the newest marker names the last
- * release shown. A home that cannot be written still gets the notice
- * (once per process).
- * - HTTP: one bounded `config` row in the brain DB
- * (`notices.behavior_changes.http`: up to HTTP_SHOWN_CAP client ids, each
- * with the release it was shown, oldest dropped first). No migration: the
- * row reuses the key/value table every brain has.
- * `gbrain doctor --only behavior_changes` reads every row newer than the
- * brain's baseline again and writes nothing.
- */
-import { createHash } from 'node:crypto';
-import { mkdirSync, readdirSync, readFileSync, writeFileSync } from 'node:fs';
-import { dirname, join } from 'node:path';
-import type { BrainEngine } from './engine.ts';
-import type { Action, Notice } from './agent-output.ts';
-import { gbrainPath, type GBrainConfig } from './config.ts';
-import { VERSION } from '../version.ts';
-import {
- CHAT_FALLBACK_PLANE_LABEL,
- chatFallbackRemovalFix,
- diagnoseChatFallbackEntry,
- readChatFallbackPlanes,
- type ChatFallbackPlane,
-} from './ai/chat-fallback-planes.ts';
-import { mergedProviderEnv } from './ai/provider-env.ts';
-import { FENCE_REPAIR_MEASURED } from './fence-repair/measured.ts';
-import { CONTENT_REPAIR_MEASURED } from './content-repair/measured.ts';
+ { since: '0.60.108.0', text: 'Re-extracting a conversation page now keeps facts that an open loop or a superseding fact references, as expired history, instead of deleting them.' },
+ { since: '0.60.108.0', text: 'Take numbers are never reused: `gbrain takes remove` leaves a struck `(removed)` row in the page, and a new take gets one more than every facts or takes row number on the page, so the first take on a page whose facts fence holds rows 1-5 is #6. Deleting the placeholder by hand frees its number again.' },
+ { since: '0.60.108.0', text: 'On an unmanaged brain a dream-cycle concept whose file holds an edit the database has not imported is deferred (`revision_conflict`) and published after sync imports it, instead of being overwritten.' },
+ { since: '0.60.108.0', text: 'A job error during worker shutdown now records `worker_shutdown: <handler error>` instead of bare `worker_shutdown`, and an `UnrecoverableError` thrown then dead-letters at once instead of running again.' },
+ { since: '0.60.108.0', text: '`gbrain jobs supervisor stop` can now report `unverified` (exit 1) and `stale_pid_file` (exit 0, nothing signaled), and on Linux the supervisor PID file has a second line with the process start time; read only its first line.' },
+ { since: '0.60.108.0', text: '`thinking: off` calls on native Google and OpenAI routes (eval judges, the synthesize triage judge, fence repair\'s model tier) now send the model\'s thinking switch (`thinkingBudget: 0`, `reasoningEffort: none`) and, where reasoning cannot be turned off (Gemini 2.5 Pro and 3.x, gpt-5/-mini/-nano, o-series), a 32,000-token reply cap; `eval takes-quality --budget-usd` and `eval cross-modal --max-usd` price that cap, so a budget that passed before can refuse earlier.' },
+ { since: '0.60.111.0', text: 'A managed sync on Postgres publishes up to 16 groups at once (clamped by the connection pool; `sync.lanes` or `--lanes N` lowers it), and a page write during a catch-up goes ahead of queued sync groups that do not touch its page and publishes beside the running ones; `gbrain config set sync.foreground_priority false` restores strict arrival order.' },
+ { since: '0.60.111.0', text: '`gbrain sources refresh` now refuses with `git_unavailable` when git cannot read the checkout\'s branch or remote (it used to read that as a detached HEAD or no remote and could skip the fetch), and a checkout that is not a Git checkout refuses `refresh_no_upstream`; run `git -C <checkout> status` to see why.' },
+ // #6278
+ { since: '0.60.112.0', text: 'A managed sync member\'s preparation now has a deadline (`persistence.sync_preparation_ms`, 120 s): a write that cannot finish preparing is released at its budget and tried once more, and a second cut-off (or a process killed mid-preparation) finishes it `failed` with `preparation_stalled`. The sync holds that file (`preparation_stalled`, listed by `gbrain sources status`; no `gbrain repair` applies) and keeps going, so the file stays out of the index until `gbrain sources retry-held <id>` and the same sync re-import it. A run that stalls more files than `sync.hold_escalate_count` / `sync.hold_escalate_pct` allow, or five in a row with no page committed between them, stops `blocked` with `preparation_systemic` (exit 1) instead of holding every file.' },
+ { since: '0.60.112.0', text: 'A `put_page`, `edit_page`, `remember` or maintenance write (fact-fence adoption, maintenance page writes) whose preparation is cut off twice now gets a terminal `preparation_stalled` receipt instead of being claimed again and holding the rest of its root; resubmit a foreground write under a new `request_id`. `gbrain sources writer status` and doctor `persistence_write_stall` name the step it reached, what it waited on and the owner process (`claim.stall`).' },
+ { since: '0.60.112.0', text: 'A managed `gbrain sync` pass that finishes its cursor while `sources retry-held` re-screens are scheduled for the source now returns `partial` / `writer_yield` instead of `synced`, and the drain runs the re-screen in the same invocation; a single-pass caller re-enters as it does at a slice boundary. A sync admission refused for write capacity (`queue_capacity` with `detail` `outstanding=N limit=M`) is waited out by the drain and, past its 30 s no-progress window, ends `blocked` with the new stop reason `write_capacity` and `drain.capacity`, where it used to exit 1 with no drain summary and a failure-ledger row.' },
+ { since: '0.60.112.0', text: 'A managed `gbrain sync` drain no longer counts a renewed claim as progress: `drain_stalled` can now stop a catch-up whose head preparation is stuck past its budget plus 30 s, a preparation the sync\'s own process still holds past its budget plus 30 s ends the drain `resumable` / `preparation_abandoned` (exit 0, safe to rerun) and exits, and a progress line prints `stalled <N>s on <step>`. `gbrain sources retry-held` now prints a follow-up sync that keeps `--no-embed` and the run\'s other processing options.' },
+ { since: '0.60.112.0', text: 'New keys `persistence.sync_preparation_ms` (120000), `persistence.maintenance_preparation_ms` (120000), `persistence.preparation_ceiling_ms` (600000) and `persistence.max_preparation_attempts` (2) bound write preparation, and `gbrain config set` refuses a value out of range; the `preparation_deadlines` write switch (`gbrain config set persistence.preparation_deadlines false`) restores the old behavior exactly (only `remember`, `put_page` and `edit_page` keep a 30 s budget; nothing is counted or held). `persistence.max_claim_ms` keeps its doctor meaning. Migration v220 adds `persistence_requests.preparation_attempts`; restart every `gbrain serve`, jobs worker and autopilot on the new version, because an older owner never gives up a stuck preparation.' },
+ { since: '0.60.112.0', text: 'Fact-fence adoption (the extract_facts cycle phase and the v0.32.2 backfill) now writes the fence\'s parsed text back into `facts.fact`: a legacy claim with surrounding whitespace or CRLF line endings is adopted with that whitespace trimmed and its line endings folded to LF (the row keeps its id, vectors and provenance). A claim the fence codec would change further (whitespace-only, `~~x~~`, a literal `<br>`) or one its page already carries stays a legacy row, active and searchable, and is reported as `FACTS_FENCE_FAILED: <slug> (fence_unrenderable: …)` and under doctor `fence_integrity` `unrenderable_legacy_facts`. Only the pages still holding such rows skip destructive fact reconciliation (the whole source skipped before), and the cycle summary names them while keeping the reconcile counts of the other pages.' },
+ { since: '0.60.112.0', text: 'A managed maintenance write on a page whose body or timeline already carries a fence defect no adoption clears (for example a second facts fence in the timeline) is now refused at submission with its fence reason, so the cycle skips that page in `failed_pages` instead of failing a request on every pass; doctor `fence_integrity` counts the stored defect as a repair candidate.' },
+ // #6278 PR 1.5
+ { since: '0.60.114.0', text: 'A cancelled database statement that a transaction-mode pooler never completes (its backend stuck in `ClientRead`) is now ended client-side `GBRAIN_CANCEL_SETTLE_MS` (2000 ms) after the cancel request by discarding that reserved connection; the owner\'s phase ends `deadline_exceeded` instead of parking until the watchdog, and a preparation read ended this way counts as the preparation deadline.' },
+ // #6278 PR 2
+ { since: '0.60.113.0', text: '`gbrain repair fences` and the maintenance `fence_repair` phase now run while a managed sync of the source is in progress: only a file a write in flight or the running sync\'s frozen manifest still names waits as `sync_in_progress` (a held file does not), and every other candidate, held files included, is repaired and committed during the catch-up. The busy check is repeated when each item is applied and when its write is admitted, and fails closed when it cannot be read.' },
+ { since: '0.60.113.0', text: 'An `owner_unavailable` refusal from fence repair, chronicle, fact-fence adoption or any other maintenance writer now carries a `reason`: `host_mismatch` (both host ids\' first 8 characters, the local `host.json` path for local callers only, `retryable: false`), `transfer_in_progress` or `clone_in_progress` (`fix.next: wait`, 30 s), `binding_missing`, `incarnation_changed`, `local_path_missing` or `coordination_path_missing`; a fence hold records the same reason instead of a bare `owner_unavailable`. Nothing claims or transfers ownership to run maintenance; `gbrain errors owner_unavailable` lists the reasons.' },
+ // Wave 0 repair batch (GBRA-60)
+ { since: '0.60.115.0', text: 'New stdio registrations gbrain writes (`gbrain bootstrap hooks`, the readiness and `gbrain init` registration lines) and the Codex and Claude Code plugins, and the `gbrain agent register` daily-driver and coding-agent presets, now use `--surface full`, every operation including `put_pages`, instead of `starter`; an existing registration or client keeps its surface. A harness that caps its tool count can register `--surface starter` or set `GBRAIN_SURFACE=starter` in the server entry\'s env.' },
+ { since: '0.60.115.0', text: 'New memory-reader, memory-writer and coding-agent grants (`gbrain mcp grant`, the admin dashboard, `auth rescope --profile`) are callable and listed on the full MCP surface instead of starter; their operation snapshot is still the ceiling, so a reader still cannot write. Existing clients keep their stored surface until the owner re-applies a profile. `whoami` and `gbrain://capabilities` now report `grant_diagnosis`, and `gbrain doctor` adds `grant_new_ops_available`, which lists grants whose snapshot or stored surface keeps operations their scopes allow out of reach, with the rescope commands.' },
+ { since: '0.60.115.0', text: 'Doctor `embeddings` now warns on an embedding backlog only when it is large (over 1,000 chunks or 1% of chunks) and its oldest pending chunk has waited more than 24 hours, read from the new `content_chunks.embedding_pending_since` column; a backlog draining inside that window reads `ok` even below 90% coverage, an old one warns even above 90%, and `details` always carries `backlog`, `oldest_pending_age_s` and `age_threshold_s`. Check with `gbrain doctor --only embeddings --json`.' },
+ // #6317. `since` below is a placeholder equal to the branch's VERSION so a fresh install's baseline covers it; the integrator sets it
+ // to the merge-slot stamp (master plus one PATCH) by hand, because release:restamp rewrites VERSION, CHANGELOG and TODOS, never this table.
+ { since: '0.60.117.0', text: 'On a managed Postgres brain, gbrain now prefers one full persistence consumer per host: `gbrain serve` always runs one, and a `gbrain sync`, jobs worker, autopilot or MCP process that finds a live, full, not-wedged consumer of this host in the new `persistence_consumers` heartbeat table runs waiter-only (it submits and waits, claims nothing) and promotes itself when that owner lapses, reads wedged or stops. This is a preference, not a guarantee: two processes starting within one heartbeat of each other, or a CLI that took its consumer before the serve started, both stay full until one exits, and doctor reports the overlap as `two_consumers_on_host` (a claim owner with no heartbeat row, an older process, as `consumers_without_heartbeat`). The fallback is visible, never silent: a sync beside an older serve prints `owner row missing: older serve or no serve; running own consumer` on its start line, `gbrain sync --no-delegate` (or `GBRAIN_SYNC_NO_DELEGATE=1`) keeps one run\'s own consumer on either engine, and `gbrain config set persistence.single_consumer false` (or `GBRAIN_SINGLE_CONSUMER=0`) restores a consumer per process brain-wide. Short-lived commands (`put`, `import`, `dream`, `cycle`) keep their own consumer; PGLite is unchanged. Restart every resident gbrain process on this version so the heartbeat rows exist.' },
+ { since: '0.60.117.0', text: 'A managed `gbrain sync` beside a live owner on this host no longer stops `drain_stalled` with "nothing here can claim it" at the allowance: it prints `stalled <N>s on <step>` with the owner\'s pid and kind every 10 s and keeps going until the 600 s preparation ceiling frees the root, then stops with `cause: owner_wedged_here`, the owner `{kind, pid, nonce}`, `retry_after_ms` and `next.safe_to_loop: true` before the ceiling (rerun after the delay) or a restart of the named pid after it. `gbrain sources status --json` and `writer status --json` now carry `data_moving`, `not_moving_since` and `movement_state` per managed source, doctor warns `managed_sync_not_moving` (counted against the score; a cursor parked between runs with no live consumer is `parked`, not scored), `serve` prints one notice when a source flips, and `writer status` ends each running claim in a `claim.next` (`claim_running` with `retry_after_ms`, `claim_overdue` as `tell_user_to_run` naming the owner pid, or `claim_lapsed` with the resume command). `/health` stays liveness-only.' },
+ { since: '0.60.117.0', text: 'New command `gbrain sources writer movement [<source>] [--wait <dur>] [--warn-only] [--json]` is the deploy gate an upgrade ends with: it waits one window (max(300 s, preparation budget + 60 s)) and exits 1 with `managed_sync_not_moving` (`reason: movement_check`) when pending managed work did not move (`--warn-only` prints the same and exits 0; `held` and `within_allowance` exit 0 with their route). `gbrain upgrade` and `post-upgrade` do not run it (neither restarts your processes) and end by printing it bare. Doctor also warns `host_identity_mismatch` when this process\'s `host.json` differs from the binding owner\'s on the same machine, naming both files and the `GBRAIN_HOME` to set; `host.json` stays version 1 and gains optional `minted_under` on files minted from now on.' },
+ // R2 facts extraction default (GBRA-60); `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.118.0', text: 'Background fact extraction now uses claude-haiku-5-5 instead of claude-sonnet-4-6 when no model is set and the reasoning tier resolves through Anthropic (less than a tenth of the cost; it passed a facts-absorb quality gate against Sonnet 4.6, with 4.6 points fewer planted items covered on natural transcripts). `gbrain config set facts.extraction_model anthropic:claude-sonnet-4-6` keeps the previous model; installs that resolve through OpenAI, or set facts.extraction_model, models.tier.reasoning or models.default, are unchanged.' },
+ { since: '0.60.119.0', text: 'On Postgres, gbrain now keeps one small file per database under `~/.gbrain/cache/pg-types/` with the parameter types the database described for gbrain\'s statements (hashes and type numbers only, no SQL text or credentials), so the next command skips those round trips; it is ignored when the Postgres or schema version differs and deleted when a migration runs. `GBRAIN_PG_TYPE_CACHE_PERSIST=0` keeps the types in memory only.' },
+ { since: '0.60.120.0', text: 'Link typing changed (Q2, confirmed on held-out data): "adviser" and "is an advisor to [X]" type advises, and "not an advisor to [X]" does not; board, observer and investor wording never types works_at; a dated advisory, board or investor role is not an employment start. Every page re-extracts its links once in the background (zero model calls; `gbrain extract --stale` finishes it now, `gbrain doctor --json` reports links_extraction_lag 0 when done). Turning `line_grammar.enabled` on or off now re-extracts every page too, so the graph follows the setting; typed relation lines stay opt-in.' },
+ // #6340 (GBRA-64).
+ { since: '0.60.121.0', text: 'A managed catch-up no longer stops on a page that moved under it: a database page that changed after the manifest was frozen is held as `concurrent_write` (re-bound and passed when it already holds what the file would import), uncommitted working-tree bytes that match neither the pinned commit nor the page are held with the new code `worktree_dirty`, and working-tree bytes committed at HEAD past the pinned target are imported as HEAD has them; the run finishes `synced` with the holds listed instead of `blocked_by_failures` (`sync.holds=fail` and company-brain sources keep blocking).' },
+ { since: '0.60.121.0', text: 'A managed sync drain that loses its database connection (`write ECONNABORTED`, `ECONNRESET`, `ETIMEDOUT`, `EPIPE`) now reconnects and retries at 5, 15 and 45 seconds instead of exiting, and a connection fault is no longer recorded in the sync failure ledger, so a relaunch (with or without `--retry-failed`) resumes at the stored cursor against the frozen manifest instead of re-freezing it; three drops in a row with no page committed between them stop the drain `connection_lost`.' },
+ { since: '0.60.121.0', text: 'New commands `gbrain sync status --source <id> --json` (cursor position, pages committed in the last 10 minutes, each hold and the last error with `class`, `safe_actions` and `needs_human`, and `next`) and `gbrain sync unblock --source <id> [--apply] --json` (performs the safe action for every hold and the last error, refuses the rest by name) let an operator agent drive a catch-up without a human; the decision table is `docs/guides/sync-unblock-runbook.md`.' },
+ // #6355 (GBRA-64); `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.123.0', text: 'A write whose database session drops during admission (a pooler reap, a failover, pg_terminate_backend) is re-run after 100, 300 and 900 ms, which replays the admitted row when the lost acknowledgment had committed; a session that keeps dropping returns the new typed `write_outcome_unknown` (reason `connection_lost`, fix: read the request by id) instead of the raw `CONNECTION_CLOSED` / `57P01` the caller used to take for a refusal while the write committed. A write admitted on the consumer\'s warm lane re-runs on the pool and the dead lane is given up at once. The vendored Postgres driver no longer hands a caller the stale `57P01` of a connection killed during startup, nor leaves a pool slot stuck until `CONNECT_TIMEOUT` after a close caught a pending write.' },
+ // Budgeted delivery PR 1. `since` equals the branch's VERSION; the integrator sets it to the merge-slot stamp by hand (release:restamp does not rewrite this table).
+ { since: '0.60.124.0', text: 'A token budget passed under `auto` evidence delivery (`token_budget` on query, search and assemble_evidence, `budget_tokens` on recall with `return_unit: "auto"`) is now a hard cap on the delivered titles and evidence: the best hit comes first, and conversations or notes that do not fit are listed in `delivery.dropped_reasons` instead of being appended as extra chunks. A budget below 32 tokens is refused with `invalid_params`. Calls without a budget, and a bare query `token_budget` (legacy chunk budgeting), are unchanged. `gbrain config set search.auto_packing off` restores the uncapped behavior.' },
+ { since: '0.60.126.0', text: '`context_pack` cards now list the newest pages that mention each entity and are dated after the entity\'s own page (up to 8 per card, 2,000 characters per card and 6,000 per pack, each with its date, slug, title and preview), so a later mail or note that corrects the page reaches the agent on its first call. A remote caller never sees a private page or another source there, and the section packs last under `budget_tokens`. `gbrain config set mentions.newer_on_cards false` turns it off.' },
+ // Lua grammar replacement (GBRA-64, from GBRA-49's serve-hang report); `since` is a placeholder until the merge-slot stamp.
+ { since: '0.60.133.0', text: 'Lua code (`.lua` files and ```lua fences) now parses with tree-sitter-grammars/tree-sitter-lua v0.3.0: every parse is sound (the previous grammar started each parse after the first from uninitialized scanner state, misparsing or spinning until the 30 s chunker timeout, which left `gbrain serve` unresponsive on a page of mislabelled shell fences), and `function` / `local function` / `function M.f()` definitions become named semantic chunks for the first time. On the next sync each source is walked once and only its `.lua` files re-chunk and re-embed (priced by the cost gate as `grammar_drift`); other code pages keep their chunks. `gbrain sync --source <id> --full` also refreshes Lua fences inside already indexed Markdown pages.' },
+ { since: '0.60.131.0', text: 'Vector search scoped to a source that holds a small part of the brain now returns its true nearest chunks: a source with up to about 25,000 chunks is scanned exactly instead of through the HNSW index, and a larger one falls back to that scan when the index comes back short. Unscoped search is unchanged; scoped results can differ from earlier releases where the index had missed closer matches.' },
+ { since: '0.60.132.0', text: 'The maintenance run now repairs the content holds managed sync records, by itself and without consent: two facts or takes fences of one kind in one section are merged into one (exact duplicate rows dropped, colliding numbers renumbered, the validator proving every original row survived), an unclosed fence followed by text on a private page is closed after its last row, and a stray frontmatter `slug:` that names no page (or a page of a different type with no title in common) is removed; each repair is one committed file write carrying the trailer `gbrain-repair: <hold_code> <tier> <confidence>` and a receipt, so `git revert` of that commit undoes it. The `fence_repair` phase runs the fences, the new `content_repair` phase right after it runs the rest of the lane (`gbrain repair content --source <id>` previews both); `gbrain config set fences.repair.enabled false` pauses all of it.' },
+ { since: '0.60.132.0', text: `The repair model (\`models.fence_repair\`, or \`models.content_repair\` for slug conflicts) now also classifies the cases the deterministic rules mark ambiguous, under the same \`fences.repair.max_usd_per_page\` ($0.30) and \`fences.repair.max_usd_per_day\` ($1.00) caps and one shared daily ledger: whether the lines after an unclosed fence on a world-visible page are prose or table rows, and whether two pages a \`slug:\` line ties together are the same thing. The model chooses among coded answers and never writes text: a world-page close that would expose hidden lines waits for your hash-bound approval (\`tail_exposure_approval\`), a page merge is recommended, never executed (\`merge_recommended\` names the canonical page), and an undecided case is \`needs_human\`. ${CONTENT_REPAIR_MEASURED} \`gbrain config set fences.repair.llm false\` turns the model tier off for the whole lane; \`--no-llm\` keeps one run to the free tiers.` },
+ { since: '0.60.132.0', text: '`gbrain sync unblock --source <id> --apply` now writes: for every held file the content-repair lane clears (`invalid_fence` and `frontmatter_slug_conflict`) it runs the lane on exactly those paths as one bounded hash-bound apply under the `fences.repair` caps, prints a receipt per file and schedules the re-screen, and reports each path as `repaired`, `held`, `needs_human` or `skipped` with the reason and its next step; a hold whose stored state waits on a person, your spend decision or the owner host is listed, never retried. Before this release unblock refused every repair-class hold. `--no-llm` keeps the repairs to the free tiers; `--no-repair` restores the refuse-only behaviour. `gbrain sync status` now reports a fence hold the lane marked manual or paid, and a recommended merge, as `needs_human` with the paragraph in `human_reason`.' },
+ { since: '0.60.134.0', text: 'A `put_page` edit (and a managed sync of an edited file) keeps the unchanged chunks and their vectors and re-embeds only the chunks that changed. `gbrain serve` answers the MCP handshake before it starts its IPC socket, persistence consumer and startup sweep. Scoped vector search counts a source\'s chunks instead of inferring them from its share of pages, and a source of up to 120,000 chunks falls back to an exact scan when the index comes back short.' },
+ { since: '0.60.137.0', text: '`gbrain import` and a classic sync of an edited file keep the unchanged chunk rows and their vectors, `--no-embed` included, so `embed --stale` re-embeds only the chunks that changed. An import, sync or reindex that changed fewer than 50 + 10% of pages pages no longer re-runs ANALYZE when planner statistics already exist. Migration v225 drops `idx_chunks_embedding_null`, a duplicate of `content_chunks_stale_idx`.' },
+ // E5.4 HNSW scale wave (GBRA-60).
+ { since: '0.60.135.0', text: 'Vector search that reaches the bounded candidate pool (a visibility scope, a type or date filter, or a source too large for the exact scope scan) now scans up to 20,000 index entries before it settles (it stopped at 2,000), so it returns the scope\'s true nearest pages instead of the first few hundred it reached: on 1M chunks with real embeddings, recall@50 under a random 10% visibility scope rose from 0.77 to 0.97, for about 15 to 35 ms more per such search. Unscoped search and small source scopes return the same results.' },
+ { since: '0.60.135.0', text: 'On Postgres, import, sync, reindex and every embed drain that embedded something now finish with a bounded ANALYZE (30 s statement, 2 s lock timeout) of `content_chunks(model, modality, page_id)` and the page columns search filters read. Without those statistics, vector search on a freshly loaded brain of 1M chunks or more sorted every candidate: scoped searches took 0.5 to 8 s, and many hit the 8 s budget and fell back to keyword-only results (`vector_candidates_incomplete`) until autovacuum ran.' },
+ { since: '0.60.138.0', text: 'On a brain without a multimodal embedding model (the default voyage-4 install), a query that reads like an image request ("a photo of ...", "show me photos") now runs as a text query, keyword arm and expansion included, instead of falling back after a failed image embed; `cross_modal: image` still routes to image search when asked.' },
+ { since: '0.60.138.0', text: 'A search query holding a markdown rule of 32 or more dashes no longer fails the keyword and title arms (`tsquery stack too small`); the run collapses to its parity, and `query` results now report `retrieval.crag.top_rerank_score` whenever the reranker ran.' },
+ { since: '0.60.139.0', text: 'Memory trust: everything an agent reads back from memory now carries a trust label ("your notes", "written by an agent", "external, untrusted" and the rest), and a write that reads like instructions to an agent is flagged. By default a flagged item is still saved, searchable and used in proactive context, shown with its flag; `gbrain trust review` lists flagged items. The stricter protections are opt-in: `gbrain config set write_gate.external_mode quarantine` holds instruction-like external content until you release it, and `gbrain config set trust.agent_activation suppress` keeps flagged agent-written items out of proactive context until you confirm them. Content saved before this release is flagged only after you claim your own sources (`gbrain trust claim-sources`, in a terminal) and run `gbrain trust scan` yourself; no agent starts either.' },
+ { since: '0.60.174.0', text: '`remember` of a claim that was forgotten is now refused before it is accepted, with `invalid_params` and the message prefix `fact_withdrawn` (it used to be accepted and then fail with "The write did not commit"); a claim forgotten without an entity stays withdrawn for every entity. `replaces` now accepts a fact saved without an entity, so `remember` with `entity` and `replaces` links that fact instead of forgetting it. A failed write receipt names its cause instead of "Inspect its durable request on the source host".' },
+ { since: '0.60.174.0', text: 'gbrain learns more of the names an entity goes by: declared aliases now cover common prose cues ("also known as", "goes by", "formerly", "doing business as"), alias label lines and table rows ("Internal nickname: Copper Fox"), and multi-word names. Every brain re-derives aliases and rescans mentions once on its next `gbrain extract --stale` (autopilot runs it); `gbrain config set mentions.multiword_aliases false` keeps one-word aliases only and `mentions.alias_deny` drops a name.' },
+ { since: '0.60.174.0', text: 'Pages that name the same subject under different title prefixes ("Account sheet: X" and "CRM record: X") are shown as identity siblings on the entity card, never merged; a name both claim now links mentions to each of them instead of to neither. Frontmatter `identity: separate` or `gbrain config set mentions.sibling_merge false` keeps pages apart.' },
+ { since: '0.60.174.0', text: 'The entity card gains `aka_sources`, `identity_siblings`, `identity_excerpt` (verbatim lines that may name the entity otherwise) and `alias_guidance`; `aka` is unchanged. search and query also search every other name of the entity a query names (up to 4, keyword-only, rows marked `matched_alias`); `gbrain config set search.alias_fanout_max 0` turns that off.' },
+ { since: '0.60.174.0', text: 'search now says how many pages match the query\'s keywords (`keyword_total`, up to 10000+) and adds one line after the rows saying they are a ranked top-K. `match: "keyword"` lists every keyword match with `total`, `truncated` and a ready-to-send `next`. An agent-facing `mode` is now refused (it was ignored) with a fix naming `match: "keyword"`, and an offset over 10,000 is refused.' },
+ { since: '0.60.174.0', text: 'search and query rank a page gbrain generated (frontmatter `dream_generated: true`, type `extract_receipt`) at half its score when the query names an entity and a primary record about it is among the results; such rows carry `provenance: "generated"`. Generated corrections are never demoted. `gbrain config set search.demote_generated false` turns the demotion off.' },
+ { since: '0.60.174.0', text: 'Lean search and query rows now keep `effective_date_source`, and replies with dated rows add one line labeling each `effective_date` as a document, event or fallback (import) date; it is never a contract\'s effective date.' },
+ { since: '0.60.174.0', text: 'Write tools accept any `request_id` of 1 to 128 printable ASCII characters instead of refusing a non-UUID. A non-UUID maps to a deterministic UUID: responses keep `request_id` as that UUID and add `client_request_id` with the id that was sent, and `get_write_request`, `list_write_requests` and `cancel_write_request` accept either. Reusing an id for a different write is refused with `idempotency_conflict` (`remember`: `invalid_params` with `write_error: idempotency_conflict`).' },
+ { since: '0.60.174.0', text: 'Facts saved by name about an account whose account sheet and CRM record share its name now link to that account (they used to get a slug no page has), and the entity card (`recent_facts`, `active_fact_count`) and `recall {entity}` show facts saved under either page or the bare name. A search that names an entity lists that entity\'s newest saved facts first, then facts of an entity they point to ("folded into Kite Co").' },
+ { since: '0.60.174.0', text: '`search` with `match: "keyword"` on an entity\'s name or alias lists pages that use any of its names, and the count line names them; a query that is not one entity\'s name keeps its exact keywords.' },
+ { since: '0.60.174.0', text: '`remember` with an entity, when the same claim is an active fact saved without one, now supersedes that copy (`status: superseded`, `superseded_fact_id`; batch receipts carry it too) instead of saving a duplicate. `forget` of a fact saved without an entity is refused with `invalid_params` and the prefix `claim_linked` while the same claim is active on entity-linked facts, which it used to withdraw as well.' },
+ { since: '0.60.174.0', text: 'An entity page can now give itself a 2 or 3 character code ("Also called JOF in my notes", "Joffrey Foods, a.k.a. JOF", "Account code: JOF"): it becomes one of the entity\'s names and pages that write it exactly as written link to the entity. Lower-case words, common capitals and acronyms (`IT`, `US`, `OK`, `AI`, `CEO`, `API` ...) and codes declared in another entity\'s sentence never qualify. Every brain re-derives aliases and rescans mentions once.' },
+ { since: '0.60.174.0', text: '`entity` accepts `names` (up to 50 names, codes or aliases) instead of `name` and returns one compact row per name: the page, its names, the opening lines of its body (`lead`) and its identity siblings, without references or facts. `name` is no longer a required parameter in the tool schema; passing neither, or both, is `invalid_params`.' },
+ { since: '0.60.174.0', text: 'The served instructions now say to keep separate parts of a question in separate searches but batch lists: resolve many names or codes in one call (`entity` with `names`, or one keyword `search` for "A" OR "B"), and issue independent calls together in one turn. The `search` description says keyword mode takes OR across quoted names or codes.' },
+ // Wave 7 perf (GBRA-75).
+ { since: '0.60.141.0', text: 'On Postgres, the first search of a process whose planner statistics on `pages` or `content_chunks` are absent (after pg_upgrade or a deleted pg_statistic, which autovacuum does not restore) now collects them in the background with the bounded refresh import already runs; without them a search on 5,000 pages took 50 to 60 s. Doctor `planner_stats_stale` names the absent columns and `gbrain repair planner-stats --apply` collects them. On PGLite, writes through the engine\'s SQL helpers now pass the same WAL checkpoint guard as other writes, so `gbrain extract` no longer wedges at 50,000 pages.' },
+ // Wave 8 perf (GBRA-75).
+ { since: '0.60.146.0', text: 'On PGLite, a vector index build now sizes its memory to the index and finishes at 50,000 pages (248,802 chunks: 11 minutes, then vector search in about 27 ms instead of 1.7 s); a brain too large for the index to fit in PGLite\'s 2 GiB memory (about 300,000 1024-dimension chunks) gets `pglite_vector_index_too_large` with a read-only move-to-Postgres preview instead of running out of memory, and search keeps working unindexed. PGLite now starts with no parallel maintenance workers and `max_wal_size=8GB`, so a single large statement no longer wedges on its own checkpoint; between statements WAL is still checkpointed at 256 MB. In a brain folder without the Git durability hook, the Git effects a write leaves now finish in batches, so a 50,000-page import no longer leaves about 30,000 of them for `gbrain serve` to drain, and a first sync of already-imported files waives them in batched transactions.' },
+ { since: '0.60.150.0', text: 'On Postgres, a pooled statement that waits past the pool\'s statement_timeout plus 30 s (GBRAIN_PG_STUCK_GRACE_MS) with nothing coming back now fails with CONNECTION_STUCK and its connection is replaced, instead of holding the pool until a restart; `GBRAIN_PG_STUCK_GRACE_MS=off` keeps the old behavior. A statement with an undefined parameter now fails alone (`pg_statement_build_failed` names it) instead of desyncing its connection. `gbrain serve --http` answers `/health?deep=1` with a pooled probe and the pool numbers.' },
+ { since: '0.60.147.0', text: 'In a brain folder with the Git durability hook, a write that arrives while the effect worker commits a backlog of Git effects now publishes after the group in flight, inside its 5 s wait, instead of returning pending after the whole backlog; Git effects still commit in order. A write waiting on a busy worktree is reported as `writer_busy` without a stale preparing phase.' },
+ // `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.151.0', text: '`delta` and `context_pack` called without `include_private`, and the per-turn context block that harness hooks inject, now apply to their facts the same page-visibility rule they already apply to their pages. With `include_private` from the local CLI, `delta` and `context_pack` output is unchanged.' },
+ { since: '0.60.167.0', text: 'Open-loop extraction from Gmail threads (`loops_extract` jobs) now runs under a $2.00 per UTC day cap, brain-wide: every job a sweep or the managed catch-up queues shares the day\'s spend group, an attempt the cap cannot admit is refused before the provider call and the thread is queued again on a later day, and a sweep that finds the day at its cap queues nothing (`daily_spend_cap`). `gbrain config set loops.extraction_max_usd_per_day <usd>` changes the cap (0 queues no paid extraction).' },
+ { since: '0.60.167.0', text: 'A Gmail thread\'s open loop now attaches to the counterparty\'s page even when that page lives in another source (`default:people/<slug>` on a federated brain), by identity only: the exact email as that page\'s alias or an `entity_identities` canonical member; a display name alone never crosses a source and a tie leaves the loop with no counterparty page. The loop row records the page\'s source (`counterparty_source_id`), the `owes_to` / `awaiting_reply_from` edge points there, and the entity card, `gbrain waiting` and `open_loops` read the loop from that page rather than from a namesake in another source. Rows written before this change keep reading as their own source.' },
+ { since: '0.60.167.0', text: '`gbrain lint` no longer reports `missing-created` on a page that carries any parseable date under `created`, `event_date`, `date`, `published`, `captured_at` or `ingested_at`, and `--fix` (the cycle\'s lint phase included) no longer copies `captured_at` / `ingested_at` into `created`: ingest time is not creation time, and the copy rewrote every page gbrain itself exported. Pages that got a `created:` that way keep it; nothing is removed.' },
+ { since: '0.60.167.0', text: 'Gmail labels named in a source\'s `g_loops_exclude_labels` (or the brain-wide `loops.extraction_exclude_labels`) keep their threads out of paid loop extraction and the deterministic detector. A name that does not resolve against the account\'s labels fails closed: no NEW paid extraction for that source until it resolves (`excluded_label_unresolved` in the sweep counters, retried every sweep); existing loops, closes and the email pages themselves are unaffected.' },
+ { since: '0.60.166.0', text: 'Open-loop extraction from Gmail threads (`loops_extract` jobs) now runs under a $2.00 per UTC day cap, brain-wide: every job a sweep or the managed catch-up queues shares the day\'s spend group, an attempt the cap cannot admit is refused before the provider call and the thread is queued again on a later day, and a sweep that finds the day at its cap queues nothing (`daily_spend_cap`). `gbrain config set loops.extraction_max_usd_per_day <usd>` changes the cap (0 queues no paid extraction).' },
+ { since: '0.60.166.0', text: 'A Gmail thread\'s open loop now attaches to the counterparty\'s page even when that page lives in another source (`default:people/<slug>` on a federated brain), by identity only: the exact email as that page\'s alias or an `entity_identities` canonical member; a display name alone never crosses a source and a tie leaves the loop with no counterparty page. The loop row records the page\'s source (`counterparty_source_id`), the `owes_to` / `awaiting_reply_from` edge points there, and the entity card, `gbrain waiting` and `open_loops` read the loop from that page rather than from a namesake in another source. Rows written before this change keep reading as their own source.' },
+ { since: '0.60.166.0', text: '`gbrain lint` no longer reports `missing-created` on a page that carries any parseable date under `created`, `event_date`, `date`, `published`, `captured_at` or `ingested_at`, and `--fix` (the cycle\'s lint phase included) no longer copies `captured_at` / `ingested_at` into `created`: ingest time is not creation time, and the copy rewrote every page gbrain itself exported. Pages that got a `created:` that way keep it; nothing is removed.' },
+ { since: '0.60.166.0', text: 'Gmail labels named in a source\'s `g_loops_exclude_labels` (or the brain-wide `loops.extraction_exclude_labels`) keep their threads out of paid loop extraction and the deterministic detector. A name that does not resolve against the account\'s labels fails closed: no NEW paid extraction for that source until it resolves (`excluded_label_unresolved` in the sweep counters, retried every sweep); existing loops, closes and the email pages themselves are unaffected.' },
+ { since: '0.60.168.0', text: 'A managed checkout deleted and recreated at its recorded path (restore from backup, rebuilt container, Migration Assistant copy) has two deliberate exits instead of `recovery_required` from every verb: `gbrain sources writer transfer prepare/accept <source> --self-transfer --confirm-relocated-root` waives only the directory identity comparison when the stamp and the reservation beside the root agree on everything else, and `gbrain sources set-path <source> <path>` converges a checkout moved behind a symlink at its recorded path, keeping the worktree. `gbrain sources writer deactivate --dry-run` now lists a `physical_root` blocker exactly when its real run would refuse, and the classic (pre-activation) release no longer refuses on a recreated directory whose reservation and stamp still agree.' },
+ { since: '0.60.168.0', text: 'Schema-pack YAML now decodes quoted scalars: a double-quoted value carries the JSON escape subset and a single-quoted value is literal text with `\'\'` for one quote, so a link-type regex written as `"\\\\b"` loads as `\\b` and a `gbrain schema` mutation writes it back unchanged (before, every mutation doubled the backslashes of every quoted scalar). A hand-written double-quoted value that meant two backslashes now means one. A mutation whose emitted YAML does not read back as the manifest refuses with `schema_pack_emit_mismatch` and leaves the file unchanged; a pack file above 8 MiB refuses to load with `schema_pack_too_large` instead of being read, and `gbrain doctor` warns on a mutable pack above 1 MiB with the hand-repair runbook.' },
+ { since: '0.60.168.0', text: 'A Git rename onto a slug a soft-deleted page still holds now moves the page onto that slug with its id, history, edges, facts and aliases in one transaction; the tombstone keeps its own history under `<slug>~purged-<id>`, a name no file can take, so nothing is hard-deleted. A rename whose destination a live page holds still imports the renamed content there, but the old row\'s edges, timeline, versions, facts, withdrawals and aliases now move to that page (with `[[old-slug]]` recorded as an alias) before the old row is soft-deleted, instead of being stranded on the tombstone. Any other database error on the rename fails the file and leaves the sync checkpoint where it was, where it used to be swallowed. The renamed page\'s `source_path` is repaired inside the rename transaction, so a later `gbrain sync --full` cannot read the live page as a removed file.' },
+ { since: '0.60.168.0', text: '`gbrain sources archive`, `remove` and `purge` no longer walk and hash a canonical checkout that already has a verified manifest: they compare no bytes, so a symlink or submodule that appeared in the checkout after it was claimed no longer refuses them with `writer_manifest_unsafe` while their dry run said they would succeed. The stored manifest keeps its digest and gets a fresh `canonical_stamp`; a source claimed before activation, whose manifest was never recorded, still records it on retire. Claim, set-path (rebind), restore and reclone still hash the checkout, and every lifecycle dry run now reports `manifest_required`.' },
+ { since: '0.60.168.0', text: 'A root-level `AGENTS.md` or `CLAUDE.md` in a source (the agent instructions `gbrain harden` writes) is no longer imported as a page: sync and `gbrain import` classify it as a metafile like `README.md`, while the same file inside a directory is still a page. A root `agents` or `claude` page an earlier version indexed is kept, not deleted; `gbrain delete agents` removes it if it is unwanted.' },
+ { since: '0.60.168.0', text: 'The conversation parser now reads chat timestamps in the page\'s declared `timezone:` (an IANA zone such as Asia/Tokyo) and stores them in UTC, so a 09:00 Tokyo message is 00:00Z and the facts extracted from it carry the right `valid_from`; before, the zone only silenced the UTC warning and every timestamp was stored as if it were UTC. Conversation pages with a declared zone give different timestamps than before on re-extraction. A zone the runtime does not know keeps UTC and the warning names it. In a daylight-saving fold the first occurrence is taken; a time inside a spring-forward gap resolves with the offset in force before the change.' },
+ { since: '0.60.168.0', text: 'A page whose slug its file path cannot derive (a doubled hyphen, which the path rule collapses to one) is now written with a `slug:` frontmatter stamp by every render (write-through, repairs, export), so sync, reconcile and repair find the page again; the stamp does not change the page\'s content digest. A file an earlier version rendered without the stamp still refuses `source_changed` on reconcile until it is repaired: `gbrain repair frontmatter --source <id>` proposes the stamp as a safe repair, and the reconcile audit\'s classify mode reports such pages as `slug_rule_mismatch`.' },
+ { since: '0.60.168.0', text: 'On Postgres, `gbrain init` and `gbrain upgrade` no longer hang silently when another session holds a table lock (an open transaction in another client): the schema replay and each migration wait at most `GBRAIN_SCHEMA_LOCK_TIMEOUT_SECONDS` (default 60) and then stop with `schema_lock_blocked`, which names the blocking sessions by pid, application and state (never their query text) and the `pg_terminate_backend` exit; init retries a few times with a short backoff. The row-level-security block now skips tables where it is already on, so a re-run takes no exclusive lock on them.' },
+ // Fix wave 14 PR2 (GBRA-79). `since` is a placeholder equal to the branch's VERSION; the integrator sets it to the merge-slot stamp.
+ { since: '0.60.163.0', text: 'On a managed brain, whether the persistence owner commits and pushes page writes is now a recorded setting: `gbrain sources writer git-durability <source> --enable|--disable` (with `--pat-file <path>` for the push credential) records it on the host binding, and a binding with nothing recorded keeps consulting the post-commit hook as before. `gbrain sources push` on a managed worktree, `bootstrap verify`\'s push probe and the skill-pack writer guard now refuse by naming that verb and `writer status`. `writer activate` on an already-managed brain answers `already_enabled`; doctor adds `foreign_ownership_marker`; `gbrain repair managed-sync-orphans --source <id>` (explicit, preview-bound) retires sync bookkeeping nothing current can resume; a stale transcript part is deleted through the coordinator on re-ingest.' },
+ { since: '0.60.163.0', text: '`gbrain sources set-strategy <id> <strategy>` persists a code source\'s sync strategy and refuses `sync_run_unfinished` while a managed sync run of that source is unfinished. `gbrain bootstrap status` reports a project-scoped Codex MCP server in `<workspace>/.codex/config.toml` as `partial` (detected) instead of `pending`, and `gbrain bootstrap hooks --adopt --harness codex` records it as the wire evidence after a passing verify; nothing is written to the Codex config.' },
+ { since: '0.60.157.0', text: 'A page whose database frontmatter carries the v0.13.1 grandfather `validate: false` while its canonical file does not is no longer refused `source_changed` on write; the next coordinated write publishes the stamp to the file. `remember` and other caller writes that were refused that way are counted by doctor (`lost_caller_writes`) and replayed by `gbrain repair failed-writes --source <id>` on the brain host, after the user agrees to the previewed set.' },
+ // Fix wave 13 PR3 (GBRA-57).
+ { since: '0.60.159.0', text: 'The dream cycle now reads a schema pack set with `gbrain config set schema_pack` (or `schema_pack.source.<id>`) when it decides whether to run extract_atoms and synthesize_concepts, as `gbrain schema active` already did. A paid phase that only such a database-config pack declares, and that did not run before, is skipped with `consent_required` until you run `gbrain config set cycle.extract_atoms.enabled true` (or `cycle.synthesize_concepts.enabled true`); doctor `extract_atoms_backlog` names the same command.' },
+ { since: '0.60.159.0', text: 'On a managed brain, a page or transcript whose atom extraction failed (malformed or cut-off model output) is now retried by the next drain or cycle, inside its per-run budget, up to 3 attempts per content; it was replayed as a failure with no model call and could stop the drain with `provider_failure`. After the third failure it is held (`held_failed`): out of the atom backlog until its content changes, and doctor `extract_atoms_held_failed` lists it with the paid retry command.' },
+ { since: '0.60.159.0', text: 'Captured session files (compaction segments, Stop-hook turns and SessionEnd transcripts) now record the source their session started under and are filed there, in a `sourced/` folder of the corpus directory, instead of under whatever source the sweep runs for. Files written before this upgrade on a brain with more than one source are held until you say where they belong: `gbrain doctor` names them, `gbrain sweep --assign-corpus <source>` previews and `--apply` maps them. A serve asked to file a session under another source refuses instead of rerouting it.' },
+ { since: '0.60.159.0', text: 'On OpenClaw 2026.9.x, which no longer passes a session file to the context engine, compaction now banks a gbrain checkpoint segment again by reading the transcript through the host\'s session-transcript runtime. Each compaction leaves an `openclaw-compact` entry in the hooks heartbeat, and `gbrain doctor` warns when a week of compactions banked nothing.' },
+ { since: '0.60.159.0', text: 'Transcript pages now keep every message whole: a message longer than 4,000 characters was cut there, and now continues in the next block under the same speaker. Re-ingesting a transcript or export re-imports the pages that had long messages (and re-extracts their facts if fact extraction is on). Chat connector syncs also keep retrying a conversation that failed until it imports and report `partial` with `unresolved` meanwhile (`gbrain doctor` warns the archive is incomplete). Conversations synced earlier are not repaired on their own: after asking the user, run `gbrain connectors sync <provider> --full` once.' },
+ // Fix wave 13 PR1.
+ { since: '0.60.161.0', text: '`gbrain embed --max-usd <usd>` is now enforced while the run spends, for text, `--slugs`, `--images` (multimodal and OCR) and `--background` runs; before, an approved cap was never metered. A run approved with `--yes` and no cost estimate now runs under the default $5.00 cap instead of none. A run that reaches its cap keeps the embeddings already written, exits 11 with reason `cost_cap` and prints the command that resumes; raise the cap by rerunning it with `--max-usd <usd>`.' },
+ { since: '0.60.161.0', text: 'A facts fence write to a page that exists only in the database (no file, or a soft-deleted page) is now refused with `db_only_page` instead of writing a stub file that then overwrote the stored body and timeline (#6398). Doctor `stub_guard_24h` counts these refusals separately and they do not raise its warning.' },
+ { since: '0.60.161.0', text: 'Hardened which files can carry a write-gate override: an override in a file is kept only for an owner-tier source (operator_curated or above), on sync, import, file repairs and reconcile alike; otherwise the content gate decides, and a file repair of such a file refuses as an overlay.' },
+ { since: '0.60.161.0', text: 'Git child processes gbrain runs now get a sanitized environment, checkout discovery is stricter, and gbrain\'s hardened Git calls accept a narrower set of arguments.' },
+ // Wave 14 PR3 (GBRA-79); `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.162.0', text: 'Dream `propose_takes` no longer proposes takes from atom pages (`type: atom`) or from any page the dream cycle wrote and stamped `dream_generated`; the source page an atom was extracted from is still a candidate, so nothing a person wrote stops being graded. New atoms now carry `dream_generated: true`, so facts extraction, the chronicle and transcript discovery skip them like other derived pages. Expect fewer proposals per cycle on brains with many atoms.' },
+ { since: '0.60.162.0', text: 'The dream `consolidate` phase no longer merges two facts that differ in a negation, number, date or amount ("Invoice A due Monday" and "Invoice B due Tuesday" stay two facts), and facts without a typed metric now need a 0.95 embedding match (the explicit-duplicate bar) instead of the 0.85 `cycle.consolidate.cluster_threshold`, which keeps governing typed metric facts. Expect fewer takes from untyped event facts. `gbrain dream --phase consolidate --dry-run` lists the clusters it would write under `details.clusters`. Facts an earlier run wrongly merged keep the `valid_until` that run stamped: previous intervals were not retained, so there is no exact undo; `gbrain recall` still returns the facts, and `remember … replaces` records a correction.' },
+ { since: '0.60.162.0', text: 'A write tool call (`add_timeline_entry`, `put_page`, `remember`, every tool marked mutating) that names a parameter the tool does not declare is now refused `invalid_params` with nothing written, in every `mcp.strict_params` mode; the suggestion names the submitted key and the declared one (`content` → `detail` on `add_timeline_entry`). Before, the default warn mode committed the row with the misnamed field dropped. Reads keep the warn grace period.' },
+ { since: '0.60.162.0', text: 'A `remember` (or any single-fact write) that repeats a fact already stored word for word for the same entity, or with no resolved entity at all, now returns the existing fact (`status: duplicate`) instead of inserting a second row, including on brains without an embedding key; a remote or unattributed caller never dedups against a fact that came from a private source. A write whose entity could not be resolved and fell back to slugifying the name now stores the fact with no entity instead of minting a placeholder entity slug, so the stub guard no longer refuses later writes about that name; search and `recall` still find the fact by its text.' },
+ { since: '0.60.162.0', text: 'A top-level call statement in a JavaScript, TypeScript, TSX, Python or Ruby file (a `describe(...)` / `it(...)` block, `app.use(...)`, `print(helper())`, `RSpec.describe ... do`) is now its own chunk, `symbol_type` `module` and `symbol_name` `__module__`, so the calls inside it get edges: `code-callers helper` lists the test body as `<file-basename>::__module__`. Files with such statements gain chunks, so the next `gbrain sync` walks each source once and re-chunks and re-embeds only its files in those five languages (priced by the cost gate as `grammar_drift`); `gbrain reindex-code` does the same now. Definition-only files keep their chunks and vectors.' },
+ { since: '0.60.162.0', text: 'The entity counters in `get_health` / `gbrain health` (`entity_page_count`, `link_coverage`, `timeline_coverage`, `most_connected`) and doctor\'s `graph_coverage` and `orphan_ratio` gates now count the page types the active schema pack declares with `primitive: entity` (`yc`, `civic` and `organization` included on gbrain-base; a custom pack\'s own entity types; `person` or `company` only while the pack does not reclassify them), resolved per source when sources carry their own pack. Brains whose entities are pack types move from 0 entities and `null` ratios to real numbers, and a doctor score can drop where coverage is low. A pack that does not load now reports `entity_types_status: pack_unavailable` with 0 entities and a `graph_coverage` warn instead of counting the old hardcoded list.' },
+ { since: '0.60.162.0', text: 'Dream `synthesize_concepts` now writes one concept page for spellings of a label that differ only by hyphens, underscores or dots (`network-effects`, `network_effects`, `networkeffects`): the spelling that already has a live `concepts/` page wins, otherwise the one most atoms use (a tie goes to the hyphenated form), and the other spellings redirect to it for that run without any page write. Two spellings that both already have live pages (`re-sign` / `resign`, `co-op` / `coop`) are kept apart; merging those stays the human redirect path (`merged_into` / `aliases`). Existing duplicate pages are not merged for you: `details.folded_spellings` on the phase receipt names each fold.' },
+ { since: '0.60.162.0', text: 'A `put_page` (or `gbrain put`) of a page that already exists, sent without `expected_revision` or `force`, is now refused with its own code `revision_required` instead of `revision_conflict`; the message, the refusal and the fix (read the page, resend with its revision) are unchanged. A stale `expected_revision` is still `revision_conflict`. A client that switched on `revision_conflict` to decide between "re-read and merge" and "I forgot the precondition" can now branch on the code (#5385).' },
+ { since: '0.60.162.0', text: 'A wikilink or markdown link whose target the source policy resolved into another source (`link_resolution.cross_source` on, or a `[[source:slug]]` reference from a federated source) is now written by `put_page`, `capture`, the managed stale pass and the source reconciliation sweep, the way `extract links --source db` already wrote it; before, those writers dropped the approved edge and the next pass deleted the rows the extractor had admitted. With the flag off and a non-federated source nothing changes, and the write receipt now counts the drops as `auto_links.skipped_cross_source`. A reader granted one source still never sees the other source\'s endpoint. Watch `gbrain get-links` on pages that cite another source: the edges you opted into now appear.' },
+ // Memory proof wave (#6066).
+ { since: '0.60.164.0', text: '`query` now adds saved facts that match the question as rows of their own, at most 3, only in row and token capacity the pages left free, so no page row is pushed out. A fact row has `result_type: "fact"`, `fact_id` and a `follow_up` recall call, and never a page slug or id; a page row whose claim a newer saved fact replaced carries `superseded_claim`. It adds up to three database lookups per query and no model call. Remote callers see only facts whose source pages they could read. `gbrain config set search.query_facts_arm false` restores the previous results.' },
+ { since: '0.60.164.0', text: 'A saved fact now replaces a similar older fact by embedding similarity only when the brain\'s embedding model has a measured threshold. The default voyage-4 at 1024 dimensions keeps 0.95 and decides as before. With any other model, both facts stay active and the conflict review sweep judges the pair where it is on; exact-text duplicates are still merged. Doctor `supersession_calibration` names the command that measures a threshold (about a cent of synthetic text, no brain content), and `gbrain config set facts.supersession_thresholds \'{"<provider:model@dims>": <threshold>}\'` registers one.' },
+ { since: '0.60.164.0', text: 'Pinned questions replace `dream.auto_think`, which never ran in the dream cycle. On upgrade, each question in `dream.auto_think.questions` becomes an inactive pinned question that keeps its cooldown, model and commit setting, and a positive `dream.auto_think.budget` becomes `cycle.standing_questions.budget_usd`; nothing refreshes or spends until you activate a pin. `gbrain questions list` shows the ids, and `gbrain questions pin --id <id>` activates one, after which the dream cycle\'s `standing_questions` phase refreshes it under that budget. `gbrain dream --phase auto_think` now exits with a usage error naming the replacement.' },
+ // Fix wave 13 PR2 (GBRA-57).
+ { since: '0.60.165.0', text: 'Managed sync: a Postgres publish still running 30 s past `persistence.publication_ceiling_ms` (default 5 min) is cancelled (its connection is discarded, nothing commits, and the write is queued again); one that still does not settle makes its owner report `restart_required`. `gbrain sync` stops `drain_stalled` (`publication_overdue`, or `no_admission` after 5 minutes with nothing admitted) instead of waiting forever, and a source more than 100,000 changes behind catches up in bounded stages instead of refusing. `gbrain migrate` with the legacy copier now forwards each page\'s origin path, kind, provenance, `ingested_at` and aliases, and rebuilds the text projections of pages the source had sealed before it switches the engine; a failed rebuild keeps the old engine active and exits 1.' },
+ { since: '0.60.165.0', text: '`gbrain extract --stale` and `extract links|all --source db` skip and count a page another writer changed mid-run (`skipped_concurrent_write`) instead of aborting the run; the page stays stale for the next run. `extract all --source db` marks a page extracted only when both its links and its timeline finished at the same revision. On a managed brain, `extract timeline --from-meetings` (and its job) now writes through the coordinator as one `managed_maintenance_meeting_timeline` request per entity page, gated at the meeting\'s trust tier; a refused or pending write fails the job and the command exits 1. An owner on an older build refuses that request kind until it upgrades. On a managed brain, `extract_entities` now writes stubs, timeline rows and backlinks through the coordinator (creating a stub needs permission to write pages); a refusal or pending write returns its error envelope and names the entities already written, instead of a raw `writer_coordinator_required` error or a silently missing timeline row.' },
+ // Memory proof wave 2 W1 (question-ranked recall).
+ { since: '0.60.169.0', text: '`recall` takes an optional `question` and returns saved facts ranked by relevance to it (facts below the match threshold are left out); calls without it still return the newest facts, every response now says `facts_order`, and a call that passes only `query` carries a `recall_hint` notice. `gbrain recall --question` passes the question instead of reading its value as an entity name. In `query`, the facts of an entity the question names come only from that entity page\'s own source, and the temporal fact reserve (`search.temporal_fact_reserve`, off by default) scores with the same question scorer: whole-word matches, and a long fact\'s word matches count for less.' },
+ // Fix wave 15 G2 (GBRA-79, #6454); `since` is the provisional merge-slot stamp (the integrator restamps).
+ { since: '0.60.177.0', text: 'A coordinated write to a page whose stored frontmatter carries one of the parser\'s reserved top-level keys (`type`, `title`, `tags`, `slug`, kept by imports before mid-2026) is no longer refused `source_changed` when the file matches the database in every other way: the file/database comparison (publication, `sources reconcile`, file repairs) strips those four keys on both sides, as the parser does (#6454). A real body, title or tag drift still refuses. Writes refused this way whose receipt is retained replay with `gbrain repair failed-writes --source <id>`; doctor `stale_frontmatter_keys` counts the rows and names the explicit-only `gbrain repair frontmatter-keys` sweep, which removes the inert keys in coordinated batches and advances each swept page\'s `knowledge_revision` once (a client holding an older revision gets one `revision_conflict`).' },
+ { since: '0.60.177.0', text: 'A published page file now always carries the page\'s own `type`, `title` and tags from the database columns. A legacy row whose stored frontmatter also held a `type` or `title` that disagreed with the columns used to render the stored value (and stored `tags` rendered when the page had none); the next write of such a page now renders the columns and drops the stale keys, so the file\'s header can change once. Nested keys of the same names (`metadata.title`) and the `slug:` stamp for slugs the path cannot derive are unchanged.' },
+ // Fix wave 15 G2 (GBRA-79, #6501); provisional merge-slot stamp.
+ { since: '0.60.177.0', text: 'A managed checkout\'s persisted directory birth stamp now matches the live directory when the two are within 1 µs, instead of only when they are byte-identical (#6501: on APFS a freshly created root reports a birth time tens of nanoseconds apart between the process that stamped it and later processes, which left every write to that root refused `recovery_required`). The owner token, brain, worktree, root, inode and device still have to match exactly; a damaged or zero stamp still refuses; the in-process file target check, the staging identity and the transfer prepare/accept comparison stay exact. When the inode or birth time moved beyond that while everything else matches (a checkout restored or recreated at its recorded path), the refusal now carries detail `physical_root_directory_changed` and names the exit: `gbrain sources writer transfer prepare/accept <source> --self-transfer --confirm-relocated-root` (`writer status --json` prints it filled in). The tolerance covers the reported drift; it was not reproduced on APFS here, so #6501 stays open until a reporter confirms on this build.' },
+ // Fix wave 15 G2 (GBRA-79, #6449); provisional merge-slot stamp.
+ { since: '0.60.177.0', text: '`gbrain sources writer activate` no longer refuses `writer_registration_required` for a source that has a checkout path but no canonical owner when the brain\'s `sync.write_through` is `false` (#6449): `writer status` already reported that source `database_only`, and activation now agrees, listing it under `database_only_sources` and leaving it unbound. Page writes to it stay database-only (`disabled_by_config`), and turning `sync.write_through` back on does not claim it automatically on a PGLite brain (activation records the listed sources in `persistence.database_only_sources`; deactivation clears it): the next write refuses `owner_unavailable` with `detail: unbound_source` and the `gbrain sources writer claim` to run (or publishes database-only under `persistence.unbound_write=database_only`), the same as on Postgres. With `sync.write_through` on, the activation refusal and the `owner_unavailable` that `gbrain sync` gives such a source now name the claim (preview with `--dry-run`) instead of a generic inspection hint.' },
+ // Fix wave 15 G2 (GBRA-79, #5808); provisional merge-slot stamp.
+ { since: '0.60.177.0', text: 'On a managed canonical worktree, `gbrain sources writer git-durability <source> --enable` (and `--pat-file`) now rewrites the durability block between the gbrain markers in `AGENTS.md`/`RESOLVER.md` to a managed variant (#5808). The block `sources harden` wrote before activation told agents to run the commit-and-push helper after every write and to pull --rebase before writing, both of which route around the persistence owner; the managed variant says page writes go through gbrain, files that are not pages are committed with plain git and ride the owner\'s next push, and the checkout is never pulled, rebased or reset. The rewrite is idempotent, changes nothing outside the markers and is not committed: the file is left for the operator to commit. The preview (`--dry-run`) lists it as `agents`.' },
+ // Fix wave 15 G2 (GBRA-79, #5913); provisional merge-slot stamp.
+ { since: '0.60.177.0', text: 'A slug-bound OAuth client (a `memory-writer` or `coding-agent` grant with `--bound-slug-prefixes`) can now call `remember` (#5913). The operation was fenced to the one slug it writes (the caller\'s entity, or `memory/unattributed`) but not on the allow-list of fenced write operations, so dispatch denied it before the fence ran and a bound grant could not remember anything. A save against an entity under the prefixes commits; one against an entity outside them, or with no entity, is refused `scope_denied` by the slug fence with nothing saved; `replaces` naming a fact outside the prefixes answers exactly like an id that does not exist. `forget` and `forget_fact` stay denied for bound clients: a withdrawal reaches pages the fenced slug does not name. New bound grants list `remember`; an existing grant keeps its operation snapshot until `gbrain auth rescope` (doctor `grant_new_ops_available` names it).' },
+ // Fix wave 15 (GBRA-79), doctor / repair / migrations group.
+ { since: '0.60.177.0', text: '`gbrain doctor --only harness_wiring` on a Postgres, `database_url` or `remote_mcp` brain now probes an HTTP registration\'s `/health` without any credential instead of reporting `http_serve_missing` unseen: a healthy gbrain answer is `wired_running` with `mcp_access: unverified` (a listener is proven, this registration\'s token and tool access are not; confirm tools in a new session), a refused local `http:` port keeps `http_serve_missing` with the `serve --http` fix, and anything else (`https:` refused, DNS or TLS errors, a timeout, a redirect, a 503 or a non-gbrain answer) is `http_serve_unreachable` / `http_serve_unhealthy` with no fix. Registered URLs are printed without userinfo, query or fragment in every doctor message and JSON (#6453).' },
+ { since: '0.60.177.0', text: '`gbrain repair <kind> --apply` no longer stops the whole run when one item is refused with `invalid_params` (a slug the grammar no longer accepts) or `source_changed` (file and database copies disagree): the item is listed in `failed[]` with its reason and left exactly as it was, the remaining items are repaired, and the command exits 1. A failed item is not retried by a resumed run; the next full scan (the printed apply command once the run has completed) retries it. `gbrain doctor --remediate` reports a repair step with failed items as `failed`, never `completed`, and the content lane and maintenance phases warn on them.' },
+ { since: '0.60.177.0', text: '`gbrain config set shared_skills.migration.enabled false` declines the v0.53.0 shared-skills migration for every machine on the brain: `gbrain apply-migrations` (the install postinstall, `gbrain upgrade` and `gbrain post-upgrade` included) skips it with no inventory and no config writes, `--list` and `--dry-run` show it `declined`, doctor and `get_health.migrations.declined` report it, and an explicit `--migration 0.53.0` refuses with `migration_declined` (exit 3) naming the command that turns it back on (#6466).' },
+ // Fix wave 15 G5 (GBRA-79).
+ { since: '0.60.177.0', text: '`gbrain backup create` on a PGLite brain now removes gbrain\'s own IPC socket files (`.gbrain-resolve.sock`, `.gbrain-persistence.sock`) from the data dir before the dump when nothing listens on them, so a `serve` that was killed no longer blocks every later backup; each removal is listed in the archive\'s `omitted`. Any other socket, FIFO or symlink in the data dir is left alone and the backup refuses with `backup_dump_failed` naming it.' },
+ { since: '0.60.177.0', text: 'The pull that `gbrain sources pull`, `sources push`, `sources harden` and the workspace push run before pushing now passes `--no-autostash`: a repository or user `rebase.autoStash=true` no longer stashes and replays edits made while the pull ran. A dirty tree still ends as `skipped_dirty`, the documented contract.' },
+ // Fix wave 15 G6 (GBRA-79).
+ { since: '0.60.177.0', text: 'A subagent job whose final model turn produced no answer (an empty or whitespace-only body, a thinking-only turn) now ends with `stop_reason: error`, and a turn the provider stopped with `refusal` ends `refusal`; both used to be reported as a clean `end_turn`. A resumed job whose stored transcript already ends on such a turn is answered from the transcript with that stop reason instead of sending the turn back to the provider as an assistant prefill (which Haiku 5.5 and Sonnet 4.6+ reject with HTTP 400). The queue\'s terminal-state policy is unchanged; `require_writes` jobs that produced nothing already failed.' },
+ { since: '0.60.177.0', text: 'Embedding chunks are now capped at the documented per-input limit of four more hosted encoders: DashScope `text-embedding-v1` / `v2` (2,048 tokens; new chunks at most 1,228 estimated tokens instead of 2,000), Google `gemini-embedding-001` (2,048; it used to truncate long chunks silently), Zhipu `embedding-3` (3,072; chunks at most 1,843) and `embedding-2` (512; chunks at most 307). On a brain using one of them, the next `gbrain embed` or `embed --stale` pass splits stored chunks over the cap and re-embeds the pieces (billed as ordinary embedding tokens); other models chunk as before. A model with no declared cap whose provider rejects one chunk as too long is now split to a cap derived from that rejection and retried on the next pass, at most three times per page, instead of failing identically on every pass; the failure line names the fix when the descent stops.' },
+ { since: '0.60.177.0', text: 'Google contacts now import phone numbers and user-created contact groups: person pages gain `phones:` (E.164 where Google supplies it) and `groups:` frontmatter, and a contact with phones but no email address, which used to produce no page at all, now gets one (at `contact-<id-hash>` when it also has no name). Because the People API ties a sync token to the request that minted it, the first contacts sweep after this upgrade lists every contact once (one full `connections.list` per Google source, within the usual quota) and then continues incrementally; `gbrain sync --full` is not needed. A group rename or deletion reaches a page when that contact next changes or on `--full`.' },
+ // Fix wave 15 G3 (GBRA-79). `since` is provisional (0.60.176.0); the integrator restamps it at the merge slot.
+ { since: '0.60.177.0', text: '`gbrain extract-conversation-facts` now walks a source\'s pages by slug (a keyset) instead of OFFSET over `updated_at`, so a page is listed, extracted and frozen once per run even while other writers touch pages that share one timestamp; a page the run sees twice is counted as `pages_skipped_duplicate_listing` with no second model call. A batch request the writer refused as malformed (`invalid_params`, the shape a page listed twice produced) is no longer a permanent block: its stored entries are resubmitted on the next run with zero model calls, up to 3 failed requests per page version, and one failed request counts once however many times it listed the page. `list_pages` sorted by `updated_desc` (the default) now breaks timestamp ties by slug, source and id, so ties page deterministically; offset paging is still unstable under writes that change `updated_at`.' },
+ { since: '0.60.177.0', text: '`gbrain projections drain` (and the migration drain) no longer loops on one queue row whose revision does not match its page: the row is re-keyed to the page\'s current revision and rebuilt in the same pass, or deleted when the page is already projected or belongs to a dead source incarnation, always as a compare-and-set on the exact row listed so a newer queued row survives. A page whose content changes while it is being rebuilt appears once under `failed` with a `revision_conflict:` reason and stays queued for the next run; `--json` may now list such rows where the command used to hang.' },
+ { since: '0.60.177.0', text: '`gbrain extract-conversation-facts` now sends every eligible turn of a conversation page to the extractor in bounded windows: a window closes at 30 messages or when its rendered text, header included, would exceed 6,500 characters, and the next turn opens a new window instead of being cut off; a turn too long for one window is split at sentence boundaries with its speaker and timestamp repeated; the 31st reply of a 31-turn group is extracted as its own window instead of being dropped. A dense page therefore takes more extractor calls than before, under the same cost cap. Pages already stamped complete from clipped input are not re-extracted automatically; to recompute them run `gbrain extract-conversation-facts --source <id> --force` (narrowed to one page with its slug option, or the whole source after a `--dry-run` preview of the window count), which spends model calls.' },
+ { since: '0.60.177.0', text: 'Fact extraction on explicit lanes (sync import, put_page) now measures same-page rewordings: when a page is re-extracted and a new claim sits within cosine 0.85 of a fact the same page produced earlier without changing a number, date, amount or negation, the run counts it as `would_dedup_same_page` and prints one stderr line naming the matched fact id. Nothing is dropped or expired; the counter exists so the rule\'s false-positive rate can be measured before any automatic dedup ships.' },
+ { since: '0.60.177.0', text: 'The atom-extraction phase (`extract_atoms`) now honors a schema pack that declares one of the built-in extractable types (meeting, source, article, video, book, original) as `extractable: false`, the way facts extraction already did: such pages are no longer mined into atoms. gbrain-base declares meeting and source extractable and is unchanged; on gbrain-recommended, `source` pages stop being atom-extracted. A pack that does not mention a built-in type keeps it extractable.' },
+ // Fix wave 15 group 1 (managed sync authority and data safety).
+ // Cat 40 next wave, Part 3 step 1. `since` is provisional; the integrator restamps it at the merge slot.
+ { since: '0.60.180.0', text: 'A `remember` refused with `fact_withdrawn` now carries an additive `withdrawn` object (`at`, `subject`: the entity slug or `all_entities`, `visibility`) on the immediate refusal, the batch item error, the failed write receipt and `get_write_request`, so an agent can tell the user when and how widely the exact claim was forgotten instead of retrying. The message, code and suggestion are unchanged; the object is absent when the caller cannot read the forgotten rows.' },
+ { since: '0.60.243.0', text: 'Every found `entity names` row, and each identity sibling on it, now carries `referenced_by_count` (the same count as the full card: distinct pages linking to it, every link source) and a row-level `next` (`{tool: "entity", arguments: {name: <slug>}}`) that returns its full card, and the source\'s `mention_index` coverage notice rides the response when coverage is incomplete. `gbrain config set entity.names_references false` drops both. The count is read in one batched statement for the call; when it fails or misses its 2-second deadline the row carries `references_unavailable` and one degraded `references_unavailable` notice instead of the count.' },
+ { since: '0.60.243.0', text: 'The full `entity` card\'s `referenced_by` used to be silently left out when its read failed; the card now carries `references_unavailable: "read_failed"` and one degraded `references_unavailable` notice, so an agent does not read a missing list as "nothing references this". New and off by default: `entity.record_types` (comma-separated page types) lists the referring pages of those types as `records` on `entity names` rows, the full card and `context_pack` cards (pull verb only), newest page date first with `page_status`, `amends` (with its recorded `since`) and `supersedes`, 5 per page and 24 per call with exact-remainder continuations.' },
+ { since: '0.60.177.0', text: 'A brain whose persistence mode cannot be read (no `persistence_brain` row, more than one, or an `enabled` value that is not a boolean) now refuses every write, sync, connector run, activation and maintenance step that depends on it with `storage_error` (`detail: persistence_mode_unknown`, fix: `gbrain sources writer status --probe --json`) instead of treating the brain as unmanaged and writing around the owner; only a well-formed `enabled: false` row selects the unmanaged path. A managed `gbrain sync --full` tree walk no longer soft-deletes a page it imported from an untracked working-tree file: a page whose stored import provenance is the working tree, or is unknown, is kept while its file is still present (`working_tree_kept` in the result), and a page imported from a Git blob still follows Git. A soft deletion is not harmless (recall stops at once and the purge lifecycle follows), so this applies on the next sync without opt-in. A first sync, a `--full` sync or one commit that alone exceeds the 100,000-entry / 16 MiB cursor bound now completes in path slices (every import slice, then bounded deletion slices, pinned at one target; the slice cursor is checkpointed with each slice and `last_commit` moves only when the whole target settles) instead of refusing with `request_too_large`; a scheduled sync takes one slice per run and `gbrain sync --drain` takes them all. One file whose manifest entry alone exceeds the byte bound still refuses by name.' },
+ // Cat 40 next wave, Part 1. `since` is provisional; the integrator restamps it at the merge slot.
+ { since: '0.60.243.0', text: '`context_pack` cards and their `newer_mentions` rows, and every `get_backlinks` link row and `group: "page"` row, now carry `page_status`: the page\'s own frontmatter `status`, only when it is a string of at most 40 characters (trimmed), never inferred. A link row\'s `status` is still the relationship state and the `status` filter is unchanged; `context_pack` `text` is unchanged. `gbrain config set entity.row_page_status false` removes it from these rows; record rows keep it.' },
+ { since: '0.60.243.0', text: 'The MCP instructions no longer tell agents to walk `referenced_by` after an `entity` `names` batch, whose rows carry no references: the brief clause now puts that walk on the single-name card and says what a `names` row holds on this brain (its `next` to the card, and `records` by type once `entity.record_types` names page types). `gbrain config set entity.names_references false` drops the names-row fields and that part of the clause.' },
+ { since: '0.60.243.0', text: 'The MCP instructions now say the record whose terms are in effect on the date asked about governs, that a page\'s `date`/`effective_date` is when it was written (not when its terms take effect), and that a change not yet effective does not apply yet; they no longer say a later correction, handoff or executed change outranks an older record. Drafts, proposals and agent-written notes still do not override records. The rule now sits inside the first 2,048 characters. `gbrain config set mcp.instructions_governing_rule newest` serves the earlier sentence.' },
+ { since: '0.60.179.0', text: 'A managed sync no longer parks forever on a pinned import whose canonical correction (a fixable fence, reflowed frontmatter) would rewrite a file that holds newer uncommitted bytes: the file is held `worktree_dirty` with the rest of the source synced, the cursor finishes, and committing the file (or `gbrain sync unblock --source <id> --apply`) imports it. Before, that refusal (`source_changed` / `pinned_git_worktree_conflict`, "Canonical sanitization cannot overwrite newer working-tree bytes.") blocked the cursor with no exit: `--retry-failed` replayed the same pin, `sources refresh` refused `sync_in_progress` and `--acknowledge-managed` refused `cursor_unfinished`. A cursor an older release left blocked this way converts on its next `--retry-failed` run. Working-tree bytes that already are the correction (gbrain\'s own writeback, published before its request settled) import without a second write.' },
+ // The non-ranking amends link. `since` is provisional; the integrator restamps it at the merge slot.
+ { since: '0.60.243.0', text: '`amends` links (a record amending another, declared in a schema pack) no longer feed any ranking signal (backlink and adjacency boosts, relational hops and degree, enrich order, entity resolution, generated-page demotion, entity anchoring), and an amends edge whose `since` is still ahead now shows in default graph reads instead of being hidden. They stay references in get_backlinks, cards and `referenced_by`; `supersedes` still down-ranks a replaced record.' },
+ { since: '0.60.243.0', text: 'When several frontmatter relationship objects in one field match the same target, only the one whose name matches it exactly dates it: `{name: MSA, since}` no longer dates `msa-renewal` beside `{name: MSA Renewal, since}`. Re-extracting such a page (`gbrain extract links --source db --include-frontmatter`) records the corrected dates.' },
+ // #6529 (GBRA-79). `since` is provisional: stamped at the current VERSION because a `since` past VERSION discloses on every fresh brain (goldens, notice tests); the integrator restamps both rows to the release (0.60.182.0 placeholder) at the merge slot.
+ { since: '0.60.182.0', text: 'With `GBRAIN_EMBEDDING_MULTIMODAL=true`, managed sync now imports image files through the coordinated image importer (OCR text, image vector and `source_path` at import) instead of holding them as `managed_image_sync_unsupported`; existing image holds are re-screened and imported on the next `gbrain sync --source <id> --no-pull`. With it off, images stay held as before.' },
+ { since: '0.60.182.0', text: 'On a multimodal install, plain `gbrain embed --stale` now runs the image sweep (`--images`) before its text pass and reports it as `images` in `--json`; `gbrain embed --stale --images` works on managed brains, finds an image page with no recorded `source_path` by its slug, and exits non-zero naming the path it tried when no candidate has a file (it used to exit 0); the folded sweep only reports fileless pages. Doctor gains `image_embedding_coverage`.' },
+ // #6530 (GBRA-82) shared-checkout-safe git. `since` is provisional (current VERSION, so a fresh brain sees nothing); restamped at the merge slot.
+ { since: '0.60.185.0', text: 'New `gbrain git commit-push` commits only the paths you name and pushes them safely in a brain checkout other agents share: `-m <msg> -- <paths>`, `--push-only`, `--pull` and `--dry-run`. After `gbrain sources harden`, the committed `scripts/brain-commit-push.sh` and the post-commit hook delegate to it and never run `git pull --rebase`, `git stash` or `git reset` in the shared tree. A rejected push is merged with the remote in memory, so brain history now gets merge commits (`gbrain: merge origin/<branch> into <branch>`) instead of rebased linear history; the checkout only fast-forwards, and a push whose fast-forward a dirty file blocks reports `pushed_checkout_lagging` (exit 0). Exit 4 (`push_unconfirmed`) means the commit is local but no push was confirmed. Guide: docs/guides/shared-checkout-git.md.' },
+ { since: '0.60.185.0', text: 'Brain checkout commits and pushes now coordinate through two OS locks under the git dir: `brain-commit.lock` for staging, committing and moving the checkout (wait `GBRAIN_COMMIT_LOCK_WAIT_SECONDS`, alias `GBRAIN_PUSH_LOCK_WAIT_SECONDS`, default 60, then `commit_lock_busy`) and `brain-publish.lock` for the network push (a foreground push waits `GBRAIN_PUBLISH_LOCK_WAIT_SECONDS`, default 300, then `push_unconfirmed`). The pre-#6530 `gbrain-push.lock` is still taken with the commit lock. The post-commit hook no longer waits for another push: it reports `push_deferred` and the running push publishes its commit too. `BRAIN_COMMIT_LOCK_HELD` is honored only when it names the lock file\'s path, no longer as `1`.' },
+ { since: '0.60.185.0', text: 'gbrain\'s own brain-repo commits (page write-through, facts fences, takes, timeline, `lint --fix`, and `sources harden` scaffolding) now take the checkout\'s commit lock (write-through waits 2 seconds, then commits its one path without it), commit only their own paths, and include both sides of a staged `git mv` rename. Paths passed to the helper or `gbrain git commit-push` are literal: a quoted glob no longer expands and fails `commit_paths_invalid`; name the files.' },
+ { since: '0.60.185.0', text: 'The pull that `gbrain sources pull`, the pull cron, `sources harden` and the workspace push run no longer rebases: a branch whose local and remote sides diverged is merged in memory and the checkout fast-forwards to the merge, for `pull_strategy: rebase` as well as `merge` (`set-pull-strategy` is still accepted). `gbrain sync`\'s pull is now a fetch plus a fast-forward under the commit lock. `gbrain sources harden` sets `rebase.autoStash=false`, `merge.autoStash=false` and `pull.ff=only` in the checkout\'s local git config so a stray `git pull` refuses instead of autostashing. A conflict now stops with `integrate_conflict` (ask the user; resolve with `gbrain git commit-push --push-only --expect-remote <sha> --resolve <path>=ours|theirs`), and `put_page` reports an unresolved one for that checkout.' },
+ { since: '0.60.185.0', text: 'The committed `scripts/brain-commit-push.sh` written by `gbrain sources harden` needs a gbrain that knows `git commit-push` to integrate remote commits. Without one it does only a locked, path-scoped commit and a plain push, and a rejected push now fails loudly (exit 4, PUSH FAILED) instead of rebasing. A helper written by a newer gbrain (a higher `# gbrain-protocol:` line) is never downgraded by an older harden.' },
+ // GBRA-60 D2/D4 in-band notices. `since` is provisional (current VERSION); restamped at the merge slot.
+ { since: '0.60.186.0', text: 'Two new info notices on MCP results; nothing a connection can call changes. `grant_blocked_operations` tells an authenticated connection once per session (once per grant revision for stateless HTTP) that its grant\'s operation snapshot, stored client surface or the server surface keeps operations its scopes allow out of reach, with counts and no operation names, and gives the brain owner\'s preview-then-apply rescope command (a missing scope is named only on a refused call). `hidden_tool_content` on get_page, search and query says when the result left out takes that a tool outside the tool list serves, with the next step that connection can take: the takes_list call (stdio also lists it), one request_tools {surface} widen, or the owner\'s repair. Fixes no longer name an MCP tool outside the grant\'s operation snapshot, and the stdio unknown-tool hint no longer offers a widen that read-only access or GBRAIN_MCP_FORCE_SURFACE would refuse.' },
+ // #6543 (GBRA-84). `since` is the release this PR is slotted for (restamped at the merge slot).
+ { since: '0.60.187.0', text: 'Read pools no longer pipeline statements behind a transaction-mode pooler: a database URL on port 6543 or with `?prepare=false`, or `GBRAIN_PREPARE=0`, now builds the read pools with `max_pipeline: 0` (through Supavisor, pipelined statements hung or came back with another statement\'s rows, #6543). A session-mode pooler (Supabase port 5432) and direct URLs keep the driver default; a URL `?max_pipeline=` or a non-empty `PGMAX_PIPELINE` still wins. The direct pool is unchanged.' },
+ { since: '0.60.187.0', text: '`/health?deep=1` now answers 503 `persistence_restart_required` when the serve\'s persistence consumer reports restart_required (it answered 200 before), and every deep-health 503 carries a stable `code` (`persistence_restart_required`, `pool_inflight_over_budget`, `deep_health_probe_failed` with `reason`), `fix` and `docs`. Both answers carry a `transport` block (pooler mode, the live `prepare` and `max_pipeline` with its reason, the server `statement_timeout`, `session_timeouts_not_applied`), and `gbrain serve` logs it once at startup as a `[gbrain serve] transport` line.' },
+ { since: '0.60.187.0', text: 'New opt-in `GBRAIN_SERVE_RESTART_REQUIRED_EXIT_SECONDS=<n>` (at least 120; a smaller value refuses to start serve): once the persistence consumer has reported restart_required continuously for n seconds, `gbrain serve` disconnects under a 5 s deadline and exits 69 (`serve_unhealthy_exit`) so a supervisor restarts it; after 3 self-exits within an hour (`serve-self-exit.json` under the gbrain home) it stops exiting and reports `self_exit_suppressed`. Off by default: nothing changes unless it is set.' },
+ { since: '0.60.187.0', text: '`gbrain sync --no-delegate` (or `GBRAIN_SYNC_NO_DELEGATE=1`), and a sync that falls back because the serve is not answering its IPC socket or predates delegated sync, now run this process\'s own consumer even under persistence.single_consumer (they waited behind the serve they bypassed), and log `two_consumers_on_host` while a serve consumes on the same host. The other fallback lines no longer claim the run uses its own consumer: they say it does not delegate and, with single_consumer on, the serve publishes its writes.' },
+ { since: '0.60.187.0', text: 'A `pg_statement_build_failed` line for `UNDEFINED_VALUE` now names the parameter (`param=$2`, or `param=?` for an array element), and a pipelined build failure no longer lets the pool queue more statements behind it on a connection built not to pipeline. A connection closed by the server (57P01) or a pooler no longer hands its error to the first statement on the replacement connection.' },
+ // Low-hanging-fruit wave (GBRA-81 items 1 and 1b).
+ { since: '0.60.188.0', text: '`query` now expands only when the search mode says so: on in `tokenmax`, off in `balanced` (the default) and `conservative`, so `query` on a `balanced` brain no longer makes an expansion LLM call before retrieval. `expand: true` (CLI `--expand`) expands one call in any mode, and `gbrain config set search.expansion true` restores expansion by default for the brain; `expand: false` (`--no-expand`) still skips it. A `search.expansion` value set earlier, which `query` used to ignore, now takes effect on `query`; `gbrain search modes` shows it. `search` never expands, as before. CRAG escalation now reads whether the first pass actually expanded (`expansion_applied`), and eval capture records the `expand` the caller sent (null when unset) so `gbrain eval replay` replays the mode default.' },
+ { since: '0.60.188.0', text: '`gbrain init --search-mode <conservative|balanced|tokenmax>` records the operator\'s choice: no recommendation, no first-run `search_mode` question, and `search.mode_source: operator` (picker choices record `auto`, and `gbrain config set search.mode` records `operator`). On a brain that already has a different mode it refuses unless `--force`. Init now recommends `balanced` instead of `conservative` when a reranker is ready but no chat key exists, and provider keys saved in `~/.gbrain/config.json` count toward the recommendation. The install matrix now prices Haiku 5.5, Sonnet 5.5 and Opus 5.5 from gbrain\'s pricing table (about a 200x corner-to-corner spread), and switching modes no longer promises a cache refill while semantic result caching is off.' },
+ // Low-hanging-fruit wave (GBRA-81 items 2 and 3).
+ { since: '0.60.188.0', text: 'Lean `search` and `query` rows (remote callers) now carry `id`, the `fetch` key, only when the connection can call `fetch` at that moment: a `full` surface, a stdio session `request_tools` widened, or an HTTP client whose surface and scopes include it. On `starter` and `verbs` connections, `fetch` was never callable, so the row\'s `slug` and `source_id` identify the page; `fields: "full"` returns every field, `id` included, and the `mcp.result_rows: full` host setting does so for every remote caller. Lean-row `score` now prints 4 significant digits. The local CLI and gbrain\'s thin client keep full rows, unchanged. `fetch` called without an id now says to re-run `search` once `fetch` is callable, or to pass the row\'s slug.' },
+ { since: '0.60.188.0', text: 'On stdio MCP and the CLI, the `degraded_recall` notice now shows on every call a transient degradation affects (`rerank_failed`, `embed_timeout`, a failed keyword or title arm, and every other per-call stage); it used to show once per session, so a rerank failure after an earlier embedding timeout returned fused-order results with no notice. A keyless brain whose only degradation is `embed_unavailable` still shows it once per session. HTTP is unchanged: every affected call. `_meta.retrieval.degraded` still records every call\'s stages.' },
+ // wave 16 (GBRA-79), v0.60.189.0.
+ { since: '0.60.189.0', text: 'A page purge (`gbrain delete <slug> --purge`) now searches the source\'s write journal for the page\'s claims at preparation, in bounded keyset chunks under the preparation budget (`persistence.maintenance_preparation_ms`), and its publication transaction only re-checks the requests admitted or settled since; the receipt reports `journal_sweep` (`scanned`, `ceiling`, `tail`, `pending_rechecked`, `complete`), and `complete: false` means a cap was hit and some requests were not tested. A purge whose remaining in-transaction lookup times out now ends `failed` with `purge_lookup_timeout` (nothing removed, tombstoned or redacted; later writes to the source move again) instead of being requeued as `database_contention` without bound, and a sweep that outruns its budget twice ends `preparation_stalled`; either failure needs a new request_id. A schema migration adds the request-table slug index (`gbrain repair request-indexes` rebuilds it).' },
+ { since: '0.60.189.0', text: 'A soft delete (`delete_page`, `gbrain delete <slug>`) of a page whose canonical file another live page of the source records now keeps the file and publishes database-only (receipt `write_through.skipped: shared_origin`, with a warning): the selected database page is hidden; the file and the surviving page remain, and nothing is erased. It used to refuse `source_changed` (the shared file renders the other page), leaving no supported exit for a duplicate-origin twin. Managed sync\'s discovery census and its origin guards now apply one rule: a live page wins the origin over tombstones, several live pages refuse `page_identity_changed` naming that soft delete, a single tombstone may still be reused and several tombstones still refuse. The receipt names the surviving slug to the trusted local owner or to a remote writer whose grant and visibility cover it, never otherwise. A purge of a shared-origin page refuses and names the soft delete. The kept file is imported into the surviving page by the next sync that imports it (`gbrain sync --source <id> --no-pull --full` does it now); edit the file first if it holds the deleted page\'s text.' },
+ // wave 16 (GBRA-79), v0.60.189.0 (managed sync bookkeeping).
+ { since: '0.60.189.0', text: 'A managed sync checkpoint whose cursor another run of the same source replaced (a `--retry-failed` rediscovery or a newer sync) now refuses `sync_cursor_replaced` (receipt state `conflict`) instead of `revision_conflict`, the run that awaited it records no managed-sync failure for it and goes on with the winning cursor, and `--retry-failed` no longer treats the superseded checkpoint as a page fault; `gbrain doctor` stops reporting such a checkpoint as an unresolved sync failure. A same-run index lag still reports `revision_conflict` and a missing manifest `storage_error`.' },
+ { since: '0.60.189.0', text: 'A write a database trigger gbrain does not know refuses now carries a closed `reason` in its public failure detail (`attribution_unclassified_table`, `trust_unclassified_table`, `graduation_in_progress`, or `unknown`), its stored message reads `Publication failed (P0001 in <raiser>: <reason>). Inspect owner diagnostics.`, and the engine-graduation fence (SQLSTATE 55000) is recognized as `graduation_in_progress` with a retry-later message instead of an owner-exception `storage_error`. The managed sync failure a run records, the failure ledger, `gbrain doctor` and `gbrain sync status --json` (`last_error.write_error_detail`, `last_error.detail`) now name the raiser, table and reason that only the receipt named before; the trigger\'s message text stays on the brain host (`gbrain write-request <id> --json`).' },
+ { since: '0.60.189.0', text: 'Managed sync bookkeeping recorded under a source incarnation the source no longer has (a source re-pointed at a new checkout, or removed and added again) is now retirable: `gbrain repair managed-sync-orphans --source <id>` lists such cursor and failure rows as `incarnation_retired` and local ledger rows whose durable failure row is gone as `mirror_only`, and a successful sync prunes a source\'s stale mirror rows. `gbrain doctor` names them with the repair even when no current failure is visible; `gbrain doctor --fast` (no database) now reports mirrored managed rows as `warn` "could not be verified" instead of `fail` (a better fast score is less certainty, not recovery; the engine-backed check stays authoritative), while old unmanaged file failures keep their severity. `gbrain sync status` reports only a cursor a current sync can select: an old-incarnation cursor is `cursor: null` with `last_error.code: cursor_incarnation_retired` and the repair preview as `next`, instead of a resumable cursor whose `next` selected nothing.' },
+ // wave 16 (GBRA-79)
+ { since: '0.60.189.0', text: 'On a managed brain, automatic fact extraction (sync import, `put_page`, `extract_facts`, the sweep) now skips a candidate whose exact claim was forgotten in that source and visibility and publishes the other facts of the same entity, counting the skips as `withdrawn_skipped` on the entity and completion write receipts and the extraction result; before, one forgotten claim refused the entity\'s whole group with `fact_withdrawn`. Explicitly remembering the forgotten claim still refuses, and a purge tombstone still refuses the whole write. A claim forgotten after the facts were prepared refuses that entity\'s write with `revision_conflict` and a detail naming the withdrawal, publishing nothing. An extraction keyed by its input alone (no request id) recovers from such a refusal, and from a batch an older release refused for a forgotten claim, on its next run: the retained facts are re-admitted as a follow-up batch with no model call, at most three times per batch, and the refused receipts stay as they were. An extraction admitted under a request id replays its receipt; a new request_id extracts again.' },
+ { since: '0.60.189.0', text: 'Atom extraction (`extract_atoms`, `gbrain dream --drain`) no longer marks an item complete when its text was cut at `cycle.extract_atoms.max_input_chars` (default 50,000 characters). The model reads the head once and its atoms are kept, but no completion stamp is written, no atom from an earlier extraction is retired, the phase result and the drain count the item under `input_truncated` with a stderr line naming the knob, and the item is skipped with no model call until the cap is raised or its content changes; raising the cap makes every such item eligible again on the next run. Before, a cut item was certified complete on its full content and a re-extraction could retire the atoms a larger cap had produced from its tail.' },
+ { since: '0.60.189.0', text: 'With the `claude-cli` provider, a model answer Claude Code reports as "API Error: Claude\'s response exceeded the N output token maximum" is now treated as an answer that stopped at the output cap (`finishReason: length`), not as a provider failure, so the output-cap ladders run as designed: open-loop extraction (`loops_extract`) retries once at 8192 output tokens and fact extraction retries once at twice its output budget. Each retry is one more model call on the same input; every other claude-cli error envelope still fails the call.' },
+ { since: '0.60.189.0', text: 'The same-page rewording measurement (`would_dedup_same_page`, 0.60.177.0) now also runs on a managed brain: automatic fact extraction there counts the rewordings on the entity and completion receipts and the `extract_facts` result and prints the same one stderr line per match. Nothing is dropped; a replay of the same request reports the recorded count without a model call.' },
+ // wave 16 (GBRA-79) G5.1 #6495, v0.60.189.0.
+ { since: '0.60.189.0', text: 'On Postgres, the keyword, keyword-count, keyword-page, title and CJK search statements run under one operator bound, `search.keyword_statement_timeout_ms` (default 8000, range 1000-60000; `gbrain config set`, then restart `gbrain serve` or the workers), instead of a fixed 8 s; a value outside the range is refused and never set from a request. `gbrain doctor` gains `keyword_plan`, a read-only canary that warns when the brain\'s commonest keyword term cannot be counted inside the bound (one term is not workload coverage, and a timed-out count is never "no matches"). A longer bound buys time, not a cheaper statement (#6495 stays open).' },
+ // #6543 fix wave PR 2 (GBRA-84). `since` is the release this PR is slotted for.
+ { since: '0.60.190.0', text: 'On a managed brain, `gbrain sync` (one source, `--all`, and a sync handed to `gbrain serve`) now implies `--no-pull` and prints one stderr line naming `gbrain sources refresh <id>` for taking upstream commits, instead of refusing with `writer_coordinator_required` until `--no-pull` was typed. Nothing changes on stdout or in `--json`; `--dry-run` and the library/MCP refusal of an explicit pull are unchanged.' },
+ { since: '0.60.190.0', text: 'A managed sync drain whose queued head no consumer can claim now stops within one governor tick with `drain_stalled`, `cause: head_blocked`, when the blocker needs an operator (a refresh fence no refresh process holds: `next.fix` is `gbrain sources refresh <id> --resume`; a running request ahead held by a process that reports `restart_required`: restart it), instead of waiting the 5-10 minute no-progress window. `drain.stall` gains `blocked_by` and `consumer`, the stall line prints `consumer=` and `blocked_by=`, and `claimable here` is read for the head itself (`unknown` when the read fails; it used to print a constant `no`). `gbrain sources writer status` names the blocker of each queued head (`blocked_by`, `claimable_here`) and adds `cancel_command` only when this caller may cancel the blocking request.' },
+ { since: '0.60.190.0', text: '`gbrain repair <kind> --apply` no longer stops at the first write that is accepted but still pending publication while a consumer on this host is publishing: it keeps the receipt (the saved position stays before it), admits the remaining items without a per-item publication wait (at most half the principal outstanding-request cap unresolved at once) and settles them against one shared wait (the write wait with nothing publishing). A run that still stops lists the receipts in `pending` and the same command resumes; `--wait 0` still waits for nothing. With no live consumer, or one that reports `restart_required`, the run stops at the first pending write as before and names the owner.' },
+ { since: '0.60.190.0', text: '`[persistence] phase=` log lines about one write request now carry `request_id`, `operation`, `source`, `slug`, `principal` and `elapsed_ms`, and their 30-second repeat suppression is per request: two requests failing the same phase log two lines.' },
+ { since: '0.60.190.0', text: '`gbrain serve` now logs the behavior changes this brain has not been told about once per process at startup, on stderr. It reads the notice state without marking it delivered, so the CLI, stdio and HTTP notices still show once each.' },
+ { since: '0.60.190.0', text: 'Importing an image no longer writes `type` or `title` into its frontmatter (the keys `gbrain repair frontmatter-keys` strips since 0.60.177.0). Doctor `stale_frontmatter_keys` names 0.60.177.0 and, on a brain with several sources, its fix is the all-sources `gbrain repair frontmatter-keys`, with the per-source commands listed.' },
+ { since: '0.60.190.0', text: '`gbrain embed --stale --images` and doctor `image_assets` find an image whose recorded path differs from the file on disk only in letter case (an exact match still wins), import it under the real-case path, and refuse a case-fold match that is ambiguous or resolves outside the source root instead of importing or counting it. `image_assets` reports case-only, ambiguous and unrooted counts.' },
+ { since: '0.60.190.0', text: 'On a managed brain, a successful `gbrain sync --source <id>` settles legacy rows the pre-managed sync left in `sync-failures.jsonl` one at a time (the imported commit holds the file and a live page claims it, or the file is gone and no page claims it); rows on an unknown commit, sentinel rows, held files and files it did not index stay. Doctor `sync_failures` says how many unresolved rows are legacy and which command settles them, and `gbrain sync --retry-failed` names them instead of saying the ledger is empty.' },
+ { since: '0.60.190.0', text: 'The Postgres in-flight watchdog now also retires a connection whose statement keeps receiving rows or notices past its budget (`pg_connection_stuck` `reason=age`; `reason=idle` when nothing came back, which used to be the only case), and the budget is per statement: an operation that declares a longer `statement_timeout` on its connection (`SET LOCAL`, `set_config`, a session `SET` on a reserved connection) gets that timeout plus the grace, and a declared 0 has no cap, read from the statements themselves so it holds behind a transaction-mode pooler. The warn line adds `reason=` and `budget_ms=`, and `/health?deep=1` reports `pool_inflight_over_budget` only for a statement past its own budget (a long transaction that declared its timeout no longer reads as over budget).' },
+ { since: '0.60.190.0', text: 'Pools count reconnects of connections retired after an incident (stuck, desynced, or closed under running statements): `recovered` and `recovery_failed` in `/health?deep=1` and `getPoolDiagnostics()`, and a failed reconnect logs `pg_connection_recovery_failed`. `gbrain serve` writes its stuck, desync and recovery events to the pool-recovery audit, so `gbrain doctor --only pool_reap_health` now fails on a recovery failure and warns on a stuck or desynced connection in the last hour.' },
+ // #6554 (GBRA-60 D8). `since` is provisional (current VERSION); the integrator restamps it at the merge slot.
+ { since: '0.60.191.0', text: '`gbrain bootstrap harness` now wires the Codex SessionEnd transcript-capture hook (its `hooks.json` group and `config.toml` trust entry) only when capture is on: turning capture off with its no-capture flag skips it, and registrar mode (a non-loopback `--url`) skips it like every other hook, because the hook talks to the local brain rather than the registered remote serve. The consent block names the hook when it is wired. A hook an earlier run installed stays until `gbrain bootstrap harness --remove`. New: `gbrain setup codex` wires Codex MCP and read-context hooks with hash-owned entries.' },
+ // Cat 41 wave 2 findings (GBRA-60). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.197.0', text: 'In a fresh Claude Code session wired by `gbrain setup claude-code` (SessionStart source `startup` or `resume`), the SessionStart hook now waits up to 4 seconds for the stdio `gbrain serve` Claude Code is starting, then prints its context pack (recent world-visible facts). Before, it gave up at once and the session got no pack. Sessions without a setup receipt, and `clear`/`compact` sessions, do not wait; a serve that never answers ends the wait fail-open with heartbeat reason `serve_not_ready`.' },
+ { since: '0.60.197.0', text: 'When `gbrain setup` recorded provider use as declined, gbrain no longer sends the OpenAI model-discovery request (`GET /v1/models`) on engine connect even if `OPENAI_API_KEY` is set, and `gbrain doctor --probe` skips the embedding probe. Doctor gains `provider_consent`, which reports the recorded decision; a decline shows as skipped by consent with the user-run fix `gbrain setup <harness> --providers`.' },
+ // W3 confidence-gated reranking (memory proof wave 2). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.202.0', text: '`gbrain search stats --json` and the `search_stats` tool now always include a `rerank_gate` section, all zeros until you set `search.reranker.gate` to `shadow`; search results and ranking are unchanged. The search cache key now includes `search.evidence_cosine_floor` and the new gate keys (the result cache stays disabled).' },
+ { since: '0.60.202.0', text: '`recall` with `budget_tokens` and a `return_unit` now fills its budget: saved facts are packed first and the delivered evidence gets the budget they leave, so the same parameters return more evidence (up to about 16% more on long conversations). Before, delivered blocks were dropped after the facts and re-counted with a rougher estimate. `budget_policy: "query_first"` is unchanged.' },
+ // W5 adaptive page-unit cut, default on after memory proof wave 2 (gbrain-evals #126). `since` is the VERSION placeholder.
+ { since: '0.60.202.0', text: 'A `return_unit: "page"` call that passes its own budget (`token_budget` on `search` and `query`, `budget_tokens` on `recall`) now stops adding pages once their whole delivered pages fill 1.5 times that budget (`search.page_rank_cut: whole_pages`, `search.page_rank_cut_factor: 1.5`), and the search mode\'s chunk-token cut no longer limits it: you get fewer pages, more of them whole, filling the budget, instead of many partial ones. On 72 BEAM conversations (regression evidence, not held-out) accuracy moved -0.25 points against the cut off (lower bound -1.00, non-inferior at the -3 margin) with delivered context at budget. The response reports it as `delivery.page_rank_cut`. `gbrain config set search.page_rank_cut off` restores the old behavior.' },
+ // Cat 41 wave 2 TTHW (GBRA-60). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.203.0', text: '`gbrain setup claude-code` and `gbrain setup codex` no longer print `gbrain init`\'s standalone output when they create the brain: no search-mode banner, no "Do this next" quickstart (`claude mcp add` and the install-check round trip) and no `harness_wiring` question, since setup has just wired the harness. They print `Brain ready at <path>`, then the first-run settings once, after `Next:` (an agent block, or `notices` in `--json` without `harness_wiring`): the applied search mode with the cost matrix and automatic saving, framed as settings in effect that the agent relays in the install reply and the user can change at any time, instead of "Reply \'defaults\'". No setting or default changed.' },
+ // W1 follow-up (memory proof wave 2). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.204.0', text: '`recall` now accepts relative `since` phrases it used to refuse (`"6 weeks ago"`, `"a month ago"`, `"last month"`, `"the past 2 years"`; months and years step the calendar), and `question` with `include_expired: true` now ranks expired and superseded facts alongside active ones instead of refusing the call. Every `since` value that parsed before gives the same window, and calls without `include_expired` rank active facts only, as before.' },
+ // GBRA-81 item 5 (per-stage search timings). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.205.0', text: 'Every `search` and `query` response now carries `_meta.retrieval.timings` (integer milliseconds per stage, `other_ms` and the operation total), and the CLI explain view of `gbrain search` and `gbrain query` prints them as a `timings:` line; results are unchanged and the timings never appear in result text.' },
+ // Cat 41 first push (#6606, GBRA-60).
+ { since: '0.60.208.0', text: 'A `gbrain remember` call with visibility private from the local CLI now says the fact is recall-only: a `note: private` line and a `private_fact_not_pushed` agent notice naming the world re-save, because session hooks push world-visible facts only. `gbrain --help` lists `remember`, `recall` and `forget` in a MEMORY section, and `gbrain setup` prints a `Memory:` line after `Next:` naming `remember`. What is saved and what is pushed are unchanged.' },
+ // Cat 41 consent (#6607, GBRA-60), approved by Garry 2026-10-13.
+ { since: '0.60.208.0', text: 'OpenAI model discovery (`GET /v1/models`) now runs right before the first OpenAI-routed call instead of on every engine connect, so a brain that never calls OpenAI (a keyless brain running `gbrain doctor` or `gbrain search` with `OPENAI_API_KEY` set) sends nothing. On existing OpenAI installs, callers that pick a model before calling OpenAI read the saved list: fact extraction, content repair and the eval judges, plus `gbrain models` and the doctor display. So on the first run after the 24-hour cache expires, or with no cache yet, they can use the previously discovered model or the static fallback; the next run picks up the new one. A recorded provider decline still stops discovery. Approved by Garry, 2026-10-13.' },
+ // #6574 (publication round trips). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.209.0', text: 'Publishing a page now writes its timeline rows, fact rows, fact field refreshes and take resolutions in a few set-based statements (one per 500 rows) instead of one statement per row, and `insertFacts` inserts in multi-row chunks for every caller. A large page no longer needs thousands of round trips, so it publishes inside `persistence.publication_ceiling_ms` behind a transaction-mode pooler with pipelining off. A projection that takes 30 s or more logs `[persistence] phase=publication reason=slow_projection` with its row counts and per-step milliseconds.' },
+ { since: '0.60.209.0', text: 'Before a publish opens its transaction, the consumer now commits one claim renewal that stamps the request `publishing` and leases it for the publication ceiling plus its grace, and stops renewing until the publish ends. A long publish no longer reads as a lapsed claim, so `gbrain sync` no longer stops `drain_stalled` with `owner_missing` while the publish is still working; a publish past the ceiling still reports `publication_overdue`. An owner that crashes mid-publish now holds its head until that lease runs out (the ceiling plus about 70 s) rather than 30 s.' },
+ { since: '0.60.216.0', text: 'A managed sync now re-freezes, by itself, a page that was cancelled or refused only because another page of the same sync did not commit (a knock-on), under `sync.holds=fail` too and without `--retry-failed`; an operator cancel is never re-frozen. The re-freeze is bounded by `sync.knock_on_refreeze_limit` (per page, default 3, 0 turns it off) and `sync.knock_on_run_limit` (per sync invocation, default 25); past them the run stops `knock_on_exhausted` naming the root request. A checkpoint refused by such a receipt, or by one at an index the run passed without a commit, is re-assessed on every resume and commits without rediscovering the manifest. A "cursor changed" refusal now records its cause: `run_replaced` (superseded, not failed), `window_dropped` (a knock-on), or `outside_fence` (a coordination fault that needs a person). `--retry-failed` no longer silently does nothing when the old run still has open requests: it returns `partial` with `retryWait` naming the request. `gbrain sync status --json` adds `last_error.root_cause`, `cursors` (every live cursor of the source) and `checkpoint_blockers`, and shows the cursor its recorded failure belongs to. The write owner must run this release for the recovery to apply.' },
+ // #6643 PR B (conflict pile).
+ { since: '0.60.217.0', text: '`synthesize_concepts` now checks each concept page against its canonical file before it calls a model or admits a write. A concept whose file differs from the database (`file_database_drift`) is skipped on every cycle, recorded in `dream.concepts.drift_skips` and released once the file and database agree, and the phase reports `warn` naming `gbrain sources reconcile <source> --brain host --audit --conflicts` and `gbrain repair file-drift`. Before, it paid for a narrative per drifted concept every cycle and left another `source_changed` conflict receipt.' },
+ { since: '0.60.217.0', text: 'A maintenance write (a dream-cycle page publication) to a page whose canonical file differs from the database now refuses `source_changed` with detail `file_database_drift` before admission and leaves no request row, instead of being admitted and ending as a conflict receipt. A replay of an earlier request with the same id still returns its receipt.' },
+ { since: '0.60.232.0', text: 'MCP `list_write_conflicts` now refuses a `source_id` outside the caller\'s grant with `permission_denied` (whether or not the source exists), like other source-scoped reads, instead of returning an empty report; its `window` sequences end at the source\'s own newest request (current incarnation) instead of the brain-wide newest, so they no longer reflect writes in other sources.' },
+ { since: '0.60.217.0', text: 'Doctor has a new `maintenance_write_drift` check: it warns when pages behind recent `file_database_drift` conflict receipts (or recorded concept skips) still have a canonical file that differs from the database, and names the read-only `--audit --conflicts` listing and the explicit-only `gbrain repair file-drift` preview. New: `gbrain sources reconcile <source> --audit --conflicts`, MCP `list_write_conflicts` (read scope; database-derived fields only for remote callers) and `gbrain repair file-drift --prefer file|database`.' },
+ // #6650 (fact-fence adoption exits). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.218.0', text: 'Fencing a legacy fact into a fence row a partial earlier run left behind now rebuilds that row from the stored fact: the published row carries the fact\'s own visibility, kind, validity, confidence and speaker attribution instead of the leftover cell\'s, a leftover private row is never reused for a world fact (the world fact gets its own row), and a newly fenced fact keeps its `attributed_to`. Before, a leftover row with a different visibility made a managed adoption refuse every time, while an unmanaged brain fenced the fact into that row and the reconcile gave the fact the leftover row\'s visibility (a private fact could become world); a leftover row with the same visibility overwrote the fact\'s kind, dates and confidence, and every adoption cleared the fact\'s speaker attribution.' },
+ { since: '0.60.218.0', text: 'A managed fact-fence adoption refused as a planning defect (`fence_unrenderable`) is no longer resubmitted every cycle: for a day after the refusal the page is reported as unadoptable (`prior_refusal`), then it gets one more try, or right away once the adoption planner changes. The writer stops collecting one identical failed request per page per cycle.' },
+ { since: '0.60.218.0', text: 'The `extract_facts` phantom-redirect pass no longer waits for the whole source to have no unfenced legacy fact rows: it holds only the top-level pages that own such rows or are the provenance page of an ontology observation (`phantoms_held_legacy_rows` in the cycle report), and redirects the rest.' },
+ // Cat 41 run 4 (GBRA-60). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.219.0', text: 'When `gbrain setup claude-code` or `gbrain setup codex` creates a new brain, it now runs the setup migrations `gbrain init` leaves pending (the same `gbrain apply-migrations` run, without installing services) and prints `[setup] Migrations: ... none pending.` in place of init\'s "Finish setup" line, so there is nothing left to run. If an existing ~/.claude/AGENTS.md, ~/.openclaw/AGENTS.md or OpenClaw cron manifest would be edited by v0.11.0, setup leaves v0.11.0 pending and names the file and the command. A brain that already existed is not touched, and `gbrain init` on its own still prints the hand-off line.' },
+ { since: '0.60.219.0', text: 'On a brain without embeddings, `gbrain recall "<a question>"` (several words that match no entity and no fact text) now ranks facts by relevance to the question, as recall\'s question option does there, with a note, instead of printing "No matching facts." On a brain with embeddings the output is unchanged apart from a hint naming the question command. Recall\'s help now prints its own usage, including the question option.' },
+ // #6650 §1.10 (GBRA L2). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.221.0', text: 'A page write whose recovery is blocked on `unexpected_file_bytes` (its file matches neither the recorded prior nor the published bytes, so every write on that source stays pending) now has a sanctioned exit: `gbrain repair stuck-recovery --source <id>` previews each blocked file with a private diff under ~/.gbrain/backups/stuck-recovery/, and `--keep prior` (restore the prior bytes; the write publishes again) or `--keep disk` (keep your edit; the write ends conflict) with `--apply --expect <hash> --yes` backs up both versions first. A terminal request is never changed. It runs only when named; nothing changes until you apply it, and each resolution is kept as an audit entry that does not expire.' },
+ // #6650 (writer terminal-state visibility). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.222.0', text: 'Writes that ended `failed`, `conflict` or `cancelled` are now summarized instead of only piling up as receipts. A new doctor check, `persistence_terminal_failures`, warns when a receipt blocks work now (a publication recovery record or a sync checkpoint blocker) or when an unresolved receipt is a gbrain-defect class, and on a 24-hour spike only secondarily, naming the build when an older write owner is producing them (`persistence.terminal_failures.window_days`, `spike_factor`, `spike_min`; defaults 7, 3, 25); rows a later write superseded, or from a build older than the release that fixed their cause, count as historical and never warn. `gbrain sync status` adds `terminal_failures` and names a recovery record as `next` when nothing else is. `gbrain write-request` adds `write_error_reason`, `suggestion` and a `diagnosis` with a structured fix for such receipts. New read-only `gbrain sources writer failures <source>` lists or groups them (`--group-by category`). The admin-only `/metrics` adds per-source counts; `/health` does not change. Nothing new is stored.' },
+ { since: '0.60.222.0', text: 'The managed fact-fence step (`extract_facts`, the v0.32.2 adoption) now checks the permanent request-ID caps against only the pages that will submit an adoption. A page suppressed by an identical refusal in the last day, or one with nothing adoptable, no longer counts, so it can no longer push the whole step to the cap and get it refused.' },
+ // #6650 L0 (convergence harness fixes). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.223.0', text: 'On Linux, a `gbrain sync` started after another gbrain process on the same machine was killed no longer treats the dead process\'s heartbeat as a live write owner. Before, it refused to hand its catch-up to the running `gbrain serve` for up to 30 s and ran its own consumer next to it; now it hands the catch-up to the serve (or runs its own consumer when no serve is running). A waiter-only consumer deferring to the dead process promotes on its next check instead of after 60 s. A heartbeat row from another host or container, or from an older gbrain, keeps the time-only rule, as does every row where `/proc` is unavailable.' },
+ { since: '0.60.223.0', text: 'On Linux, when the process holding write claims on this host is killed, another consumer on the same machine now reclaims those claims within about 5 s instead of waiting out their lease (up to `persistence.publication_ceiling_ms` plus about 65 s, so about 365 s by default). Only claims with no recovery record and no publication started are taken, the same guard an expired claim has. An owner that is alive, however slow, or on another host or container keeps its full lease.' },
+ // #6696 PR C (GBRA-93 lane C). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.237.0', text: '`gbrain sources writer failures`, `gbrain write-request`, `gbrain sync status` and doctor `persistence_terminal_failures` now report a write refused because its page\'s canonical file is missing (a ghost page) as category `canonical_file_missing`, whose fix previews `gbrain repair ghost-pages --source <id>`, instead of a sync retry that refuses the same way. A `fence_unrenderable` fact-fence adoption refusal is its own category, and one written by a build older than 0.60.218.0 (the release that stopped the adoption loop) counts as historical and no longer warns.' },
+ { since: '0.60.237.0', text: '`gbrain apply-migrations` no longer prints "All migrations up to date" (exit 0) while a migration is wedged (3 or more consecutive partial runs) and no newer migration has run past it. It exits 1 with `migrations_pending` reason `wedged` and a fix to ask the user about (`gbrain apply-migrations --force-retry <version>` after fixing the cause); `--list` names the wedged migration and its clearing command, `--list --json` adds a `wedged` list, `gbrain post-upgrade` exits non-zero and `gbrain upgrade` prints `Migrations: wedged` instead of `Migrations: complete`.' },
+ { since: '0.60.237.0', text: '`gbrain repair file-drift` now takes `--only <path>` and `--skip <path>` (repeatable; source-relative canonical file paths: a value without `*` is an exact path, and on file-drift only a glob takes `*` within a segment and `**` across segments, so `--only \'concepts/**\'` selects every drifted page filed under concepts/). The globs narrow the selection before the mixed-class check, are bound into the preview hash and appear in the printed apply command, so running that command applies exactly the previewed pages; an apply under other globs refuses `preview_changed`. `--keep` on file-drift is now refused with a pointer at `--prefer database` (keep the database copy) or `--prefer file`, instead of the stuck-recovery value error.' },
+ { since: '0.60.237.0', text: 'gbrain.yml `storage:` accepts an opt-in `keep_db:` list of directory prefixes. On the canonical owner host, the resident `gbrain serve`, `gbrain jobs` or `gbrain autopilot` consumer reconciles each drifted page under those prefixes with the database copy (the `gbrain repair file-drift --prefer database` resolution, inside reconcile\'s protections and backups), at most 10 requests every 10 minutes, never twice for the same drift and never past 90% of the write-quota stop line; other hosts and remote or caller writes are unchanged and keep refusing `source_changed`. Doctor `maintenance_write_drift` echoes each declared policy with how many drifted pages it matches and their receipt cost. An unknown key under `storage:` now prints a warning instead of being ignored silently.' },
+ { since: '0.60.237.0', text: '`gbrain repair content` (the `slug-conflicts` kind) now judges a held `frontmatter_slug_conflict` file with the same screen managed sync froze it with. A held file sync would now import as it is (its `slug:` line names the file\'s own page, or it no longer conflicts) is listed as `import` and imported unchanged, clearing the hold only while it is still the observation the repair read; before, it was skipped as `already_exempt` or `already_clean` and the hold stayed. A file in a source that is a subdirectory of its Git repository now loses its stray `slug:` line instead of being held `still_invalid`. A file sync would hold whatever the repair writes is now held `slug_page_mismatch` naming both slugs, instead of the generic `still_invalid` or `already_exempt` (an alias to the file\'s own page is one).' },
+ { since: '0.60.237.0', text: 'A managed `gbrain sync` whose final checkpoint committed no longer ends `blocked` / `drain_stalled` / `no_admission` (with advice to move the database to port 5432) while it finishes planner statistics and link extraction. That tail now has its own budget: link extraction stops after 5 minutes and leaves the remaining pages for `gbrain extract --stale`, and a tail that is still stuck 30 s later stops `no_progress` at step `finish`. A run stuck before admission still stops `no_admission` after 5 minutes.' },
+ { since: '0.60.237.0', text: 'New doctor check `serve_build_drift` (ops): on a managed Postgres brain it warns "serve is running an older build than this checkout; restart serve and workers" when a live `serve`, jobs worker, autopilot, sync or MCP process on this host reports an older gbrain version in its consumer heartbeat than the binary running doctor. The fix names the installed serve service\'s restart (`systemctl --user restart gbrain-serve.service` or `launchctl kickstart -k gui/<uid>/com.gbrain.serve`), or the pid to stop and start again, and the verify is `gbrain doctor --only serve_build_drift --json`. Nothing restarts automatically; PGLite reads ok.' },
+ { since: '0.60.237.0', text: 'A `gbrain sync` handed to a running `gbrain serve` on a managed brain now treats processing options as the in-process sync does. With no `--no-embed` / `--no-extract` / `--no-schema-pack` flag it adopts an unfinished run\'s stored options instead of refusing `invalid_params`; an older CLI that omits the explicit-flag list counts each processing flag it sends as true as typed. The resident-owner lane of a PGLite brain follows the same rule and keeps an explicit list it is sent. A cost-gate embedding deferral stays a property of that run, so resuming a run that stored embedding on embeds nothing in it. A source with a configured strategy now gets one cursor for `gbrain sync --all`, a single-source sync, the cycle and a delegated run; an unfinished run under the old key finishes under that key first.' },
+ { since: '0.60.237.0', text: '`--skip-failed` and `--include-gitignored` on a managed source now refuse with `managed_sync_flag_refused`, naming the flag, before anything runs: at `gbrain sync` parse (`--all` included), before a hand-off to `gbrain serve`, and for jobs, MCP and the cycle. Before, the refusal was `writer_coordinator_required` "cannot bypass ignored-file or failed-receipt guards", raised later. Rerun without the flag.' },
+ { since: '0.60.237.0', text: '`gbrain sync --retry-failed` on a managed source now prints, for each failure held under another run\'s options, its class and the command that settles it: `resumable` (a replay of the unfinished run, or a fresh discovery under the failed run\'s options, labelled apart), `safely orphaned` (the `gbrain repair managed-sync-orphans` preview) or `unresolved` (what has to finish first). A failure recorded before runs kept their options no longer prints "with the same options as the failed run (this receipt no longer records them)"; its options are recovered when an option set reproduces its cursor key exactly.' },
+ // #6696 PR B (GBRA-93 lane B). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.237.0', text: '`gbrain doctor` now runs its operator sections (write capacity, unresolved write failures, managed sync movement, receipt compaction (`persistence_compaction`), serve build drift, schema-pack consistency) before the slower checks, and bounds every other check by `doctor.entry_budget_ms` (default 15000). A check that does not finish in time is a warn with `details.health: "unknown"` and `reason: "budget"` and a command to rerun it alone, instead of holding the whole run; every check reports `elapsed_ms`. Above `doctor.orphan_ratio.full_scan_max_pages` pages (default 50000) `orphan_ratio` is a sampled estimate marked `estimated: true`; `gbrain doctor --tier deep` scans fully. New: `gbrain doctor --tier ops` runs only the operator sections under a 4000 ms deadline (`--budget-ms` changes it) and reports `complete`, `unknown_sections` and `elapsed_ms`; on PGLite the sections that need a Postgres serve read `not_applicable`. The local doctor now runs `schema_pack_consistency` (pages whose type the source\'s schema pack neither declares nor aliases), which only the remote `run_doctor` report ran before.' },
+ { since: '0.60.237.0', text: 'A thin client\'s `gbrain doctor --tier ops` or `gbrain doctor --only <check>` now asks the remote serve instead of running the thin-client connectivity checks with `--only` ignored: an admin token gets `run_doctor` with `tier: "ops"` / `only`, a read token gets the new read-scope MCP operation `get_brain_health` (write capacity as `ok|low|critical` with a days band, write failures, unsearchable chunks and ghost pages as count bands for the sources it can read, no slugs or exact counts, cached 60 s), and a serve older than this release refuses with `doctor_tier_unavailable` naming `gbrain doctor --tier ops --json` on the brain host. `get_brain_health` is also the MCP verify of the capacity and `maintenance_backpressure` fixes.' },
+ { since: '0.60.237.0', text: 'New doctor check `embedding_state` (brain, runs on the ops tier) counts where indexed text stands against the active embedding column: embedded, pending, keyword_only (embed_skip pages, by design), quarantined, empty, chunks on deleted pages and chunkless pages. It warns only on chunks of pages soft-deleted more than 72 hours ago (`deleted_page_chunks_overdue`, fix `gbrain pages purge-deleted`) and, on a keyed brain, on live pages with body text but no chunk rows (`chunkless_pages_healable`, fix `gbrain embed --stale`); the pending backlog stays the `embeddings` check\'s warning and quarantined pages stay `quarantined_pages`\'. On the ops tier a brain whose active embedding column has no partial index `WHERE <column> IS NULL` reports `unknown` (`embedding_state_unknown`) instead of scanning. Check with `gbrain doctor --only embedding_state --json`.' },
+ { since: '0.60.237.0', text: 'New read-only `gbrain pages unsearchable --source <id> [--state <state>] [--limit N] [--json]` lists the pages search cannot fully see, one row per page and embedding state with its reason, chunk count, bytes and fix; an unknown `--state` refuses with `invalid_params` naming the valid states.' },
+ // #6696 PR B5 (GBRA-93 lane B, ghost pages). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.237.0', text: 'New doctor check `ghost_pages`: on a source\'s canonical owner host it counts live pages whose canonical file is missing (ghost pages: every write to them refuses `source_changed` with reason `canonical_file_missing` and no sync can import them) and names the read-only `gbrain repair ghost-pages --source <id>` preview. Off the owner host, or on a brain with no source checkout, it is `ok` (info, not applicable); an unreadable checkout warns with health unknown. `gbrain pages ghosts --source <id> [--json]` lists them, read-only. `undeclared_db_only_pages` is unchanged.' },
+ { since: '0.60.237.0', text: 'New explicit-only repair kind `gbrain repair ghost-pages --source <id>`: the preview lists each ghost page with its recorded canonical path and revision and prints the apply command with its hash; `--apply --expect <hash> --yes` soft-deletes exactly that set (without `--yes` a non-interactive run exits 3 with the consent payload and changes nothing). It refuses off the owner host (`not_owner_host`), on an unreadable checkout (`ghost_storage_unknown`), and when ghosts are more than half of a source\'s file-backed pages (`ghost_mass_delete_refused`, unless `GBRAIN_ALLOW_MASS_RECONCILE=1`); a page whose file came back before the apply is kept. Removed pages are purged after 72 h; `gbrain restore <slug> --force` undoes one until then. Sync never removes ghost pages by itself.' },
+ { since: '0.60.237.0', text: 'A coordinated write refused because the page\'s canonical file is missing now carries `detail: canonical_file_missing` (message unchanged), and the live file check behind the conflict audit, maintenance and doctor reports reason `canonical_file_missing` for such a page instead of `file_missing`; other `source_changed` refusals keep `file_missing`.' },
+ // Large pages, Wave A read contract. `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.231.0', text: 'A page over 256 KB (`mcp.inline_body_bytes`) read with MCP `get_page` and no body mode now returns an outline plus a first window instead of the whole page; `compiled_truth`, `timeline` and `content` are never filled with part of a page. Read on with `body: "window"` (`lines`, `bytes`, `around_chunk_id` from a search hit, or `next_cursor`); `body: "none"` returns just the revision and size; `body: "full"` or `include_content: true` still return the whole page when it fits the connection. The local `gbrain get` still prints whole pages, and gbrain\'s own thin client pages a large page to its end and checks its sha256 before printing. Hosts advertise this as `capabilities: ["large_pages_v1"]` in `get_brain_identity`.' },
+ { since: '0.60.231.0', text: 'Every MCP tool result is now measured as its complete encoded response, and a read over the connection\'s cap (4 MiB on stdio, `mcp.max_result_bytes_stdio`; 1 MiB on HTTP, `mcp.max_result_bytes_http`) is replaced by a `result_too_large` error instead of a response the client would cut or reject. A whole page that does not fit is refused with `page_too_large_for_inline`, whose fix reads its outline; an older gbrain CLI gets that refusal rather than a partial page and should be upgraded.' },
+ { since: '0.60.231.0', text: 'A remote `put_page` of a page over 256 KB now needs `expected_revision` (`force` no longer stands in for it), and content under half the stored page is refused with `page_shrink_refused` unless `allow_shrink: true` (also accepted per entry by `put_pages`). This stops a window sent back as the page from deleting the unread rest; change large pages with `edit_page`, whose revision `get_page body: "none"` returns.' },
+ { since: '0.60.231.0', text: '`fetch` of a page over 256 KB now returns the window around the searched chunk instead of the whole page, with `metadata.total_bytes`, `metadata.window` and `metadata.next_id` (fetch it to read on). Search result ids for hits past a page\'s first chunk now name that chunk; they decode to the same page and grant nothing.' },
+ { since: '0.60.231.0', text: 'Evidence delivery (`return_unit` on search, query, recall and `assemble_evidence`) no longer assembles a page over 256 KB whole: a `page` unit becomes the window around the hits and `delivered.fallback_reason` says `page_over_inline_bytes`. A truncated snippet for a hit past a page\'s first chunk now points at `get_page <slug> around_chunk_id=<id>`.' },
+ { since: '0.60.231.0', text: '`get_chunks` now returns a page\'s chunks 50 at a time in chunk_index order instead of all of them. Pass `from_index` and `limit` (up to 500 over MCP) to read further. The result is still a list; `_meta.pagination` reports `total_chunks` and `next_from_index`, and MCP callers get a `listing_truncated` notice naming the next call when more chunks remain. The local CLI prints a stderr hint when the default cut the list.' },
+ { since: '0.60.231.0', text: '`get_versions` (`gbrain history`) now returns metadata only for the newest 20 versions by default: id, snapshot time, title, type, tags and frontmatter, without `compiled_truth` or `timeline`. Pass `include_body: true` for the bodies (still filtered for remote callers) and a larger `limit` for older versions (up to 100 over MCP; the local CLI honors any limit). When older versions exist, `_meta.pagination` says so and MCP callers get a `listing_truncated` notice. `gbrain history` shows each version\'s title when no body was requested; `revert_version` is unchanged.' },
+ { since: '0.60.231.0', text: 'Short page leads (exact-slug and alias search snippets, relational-recall synopses, reflex pointer synopses, entity card summaries, entity-name leads, and think\'s anchor and date-window page rows) now read only the first 64 KiB of a page, respect fact withdrawals, and mask private-key text as a token. Think\'s anchor and date-window rows carry at most 64 KiB of page text instead of the whole page. Output for ordinary small pages is unchanged.' },
+ { since: '0.60.233.0', text: 'A `sync` Minions job on a managed brain (autopilot freshness and hand-submitted jobs) now drains its catch-up like `gbrain sync` instead of landing about one page per job: it keeps publishing (bulk groups, one lane) until the source is synced or the job\'s own deadline less a 60 s reserve (its `timeout_ms`, or the queue\'s wall-clock limit for a job without one, at most an hour), so a job now holds a worker slot up to that deadline. When it stops with work left and the stop is safe to repeat, it queues one follow-up `sync` job (`continuation_job_id`, priority 5, behind waiting embeds) on a worker-backed brain. Freshness dispatch is single-flight per source (`maxPending: 1`), and a sync job that starts while another is draining the same source completes as `skipped: sync_in_progress` with `running_job_id` and a `next` that watches it. The job result now carries the CLI\'s `outcome`, `drain` and `next` plus `incomplete` (a queued follow-up\'s `next` observes it; a remotely submitted job\'s `next` asks for a new job or the host operator), keeps the first 50 `pagesAffected` and `held` entries with `pages_affected_count` / `held_count`, prints one stderr line when it stops short, and `jobs get` shows progress while it runs. `sources status`, `writer movement` and `sync status` count a live sync job as the source\'s drain (`live.drain_job_id`, `live_job_id`). Classic (non-managed) sync jobs are unchanged. To go back: `gbrain config set sync.job_drain false`.' },
+ // GBRA-96 (default reranker). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.228.0', text: 'The default search reranker is now Voyage `rerank-3-lite` instead of `rerank-2.5`, for brains that never set `search.reranker.model` (a brain that set one keeps it). In gbrain-evals #148 (v0.10.93) it cut rerank cost 60% at the same 50 candidates × 1,400 tokens, with retrieval quality within noise. To go back: `gbrain config set search.reranker.model voyage:rerank-2.5`.' },
+ // #6650 follow-up (group follower stamps). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.229.0', text: 'On Linux, when a gbrain process holding a group of writes is killed, the group members it had claimed but not started are now reclaimed with its other claims within about 5 s, instead of after their 30 s claim lease. Members it had started, and any member with a recovery record or a publication in progress, are handled as before. A host with a dead owner row ahead of more than eight others now still finds the live `gbrain serve` to hand a sync to.' },
+ // #6696 (GBRA-93 PR A, write-quota outage). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.235.0', text: 'A write refused at a cumulative write cap (permanent request ids or receipt bytes) now fails with `write_quota_exhausted` instead of `queue_capacity`, with `reason` (`lifetime_ids` or `terminal_bytes`) and the brain host\'s reversible `gbrain config set` raise; `queue_capacity` now means only the outstanding-request cap, which frees as queued writes settle. Before the wall, background producers (maintenance, conversation facts, autopilot phases and catch-up syncs) pause at `persistence.capacity.background_pause_pct` (default 80) with `write_capacity_backpressure`, so your own writes keep the rest; the conversation-facts preflight reports a cumulative cap the same host-only way instead of as a wait.' },
+ { since: '0.60.235.0', text: 'Receipt bytes are now charged for what a receipt really keeps. An admission reserves its request body plus 12 KiB (still at least 16 KiB), so a 100 KB page write reserves about 110 KB instead of 16 KiB, and once its last effect settles the receipt gives back everything it does not keep (most small writes keep 3 to 6 KB). Receipts compacted before this release give their excess back in one bounded pass. Doctor adds `persistence_counter_drift` and `persistence_compaction` (warns when a resident consumer has not compacted in `persistence.maintenance.compaction_stale_hours`, default 24), and `gbrain repair receipt-compaction` (explicit-only, preview-bound) compacts receipts past the retention window on demand.' },
+ { since: '0.60.235.0', text: 'A managed sync now checks before its first write that its remaining files fit the write capacity left and refuses `write_quota_insufficient` with the config raise when they do not (nothing is admitted). A sync that passes the check and is then stopped by a cap another writer filled ends `resumable` with stop reason `capacity_paused`; the same command resumes it. Write and sync receipts carry `[gbrain notice write_capacity_low]` (at most once an hour per scope; mute with `gbrain notices mute write_capacity_low`) when a cap is at 80% or runs out within `persistence.capacity.warn_days`.' },
+ { since: '0.60.235.0', text: 'Maintenance no longer submits writes it knows will fail: a page whose canonical file is gone is refused before a request exists (`source_changed`, detail `canonical_file_missing`), and the same write refused three times in a day (`persistence.maintenance.refusal_breaker_threshold`; 0 turns it off) is held back until the page, the planner or the write changes. Doctor `maintenance_write_drift` lists what is held back and how to release it.' },
+ { since: '0.60.236.0', text: '`edit_page` on a large page no longer line-diffs the whole page for its receipt diff: past 4 million old-by-new line pairs (about 2,000 x 2,000 lines) only the changed region between the common leading and trailing lines is diffed, with the same 3 lines of context and page line numbers. When that region is itself that large, the diff is one hunk (every old line removed, every new line added) and the receipt says `diff_coarse: true`. Before, a one-line edit on a 50,000-line page could run the process out of memory. Diffs of smaller pages are unchanged.' },
+ { since: '0.60.236.0', text: 'The page keyword vector (the title arm of search) now indexes the first 65,536 characters of a page\'s timeline, and the database trigger the first 32,768 characters of its timeline entries, so a word that appears only past that point no longer finds the page through the title arm; chunk search still covers the whole timeline. Before, writing a page with a diverse timeline over about 1 MB failed with "string is too long for tsvector". The upgrade rebuilds the vectors of pages whose timeline is over 32,768 characters once.' },
+ // Large pages A7 (Lane 3b).
+ { since: '0.60.242.0', text: 'Automatic fact extraction from a page longer than 8,000 characters now reads the text appended since its last extraction (the newest 8,000 characters when more was appended) instead of the first 8,000 characters every time, so messages appended to a long conversation page yield facts. Re-extracting an unchanged long page makes no model call. A page that changed before that point, or was never extracted, is still read from its first 8,000 characters, and that is recorded in the new `page_extraction_state` table instead of passing silently.' },
+ { since: '0.60.242.0', text: '`extract_atoms` on a page over `cycle.extract_atoms.max_input_chars` now reads the text appended since its last extraction instead of the page head again. Such a read is still partial input: no completion stamp is written and no atom is retired. A complete appended-text read prints no stderr line; a cut read still does.' },
+ { since: '0.60.242.0', text: '`gbrain extract-conversation-facts` now checks a `raw_transcript` sidecar\'s size before reading it: a sidecar over the 25 MiB cap is skipped without being read (before, it was read whole and bypassed the cap), and the cap now applies to the text the parser reads, so a sidecar page whose own body is over the cap but whose sidecar is under it is no longer skipped. The cap is derived from the page ceiling and never sits below it. A size skip now leaves a durable receipt as well as the stderr line.' },
+ { since: '0.60.242.0', text: 'Doctor has a new `extraction_input_truncated` check listing pages whose last extraction read only part of their input (facts from the head or the newest window of a long append, atoms cut at the input cap, conversation pages skipped for size), with sample slugs and the remedy. It warns when atoms or conversation-facts receipts exist (naming `gbrain config set cycle.extract_atoms.max_input_chars <n>`, a paid change for the user to decide); facts-only receipts are reported as info.' },
+ // Large pages A6/A9/T33/T3/F10 (Lane 3).
+ { since: '0.60.242.0', text: 'Pages up to 24 MiB are now stored, chunked and keyword-searchable: `content_sanity.bytes_block` defaults to the 24 MiB page ceiling (was 500 KB), so a page between 500 KB and 24 MiB is no longer stored with `embed_skip` and zero chunks. Import, sync, the managed sync read, CLI stdin (`gbrain put`, was 5 MB) and the MCP stdio message limit (was the SDK\'s 10 MiB) all admit a page at the ceiling; one byte more is refused with the limit named. Code files keep their 5 MB limit. Size refusals no longer tell agents to split pages under the ceiling. A page with an `embed_skip` marker, including one over an operator\'s lower `bytes_block`, keeps its chunks and stays keyword-searchable; it only gets no vectors (it used to drop to zero chunks). `put_page`, `remember` and sync receipts carry `size_state` (sync: `size_states`) naming a large or embed_skip page\'s embedding state: `deferred`, `partial`, `held` or `skipped`. A `put_page` or `capture` body over the ceiling is refused as `request_too_large` before journal admission, so no write request is recorded for it and a body over the journal\'s intent-byte cap no longer returns retryable `queue_capacity`.' },
+ { since: '0.60.242.0', text: 'A page over 1 MiB now commits with its chunks keyword-searchable and no vectors, and is embedded after the write by the stale sweep, `gbrain embed` or the post-write embedding job, instead of embedding every chunk inline before the write commits. Each such page spends at most `embed.max_usd_per_page` (default $2; unlimited under `spend.posture tokenmax` when unset; `off` disables it) over its lifetime per embedding model, newest chunks first; the run caps still apply and the lowest cap wins. A page the cap stopped, or one held for approval, leaves the stale queue, and doctor\'s new `partial_embedding` check names it with the approval command (`gbrain embed --held --max-usd N`, or `gbrain embed --slugs <slug> --max-usd N`). Before embedding, a large page whose head, middle and tail samples are all markup, or two of them match junk patterns, is held instead. Large pages use the free title context tier, never paid per-chunk synopses.' },
+ { since: '0.60.242.0', text: '`gbrain upgrade` now re-indexes pages an older gbrain stored without chunks because they were over 500 KB (`embed_skip: oversized`) when they fit under the effective `bytes_block`: for up to two minutes in its post-upgrade step, then `gbrain reindex --oversized` (new; `--dry-run`, `--source`, `--limit`, `--json`) finishes. It is CPU-only, works with embeddings off, makes those pages keyword-searchable at once and prints a receipt. It removes only the gate-written marker and its `content_flag: oversized`. Pages over 1 MiB are held for embedding approval; the post-upgrade notice shows their count and estimated cost and asks before anything is spent.' },
+ { since: '0.60.242.0', text: 'A page over 1 MiB keeps only its newest 5 large version snapshots in `page_versions` (each snapshot is a full copy of the body); its snapshots at or under 1 MiB, and every snapshot of a smaller page, are kept as before. The persistence journal now admits 64 MiB of outstanding write intent per principal (was 32 MiB), so a second ceiling-size write can wait behind the first. Write-through never writes a canonical file over the 25 MiB pre-push secret-scan limit: it skips with `over_push_scan_cap`, and a managed write that would produce one is refused with `request_too_large`.' },
+ // Large pages: get_chunks truncation marker (coordinator follow-up to the read contract).
+ { since: '0.60.242.0', text: 'When `get_chunks` returns fewer chunks than the page holds, the last chunk in the list now carries `truncated: true` and `next_from_index`, so a client that reads only the array (and not `_meta.pagination` or the `listing_truncated` notice) sees the list is incomplete. The result is still a bare array; the other chunks are unchanged.' },
+ // Large pages A3/T44, A4/T32 (Lane 3a).
+ { since: '0.60.242.0', text: 'Replacing a page\'s chunks now writes them in bounded batches (at most 500 rows and 16 MiB of encoded rows per statement) after one prune, all in the same transaction, instead of one statement carrying every chunk. A page with thousands of chunks no longer builds one giant statement, and a failure in any batch still rolls the whole replacement back.' },
+ { since: '0.60.242.0', text: 'A chunk vector is now tied to the chunk\'s text and its full embedding input rather than its position. When an edit inserts or removes chunks above it, a projection rebuild moves the unchanged chunk to its new index with its vector instead of dropping it, so only new or changed chunks wait for embedding. An embed that finishes after the page changed now commits the vectors of the chunks that are still the same (same text, source and embedding input) and leaves the rest for the next run, instead of discarding the whole run; the page\'s embedding signature is stamped only when every chunk got its vector. A vector built under an old title or synopsis is still dropped.' },
+ // #6712 PR 1 lane B (prescreen, file_drift, lost-manifest re-discovery); `since` is a placeholder until the merge-slot stamp.
+ { since: '0.60.255.0', text: 'A managed sync now skips a file whose import provenance matches it (same bytes on disk, the page still at the revision that import wrote, the same parser) without preparing it: discovery prescreens it and the guarded no-op checks pass it in one transaction. Sync receipts carry a `prescreened` count. A no-change tree walk of 2,000 pages dropped from about 10 s to under 1 s. `--full` bypasses the prescreen.' },
+ { since: '0.60.255.0', text: 'A managed sync no longer imports a file over a database version of its page that sync never saw. When the page changed since its file was last imported (or, in a tree walk such as a first sync, `--full` or an unreachable checkpoint, has no usable import record) and the import would change it, the file is held with the new code `file_drift` and the page keeps the database version; `gbrain repair file-drift --prefer database|file` resolves it. Pages under `storage.keep_db` prefixes are not held: the keep_db worker reconciles them from the database. These holds never escalate; with `sync.holds=fail` the run stops with `file_drift` instead. A page that survived a shared-origin delete is held too: the delete\'s warning and the hold both name `gbrain repair file-drift --prefer file` instead of `sync --full`.' },
+ { since: '0.60.255.0', text: 'A managed sync whose frozen manifest is missing no longer stops with `storage_error` until an explicit `--retry-failed`: the next sync re-discovers the whole tree at HEAD and finishes, skipping what the lost run already imported. Dry runs and company-brain sources keep the refusal.' },
+ // #6712 PR 0 (#6694 + write-only provenance); `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.248.0', text: 'A managed sync of a source rooted at its Git repository root now checkpoints whichever `slug_root_mode` the source pins (both modes give it the same slugs) and keeps that pin; before, a `source-root` pin failed every checkpoint with `revision_conflict`. A plain `gbrain sync --no-pull --source <id>` now finishes a checkpoint that already failed this way. On a source in a subdirectory, a pin that changes while a sync runs is refused as `slug_root_mode_mismatch` (a person chooses the mode) instead of `revision_conflict`; restoring the pin lets the next plain sync finish. After a downgrade, an older gbrain reports these as `revision_conflict` again.' },
+ { since: '0.60.248.0', text: 'Managed-sync import provenance now also records the bytes each publish left on disk (`disk_sha256`, `disk_blob_oid`: the canonical writeback when sync rewrote the file), the page revision it produced and what parsed it (import parser version, Markdown chunker, schema pack), and a sync that skips an unchanged file records the same. Nothing reads these yet; a later release uses them to skip unchanged files. Records written before this release lack them and are replaced on the next import of their page; an older gbrain ignores them.' },
+ // #6693 (D7): writes refused while their page's file awaits import.
+ { since: '0.60.245.0', text: 'A write refused because its page\'s canonical file holds a committed Git change that managed sync has not imported yet now says so (`source_changed`, reason `pending_import`, "The canonical file holds a committed Git change that sync has not imported yet.") instead of "an uncoordinated local edit". A `remember` refused that way, or refused because sync held the file, is kept: after each managed sync, gbrain replays those remembers whose page now matches its file, once, with the fact\'s original date and the caller\'s original authority (at most 50 per sync; the sync result\'s `replayedRemembers` counts them), so the agent should not save the fact again. `put_page` and other writes are not replayed: resubmit after the next sync. Remembers refused before this release are listed by `gbrain repair failed-writes --source <id>`.' },
+ // #6686 (D8): a facts fence below the timeline sentinel.
+ { since: '0.60.245.0', text: 'A page whose only `## Facts` fence sits below the timeline sentinel keeps it there: `remember` and `extract_facts` now add their rows to that fence (and strike a replaced row where it lives) instead of adding a second fence above the sentinel, and `extract_facts` reconciles such a fence instead of warning `FACTS_FENCE_BELOW_SENTINEL` and freezing its facts. A page that already has a fence on each side of the sentinel still warns, now naming `gbrain repair split-facts --source <id>`, an explicit preview-then-apply repair that merges the two fences under their own row numbers and refuses a page whose fences share a row number.' },
+ // Wave 17 lane 3 item 3.4 (#6675, decision D3 option B). `since` is a placeholder until the merge-slot stamp.
+ { since: '0.60.249.0', text: 'The extract_atoms phase now honors `models.tier.utility`: its model is `models.dream.extract_atoms`, then `models.tier.utility`, then the key-aware utility default. A brain that routed its utility tier to another model without setting `models.dream.extract_atoms` extracts atoms on that model from now on (it used the built-in utility default before); `models.default` and `GBRAIN_MODEL` alone still do not change this phase. `gbrain models` shows the row and its source. Set `models.dream.extract_atoms` to keep a different model for this phase.' },
+ // #6608: fact writers onto a page of an unbound source.
+ { since: '0.60.249.0', text: 'On Postgres, `remember` about an existing page of a source that has a checkout but no canonical owner now follows the same rule as `put_page`: with `persistence.unbound_write=database_only` a page without a canonical file gets the fact fenced into its database body (database-only, `write_through.skipped: unbound_source`), and otherwise the refusal (still `unavailable` with `write_error: owner_unavailable`) carries `detail: unbound_source`, the opt-in or classic file path, and an ask-the-user fix instead of the generic writer hint. `loops_close` fact retirement and `gbrain facts relink` fence such pages the same way.' },
+ // #6610: classic unfenced facts on database-only pages.
+ { since: '0.60.249.0', text: 'On a brain without managed persistence, `extract_facts` (and the v0.32.2 fence step) now fences unfenced facts of a database-only page (no recorded file and none at its slug path) into the page\'s database body when such a write is database-only (`sync.write_through` off, or on Postgres an unbound source with `persistence.unbound_write=database_only`, which stamps the page `unbound_source`), instead of reporting a missing canonical file and halting the facts fence every run. Without that opt-in the rows stay unfenced and their page skips reconciliation, but they no longer count as pending (`legacyRowsPending`) or trigger the guard; doctor `fence_integrity` lists them under `unbound_legacy_facts` and asks the user about the opt-in, and the migration reports them as `skipped_unbound_source`.' },
+ { since: '0.60.249.0', text: 'On a brain without managed persistence, `gbrain restore` / `restore_page` of a soft-deleted page whose recorded file is gone from the checkout now refuses (`source_changed`, detail `canonical_file_absent`) when the restore writes no file, instead of restoring a page the next `gbrain sync --full` deletes again. Put the file back and sync, or pass `--detach` (`detach: true`) to restore it database-only (`database_only_reason=detached`, no `source_path`); a file synced back at its path binds the page again. New doctor check `missing_recorded_files` lists live pages a full sync would delete this way.' },
+ { since: '0.60.250.0', text: 'Remote agents and token-floor connections now get stored contradiction findings from `find_contradictions` instead of an availability note or a refusal: only findings whose two sides they can read now, each side re-read live with its `source_id` and `trust_tier`, never the stored report text; `min_trust` and the token floor filter instead of refusing. A local `gbrain find-contradictions --source <id>` (or `GBRAIN_SOURCE`) now gets that scoped view instead of the note; the bare command still reads the whole stored run.' },
+ // Pre-W1 integrity wave (belief ledger Q6 + inherited purge read gaps). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.251.0', text: 'A take graded only in the database (for example by `grade_takes` on a source without managed persistence) keeps its grade when its page is published again from a fence that has no resolution cells: a prose edit, a re-import, a sync or `revert_version` to a version from before the grade. Before, every such publish erased the grade. A fence that carries resolution cells still writes them, and a take whose claim is edited in place (same row number) now drops the old claim\'s grade.' },
+ { since: '0.60.251.0', text: 'After `purge_fact` or a page purge, no read returns the purged text from what the purge hid: a page a purge hid for re-derivation now reads as missing in `get_page` and `fetch` (even with `include_deleted`) and returns no `get_versions` history, and a page purge now hides rows derived from the page and its facts, as `purge_fact` already did. `purge_fact` now redacts every retained version of a page (it stopped after 5,000), and its receipt\'s `pages` and `page_versions` stores also report a page or version that still states the claim in its title or frontmatter, alongside prose (`out_of_scope: source_prose`).' },
+ // W1 trust prerequisites (#6783 §12 (a) and (b)).
+ { since: '0.60.253.0', text: 'A write less trusted than a take or timeline row no longer deletes, replaces or deactivates it. A page publish (`put_page`, sync, a maintenance republish) that drops or rewrites such a row, `takes_remove`, the takes reconcile (`gbrain extract takes`) and the timeline orphan prune now keep the row as it is and file a `forget` proposal (`gbrain trust review`): `gbrain trust confirm tp<id>` applies the change, `gbrain trust drop tp<id>` keeps the row. A refused `takes_remove` returns `forget_requires_owner` with the proposal ref. The page text keeps what the writer published, and the put_page response lists the proposals under `contested`.' },
+ { since: '0.60.253.0', text: 'Lowering a row\'s trust tier now lowers what was derived from it: facts, takes, pages and timeline rows reached through their recorded derivation inputs drop to the least trusted of their current inputs (an agent edit that lowers a page, an owner tier change, the `gbrain trust claim-sources` relower repair, a derived republish, a fence field rewrite). Raising a tier never promotes a derivative, and recorded history keeps its tiers. A lowered row\'s `write_origin.input_lowered` names the tier it had; on a managed brain a dependent in another source is marked `needs_rederive` instead.' },
+ // Held-removal accept fix. `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.254.0', text: 'Accepting a held take change (`gbrain trust confirm tp<id>`, or accept-all in `gbrain trust review`) that struck a take through or changed its kind or holder now applies exactly that change. On v0.60.253.0 the accept removed the take from the page and the takes index instead (a take graded in its fence was refused and kept). `gbrain repair accepted-takes` lists each take the records prove was removed that way and, with `--apply --expect <hash>`, restores it at the tier of the accepted write; a grade only the database held is not restored. Accepting a held take or timeline change on a page stored in segments now applies it instead of refusing with `page_body_segmented`.' },
+ // #6712 PR 1 lane C (L2 one page, one fate, #6565, #6600): pass once VERSION is stamped 0.60.255.0 (behavior-change-notice.test.ts fresh-install cases).
+ { since: '0.60.255.0', text: 'A managed sync now gives each page its own fate (#6712): a page that does not commit is held, retried or stops the run on its own, and the pages admitted after it still publish and are counted from their own receipts. Before, one failed page cancelled the rest of its bulk group and every group admitted ahead of it, and later syncs re-froze them. Two changes of one page in one sync (a delete and an import of one slug, say) are never published in the same group, and the later one is held behind the earlier one (`blocked_on`) when that one is held. `sync.knock_on_refreeze_limit` and `sync.knock_on_run_limit` are retired (`gbrain config set` refuses them) and `knock_on_exhausted` is no longer raised; an older receipt with it reads as superseded. The write owner must run this release.' },
+ { since: '0.60.255.0', text: 'A file that changed after its sync request was admitted (`source_changed`) is now retried after the manifest\'s last entry, up to three times, before it is held `worktree_dirty` (before: one retry in place). A dropped connection re-freezes the entry in place; an unrecognized database refusal (an unknown P0001 or a 55000, #6565) stops the run as systemic with the classifier\'s action, and the next plain sync re-freezes the stopped entry, at most three times in a row before `--retry-failed` is needed. A held deletion whose exact page an authorized delete already removed (#6600) settles and clears its hold. `preparation_stalled` holds are retried by every sync until their third attempt, a `concurrent_write` hold is re-screened when its page\'s revision moves, and `--retry-failed` now rediscovers a run whose checkpoint a receipt still blocks.' },
+ // #6712 PR 1 lane A (drain lease, one cursor, options inheritance).
+ { since: '0.60.255.0', text: 'A managed source now has one drainer at a time (#6712): every managed sync pass (the CLI, `--no-delegate` included, a serve, a `sync` job, the dream cycle) runs under the source\'s drain lease, a 2-minute lease renewed every 20 s, so a crashed holder\'s lease lapses within one cron tick. A second `gbrain sync` follows the holder within its own `--timeout`, printing the holder (kind, pid, host, version) and the pages it commits, and takes over when the holder finishes; out of budget it exits 0 `resumable` with code `sync_drain_lease_held`, `next.retry_after_ms` 60 s and `safe_to_loop`. Ctrl-C stops following and leaves the holder running. A `sync` job or the cycle that finds the lease held skips, as it did on the sync lock.' },
+ { since: '0.60.255.0', text: 'A `gbrain sync` that follows another drainer no longer exits 0 forever behind a wedged one: when the lease holder commits no page and saves no cursor for 5 minutes, the run stops `blocked` (exit 1) with `drain_stalled`, cause `no_progress`, `drain.stall.lease_holder` naming the holder, and a fix that reads `gbrain sources writer status --source <id> --json` and names `gbrain sync --source <id> --no-pull --break-lock` for a holder that is gone.' },
+ { since: '0.60.255.0', text: 'A managed source keeps one sync cursor (#6712): the cursor key is the source incarnation (plus the company, for a company approval) instead of a digest of the writer, its authority and the options, so a CLI run, a serve, a job and a different writer all resume the same cursor. An unfinished cursor an older gbrain left under another key is finished in place under that key and reported in `cursorAdopted`; other old-key cursors are retired (`superseded_by_adoption`, queued requests cancelled) once nothing under them is running, and a run waits (`writer_pending`) for a request still running under one before it publishes. `cursorFanIn` counts them.' },
+ { since: '0.60.255.0', text: 'Resuming an unfinished managed sync never refuses over processing options any more (#6712): the cursor\'s `--no-embed`, `--no-extract` and `--no-schema-pack` opt-outs are inherited by every run that resumes it, a flag that would have asked for more processing is reported in `inherited_options` (and printed), and `cursor_processing_options_conflict` is no longer returned. A writer that resumes another writer\'s cursor admits the rest under its own validated grant; requests already admitted stay under their original principal, are read and cancelled under it, and are never rewritten.' },
+ { since: '0.60.255.0', text: 'The delegation wire\'s `explicitProcessing` field is accepted from a sync client below 0.60.255.0 and ignored until 2026-11-14 (`WIRE_SKEW_WINDOWS` in `src/core/wire-skew.ts`), then removed. `gbrain sync --retry-failed` on a managed source now counts every failure of the source, since no failure sits under another cursor key.' },
+ { since: '0.60.255.0', text: 'Downgrading below 0.60.255.0 must be quiescent: stop `gbrain serve`, autopilot and sync crons, let the running sync finish, then downgrade. An older binary does not take the drain lease; while a newer non-job holder drains, it writes a `gbrain-drain-lease` row that the live-sync check of 0.60.231.0 and later sees, so such an autopilot backs off instead of dispatching a second sync, but an older CLI started beside a newer drainer is not fenced. An older gbrain resumes an old-key cursor only; a cursor this release created under the new key is invisible to it and is rediscovered from the last synced commit.' },
+ // #6785/#6786 corpus hotfix.
+ { since: '0.60.256.0', text: 'A session transcript whose extraction answered `chat_unavailable` (no usable extraction model, as in every `gbrain bootstrap verify` before this release) is no longer marked ingested: it stays pending, and files an earlier build marked `skipped: chat_unavailable` are extracted again by the next sweeps. That is a one-time paid catch-up after upgrading, bounded by the sweep window caps (8 windows per file and 32 per sweep; `GBRAIN_CORPUS_WINDOWS_PER_SWEEP` lowers the total) and paused by `GBRAIN_SWEEP=0` or `gbrain config set facts.extraction_enabled false`. Nothing is rewritten during the upgrade, and retention keeps those files for 3x `dream.synthesize.corpus_retention_days` until they are extracted. `bootstrap verify` no longer runs the corpus pass. The sweep, both harvest lanes and the OpenClaw `compact()` inline harvest check a claimed but not activated canonical worktree before any model call and skip it as `writer_coordinator_required`, naming `gbrain sources writer status <source>`. A corpus window that fails after its model call is retried on the next sweep, then after 10, 20 and 40 minutes, then no longer paid for (`corpus_window_dead_lettered`) until `gbrain sweep --retry-failed --apply` (paid, preview without `--apply`) or one extraction model or provider change. The `serve --http` corpus drain writes its skip reasons and failures to stderr.' },
+ // Fix wave 18b (old backlog). `since` is the wave's expected merge slot until the slot stamp.
+ { since: '0.60.257.0', text: 'Doctor checks that used to report `ok` or `skipped` when an unrelated column or table was missing now fail with the real database error; only the exact object a check depends on reads as "not migrated yet". Page writes, rename aliases, links preparation and Google counterparty resolution likewise tolerate only their own missing table or column and propagate any other undefined-table or undefined-column error.' },
+ { since: '0.60.257.0', text: '`sync_freshness`: a source whose first sync is running reads `warn` (`sync_first_run_in_progress`) instead of fresh, and "never been synced" becomes `sync_no_successful_sync` (fail) with the last attempt and a fix for its state. Adopted read-only skill-pack catalogs no longer fail it (`read_only_pack_count`).' },
+ { since: '0.60.257.0', text: 'Onboarding `entity_link_coverage` and `timeline_coverage`, the MCP onboarding counts and `extract-ner` typed edges count the page types the active pack declares as entities, per source. A pack that does not load makes the checks warn `entity_types_unavailable`, leaves the MCP entity counts unknown and makes `extract-ner` report `pack_unavailable`.' },
+ { since: '0.60.257.0', text: '`gbrain sources writer activate` (dry run and real) adds `warnings[]` with one `git_durability_not_enabled` entry per filesystem source whose Git effects would stay skipped, and prints them on stderr without `--json`; activation is not refused.' },
+ { since: '0.60.257.0', text: '`think`, MCP `think`, `synthesize`, CRAG think escalation (`search.crag_think`), dream auto-think, `takes search --semantic`, `search diagnose`, `gbrain eval` vector baselines and `brainstorm` now embed their query with the brain\'s `embedding_query_prefix`, like hybrid search already did; on a brain with a prefix their retrieval shifts and saved eval baselines move.' },
+ { since: '0.60.257.0', text: 'On Postgres, a hybrid keyword statement that hit `search.keyword_statement_timeout_ms` is skipped for `search.keyword_timeout_negative_cache_seconds` (default 600 s, 0 = off) in the same serving process when the same statement and scope run again: the search answers from the vector arm with `keyword_arm_failed: skipped_after_timeout` instead of waiting for the timeout. A narrower or differently scoped query, another brain and `use_cache: false` still run it; each timeout writes one `search.keyword_timeout_stats` row that doctor `keyword_plan` reports.' },
+ { since: '0.60.257.0', text: '`recall` with `question` adds an informational `facts_calibration: {status: "unmeasured", model_key}` when semantic matching ranked facts on an embedding model without measured admission floors, and shows one `facts_calibration_unmeasured` info notice per brain per session (mute with `gbrain notices mute facts_calibration_unmeasured`); `facts_degraded` is unchanged.' },
+ { since: '0.60.257.0', text: 'Dream patterns now quote-verify the timeline entries a patterns child appends with `add_timeline_entry`: an entry quoting text that is not in this run\'s reflections moves to the page\'s `unverified_claims`, and appended pages count in `patterns_written` (new `details.timeline_appends`). `appended_unverified` stays as a deprecated alias.' },
+ { since: '0.60.257.0', text: 'In-cycle dream patterns runs (autopilot, bare `gbrain dream`) now wait `dream.patterns.min_interval_hours` (default 6) after the last completed run and skip with `patterns_min_interval` and `next_eligible_at`; `gbrain dream --phase patterns` and `--once` still run at once. A patterns child\'s `get_page` results past `dream.patterns.child_read_budget_kb` (default 200 KB) come back as a short summary (`truncated: true`, `read_budget_exhausted`). Set either to 0 to turn it off.' },
+ { since: '0.60.257.0', text: 'New: `gbrain trust backfill --repair-unknown-markers` previews pages whose `trust_tier: unknown` marker sits below their stored tier (stamped by agent edits before v0.60.249.0) with the evidence for each, and repairs only the pages you name with `--slug` and the preview hash (`--expect`). `gbrain trust review` shows a repair command on `lower_page` items that marker caused.' },
+ { since: '0.60.257.0', text: '`gbrain doctor` has a new `embedding_identity_unqualified` check: a brain whose `embedding_model` row has no provider prefix now warns and names the `gbrain migrate embeddings --to <provider:model> --dry-run` preview (applying it re-embeds facts and is paid).' },
+ { since: '0.60.257.0', text: 'Gmail mail sent with `Precedence: bulk`, `list` or `junk`, a `List-Id` header, or a no-reply `Reply-To` no longer opens a reply-owed loop in `gbrain waiting`. Loops opened before this release stay open: `gbrain waiting` counts those from such senders and prints `gbrain loops drop sender <email> --source <id> --dry-run` for each (preview, then run without `--dry-run`; a drop cannot be undone).' },
+ { since: '0.60.257.0', text: '`gbrain loops mute sender|thread` (`loops_mute`) now also closes the muted sender\'s or thread\'s open reply-owed loops (status `dropped`, `closed_by: muted`) and returns their ids in `closed`; before, existing loops stayed open. `gbrain loops unmute` (`loops_unmute`) queues those loops for a re-check on the next Gmail sync, which reopens one only when nothing answered its thread since, and returns `requeued`. Both take `--dry-run` (`dry_run`) and return an `undo_command`. Commitment and decision loops and manually closed loops are not touched.' },
+ { since: '0.60.257.0', text: '`gbrain google status` now reads each linked Google source\'s calendar once (`--no-probe` skips it) and, when the account cannot read it (HTTP 403 or 404), names it with `code: calendar_unreadable` and the fix, and reports `ok: false` with exit code 1. The sync records the same result instead of looking like an empty calendar, and doctor warns `google_calendar_readable`.' },
+ { since: '0.60.257.0', text: 'On Postgres, an aborted transaction (a request deadline, a cancelled job or a closed client) now cancels the statement it is running before it releases the connection, instead of leaving that statement running on the server until it finished on its own. A statement waiting on a lock is cancelled within the settle window; the abort error keeps the driver error as `cause` and reports a failed cancel as `cancelFailure`.' },
+ { since: '0.60.257.0', text: 'A second `gbrain serve` that could not bind the resolve IPC socket (another serve owned it) now retries every 30 seconds (plus up to 5 s jitter) and takes the socket over once the owner is gone, so hooks keep per-turn context without restarting the surviving serve. The single-owner rule is unchanged: a live owner is never displaced.' },
+ { since: '0.60.257.0', text: 'On Windows, a PGLite brain whose data directory makes the IPC socket path longer than 107 bytes now places its sockets at `%USERPROFILE%\\.gbrain\\run\\<kind>-<hash>.sock` (the Postgres scheme, same `.gbrain-ipc-secret` guard) instead of failing to bind them, so hooks and local commands reach `gbrain serve` again. A path still too long is logged as `ipc_path_too_long` and reported by the new doctor check `ipc_socket_path`.' },
+ { since: '0.60.257.0', text: '`gbrain backup create` on PGLite now refuses before it takes the lock or writes anything when the brain is outside what its archive holds: a data directory that is not `<root>/.gbrain/brain.pglite` or is reached through a symlink is `unmanaged_database_path` (a `.gbrain` alias used to get `symlink_path`), and an estimated archive over 8 GiB is `backup_too_large` (it used to run the dump and fail late). Under `--json` both are their own envelope with an ask-the-user physical-copy fix instead of `storage_error`; the legacy `reason` is unchanged. Doctor `pglite_data_dir` now warns on a healthy PGLite brain whose estimated archive passes 6 GiB.' },
+ { since: '0.60.257.0', text: '`gbrain bootstrap harness --token` on a PGLite brain now wires the harness when no serve answers at the serve URL and none holds the brain, and exits 13 with JSON `status: "pending_verify"` instead of exit 1 before writing anything. Re-run the same command with the same `--token` once `gbrain serve --http` runs to verify it; `gbrain bootstrap harness --status` reports `status: "partial"` and exits 1 until that run passes. A serve holding the brain at another URL, any HTTP answer, no `--token` and Postgres brains still fail as before. The harness `--json` result gains `status` (`ok`, `failed` or `pending_verify`).' },
+ // #6803 parts 1 and 4 hotfix. `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.258.0', text: 'An automatic embed-backfill that ends with nothing embedded and the same blocked pages (a projection that keeps failing to rebuild) is no longer resubmitted every 10 minutes: the next automatic submission waits twice the cooldown per identical failure, and after 3 identical failures sync, connector and federation submitters stop (`stalled`) until the blocked pages or the stale chunks change or a run embeds something. A retry inside one job that finds the same blockers dead-letters at once with `embed_backfill_stalled`. Doctor `embed_backfill_stalled` names the blocked pages and `gbrain projections drain --dry-run` previews the repair. `gbrain embed --stale` and `gbrain jobs submit embed-backfill` are not held back.' },
+ { since: '0.60.258.0', text: 'A managed Google or GitHub source whose credential no longer matches its pinned account is now skipped by autopilot after the first refusal (fan-out `unavailable-path`, freshness `freshness_source_path_skipped` with `code: connector_account_changed`) instead of being synced and refused every interval. Doctor `connector_account_mismatch` lists such sources. A `gbrain sync --source <id>` that passes the account check, or a change to the source\'s connector config, clears the skip.' },
+ { since: '0.60.258.0', text: 'A connector source\'s autopilot cycle now extracts facts and recomputes emotional weight only for that source\'s pages changed since its last completed cycle. Before, both phases walked every page in the brain on every connector cycle, which on a large brain ran past the 30-minute job deadline, so the cycle never finished and repeated the full walk.' },
+ // LHF wave 2 item 0 (GBRA-94): tokenmax `query` no longer expands by default.
+ { since: '0.60.259.0', text: '`gbrain query` no longer runs LLM query expansion by default on `tokenmax`, so no search mode expands by default. On 300 LongMemEval-S questions with the reranker, `query` without expansion kept retrieval within noise (298 vs 299 of 300) and its p50 fell from about 2 s to about 230 ms (gbrain-evals expansion-latency report, 2026-10-14). To keep expanding: `gbrain config set search.expansion true` for the brain, or pass `--expand` / `expand: true` per call.' },
+ // #6828 / #6718 hotfix. `since` is a placeholder equal to the branch VERSION until the merge-slot stamp.
+ { since: '0.60.261.0', text: 'The update check (the startup `UPGRADE_AVAILABLE` marker, `gbrain check-update`, `gbrain self-upgrade`, doctor\'s `self_upgrade_health` and the `auto` channel) now reads the version at the `latest-stable` tag, the published release `bun update` installs, instead of master\'s `VERSION`. A version stamped on master but not yet released is no longer announced, and `auto` no longer tries to install it (#6718, #6828).' },
+ { since: '0.60.261.0', text: 'A `gbrain upgrade` whose install step leaves the same version running now prints `No newer version was installed` instead of `Upgrade complete`, and keeps `last_upgrade`, the pending-update marker and the `JUST_UPGRADED` breadcrumb as they were. The `auto` channel no longer exits for a relaunch after such a swap and no longer records the target known-bad: it audits the attempt as `skipped` and retries after 24 hours. A version is recorded known-bad only when it was installed and then failed, under the version actually installed.' },
+ { since: '0.60.261.0', text: '`gbrain doctor` (`self_upgrade_health`) now warns when `self_upgrade.failed_versions` holds a version the audit proves was never installed (an earlier release reported a no-op swap as swapped and recorded it known-bad, #6828), so `auto` would skip that release forever. `gbrain self-upgrade --clear-never-installed` previews the entries and the swap that recorded each; `--apply` removes exactly those. A post-upgrade failure recorded with no installable target (`latest`, `unknown`) now clears from `upgrade_errors` once the binary is past the version it failed from.' },
+ // #6831 + #6816 hotfix. `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.262.0', text: 'A managed Google or GitHub connector item whose content matches a page purge tombstone is now skipped, and the rest of the sync continues (#6831). Before, the pages guard\'s `purged_content` refusal of that one item ended the whole sync job, and every later sync of the source died the same way. Skipped items are listed in `gbrain sources status` ("skipped as purged content"), and `gbrain pages unpurge <slug>` lets one back in. Every other failed connector write still ends the run.' },
+ { since: '0.60.262.0', text: 'A connector source whose syncs keep ending on an error now says so (#6831): `gbrain sources status` names the error, the item and a read-only next step, and reads STOPPED after 3 failed runs in a row; `gbrain sync status --json` adds `connector_last_error` with that read-only fix; doctor `sync_freshness` warns about a STOPPED source even when its last good sync was recent (fails past the fail age). `last_error`, `state` and `next` are unchanged for connector sources.' },
+ { since: '0.60.262.0', text: 'A `claude-cli` usage-policy refusal ("API Error: <model> can\'t help with this ... https://www.anthropic.com/legal/aup", and the older "violate our Usage Policy" and "safeguards flagged this" wordings) is now a provider content block (`claude_cli_usage_policy`, #6816): `extract_atoms` tombstones the item after its consecutive-failure limit instead of re-sending it every run, and with `chat_fallback_on_refusal: false` the prompt is not sent on to the next model in `chat_fallback_chain`. Other `claude-cli` errors are unchanged.' },
+ // #6834 hotfix. `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.263.0', text: 'A managed sync whose checkpoint was refused `revision_conflict` on `__managed_sync_checkpoint__` because the source\'s `last_commit` moved under it (#6834) no longer blocks forever: when the source already records the run\'s target, the next plain `gbrain sync` finishes the run; when it records any other commit, `gbrain repair managed-sync-orphans --source <id>` lists the cursor as `checkpoint_moved` (preview, then `--apply --expect <hash>`) and the next sync discovers from that commit. Doctor `sync_failures` and `sync_freshness` name that repair as their fix, the receipt reason is `sync_checkpoint_moved` (fact batches: `facts_batch_incomplete`) instead of "read the current page", the terminal-failure action reads `gbrain sync status` instead of `gbrain get` on the bookkeeping slug, and a later committed checkpoint supersedes the refused receipt.' },
+ // W1 belief ledger (#6806).
+ { since: '0.60.265.0', text: 'On a managed brain, `gbrain pages purge-deleted` (retention cleanup of pages soft-deleted more than 72 hours ago) no longer writes purge tombstones: it removes the page as before but records no page, fact or take tombstone, so the same content can be imported again later, as on a brain without managed persistence. Only `gbrain delete <slug> --purge` and `purge_fact` forget content. A page purge now also holds its source exclusively while it publishes, so other writes to that source wait for it.' },
+ // #6712 PR 2 lane L3 (flags and config keys): `since` is a placeholder until the merge-slot stamp.
+ { since: '0.60.266.0', text: 'Five `sync.*` config keys are no longer read (#6712): `sync.bulk_max_txn_ms`, `sync.hold_cap`, `sync.hold_escalate_count`, `sync.hold_escalate_pct` and `sync.parser_regression`. Set `GBRAIN_SYNC_BULK_MAX_TXN_MS`, `GBRAIN_SYNC_HOLD_CAP`, `GBRAIN_SYNC_HOLD_ESCALATE_COUNT`, `GBRAIN_SYNC_HOLD_ESCALATE_PCT` or `GBRAIN_SYNC_PARSER_REGRESSION` in the environment of the process that syncs instead; a value stored on the brain is kept but not applied, so a tuned brain runs with the defaults (15000, 500, 50, 5, stop) until the variable is set. `gbrain doctor --only sync_config_keys` lists stored values that stopped applying, `gbrain config get <key>` prints the value in effect and where it comes from, and `gbrain config set` of a retired key warns, names the variable and writes nothing (exit 0).' },
+ { since: '0.60.266.0', text: '`sync.job_drain`, `sync.foreground_priority`, `sync.federated_v2`, `sync.waive_batch` and `sync.bulk` are rollback keys (#6712): `false` still restores the earlier behavior a notice named, and they stay honored until at least 2027-01-14 (`CONFIG_ROLLBACK_WINDOWS` in `src/core/wire-skew.ts`), but `config set` now writes them with a note that they are not tunables and help text no longer recommends them. `sync.foreground_priority` is accepted without `--force` (it was refused as an unknown key). A serve or PGLite owner that receives a retired field from an older sync client (`explicitProcessing` today) prints one `[gbrain notice]` naming it and its window, and the PGLite owner lane accepts `--lanes N` and `--no-lanes` (ignored there) instead of refusing them.' },
+ // #6712 PR 2 lane L5 (truthful receipts, fast status). `since` is a placeholder until the merge-slot stamp.
+ { since: '0.60.266.0', text: 'A managed `gbrain sync` returns `synced` when its checkpoint commits: the tail after it (planner statistics, link extraction for the imported pages) now runs after the drain lease is released, bounded at 5 minutes, and a second sync can take the lease while it runs. A tail that fails, is cut short or gets no time keeps the run `synced` and adds a `[gbrain notice sync_tail_degraded]` with its fix (`gbrain extract --stale --source-id <id>`); a tail a crash skipped runs on the next sync of the source.' },
+ { since: '0.60.266.0', text: 'The `drain_stalled` cause `no_admission` is retired: a sync pass that admits nothing with no unfinished request stops `drain_stalled` / `no_progress` with the same step and statement, a delegated run no longer falls back to its own consumer for it, and the transaction-pooler warning line is gone. Scripts matching `no_admission` should match `no_progress`.' },
+ { since: '0.60.266.0', text: 'While a managed sync holds a source\'s drain lease, short-lived commands (`put`, `remember`, `import` and other CLI writes) no longer publish that source\'s sync page requests; only the drainer does (#6712). A command whose own write names a page the sync is about to publish waits for the drainer, and returns its retryable writer-pending reply when the drainer does not finish in time. With no live lease, every consumer drains as before.' },
+ { since: '0.60.266.0', text: 'A plain `gbrain sync status` skips the terminal-failure summary, the checkpoint blocker list and the cursor list (their fields stay, empty or `unknown`, with `terminal_failures_read` / `checkpoint_blockers_read` / `cursors_read` set to `not_read` and a `--detail` fix); `gbrain sync status --detail` reads them. New fields: `state`, `reason`, `oldest_blocker`, `recovery`, and `public_category` on holds, `last_error`, receipts and doctor `sync_failures`.' },
+ // #6712 PR 2 lane L4 (exits, escalation, soak counters): placeholder since; the fresh-install cases in behavior-change-notice.test.ts pass once VERSION is stamped.
+ { since: '0.60.266.0', text: 'A held file now asks for a person (`needs_human`) only after its safe action failed three times and at least 24 hours have passed since it was first held (#6712). Three re-holds within an hour stay the agent\'s to retry. A `worktree_dirty` file whose uncommitted bytes changed in the last day, and an image held while multimodal embedding is off, never escalate this way. A failed `sync unblock --apply` (still dirty) or a repair that holds the file again counts as an attempt.' },
+ { since: '0.60.266.0', text: 'A managed-sync file that `write_gate.external_mode=reject` refuses is now held as `write_gate_rejected` when sync freezes it, instead of failing its receipt and stopping the rest of the source. A held file that leaves the source (excluded with `sync.exclude`, or an image while multimodal embedding is off) is released by the next sync even when nothing new was committed. Every sync re-screens a `write_gate_rejected`, `content_rejected` or `purged_content` hold, so switching the setting, an owner allow rule or `gbrain pages unpurge` clears it.' },
+ { since: '0.60.266.0', text: 'A `source_changed` write receipt\'s fix now follows its recorded reason: two-sided drift previews `gbrain repair file-drift --source <id> --slug <slug> --prefer database` (a group of them `--all-drifted --since <instant>`), a missing canonical file previews `gbrain repair ghost-pages`, an admission race is retried, and a changed binding or unsafe target names `gbrain sources writer status`. `gbrain repair file-drift` takes `--since <ISO-8601 | age>` to narrow `--all-drifted`.' },
+ { since: '0.60.266.0', text: 'Doctor `managed_sync_not_moving` now fails (it used to list the source as parked) when a managed source\'s queue holds admitted requests with no consumer and nothing has moved for longer than `persistence.preparation_ceiling_ms`; its fix is the resume sync, which consumes the queue (#6552). A managed sync now prints a line when live pages of the source have no canonical file, naming the read-only `gbrain repair ghost-pages` preview; it never deletes them.' },
+ // Lane 31 (mirror-recovery fast fail). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp. A sync behind a withdrawal-mirror or page-write recovery blocked on unexpected_file_bytes stops at once instead of waiting 5 minutes.
+ { since: '0.60.267.0', text: 'A sync queued behind a recovery that only the user can resolve now stops after one governor tick with `drain_stalled`, `cause: head_blocked`, instead of waiting out the 5-minute no-progress window. Two recoveries count: a fact-withdrawal mirror whose page file was edited while the mirror was publishing (`blocked_by=effect_recovery(unexpected_file_bytes …)`; the fix asks the user to put the file back to a version gbrain recorded, then rerun the sync), and a page write whose file was edited while it was publishing (`blocked_by=request_recovery(unexpected_file_bytes …)`, whether it blocks the queued head or is the head; the fix runs the `gbrain repair stuck-recovery` preview, or the user undoes the edit). Both name the file, and `gbrain sources writer status` shows the same advice. A recovery that can still finish (its file back on a recorded version) keeps the wait. Known gap: a recovery stuck on `unexpected_staging_bytes` still waits out the window.' },
+ // W2 belief ledger page-at-time. `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.267.0', text: 'A page rename (a sync that sees a file move, a frontmatter slug repair, a held-file or import move) now saves the page as it stood before the move as a version, as an edit does, so `get_versions` and `gbrain history` list one more snapshot per rename. The move advances the page\'s revision, and until now no version held the body from before it.' },
+ { since: '0.60.267.0', text: '`purge_fact` now saves each page it rewrites as a version before dropping the purged fence row, and its version redaction then removes the claim from that version as from every other, so `get_versions` and `gbrain history` list one more snapshot per page a fact purge rewrites. The snapshot holds the page as it stood before the purge, without the purged claim.' },
+ // Remote open-loop hotfix (GBRA-120).
+ { since: '0.60.268.0', text: 'Remote callers (every MCP transport) no longer get open-loop-backed threads on `entity` cards, or in `context_pack` and `delta`, which build on those cards: no loop summary, `due` or `loop_id`. Use `open_loops`, which reads loops only in granted sources. The trusted local CLI still sees them on `gbrain entity`, and in `context_pack` / `delta` with `include_private`. Remote `open_loops` grouped results no longer rank counterparties by backlink counts.' },
+ // #6712 PR 3 (L7 retry alias and managed help; L8 #6727 #6735 #6763).
+ { since: '0.60.269.0', text: 'On a managed source a plain `gbrain sync` now retries the failure the previous run recorded, so `--retry-failed` is a deprecated alias (#6712): it stays accepted for two releases, prints the `sync_retry_failed_deprecated` notice and changes nothing (on a google or github connector source it still re-approves failed item receipts). A content refusal, or a pinned import refused for newer uncommitted bytes (`source_changed`), is replayed without a new request until the file changes, is committed, or gbrain is upgraded. Two failures need a person and no sync retries them: a checkpoint refused `slug_root_mode_mismatch` while the source keeps the other pin (`gbrain repair managed-sync-orphans` lists it as `slug_mode_refused`; retiring it keeps the pin) and a checkpoint whose source checkpoint moved (`checkpoint_moved`, #6834). `gbrain sync --help` lists the ten flags a managed brain needs under "Managed brains" first, then "Classic brains / advanced". Downgrading restores the explicit `--retry-failed` retry; older builds ignore the `gbrain_version` a failure row now records.' },
+ { since: '0.60.269.0', text: 'A managed sync no longer forks a second page for a file whose page an older gbrain imported under a slug the current slug fold spells differently (#6727: punctuation, spaces, accents, emoji, full-width characters): a file with no recorded origin and no page at its slug imports into the one live page without a recorded file that folds to it, keeping that page\'s id, links and history. When several such pages match, the file is held `legacy_slug_conflict` (needs a person: keep one, remove the others, then sync); with `sync.holds=fail` the run stops `page_identity_changed`. Pages already forked by older syncs are not merged.' },
+ { since: '0.60.269.0', text: 'A managed sync\'s final checkpoint validation reads at most one committed receipt per unfinished receipt, so a catch-up of tens of thousands of entries no longer times out at its last step (#6735). A checkpoint that still hits `checkpoint_validation_timeout` is re-validated by the next sync of the source (once per run, after the stop is recorded) instead of rediscovering the whole manifest.' },
+ { since: '0.60.269.0', text: 'Doctor no longer warns that a managed sync cursor has been idle "over an hour" right after the cursor was discovered (#6763): idle time counts from the cursor\'s last advance, or from its discovery when it has not advanced yet.' },
+ // Wave 4a W5 belief ledger time model. `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.270.0', text: 'A relationship end that only the nightly relationship check dated (a `gbrain-dream (inferred)` timeline line) is now shown as an upper bound: relationship notes on entity cards, `context_pack`, ambient turn context and compiled context files read `ended: works_at acme-example (by 2025-03-01)` instead of `(2025-03-01)`, because the check closes the earlier relationship on the day the next one started, so the real end may be earlier. An explicit end line for the same stint now replaces the inferred end whether its date is earlier or later; before, the relationship stayed closed on the earlier inferred date even when the page dated its end later.' },
+ { since: '0.60.270.0', text: '`gbrain migrate --to <engine>` through the legacy copier (graduation turned off, or Postgres to PGLite) now refuses a brain that holds page versions, with `writer_coordinator_required`, `reason: page_history` and the number of versions it would discard, instead of copying the pages without them. Nothing changes in either datastore. Graduation from PGLite to Postgres carries versions and is unaffected.' },
+];
+
+/** The newest disclosed change's release: the notice id moves only when a release adds rows. */
+export const BEHAVIOR_NOTICE_SINCE: string = BEHAVIOR_CHANGES.reduce((v, c) => laterRelease(v, c.since), PREDATES);
+export const BEHAVIOR_NOTICE_ID = `${BEHAVIOR_NOTICE_CODE}@${BEHAVIOR_NOTICE_SINCE}`;
-/** The measured re-ingest page multiplier, as prose (scripts/measure-transcript-split-cost.ts: 4 → 27 pages on a 1 MB session). */
-export const TRANSCRIPT_REINGEST_MULTIPLIER = 'about 6.75x';
-export const BEHAVIOR_NOTICE_CODE = 'behavior_changes';
-/** A brain created this recently, with no recorded baseline, counts as a fresh install. */
-export const FRESH_BRAIN_GRACE_MS = 60 * 60 * 1000;
-export const HTTP_SHOWN_KEY = 'notices.behavior_changes.http';
-export const HTTP_SHOWN_CAP = 500;
-const CLIENT_ID_MAX = 128;
-/** The baseline recorded for a brain that existed before baselines were kept. */
-const PREDATES = '0';
-const RELEASE = /^\d+(\.\d+)*$/;
-
-export type BehaviorChannel = 'cli' | 'stdio' | 'http';
-
-/** Release order over every numeric segment (`0.60.65.0` style; missing segments are 0). */
-export function compareReleases(a: string, b: string): number {
- const pa = a.split('.').map(n => parseInt(n, 10) || 0);
- const pb = b.split('.').map(n => parseInt(n, 10) || 0);
- for (let i = 0; i < Math.max(pa.length, pb.length); i++) {
- const d = (pa[i] ?? 0) - (pb[i] ?? 0);
- if (d !== 0) return d < 0 ? -1 : 1;
+/**
+ * The disclosure of the changes introduced after release `after` (default:
+ * all of them), grouped by release; null when none apply. `remote` (HTTP)
+ * names only that a chain is configured; entries and providers stay on the host.
+ */
+/**
+ * The releases a disclosure covers: listed when there are a few, a range past
+ * that, so the header does not crowd the changes out of the rendered 2,000
+ * characters as releases accumulate.
+ */
+export function releaseSpan(versions: string[]): string {
+ if (versions.length > RELEASE_LIST_MAX) {
+ const sorted = [...versions].sort(compareReleases);
+ return `v${sorted[0]} through v${sorted.at(-1)} (${versions.length} releases)`;
}
- return 0;
+ const releases = versions.map(v => `v${v}`);
+ return releases.length > 1 ? `${releases.slice(0, -1).join(', ')} and ${releases.at(-1)}` : releases[0]!;
+}
+const RELEASE_LIST_MAX = 4;
+
+export function behaviorChangesNotice(chain: ChainDisclosure | null, opts: { remote?: boolean; after?: string } = {}): Notice | null {
+ const byRelease = new Map<string, string[]>();
+ let namesChain = false;
+ for (const change of BEHAVIOR_CHANGES) {
+ if (compareReleases(change.since, opts.after ?? PREDATES) <= 0) continue;
+ const text = typeof change.text === 'string' ? change.text : change.text(chain, !!opts.remote);
+ if (!text) continue;
+ namesChain ||= typeof change.text !== 'string';
+ byRelease.set(change.since, [...(byRelease.get(change.since) ?? []), text]);
+ }
+ if (byRelease.size === 0) return null;
+ const count = [...byRelease.values()].reduce((n, texts) => n + texts.length, 0);
+ let n = 0;
+ const why = `gbrain ${releaseSpan([...byRelease.keys()])} changed ${count} behavior${count === 1 ? '' : 's'} on this brain. All stay on; this is a one-time disclosure, not a request for consent. ` +
+ [...byRelease].map(([since, texts]) => (byRelease.size > 1 ? `v${since}: ` : '') + texts.map(t => `(${++n}) ${t}`).join(' ')).join(' ') +
+ ' gbrain doctor --only behavior_changes shows this again.';
+ const fix: Action = chain && namesChain && !opts.remote
+ ? chatFallbackRemovalFix(chain.plane, chain.filePath)
+ : { argv: DOCTOR_ARGV, consent: [], actor: opts.remote ? 'host_admin' : 'agent', requires_exclusive: false,
+ why: 'Shows this disclosure again; read-only.', docs: 'docs/guides/chat-fallback.md' };
+ return { code: BEHAVIOR_NOTICE_CODE, kind: 'safety', why, fix };
}
-function noticeDir(): string {
- return gbrainPath('notices', 'behavior-changes');
+/**
+ * #5575 legacy content: while unclaimed sources hold rows from before trust
+ * tiers, the notice's fix becomes the claim (`fix.next: tell_user_to_run`, the
+ * user_message explains claiming), unless it already carries the chat
+ * fallback removal. Best-effort: any fault keeps the notice as built.
+ */
+export async function withTrustClaimAsk(engine: BrainEngine, notice: Notice | null): Promise<Notice | null> {
+ if (!notice || (notice.fix?.argv && notice.fix.argv.join(' ') !== DOCTOR_ARGV.join(' '))) return notice;
+ try {
+ const { claimSourcesFix, readUnclaimedLegacySources, CLAIM_USER_MESSAGE } = await import('./trust/claim.ts');
+ if ((await readUnclaimedLegacySources(engine)).unclaimed.length === 0) return notice;
+ return { ...notice, fix: claimSourcesFix(), user_message: CLAIM_USER_MESSAGE };
+ } catch {
+ return notice;
+ }
}
-const safe = (s: string) => s.replace(/[^A-Za-z0-9_.-]/g, '_');
-
-/** Brain identity under GBRAIN_HOME: the brain id plus a hash of its database location (never the location itself). */
-export function behaviorBrainKey(cfg: GBrainConfig | null | undefined, brainId = 'host'): string {
- const location = cfg?.database_url ?? cfg?.database_path ?? '';
- return `${safe(brainId)}-${createHash('sha256').update(location).digest('hex').slice(0, 12)}`;
-}
+// ── delivery ────────────────────────────────────────────────────────────────
-let brainIdMemo: Promise<string> | null = null;
+/** notice × brain × channel (× client) already handled in this process: one look per process. */
+const handled = new Set<string>();
+const HANDLED_MAX = 10_000;
-/** The brain id this process routes to (`--brain`, GBRAIN_BRAIN_ID, .gbrain-mount), `host` when unresolvable; resolved once per process. */
-export function currentBrainId(): Promise<string> {
- brainIdMemo ??= (async () => {
- try {
- const { resolveBrainId } = await import('./brain-resolver.ts');
- const { getCliOptions } = await import('./cli-options.ts');
- return resolveBrainId(getCliOptions().brain);
- } catch {
- return 'host';
- }
- })();
- return brainIdMemo;
+function markHandled(key: string): boolean {
+ if (handled.has(key)) return false;
+ if (handled.size >= HANDLED_MAX) handled.delete(handled.values().next().value as string);
+ handled.add(key);
+ return true;
}
-// ── eligibility ─────────────────────────────────────────────────────────────
+/** Test seam: forget this process's looks. */
+export function __resetBehaviorNoticeForTests(): void {
+ handled.clear();
+}
-const baselinePath = (brainKey: string) => join(noticeDir(), `${brainKey}.baseline`);
+const markerPrefix = safe(`${BEHAVIOR_NOTICE_CODE}@`);
+const markerSuffix = (brainKey: string, channel: 'cli' | 'stdio') => `.${brainKey}.${channel}.shown`;
-function readBaseline(brainKey: string): string | null {
+/** Claim the per-channel marker for the current notice id. `unwritable` still delivers (conservative). */
+function claimMarker(brainKey: string, channel: 'cli' | 'stdio'): 'claimed' | 'shown' | 'unwritable' {
+ const path = join(noticeDir(), `${safe(BEHAVIOR_NOTICE_ID)}${markerSuffix(brainKey, channel)}`);
try {
- const v = readFileSync(baselinePath(brainKey), 'utf8').trim();
- return RELEASE.test(v) ? v : null;
- } catch {
- return null;
+ mkdirSync(dirname(path), { recursive: true });
+ writeFileSync(path, `${new Date().toISOString()}\n`, { mode: 0o600, flag: 'wx' });
+ return 'claimed';
+ } catch (e) {
+ return (e as NodeJS.ErrnoException)?.code === 'EEXIST' ? 'shown' : 'unwritable';
}
}
-/** Record a baseline; `exclusive` keeps an existing one (first writer wins). Never throws. */
-function writeBaseline(brainKey: string, since: string, exclusive: boolean): void {
+/** The newest notice release this brain × channel was shown (any build's marker), `0` when none. */
+function localShownThrough(brainKey: string, channel: 'cli' | 'stdio'): string {
+ const suffix = markerSuffix(brainKey, channel);
+ let through = PREDATES;
try {
- mkdirSync(noticeDir(), { recursive: true });
- writeFileSync(baselinePath(brainKey), `${since}\n`, { mode: 0o600, flag: exclusive ? 'wx' : 'w' });
- } catch { /* unwritable home or a concurrent first writer: eligibility is re-derived next time */ }
+ for (const name of readdirSync(noticeDir())) {
+ if (!name.startsWith(markerPrefix) || !name.endsWith(suffix)) continue;
+ const release = name.slice(markerPrefix.length, -suffix.length);
+ if (RELEASE.test(release)) through = laterRelease(through, release);
+ }
+ } catch { /* no markers yet, or an unreadable home */ }
+ return through;
}
-/** `gbrain init` created this brain's database: it is a fresh install at this version. */
-export function stampFreshBrainBaseline(brainKey: string): void {
- writeBaseline(brainKey, VERSION, false);
+/** Has this channel been shown the newest notice for this brain? (doctor; read-only) */
+export function behaviorNoticeShown(brainKey: string, channel: 'cli' | 'stdio'): boolean {
+ return compareReleases(localShownThrough(brainKey, channel), BEHAVIOR_NOTICE_SINCE) >= 0;
}
-/** `gbrain upgrade` recorded an upgrade from a release older than the newest disclosed change. */
-function upgradedAcrossRelease(): boolean {
+/**
+ * CLI and stdio: the changes this brain × channel has not been shown, once
+ * per notice, or null. Never throws; a fault returns null and the next call
+ * looks again.
+ */
+export async function takeLocalBehaviorNotice(
+ engine: BrainEngine,
+ channel: 'cli' | 'stdio',
+ opts: { cfg: GBrainConfig | null; brainKey?: string; now?: number },
+): Promise<Notice | null> {
+ let key = '';
try {
- const state = JSON.parse(readFileSync(gbrainPath('upgrade-state.json'), 'utf8')) as { last_upgrade?: { from?: unknown } };
- const from = state.last_upgrade?.from;
- return typeof from === 'string' && compareReleases(from, BEHAVIOR_NOTICE_SINCE) < 0;
+ const brainKey = opts.brainKey ?? behaviorBrainKey(opts.cfg, await currentBrainId());
+ key = `${BEHAVIOR_NOTICE_ID}|${brainKey}|${channel}`;
+ if (!markHandled(key)) return null;
+ const after = laterRelease(await brainBaseline(engine, brainKey, { persist: true, now: opts.now }), localShownThrough(brainKey, channel));
+ if (compareReleases(BEHAVIOR_NOTICE_SINCE, after) <= 0) return null;
+ if (claimMarker(brainKey, channel) === 'shown') return null;
+ return withTrustClaimAsk(engine, behaviorChangesNotice(await chainDisclosure(engine, opts.cfg), { after }));
} catch {
- return false;
+ if (key) handled.delete(key);
+ return null;
}
}
-async function brainCreatedBefore(engine: BrainEngine, cutoffMs: number): Promise<boolean> {
- try {
- const rows = await engine.executeRaw<{ at: string | Date | null }>(`SELECT MIN(created_at) AS at FROM sources`);
- const at = rows[0]?.at;
- if (at === null || at === undefined) return false;
- const ms = new Date(at).getTime();
- return Number.isFinite(ms) && ms < cutoffMs;
- } catch {
- return false;
- }
-}
+type HttpShown = Record<string, { since: string; at: string }>;
-/**
- * The brain's baseline release (`0` when it predates baselines). Reads the
- * recorded baseline; without one, derives it and (when `persist`) records it,
- * so a fresh brain stays fresh after the grace window. `persist: false`
- * (doctor) writes nothing.
- */
-export async function brainBaseline(
- engine: BrainEngine | null,
- brainKey: string,
- opts: { persist: boolean; now?: number },
-): Promise<string> {
- const recorded = readBaseline(brainKey);
- if (recorded) return recorded;
- const now = opts.now ?? Date.now();
- const predates = upgradedAcrossRelease() || (engine !== null && await brainCreatedBefore(engine, now - FRESH_BRAIN_GRACE_MS));
- const since = predates ? PREDATES : VERSION;
- if (!opts.persist) return since;
- writeBaseline(brainKey, since, true);
- return readBaseline(brainKey) ?? since;
+/** Clients and the notice release each was shown. A row from an older build (`clients` mapping to a time) was shown its row id's release. */
+function readHttpShown(raw: string | null): HttpShown {
+ const shown: HttpShown = {};
+ try {
+ const v = raw ? JSON.parse(raw) as { id?: unknown; clients?: Record<string, unknown> } : null;
+ const rowRelease = typeof v?.id === 'string' && v.id.startsWith(`${BEHAVIOR_NOTICE_CODE}@`) ? v.id.slice(BEHAVIOR_NOTICE_CODE.length + 1) : '';
+ for (const [client, entry] of Object.entries(v?.clients && typeof v.clients === 'object' ? v.clients : {})) {
+ const e = entry as { since?: unknown; at?: unknown } | string;
+ if (typeof e === 'string' && RELEASE.test(rowRelease)) shown[client] = { since: rowRelease, at: e };
+ else if (typeof e === 'object' && e && typeof e.since === 'string' && RELEASE.test(e.since) && typeof e.at === 'string') shown[client] = { since: e.since, at: e.at };
+ }
+ } catch { /* unreadable: start over */ }
+ return shown;
}
-const laterRelease = (a: string, b: string) => (compareReleases(a, b) >= 0 ? a : b);
-
-// ── content ─────────────────────────────────────────────────────────────────
-
-export interface ChainDisclosure {
- plane: ChatFallbackPlane;
- entries: string[];
- providers: string[];
- onRefusal: boolean;
- filePath: string;
+/** Record a client as shown the current notice, keeping the newest HTTP_SHOWN_CAP. */
+export function recordHttpShown(raw: string | null, clientId: string, at: string): string {
+ const shown = readHttpShown(raw);
+ shown[clientId] = { since: BEHAVIOR_NOTICE_SINCE, at };
+ const kept = Object.entries(shown).sort((a, b) => (a[1].at < b[1].at ? 1 : a[1].at > b[1].at ? -1 : 0)).slice(0, HTTP_SHOWN_CAP);
+ return JSON.stringify({ id: BEHAVIOR_NOTICE_ID, clients: Object.fromEntries(kept) });
}
-/** The effective chain as disclosed to the local owner, or null when no chain is set. Never throws. */
-export async function chainDisclosure(engine: BrainEngine | null, cfg: GBrainConfig | null): Promise<ChainDisclosure | null> {
+/**
+ * HTTP: the changes each authenticated client has not been shown, once per
+ * notice (remote view: no entries or providers). The per-client record lives
+ * in the brain's `config` table; a failed write still delivers. Never throws.
+ */
+export async function takeHttpBehaviorNotice(
+ engine: BrainEngine,
+ clientId: string | undefined,
+ opts: { cfg: GBrainConfig | null; brainKey?: string; now?: number },
+): Promise<Notice | null> {
+ if (!clientId) return null;
+ const client = clientId.slice(0, CLIENT_ID_MAX);
+ let key = '';
try {
- const planes = await readChatFallbackPlanes(engine);
- if (!planes.effective) return null;
- const env = mergedProviderEnv(cfg, process.env);
- const providers = [...new Set(planes.effective.chain
- .map(entry => diagnoseChatFallbackEntry(entry, { env, userCapKeys: [] }).provider)
- .filter((p): p is string => !!p))];
- return { plane: planes.effective.plane, entries: planes.effective.chain, providers, onRefusal: planes.onRefusal.value, filePath: planes.filePath };
+ const brainKey = opts.brainKey ?? behaviorBrainKey(opts.cfg, await currentBrainId());
+ key = `${BEHAVIOR_NOTICE_ID}|${brainKey}|http|${client}`;
+ if (!markHandled(key)) return null;
+ const baseline = await brainBaseline(engine, brainKey, { persist: true, now: opts.now });
+ const raw = await engine.getConfig(HTTP_SHOWN_KEY).catch(() => null);
+ const after = laterRelease(baseline, readHttpShown(raw)[client]?.since ?? PREDATES);
+ if (compareReleases(BEHAVIOR_NOTICE_SINCE, after) <= 0) return null;
+ try { await engine.setConfig(HTTP_SHOWN_KEY, recordHttpShown(raw, client, new Date(opts.now ?? Date.now()).toISOString())); } catch { /* deliver anyway */ }
+ return withTrustClaimAsk(engine, behaviorChangesNotice(await chainDisclosure(engine, opts.cfg), { remote: true, after }));
} catch {
+ if (key) handled.delete(key);
return null;
}
}
-
-const DOCTOR_ARGV = ['gbrain', 'doctor', '--only', BEHAVIOR_NOTICE_CODE, '--json'];
-
-type ChangeText = string | ((chain: ChainDisclosure | null, remote: boolean) => string | null);
-
-/** Every disclosed behavior change, with the release that introduced it. Append new rows; never edit a shipped `since`. */
-export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText }> = [
- { since: '0.60.68.0', text: (chain, remote) => {
- if (!chain) return null;
- if (remote) return 'A chat fallback chain is configured on this brain host: when a chat call\'s own model fails it is retried on other models. Its entries and providers are visible to the brain host operator in gbrain doctor --only chat_fallback_chain.';
- return `chat_fallback_chain is live (set in ${CHAT_FALLBACK_PLANE_LABEL[chain.plane]}): when a chat call's own model fails${chain.onRefusal ? ' or refuses' : ''}, gbrain retries it on ${chain.entries.join(', ')}, so ${chain.providers.length ? chain.providers.join(', ') : 'those providers'} receive that traffic. ` +
- (chain.onRefusal
- ? 'It falls back on refusals as well as errors, so content one provider refused is sent to the next; `gbrain config set chat_fallback_on_refusal false` keeps outage fallback only.'
- : 'chat_fallback_on_refusal is false, so it falls back on errors only.') +
- ' Removing the chain is optional; ask the user (gbrain doctor --only chat_fallback_chain has the per-plane steps).';
- } },
- { since: '0.60.68.0', text: 'On a managed brain, autopilot\'s lint phase now writes its repairs instead of only reporting them; `gbrain config set cycle.lint_fix false` turns that off.' },
- { since: '0.60.68.0', text: `Transcript re-ingest now splits transcripts into smaller parts (45,000-byte target, previously 300,000 bytes): ${TRANSCRIPT_REINGEST_MULTIPLIER} as many part pages and about 9% more embedding tokens (measured on a 1 MB session), and each re-ingested transcript re-embeds once.` },
- { since: '0.60.68.0', text: 'The mention linker rebuilds its gazetteer resume state once, so the first mention-extraction run after upgrading rescans pages.' },
- { since: '0.60.74.0', text: 'A shell job\'s leftover processes (`cmd &` with no `wait`) are now terminated when the job ends; start long-lived processes under a service manager or detach them with `setsid`.' },
- { since: '0.60.74.0', text: 'On Postgres autopilot, a brain whose schema pack declares extract_atoms now gets the daily atom auto-drain, spending within autopilot.auto_drain.max_usd_per_day (default $2); `gbrain config set autopilot.auto_drain.enabled false` opts out.' },
- { since: '0.60.74.0', text: 'OAuth access tokens now last at most 90 days: stored client lifetimes were clamped and already-issued access tokens shortened to 90 days after issue, so a client with no refresh token reconnects; restart any running `gbrain serve --http`.' },
- { since: '0.60.74.0', text: '`gbrain sources writer status --json` renamed `ingress` to `local_process_ingress`; it describes only the process that answered.' },
- { since: '0.60.74.0', text: '`gbrain jobs work` exits 0 after a SIGTERM drain (was 143) and 17 when running claims had to be handed back.' },
- { since: '0.60.74.0', text: 'Captured session files nothing has extracted are kept up to 3x dream.synthesize.corpus_retention_days (90 days by default, was 30), so the corpus directory can use more disk; `gbrain sweep --once --budget-ms 600000` clears that backlog.' },
- { since: '0.60.77.0', text: 'think answers, saved syntheses, concept narratives and pattern pages check their quotes against their sources: a quote found nowhere loses its quotation marks and is marked [unverified]. It is not yet measured as a catch for made-up quotes. `gbrain config set think.quote_verify false` and `gbrain config set dream.quote_verify false` turn it off.' },
- { since: '0.60.77.0', text: 'forget responses list close active facts it did not withdraw (`similar_active`); with a TypeSafe key, forgetting also queues an overnight review that only proposes withdrawing rewordings (`gbrain decide proposals list`; `gbrain config set decide.slots.conflict.review_withdraw false` turns it off).' },
- { since: '0.60.78.0', text: 'On a brain with embedding turned off, search, query, recall, think and fact writes no longer send text to an embedding provider: reads run keyword-only and say so, and `gbrain doctor --json` names the enable command if the user wants semantic search back.' },
- { since: '0.60.79.0', text: 'Frontmatter is parsed as YAML 1.2: clock-like values such as `10:30` stay text (they were read as base-60 numbers, so 10:30 became 630), a leading zero is decimal (`010` is 10, not 8), `0o` marks octal, and `1_000` stays text. Re-syncing a page whose frontmatter used those forms stores the new values.' },
- { since: '0.60.87.0', text: 'Near automatic context compaction, Claude Code and OpenClaw sessions get one notice per compaction segment asking the agent to save what it needs with `remember` (up to 20 facts per call). In the held-out test it raised accuracy after compaction from 51.7% to 63.0% and cost about 28% more per question (5% more per correct answer). `gbrain config set memory.pressure.enabled false` turns it off. Always-loaded core memory is new and off; `gbrain config set memory.core.enabled true` turns it on.' },
- { since: '0.60.88.0', text: '`think` now answers with the current date (in `brain.timezone`) and each page\'s content date, so relative words like "last month" resolve against today and dates inside a page against that page. In the held-out test it raised accuracy from 74.2% to 88.2% with unchanged latency. Pass `reference_date` (MCP) or `--reference-date` (CLI) to answer as of another day.' },
- { since: '0.60.93.0', text: 'Links to pages that do not exist yet are now kept instead of dropped, including links in remote agents\' writes: `gbrain wanted` (MCP `wanted_pages`) lists them, most-linked first, and the edge appears once the page is created. Existing pages are re-extracted once to fill the list. In the held-out test no edge was lost and every withheld entity was listed. `gbrain config set wanted_pages.enabled false` turns it off.' },
- { since: '0.60.94.0', text: 'Fact extraction, dream synthesis, atom extraction and take proposals now rewrite relative dates ("last week", "3 days ago") as the actual date, resolved against when the text was written. In the held-out test, saved facts with an unresolved relative date fell from 9% to 2% with no loss in answer accuracy. Facts saved earlier keep their wording. `gbrain config set extraction.date_grounding false` turns it off.' },
- { since: '0.60.94.0', text: 'Saved facts now record who said them (you, the assistant or someone else), so an assistant recommendation is no longer saved as your plan; recall shows the speaker. In the held-out test, answers about what the assistant said rose from 44% to 96%. Expect about 41% more saved facts on assistant-heavy conversations. `gbrain config set facts.attribution false` turns it off.' },
- { since: '0.60.94.0', text: 'Facts extracted from a dated page (a meeting or daily note) are stored at the page date instead of the sync time.' }, { since: '0.60.97.0', text: 'A put_page of a new slug ending in `.md` or `.mdx` is refused with `invalid_params` naming the bare slug; a page that already exists under such a slug still updates and its response carries `slug_advisory`.' },
- { since: '0.60.97.0', text: '`gbrain config set` refuses an unregistered `search.*` or `content_sanity.*` key (exit 2) and names the nearest registered key; `--force` still writes it.' },
- { since: '0.60.97.0', text: '`gbrain transcripts ingest --facts` exits 1 when any page fails fact extraction, and `gbrain doctor --remediate` exits 1 when a repair preview failed; a plan approved while a preview failed refuses with `preview_changed` once that preview succeeds.' },
- { since: '0.60.97.0', text: 'With `facts.default_visibility` set to `world`, facts extracted from conversations are written world-visible; they were always private before.' },
- { since: '0.60.97.0', text: 'The take sanitizer no longer redacts the name or word "dan"; the uppercase acronym DAN, "dan mode" in any case and "do anything now" are still redacted.' },
- { since: '0.60.97.0', text: 'Google Calendar sync writes only events between `historyDays` back and 60 days ahead; `gbrain sync --full` removes pages for in-window events the calendar no longer lists (more than 200 is refused and reported partial).' },
- { since: '0.60.98.0', text: 'Managed sync now holds a file whose facts or takes fence cannot be imported (code `invalid_fence`; `gbrain sources status <id>` names the fence, section and rows) instead of blocking the whole source, and a source such a fence blocked before recovers on its next sync. Coordinated writes refuse such a fence with `invalid_fence` (wire `error` stays `invalid_params`, or `take_row_collision`). `gbrain config set sync.holds fail` keeps fail-closed blocking.' },
- { since: '0.60.99.0', text: 'Fixable facts and takes fences are now rewritten instead of held or refused: managed sync, put_page and the fact and take writers normalize a fence whose meaning is unambiguous (a missing end marker after the table, two-dash takes markers, zero or duplicate row numbers, header aliases, invented kinds and enum synonyms, assistant holders, percent confidences) without changing a claim or an existing row number, and managed sync commits the rewritten file. Results report `fences_normalized`; `gbrain sync --dry-run` lists `would_normalize`. `gbrain config set fences.normalize false` turns it off (such fences are then held or refused).' },
- { since: '0.60.100.0', text: '`gbrain doctor` has a new `fence_integrity` check: it counts malformed facts and takes fences still waiting (held files, stored pages, unsynced checkout files) by the tier that would fix them, and warns when a source had 20 or more fences normalized in 7 days. Each doctor run scans stored pages and source checkouts for up to 10 seconds (`GBRAIN_DOCTOR_FENCE_TIMEOUT_MS`) and resumes where it stopped; until a scan finishes the check reports partial instead of ok. New settings `fences.repair.max_usd_per_page` (0.05) and `fences.repair.max_usd_per_day` (1.00) cap model fence repair.' },
- { since: '0.60.102.0', text: `Malformed facts and takes fences are now repaired automatically: the maintenance run repairs held files and stored pages on the owner host, and its first run after upgrading repairs every malformed fence it finds in each source, rewriting and committing those files (\`gbrain doctor --only fence_integrity\` counts them; \`gbrain repair fences\` previews the plan). A fence only a rewrite can realign sends just its header and those rows, never the rest of the page, to the repair model, within $0.30 per page and $1.00 per day (\`fences.repair.max_usd_per_page\`, \`fences.repair.max_usd_per_day\`); every rewrite passes validation gates before it is written. With \`models.fence_repair\` unset, the repair model is the first model the fence-repair eval measured as accurate enough that has a provider key on the brain host (\`gbrain models\` names it); with none, model repair stays off until the user sets \`models.fence_repair\`. ${FENCE_REPAIR_MEASURED} \`gbrain config set fences.repair.llm false\` keeps fence rows away from the model; \`gbrain config set fences.repair.enabled false\` pauses automatic repair. On a managed source each repaired file is committed, so \`git revert\` undoes it (page history keeps the earlier version); turning these settings off stops future repairs and does not undo past ones.` },
- { since: '0.60.105.0', text: '`gbrain pages purge-deleted`, `cache clear|prune`, `schema use|downgrade|init|remove-*`, `integrity auto|reset-progress` and `search modes --reset` refuse an argument they would ignore (exit 2), and `--help` never runs them; preview with `gbrain pages purge-deleted --dry-run --json`.' },
- { since: '0.60.105.0', text: '`gbrain pages purge-deleted` asks first: without a terminal it exits 3 with an ask_user payload naming the `--yes` command. `gbrain call purge_deleted_pages` asks the same way; the top-level `gbrain purge-deleted` is gone.' },
- { since: '0.60.105.0', text: '`gbrain apply-migrations` exits 1 (`migrations_pending`) when it leaves the schema behind; run `gbrain apply-migrations --yes`, then `gbrain doctor --json` if that fails.' },
- { since: '0.60.105.0', text: 'Remote put_page and put_pages content with no Timeline section is refused (`timeline_rows_would_be_removed`) when it would delete dated rows; keep the section or pass `drop_timeline: true`.' },
- { since: '0.60.105.0', text: '`gbrain schema active --json` exits nonzero on `unknown_source` or `database_error`; check `gbrain sources list --json`.' },
- { since: '0.60.105.0', text: '`gbrain waiting --json` and `open_loops`: loops with no counterparty move to `no_counterparty`, and each group lists at most 5 loops (`loops_omitted` counts the rest).' },
- { since: '0.60.105.0', text: 'Frontmatter validation and `--fix` no longer flag or rewrite valid YAML (a block-scalar line shaped like `Key: "a", then "b"`); a file an earlier `gbrain frontmatter validate --fix` rewrote can be restored from its backup under ~/.gbrain/backups/frontmatter/.' },
- { since: '0.60.105.0', text: 'Facts the sweep extracts from a saved session file are dated when the file was written, not when the sweep ran; facts saved earlier keep their dates.' },
- { since: '0.60.105.0', text: 'Link extraction no longer types a link to a person, meeting or calendar page as `works_at` (or a meeting/calendar link as `founded`/`invested_in`) from a nearby role phrase; it becomes `mentions`. Existing edges change on re-extraction: `gbrain extract --stale`.' },
- { since: '0.60.105.0', text: 'In-cycle dream patterns runs are sized to the cycle budget from the last run\'s recorded cost (`dream.patterns.last_run`): a first run submits at most 25 reflections, and a run that cannot fit `min_evidence` reflections is skipped as `insufficient_cycle_budget` before any spend; `gbrain dream --phase patterns` still runs at full size.' },
- { since: '0.60.105.0', text: 'An explicit `memory.auto_writeback off` now stops every ambient capture lane: the compaction harvest (PreCompact segments and OpenClaw compactions) and SessionEnd transcripts stop extracting too, and session text banked under off is never extracted later, even after writeback is turned back on. Unset keeps both lanes running. An unreadable, drifted or unrecognized setting now holds them instead of extracting. Restart `gbrain serve`, cron or autopilot sweeps and OpenClaw gateways started on an older version; `gbrain bootstrap harness --remove` stops the hooks from banking session text at all.' },
- { since: '0.60.105.0', text: 'On a managed canonical worktree the session hooks no longer start `gbrain sources push` (it refuses there; heartbeat reason `push_managed_coordinator`), backup check no longer counts gbrain\'s `.gbrain-owner.json` as uncommitted work and points managed roots at `gbrain sources writer status --probe --json`, a root with no origin remote reads `no_remote` even after a recorded push refusal, and doctor `bootstrap_push_health` reports ok once a recorded push failure\'s tree matches its origin branch.' },
- { since: '0.60.105.0', text: 'The MCP initialize instructions are reordered so harnesses that read only the first 2,048 characters (Claude Code) get the essentials: with ambient writeback on, a one-line writeback contract now sits in the memory clause (the full rules stay last), the error protocol follows the data-not-instructions clause in a shorter form, and the forget caveat moved after the scope clause.' },
- { since: '0.60.105.0', text: '`gbrain skillpack scaffold --harness` prints its Update lens and remove hints with the `--dest`, `--scope` and `--workspace` you passed, and `gbrain skillpack reference --harness <h>` with no slug no longer exits 2 on the shared-dependency ledger entry.' },
- { since: '0.60.105.0', text: 'On a managed brain, doctor `pack_upgrade_available` is now an info row with a read-only preview instead of an apply step it could not run, and `unify-types` apply switches the pack when nothing needs retyping (it still refuses, now naming the counts, when pages would change).' },
- { since: '0.60.105.0', text: '`gbrain bootstrap harness --remove` now also deletes Claude Code hook entries that lost their `_gbrain` marker when their command is exactly what this install wrote, and lists each one it removed; a lookalike it did not write is left in place and removal exits 1 with `harness_hook_unowned`. Re-running the install converges to one entry per event instead of adding a second set. `gbrain bootstrap harness --remove --dry-run` previews the removal without writing anything.' },
- { since: '0.60.105.0', text: '`gbrain repair <kind> --apply` and `gbrain doctor --remediate` now wait for each publication with the CLI write wait (`--wait`, `GBRAIN_WRITE_WAIT_MS`, `persistence.write_wait_ms`, else 30 s) instead of 5 s, so one run repairs a slow source; `--wait 0` stops at the first pending write and the rerun resumes.' },
- { since: '0.60.105.0', text: '`gbrain sources reconcile` now identifies a private fact row by its row number and claim, so a page whose world row shares a private row\'s claim publishes instead of being refused; it now also refuses a world row that copies a stored private row\'s context (24 or more characters) verbatim, naming only the row number.' },
- { since: '0.60.105.0', text: '`gbrain repair failed-writes` now replays subagent and restricted-namespace writes (they were all refused "via subagent requires ctx.subagentId"), under the original writer\'s stored authority re-checked against its live grant; replayed writes are attributed to that original writer.' },
- { since: '0.60.105.0', text: 'Inline `[Source: ..., date]` citations no longer file an adjacent HTML comment (such as `<!-- AUTO:slack END -->`) as a timeline entry, and a timeline row carrying comment markup is never written back into a page (it would duplicate a section END marker); `gbrain repair timeline-comments --source <id>` previews and cleans rows and bullets stored before this release.' },
- { since: '0.60.105.0', text: 'On a managed brain, `gbrain files upload-raw` of a small file now refuses before creating anything (it used to leave an empty `.raw/` directory); configure a storage backend and use `gbrain files upload <file> --page <slug>`.' },
- { since: '0.60.105.0', text: 'A managed write that fails on an unexpected owner exception keeps its class, errno and source frame owner-only (the public `storage_error` message stays generic), the owner log line names the class and source frame, and `gbrain write-request <id>` (`owner_build`) says when the owner that ran it is on another build than the CLI and needs a restart.' },
- { since: '0.60.105.0', text: 'Doctor\'s new `persistence_write_stall` check warns when a managed write has held its claim longer than `persistence.max_claim_ms` (default 10 minutes) and names the stuck phase; `gbrain sources writer status --json` shows each running request\'s `claim` phase.' },
- { since: '0.60.105.0', text: 'On a brain whose managed persistence was never activated, `gbrain sources writer deactivate` now releases sources claimed before activation (the dry run lists them as `pre_activation_claims`), so classic `gbrain sync` of them works again; `gbrain sources writer deactivate --dry-run --json` previews it.' },
- { since: '0.60.105.0', text: 'Writer transfer, `gbrain sources set-path` and reclone now compare only the files Git tracks in a Git checkout, so ignored files such as `.env.local` are never read or need copying and a clean `git clone` verifies; a transfer prepared before this release is prepared again (`writer_manifest_rescope_required`), and upgrading drops the per-file path and hash maps older releases stored.' },
- { since: '0.60.105.0', text: 'A managed sync import that races a database-only write to the same page is now held with code `concurrent_write` (the sync finishes, the database version is kept) instead of leaving the source `blocked_by_failures`; `gbrain sources reconcile <source> <slug> --preview` resolves it.' },
- { since: '0.60.105.0', text: 'Hybrid search on CJK text now falls back to matching any query term when matching all terms finds too few rows (all-term matches still rank first), and its CJK keyword arm has one time budget, `search.cjk_keyword_deadline_ms` (default 3000); a cut arm reports degraded `keyword_candidates_incomplete`, so narrow with `--source-id` or raise the key.' },
- { since: '0.60.105.0', text: 'Filtered vector search on Postgres runs pgvector iterative scans in relaxed_order, which keeps closer in-filter matches strict order dropped; `gbrain config set search.hnsw_iterative_scan strict_order` and a restart of serve and autopilot restore the old mode.' },
- { since: '0.60.105.0', text: 'With retrieval feedback on, MCP search and query results carry one visible line with the answer id (`Rate after use: rate_answer { answer_id: "ans_…", rating: 1-5 }`), so hosts that hide `_meta` can still rate.' },
- { since: '0.60.105.0', text: 'Imported transcript pages now also redact a password typed after a credential label (`password: …`, `login alice / …`) as `<REDACTED:labeled_credential>`; pages imported earlier are not rewritten, so run `gbrain transcripts audit-secrets --json` to list them (doctor `transcript_secret_exposure`).' },
- { since: '0.60.106.0', text: 'A managed Git effect whose durability check fails (a git timeout, a damaged checkout, an unreadable hook) now stays queued with `git_unavailable` and retries instead of completing as `durability_not_enabled` without a commit or push; only a directory with no Git checkout at or above it reads as not durable. Check with `gbrain sources writer status --json`.' },
- { since: '0.60.106.0', text: '`gbrain embed --stale` and the embed-backfill job no longer stop when some pages still need a text projection: everything else embeds, and the blocked pages (often image pages) are counted and named with `gbrain embed --stale --images` or `gbrain sync --full`.' },
- { since: '0.60.106.0', text: '`gbrain sources reconcile` no longer refuses a page whose file name more than 100 other pages share; upgrading builds two indexes on `pages` (online on Postgres) for that check.' },
- { since: '0.60.106.0', text: 'A pending write\'s `poll_command` is now `gbrain write-request --brain <id> -- <request_id>`, the same command as the error\'s `fix`, instead of `gbrain call get_write_request ...`.' },
- { since: '0.60.106.0', text: '`gbrain quarantine clear` works on a managed brain, and `--force` records `quarantine_override` in the page frontmatter so the page stays cleared until its title, type or body changes; `quarantine scan --apply` refuses on a managed brain. Preview with `gbrain quarantine list`.' },
- { since: '0.60.106.0', text: 'An inline `[Source: A, date; B, date]` citation now files one timeline entry per dated source instead of one entry with the last date, and timeline summaries drop paired `**`, `__`, `*` and `_` emphasis markers. Rows stored under the older reading are deleted the next time their page is written or extracted, never written back into the page; a row someone gave its own detail stays. Pages nobody edits keep the old rows until the timeline prune-orphans cleanup runs (see `gbrain extract timeline --help`).' },
- { since: '0.60.106.0', text: '`gbrain edge-proposals list` now reads `--limit=N` and `--status=X` (they were ignored), and a `--limit` that is not a whole number from 1 up exits 2 instead of failing in the database or silently becoming 1.' },
- { since: '0.60.106.0', text: 'Dream atom and concept extraction no longer accept a model answer that stopped at the output cap or was refused (claude-cli included): such an answer counts as a failure, never as "nothing to extract" or a new concept narrative. On a managed brain the failed atom batch keeps the page\'s earlier atoms and waits for an approved retry (`gbrain jobs submit extract-atoms-drain --params \'{"sourceId":"<id>","retryRequestId":"<request>"}\'`); a concept that fails 3 times on unchanged atoms is skipped until they change (`gbrain config unset dream.concepts.failed_attempts` retries it now).' },
- { since: '0.60.106.0', text: 'The dream patterns breaker now counts deaths per source (`dream:patterns:source:<id>`), including runs cancelled at their timeout after paid work, so a brain whose patterns runs keep dying is refused at once after the upgrade; fix the cause, then `gbrain dream reset-key \'dream:patterns:source:<id>\'`. Pattern pages store a quarantined claim\'s reflection list once per page (`unverified_claim_sources`); the first patterns run rewrites existing pages that way (frontmatter only, no model call) before it pays for a run.' },
- { since: '0.60.106.0', text: 'Dream triage no longer re-judges a transcript every cycle after a truncated, refused or unparseable verdict: it waits 24 hours, doubling per repeat up to 7 days (`triage_unreliable_backoff`), and a content or triage-model change re-judges at once; `gbrain dream retriage --force` re-judges now and pays per file.' },
- { since: '0.60.106.0', text: 'A `gbrain dream` scoped to a source, including a bare `gbrain dream` on the default source, now also takes the brain-wide `gbrain-cycle` lease for synthesize, patterns, embed and the other brain-wide phases: while autopilot maintenance holds it, those phases are skipped as `maintenance_lock_busy` and the source phases still run, and autopilot maintenance skips its window while a dream holds it. `gbrain status --section locks --json` shows the holder.' },
- { since: '0.60.106.0', text: '`gbrain onboard --auto` (including cron runs), `doctor --remediate` and MCP `run_onboard` never submit a manual-only step: the schema-pack upgrade (`unify-types`) and the paid takes bootstrap (`extract-takes-from-pages`) are listed under `manual_only_skipped` with the command to run them yourself. A job of either kind an earlier run already queued still runs: find it with `gbrain jobs list --status waiting` and cancel it with `gbrain jobs cancel <id>` if you did not want it.' },
- { since: '0.60.106.0', text: '`gbrain reindex --markdown` asks before re-embedding (paid): without a terminal it exits 3 with an ask_user payload naming the page count, the estimate and the `--yes` command; `--yes` or `--max-usd <usd>` approves it, and `--dry-run`, `--no-embed` and a keyless brain never ask. A queued `reindex` job re-embeds only with the approval stored at submit time (`gbrain jobs submit reindex ... --yes`, or the search-mode switch prompt); one queued without it fails with `confirmation_required`.' },
- { since: '0.60.107.0', text: 'Search-hiding and other gate-owned frontmatter keys (`quarantine`, `content_flag`, `embed_skip`, `atoms_scan_hash`, `quarantine_override`) in a local `put_page`, a connector, an ingest event or any other non-owner write are now stripped instead of kept; sync and import of your own files, reindex, repair and `gbrain quarantine clear` keep them.' },
- { since: '0.60.107.0', text: 'A quarantined page is no longer offered to automatic fact extraction (`facts_backstop.skipped: quarantined`) and its facts and takes fences are not projected; rows projected before it was quarantined stay.' },
- { since: '0.60.107.0', text: '`get_page` and `fetch` of a quarantined page carry `quarantined` (fetch: `metadata.quarantined`) and a `page_quarantined` notice, and remote callers get no body or text unless an admin-scoped caller passes `include_quarantined: true`; a quarantined `put_page` now reports `quarantined: { reason, detail }`.' },
- { since: '0.60.108.0', text: 'Managed brains now extract conversation facts from meetings, transcripts and email threads through receipted batch requests (up to 25 pages each), and record single emails, prose notes and undated pages as not extractable for good. Nothing runs on its own: preview with `gbrain extract-conversation-facts --source-id <id> --dry-run`. A run stops with `maintenance_backpressure` (exit 12) before the writer passes 80% of its request or receipt capacity; `gbrain sources writer status --json` shows it.' },
- { since: '0.60.108.0', text: 'Re-extracting a conversation page now keeps facts that an open loop or a superseding fact references, as expired history, instead of deleting them.' },
\ No newline at end of file