Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

Merge branch 'capy/6712-pr4b' of https://git.capy.ai/garrytan/gbrain into capy/6712-pr4b-docs

garrytanafaf51e5cbc3
diff --cc src/commands/doctor/checks/managed-sync-movement.ts
index f335db86fe,365b5e25e4..b721dad5fc
--- a/src/commands/doctor/checks/managed-sync-movement.ts
+++ b/src/commands/doctor/checks/managed-sync-movement.ts
@@@ -54,10 -32,10 +56,11 @@@ async function runManagedSyncMovementCh
const stuck = pending.filter(m => m.movement_state === 'not_moving');
const parked = pending.filter(m => m.movement_state === 'parked');
const stranded = parked.filter(strandedQueue);
+ const unknown = pending.filter(m => m.movement_state === 'unknown');
- const details = { count: stuck.length, parked: parked.length, stranded: stranded.length, ...(unknown.length ? { unknown: unknown.length, health: 'unknown' } : {}), sources: pending.map(m => ({ source_id: m.source_id, movement_state: m.movement_state, data_moving: m.data_moving,
+ const slow = await slowNoChangePasses(connectedEngine(ctx));
- const details = { slow_passes: slow, count: stuck.length, parked: parked.length, stranded: stranded.length, sources: pending.map(m => ({ source_id: m.source_id, movement_state: m.movement_state, data_moving: m.data_moving,
++ const details = { slow_passes: slow, count: stuck.length, parked: parked.length, stranded: stranded.length, ...(unknown.length ? { unknown: unknown.length, health: 'unknown' } : {}), sources: pending.map(m => ({ source_id: m.source_id, movement_state: m.movement_state, data_moving: m.data_moving,
not_moving_since: m.not_moving_since, last_commit_at: m.last_commit_at, last_progress_at: m.last_progress_at, cursor: m.cursor, pass: m.pass, head: m.head, live: m.live, admitted: m.admitted,
- ceiling_ms: m.ceiling_ms, writer_status_command: m.writer_status_command })), docs: DOCS };
+ ceiling_ms: m.ceiling_ms, writer_status_command: m.writer_status_command, ...(m.unknown ? { unknown: m.unknown } : {}) })), docs: DOCS };
if (stranded.length) {
const first = stranded[0]!;
checks.push({ name: 'managed_sync_not_moving', status: 'fail', readiness_state: 'degraded', details,
@@@ -81,12 -59,11 +84,17 @@@
+ `managed sync data has not moved for longer than the ${Math.round(first.ceiling_ms / 1000)}s ceiling while a sync or consumer is live. The health signals are green; the data is not.`,
fix: agentFix(['gbrain', 'sources', 'writer', 'status', '--source', first.source_id, '--json'],
'Read-only: names the request at the head, its step, what it waits on, the owner process and the next step (`claim.next`) on the running claim.', 'managed_sync_not_moving', { docs: DOCS }) });
+ } else if (unknown.length) {
+ checks.push({ name: 'managed_sync_not_moving', status: 'warn', readiness_state: 'degraded', details,
+ message: `${unknown.map(m => m.source_id).join(', ')}: the managed sync backlog could not be read (${unknown[0]!.unknown?.error ?? 'no detail'}), so whether sync data moves is unknown; this is not an all-clear.`,
+ fix: agentFix(['gbrain', 'sources', 'writer', 'movement', unknown[0]!.source_id, '--json'],
+ 'Read-only: reads the backlog again and judges movement over one window; if the read keeps failing, gbrain doctor --json checks the database.', 'managed_sync_not_moving', { docs: DOCS }) });
+ } else if (slow.length) {
+ checks.push({ name: 'managed_sync_not_moving', status: 'warn', details,
+ message: `${slow.map(s => `${s.source_id} (its newest ${s.kind} pass found no change in ${s.duration_ms} ms, over the ${s.target_ms} ms target for a source `
+ + `${s.large ? 'over' : 'up to'} ${LARGE_SOURCE_PAGES.toLocaleString('en-US')} pages; timings_ms ${JSON.stringify(s.timings_ms)})`).join('; ')}: managed sync is current but slow to confirm it.`,
+ fix: agentFix(['gbrain', 'sync', 'status', '--source', slow[0]!.source_id, '--json', '--detail'],
+ 'Read-only: the newest pass (`convergence.duration_ms`, `timings_ms`) beside a fresh read of the checkout, to see which step is slow.', 'managed_sync_not_moving', { docs: DOCS }) });
} else if (pending.length) {
checks.push({ name: 'managed_sync_not_moving', status: 'ok', severity: 'info', details,
message: `Managed sync data is moving${parked.length ? `; ${parked.map(m => { const work = (m.cursor ?? m.pass)!; return `${m.source_id} is parked at ${work.index}/${work.total} (no sync or consumer live; resume: ${work.resume_command})`; }).join('; ')}` : ''}.` });
diff --cc src/core/behavior-change-notice.ts
index c17820b031,3a4befbb4e..1216eab142
--- a/src/core/behavior-change-notice.ts
+++ b/src/core/behavior-change-notice.ts
@@@ -767,28 -766,88 +766,112 @@@ export const BEHAVIOR_CHANGES: Readonly
{ since: '0.60.278.0', text: '`gbrain extract --stale --source <id>` now refuses with `invalid_params` naming `--source-id <id>` instead of running brain-wide; `--source fs` exits 2 `invalid_params` (it exited 1), and `--source db` refuses as ambiguous when a source is named `db`. Rendered extract fixes pin `--source-id`. The end-of-sync extraction nudge stays silent when doctor `links_extraction_lag` would not warn (attendance-blocked meetings no longer count), names both `gbrain extract --stale` and `gbrain extract --stale --catch-up` with estimates, and becomes a run-it-yourself step above two minutes; `extract --stale` JSON gains `actionable`, `attendance_blocked`, `mention_due` and `complete`; the per-source "still owe extraction" line counts only pages that sync imported; and an owner-delegated plain `extract --stale` keeps the 30-minute budget (`--catch-up` is carried through).' },
// #6712 #6887 (DB-only overwrite hotfix).
{ since: '0.60.279.0', text: 'On a managed brain an incremental `gbrain sync` no longer publishes a committed file edit over a page that was also edited in the database since its last import (for example a `put_page` with `sync.write_through` off). The file is held `file_drift` (side `both`) and the page keeps its edit; `gbrain repair file-drift --slug <slug>` previews both sides. A page deleted in the database is held the same way instead of being recreated from the file. A database change an import keeps (a tag, say) holds nothing: the edit imports and the tag stays. Before, only a first sync, `--full` or a failed delta guarded this case, and the plain sync overwrote the database edit with no hold.' },
+ // Wave 4b W6 take grading. `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.282.0', text: 'The dream cycle\'s take-grading phase (`grade_takes`) now asks its judge with prompt `hybrid-evidence-v2`: evidence about a different company, person or product whose name only resembles the one in the claim no longer counts toward a verdict. An answer with prose around its JSON, or a repeated answer that agrees, now parses instead of failing (two answers that disagree are still no verdict). Verdicts are cached per prompt version, so the next cycles grade each eligible take once more, within the phase\'s budget (`cycle.grade_takes.budget_usd`, default $3 a run). Auto-resolve stays off, so no take\'s resolution changes. New: `gbrain takes grades` lists the cached verdicts for review and marks judges the take-grading eval has not measured.' },
+
+ // Wave 18 lane 1 (#6778 #6761 #6791 #6773).
+ { since: '0.60.284.0', text: 'Facts absorb now waits for its write up to the job deadline instead of 5 s. A write still committing is logged `write_pending_accepted` and writer contention before admission `write_deferred_unadmitted`; neither counts toward the doctor\'s facts_extraction_health threshold, and persistent contention gets its own warning (`gbrain sources writer status --source <id> --json`).' },
+ { since: '0.60.284.0', text: 'facts_extraction_health reports its 24 h failure count as history (rolling, with an ages-out time) and separately names facts-absorb jobs still dead, with `gbrain jobs retry <id>` as the fix; it no longer suggests raising `facts.absorb_warn_threshold`, and the thresholds are unchanged.' },
+ { since: '0.60.284.0', text: 'A `claude-cli` answer that Claude Code continued after hitting its output cap is now rebuilt in full from the call\'s event stream (the CLI runs with `--verbose`) instead of returning only the text after the continuation as a complete answer. When the full text cannot be proven, the call returns no text and no tool calls, finishes `length` (callers retry or escalate as for any capped answer) and reports `providerMetadata[\'claude-cli\'].code = \'continuation_unproven\'` with reason `events_missing`, `no_assistant_events` or `segments_unmatched`, and one stderr line per reason per process naming its remedy (upgrade the claude CLI for the first two, raise the caller\'s output cap for the third).' },
+ { since: '0.60.284.0', text: 'Generated dream-cycle summaries now carry `created: <summary date>` in their frontmatter, so they pass `gbrain lint`\'s temporal check.' },
+ // Wave 18 lane 2 (#6743 #6739 #6755 #6729).
+ { since: '0.60.284.0', text: '`gbrain bootstrap harness` exits 14 (`bootstrap_cleanup_pending`, JSON `status: "cleanup_pending"`) instead of 0 when the harness is wired but earlier shared-skills enrollments or carried previous token ids are not cleaned up yet, and `--status` exits 14 instead of 1 for the same state; the JSON gains a per-id `cleanup` list and a `fix`. Each carried token id is now revoked on its own once no enrollment holds it, and an old enrollment whose token was already revoked finishes its local cleanup and counts as left (`credential_revoked`) instead of blocking every revocation. Doctor `bootstrap_harness_health` names each id as revoked (cleanup pending) or active and recommends leave before revoke.' },
+ { since: '0.60.284.0', text: 'The first Claude Code `user-prompt` hook in a new working folder now records heartbeat outcome `ok` with prompt-only context instead of `degraded` / `transcript_unreadable`: Claude Code creates `~/.claude/projects/<project>/` only after that prompt, so a transcript whose project folder does not exist yet reads as absent, the same as a not-yet-written transcript (#5465). It applies only when the missing folder is a direct child of an existing folder inside the projects root and the path has no `..` segment; any other missing path still fails closed. A missing transcript at `session-end` is still reported as degraded.' },
+ { since: '0.60.284.0', text: 'On a Postgres brain with no sync.repo_path, the v0.11.0 migration no longer runs `gbrain autopilot --install` during an upgrade. Phase F is recorded as skipped (reason no_repo_path) with the exact install command (the default source\'s path when it has one), the migration completes instead of wedging after three partial runs, and `gbrain doctor` shows a minions_migration line with that command until an autopilot is installed for the brain. A brain already wedged on v0.11.0 by partials that failed only the install phase is cleared automatically on the next apply-migrations run when its sync.repo_path is unset (a \'retry\' row with reason phase_f_no_repo_path is appended to migrations/completed.jsonl); with sync.repo_path set the --force-retry advice stands. Phase F ledger entries now carry a reason code (no_repo_path, autopilot_already_installed, install_failed). Separately, a direct `gbrain autopilot --install` with no --repo and no sync.repo_path now installs for the default source\'s local_path instead of refusing. Wedged-migration advice now names migrations/completed.jsonl (phases[].detail) instead of upgrade-errors.jsonl.' },
+ { since: '0.60.284.0', text: 'New explicit-only repair kind `gbrain repair rename-identity --source <id>` for an inexact Git rename that sync split into a delete plus an add (#6729). Without `--slug` the preview lists the open pairs with their preview commands. `--slug <new-slug>` (and `--from <old-slug>` when two pairs share it) previews one pair and binds both page ids, both revisions and the disposition into its hash; `--apply --expect <hash> --yes` (destructive consent; without `--yes` a non-interactive run exits 3 with the consent payload) carries the old page id onto the new slug with its version history, timeline, links, facts and aliases, imports the new file onto it as an edit and retires the provisional page (soft-deleted under a purged slug). Facts of both pages survive or the carry refuses `fact_rows_collide` before writing. Carrying identity is classic-only: on a managed source the preview states `managed_remedy_unavailable` and names `--close`, and an apply refuses with that code. `--close` settles the pair and moves nothing, on both kinds of source. Both settle the record (`disposition` remedied or closed), which releases the purge hold. `--all`, the maintenance cycle and the remediation plan never run it.' },
+ { since: '0.60.284.0', text: 'The #6729 sync report, `gbrain sync status --json` (`identity_downgrades[].remedy`) and doctor `rename_identity_downgrades` now name each open pair\'s remedy: the `gbrain repair rename-identity` preview argv, the apply argv bound to the plan hash, `consent: ["destructive"]` and what releases the purge hold. On a managed source the remedy is `--close` (`carry_unavailable: "managed_remedy_unavailable"`), because carrying identity is unavailable there. Doctor\'s fix is the first pair\'s apply (`ask_user`, with `preview_argv` and `plan_hash`); `gbrain restore <old-slug> --source-id <id> --force` stays the named alternative wherever the source admits a restore (`restore_available`, so not on an unbound Postgres source with a checkout); there the remedy is the only fix doctor offers, and `restore_unavailable_sources` lists those sources.' },
+ // Wave 18 lane 3 (#6740 #6742 #6720 #6731 #6764).
+ { since: '0.60.284.0', text: 'The entity mention scan no longer reads text inside HTML comments, so the `<!--- gbrain:... -->` fence markers stop producing `mentions` links to a page titled like a marker word (#6740). `MENTION_EXTRACTOR_VERSION` is now 6: the next `gbrain extract --stale` (or maintenance cycle) rescans every inline-body page once and removes the stale plain mention rows; `typed_ner` edges are untouched and segmented pages stay deferred as before. Entity cards and `get_backlinks` show a mention coverage notice (state `pending`) until that rescan finishes.' },
+ { since: '0.60.284.0', text: 'The bundled `gbrain-base-v2` schema pack (the `init` default, also inherited by `company-brain`) is now version 1.4.0 and declares the `question` page type the pinned-question writer stamps, so a pinned question no longer makes doctor `schema_pack_consistency` warn `page_type_undeclared` (#6742). Existing question pages keep their type; no data changes. The active pack identity reads `[email protected]+<hash>`.' },
+ { since: '0.60.284.0', text: 'A page-derived atom now carries its source page\'s content date as frontmatter `date` (the source\'s stored `effective_date`, else the same precedence import uses), so its `effective_date` is the date of the conversation or note it came from instead of the extraction run (#6720); `extracted_at` stays the processing stamp and transcript-derived atoms are unchanged. Atoms extracted before this release keep their run dates until re-extracted (`gbrain dream --phase extract_atoms` with `--force` re-pays the model); a preview-first backfill repair is planned.' },
+ { since: '0.60.284.0', text: '`gbrain extract-conversation-facts` (and the `conversation_facts_backfill` cycle phase) now tells the extractor which entities the conversation page itself links (its frontmatter attendees and the entity pages its body links, same source, up to 40 slugs), so facts about those people and companies are stored on their pages instead of a guess from a first name (#6731). A private entity is hinted only when the run writes private facts. The `extract_facts` operation\'s prompt and 5-hint cap are unchanged.' },
+ { since: '0.60.284.0', text: '`gbrain extract-conversation-facts` (and the `conversation_facts_backfill` cycle phase) now runs the free write-time subject inference on facts the extractor returns without an entity, so a fact naming exactly one entity page in full is stored on that entity (context note `entity inferred from mention`; off with `facts.entity_inference false`) (#6764). Doctor `unlinked_facts` counts the conversation extractor\'s unlinked rows on their own (origin `conversation`, no longer inside fence-owned) and, because `gbrain facts relink` never examines them, its fix is a bounded, source-qualified re-extraction of the pages with the most (`--slugs`, up to 50, `--force --max-cost-usd <N>` with the approved amount as the input `N`, preview `--dry-run`; paid, asks the user first). A `replaces` naming a conversation-derived fact now says to re-extract its page instead of hinting at a fence edit.' },
+ { since: '0.60.284.0', text: 'New `gbrain facts relink --conversation` links the conversation extractor\'s facts that were stored without an entity, for free: a fact naming exactly one entity page in full is linked (context note `entity relinked from mention`), one write per page (a receipted coordinator request on a managed brain), no model call (#6764). Doctor `unlinked_facts` now prescribes it first for those rows (consent none, the agent runs it, preview `--dry-run`); a fact it cannot resolve is recorded (`fact_relink_attempts` outcome `conversation_unresolved`), and only then does the doctor offer the paid re-extraction of its page, capped at the amount the user approves (`--max-cost-usd <N>`). A re-extraction of the page keeps a relinked fact\'s entity on the claim\'s new row. Rows the free pass could not resolve no longer count toward doctor\'s 25% new-fact warning. Once a page was re-extracted on its current content, doctor stops offering the paid re-extraction for it and lists the facts left for linking by hand (`--entity`); editing the page offers it again.' },
+ // Wave 18 lane 4 (#6725 #6723 #6724).
+ { since: '0.60.284.0', text: '`volunteer_context` and the retrieval reflex now point at one page per name per source: when a meeting, transcript or note page shares an entity page\'s exact title, the pointer goes to the explicit exact slug, then the linkable entity type, then anything else, as `entity` already chose (#6725). The choice runs after the privacy and activation gate, so a private or withheld entity page falls back to the readable page, and same-title pages in different sources are still both volunteered.' },
+ { since: '0.60.284.0', text: '`entity` and `context_pack` now resolve names across every source the caller can read, like `volunteer_context` (#6723): the home source first (the connection\'s source, or its GBRAIN_SOURCE / .gbrain-source binding), then the other readable sources sorted by id. A name only another readable source holds now returns a card instead of `found: false`; a name the home source holds still resolves there. `source_id` pins one source (refusals match `recall`: `scope_denied`, `not_found`, `invalid_params`), `context_pack` takes source-qualified `entity_refs`, and every card, `names` row and suggestion carries `source_id`. A bound connection\'s lookups that its own source misses get a `source_binding_narrowed` notice naming where each name resolved. Sources outside the grant are never read; a remote `__all__` still resolves nothing. Each pack card\'s activation verdict, newer mentions, records, page status and pinned questions now come from its own source: a pinned question joins the pack only when its source and `scope_entity` match a packed card, and a requested name that packs no card no longer pulls in a pin by slug.' },
+ { since: '0.60.284.0', text: '`context_pack` now returns `entity_facts[]`, the packed entities\' own facts (up to 5 per card, newest first, read in the card\'s own source and visibility), each tagged with its card\'s `source_id` and `slug` and carrying `fact_id`, confidence, `attributed_to`, provenance and trust (#6724). `facts[]` is unchanged hot memory. `text` gains a `## Entity facts` section before hot memory, and a fact in both renders once. Under `budget_tokens` entity facts pack after cards and before hot facts; a remote caller still never sees a private fact.' },
+ // Wave 18 lane 5 (#6781 #6780 #6719 #6758 #6759 #6772 #6765 #6774 #6776 #6775).
+ { since: '0.60.284.0', text: 'A managed sync backlog that cannot be read is now movement_state unknown (unknown.reason backlog_read_failed) on sources status, writer status and doctor, never nothing_pending (#6781). Doctor managed_sync_not_moving warns with details.health unknown, and gbrain sources writer movement exits 1 with the new code movement_unknown (--warn-only still exits 0) where it used to exit 0. Rerun the movement command; if the read keeps failing, run gbrain doctor --json.' },
+ { since: '0.60.284.0', text: 'gbrain config set now accepts twelve keys gbrain already reads at runtime but refused as unknown (#6780), including facts.absorb_warn_threshold, think.trajectory_enabled, embedding_image_ocr_max_usd and agent.search_snippet_chars; a source scan guard keeps every getConfig key registered.' },
+ { since: '0.60.284.0', text: 'A terminal write failure with origin owner_exception no longer gets the database-trigger hint (#6719): it says the owner hit an unexpected exception, nothing was committed and the cause is unknown, and points at gbrain write-request <id> --json (error_detail) and the consumer log; an origin that names no database refusal stays unknown instead of being read as a trigger.' },
+ { since: '0.60.284.0', text: 'Every agent-contract event now records the gbrain version that wrote it (#6758). When doctor agent_contract warns, details.builds splits the counted events into this_build, other_builds and unknown_build, details.incident is historical when none came from the running build, and the message names how many another build recorded. The warning and its 7-day window are unchanged.' },
+ { since: '0.60.284.0', text: 'Doctor persistence_counter_drift now names each drifting scope\'s direction (overcharge for a positive delta, a bounded charge with no data lost; undercount for a negative one) and splits the receipts behind it into requests and topology_changes (#6759). The check is still read-only; there is no counter reconcile repair yet.' },
+ { since: '0.60.284.0', text: 'An embedding error from a provider that reports one input over the model\'s context with a 5xx or no HTTP status (llama.cpp "larger than the max context size", Ollama 500 "input length exceeds the context length") is no longer retried as transient (#6772): the bad chunk is isolated, its siblings embed, and the over-length heal splits it. Only explicit token or context-limit wording counts; "input queue is too long", connection-limit and other 5xx errors still retry.' },
+ { since: '0.60.284.0', text: 'Writer coordination lock path fallback (#6765): when a checkout contains GBRAIN_HOME (or is it), its native writer lock no longer lands inside the checkout; a claim places it under GBRAIN_COORDINATION_HOME (absolute, outside the checkout), else ~/.gbrain/persistence, in a directory namespaced by the checkout and host, and refuses with storage_error when even that resolves inside the checkout. Ordinary layouts keep persistenceHome()/locks, and a path a reservation already records always wins. A writer transfer keeps the recorded lock (successor reservation first, then the host binding) instead of recomputing it from the accepting process\'s home. A reservation an older release wedged with its lock inside the checkout ("must live outside the canonical checkout") is repaired by the next claim on the host that reserved it. Who: brains whose source checkout contains GBRAIN_HOME, and container deployments. What to do: in a container, set GBRAIN_COORDINATION_HOME to a mounted directory outside the checkout so the lock survives recreation; re-run the claim on a wedged source; gbrain sources writer status --json shows onboarding.sources[].coordination_lock (path, rule, old_path_wedge, and coordination_home_ignored when GBRAIN_COORDINATION_HOME names another directory than the recorded lock, which wins; doctor coordination_lock_location warns about the same case).' },
+ { since: '0.60.284.0', text: 'A graduation intent marker that recorded a boot id or PID namespace this process cannot read now reads unknown, not alive, so a marker from another host or container is never taken as a live run because a local process shares its pid (#6774).' },
+ { since: '0.60.284.0', text: '`scripts/eval-spend-guard.sh` runs the guarded command in its own process group and stops the whole group (helpers and grandchildren included) on an interrupt, after the kill grace, and when the command exits leaving processes behind. A terminal stdin is now EOF (the command cannot read the terminal from its own group); pipe or redirect input if it needs any (#6776).' },
+ { since: '0.60.284.0', text: 'While its command runs, `scripts/eval-spend-guard.sh` keeps a run lease in `<ledger>.leases/<run_id>.lease` (run id, guard pid, process group id, host, boot id) and removes it once the run is reconciled. When a guard was SIGKILLed and its process group may still be running, the next guard on that host prints a STALE RUN report on stderr with the lease path, the pgid and the commands to inspect it (ps -o pid,pgid,cmd -g <pgid>) and stop it (kill -TERM -- -<pgid>), appends a cost-0 status "unknown" ledger row (stale_run_id, pgid, lease) and renames the lease to .reported; a later start retires a .reported lease once its group has exited or the host rebooted (or remove it by hand). Nothing is killed automatically, and the stale run\'s reservation stays counted at its estimate (#6776).' },
+ { since: '0.60.284.0', text: '`gbrain claw-test` runs each phase in its own process group: a phase timeout, SIGINT and SIGTERM stop everything the phase started, and SIGINT stops the running phase even when it was not sent from the terminal (a second SIGINT kills it) (#6775).' },
+ // #6712 follow-up (#6891).
+ { since: '0.60.285.0', text: 'New doctor check `sync_overwritten_db_edits` warns when an incremental managed sync published a committed file edit over a page that was also edited in the database since its last import, with no `file_drift` hold (the bug #6887 fixes): the database edit survives only in the page\'s history. It counts the pages per source from page history and write receipts (also after receipt compaction) and warns only when the records prove it; findings it cannot prove are counted as unknown. New explicit-only repair `gbrain repair overwritten-edits --source <id>` previews each page with a diff, and `--apply --expect <hash>` restores the edit as a new revision through a database-only `revert_version` bound to the previewed revision (a page that moved is `changed_since_preview`); it never rewrites the committed file. Only the host that owns the source\'s checkout compares that file and holds it `file_drift` when it differs from the restored page; on any other host the restore applies with the file left unheld (outcome `restored_file_unheld`), and the owner host runs `gbrain repair file-drift --source <id> --slug <slug> --prefer database` afterward to write the restored edit to the file (no command writes only the hold).' },
+ { since: '0.60.281.0', text: 'The dream cycle\'s take-grading phase (`grade_takes`) now asks its judge with prompt `hybrid-evidence-v2`: evidence about a different company, person or product whose name only resembles the one in the claim no longer counts toward a verdict. An answer with prose around its JSON, or a repeated answer that agrees, now parses instead of failing (two answers that disagree are still no verdict). Verdicts are cached per prompt version, so the next cycles grade each eligible take once more, within the phase\'s budget (`cycle.grade_takes.budget_usd`, default $3 a run). Auto-resolve stays off, so no take\'s resolution changes. New: `gbrain takes grades` lists the cached verdicts for review and marks judges the take-grading eval has not measured.' },
+
+ // Wave 18 lane 1 (#6778 #6761 #6791 #6773).
+ { since: '0.60.282.0', text: 'Facts absorb now waits for its write up to the job deadline instead of 5 s. A write still committing is logged `write_pending_accepted` and writer contention before admission `write_deferred_unadmitted`; neither counts toward the doctor\'s facts_extraction_health threshold, and persistent contention gets its own warning (`gbrain sources writer status --source <id> --json`).' },
+ { since: '0.60.282.0', text: 'facts_extraction_health reports its 24 h failure count as history (rolling, with an ages-out time) and separately names facts-absorb jobs still dead, with `gbrain jobs retry <id>` as the fix; it no longer suggests raising `facts.absorb_warn_threshold`, and the thresholds are unchanged.' },
+ { since: '0.60.282.0', text: 'A `claude-cli` answer that Claude Code continued after hitting its output cap is now rebuilt in full from the call\'s event stream (the CLI runs with `--verbose`) instead of returning only the text after the continuation as a complete answer. When the full text cannot be proven, the call returns no text and no tool calls, finishes `length` (callers retry or escalate as for any capped answer) and reports `providerMetadata[\'claude-cli\'].code = \'continuation_unproven\'` with reason `events_missing`, `no_assistant_events` or `segments_unmatched`, and one stderr line per reason per process naming its remedy (upgrade the claude CLI for the first two, raise the caller\'s output cap for the third).' },
+ { since: '0.60.282.0', text: 'Generated dream-cycle summaries now carry `created: <summary date>` in their frontmatter, so they pass `gbrain lint`\'s temporal check.' },
+ // Wave 18 lane 2 (#6743 #6739 #6755 #6729).
+ { since: '0.60.282.0', text: '`gbrain bootstrap harness` exits 14 (`bootstrap_cleanup_pending`, JSON `status: "cleanup_pending"`) instead of 0 when the harness is wired but earlier shared-skills enrollments or carried previous token ids are not cleaned up yet, and `--status` exits 14 instead of 1 for the same state; the JSON gains a per-id `cleanup` list and a `fix`. Each carried token id is now revoked on its own once no enrollment holds it, and an old enrollment whose token was already revoked finishes its local cleanup and counts as left (`credential_revoked`) instead of blocking every revocation. Doctor `bootstrap_harness_health` names each id as revoked (cleanup pending) or active and recommends leave before revoke.' },
+ { since: '0.60.282.0', text: 'The first Claude Code `user-prompt` hook in a new working folder now records heartbeat outcome `ok` with prompt-only context instead of `degraded` / `transcript_unreadable`: Claude Code creates `~/.claude/projects/<project>/` only after that prompt, so a transcript whose project folder does not exist yet reads as absent, the same as a not-yet-written transcript (#5465). It applies only when the missing folder is a direct child of an existing folder inside the projects root and the path has no `..` segment; any other missing path still fails closed. A missing transcript at `session-end` is still reported as degraded.' },
+ { since: '0.60.282.0', text: 'On a Postgres brain with no sync.repo_path, the v0.11.0 migration no longer runs `gbrain autopilot --install` during an upgrade. Phase F is recorded as skipped (reason no_repo_path) with the exact install command (the default source\'s path when it has one), the migration completes instead of wedging after three partial runs, and `gbrain doctor` shows a minions_migration line with that command until an autopilot is installed for the brain. A brain already wedged on v0.11.0 by partials that failed only the install phase is cleared automatically on the next apply-migrations run when its sync.repo_path is unset (a \'retry\' row with reason phase_f_no_repo_path is appended to migrations/completed.jsonl); with sync.repo_path set the --force-retry advice stands. Phase F ledger entries now carry a reason code (no_repo_path, autopilot_already_installed, install_failed). Separately, a direct `gbrain autopilot --install` with no --repo and no sync.repo_path now installs for the default source\'s local_path instead of refusing. Wedged-migration advice now names migrations/completed.jsonl (phases[].detail) instead of upgrade-errors.jsonl.' },
+ { since: '0.60.282.0', text: 'New explicit-only repair kind `gbrain repair rename-identity --source <id>` for an inexact Git rename that sync split into a delete plus an add (#6729). Without `--slug` the preview lists the open pairs with their preview commands. `--slug <new-slug>` (and `--from <old-slug>` when two pairs share it) previews one pair and binds both page ids, both revisions and the disposition into its hash; `--apply --expect <hash> --yes` (destructive consent; without `--yes` a non-interactive run exits 3 with the consent payload) carries the old page id onto the new slug with its version history, timeline, links, facts and aliases, imports the new file onto it as an edit and retires the provisional page (soft-deleted under a purged slug). Facts of both pages survive or the carry refuses `fact_rows_collide` before writing. Carrying identity is classic-only: on a managed source the preview states `managed_remedy_unavailable` and names `--close`, and an apply refuses with that code. `--close` settles the pair and moves nothing, on both kinds of source. Both settle the record (`disposition` remedied or closed), which releases the purge hold. `--all`, the maintenance cycle and the remediation plan never run it.' },
+ { since: '0.60.282.0', text: 'The #6729 sync report, `gbrain sync status --json` (`identity_downgrades[].remedy`) and doctor `rename_identity_downgrades` now name each open pair\'s remedy: the `gbrain repair rename-identity` preview argv, the apply argv bound to the plan hash, `consent: ["destructive"]` and what releases the purge hold. On a managed source the remedy is `--close` (`carry_unavailable: "managed_remedy_unavailable"`), because carrying identity is unavailable there. Doctor\'s fix is the first pair\'s apply (`ask_user`, with `preview_argv` and `plan_hash`); `gbrain restore <old-slug> --source-id <id> --force` stays the named alternative wherever the source admits a restore (`restore_available`, so not on an unbound Postgres source with a checkout); there the remedy is the only fix doctor offers, and `restore_unavailable_sources` lists those sources.' },
+ // Wave 18 lane 3 (#6740 #6742 #6720 #6731 #6764).
+ { since: '0.60.282.0', text: 'The entity mention scan no longer reads text inside HTML comments, so the `<!--- gbrain:... -->` fence markers stop producing `mentions` links to a page titled like a marker word (#6740). `MENTION_EXTRACTOR_VERSION` is now 6: the next `gbrain extract --stale` (or maintenance cycle) rescans every inline-body page once and removes the stale plain mention rows; `typed_ner` edges are untouched and segmented pages stay deferred as before. Entity cards and `get_backlinks` show a mention coverage notice (state `pending`) until that rescan finishes.' },
+ { since: '0.60.282.0', text: 'The bundled `gbrain-base-v2` schema pack (the `init` default, also inherited by `company-brain`) is now version 1.4.0 and declares the `question` page type the pinned-question writer stamps, so a pinned question no longer makes doctor `schema_pack_consistency` warn `page_type_undeclared` (#6742). Existing question pages keep their type; no data changes. The active pack identity reads `[email protected]+<hash>`.' },
+ { since: '0.60.282.0', text: 'A page-derived atom now carries its source page\'s content date as frontmatter `date` (the source\'s stored `effective_date`, else the same precedence import uses), so its `effective_date` is the date of the conversation or note it came from instead of the extraction run (#6720); `extracted_at` stays the processing stamp and transcript-derived atoms are unchanged. Atoms extracted before this release keep their run dates until re-extracted (`gbrain dream --phase extract_atoms` with `--force` re-pays the model); a preview-first backfill repair is planned.' },
+ { since: '0.60.282.0', text: '`gbrain extract-conversation-facts` (and the `conversation_facts_backfill` cycle phase) now tells the extractor which entities the conversation page itself links (its frontmatter attendees and the entity pages its body links, same source, up to 40 slugs), so facts about those people and companies are stored on their pages instead of a guess from a first name (#6731). A private entity is hinted only when the run writes private facts. The `extract_facts` operation\'s prompt and 5-hint cap are unchanged.' },
+ { since: '0.60.282.0', text: '`gbrain extract-conversation-facts` (and the `conversation_facts_backfill` cycle phase) now runs the free write-time subject inference on facts the extractor returns without an entity, so a fact naming exactly one entity page in full is stored on that entity (context note `entity inferred from mention`; off with `facts.entity_inference false`) (#6764). Doctor `unlinked_facts` counts the conversation extractor\'s unlinked rows on their own (origin `conversation`, no longer inside fence-owned) and, because `gbrain facts relink` never examines them, its fix is a bounded, source-qualified re-extraction of the pages with the most (`--slugs`, up to 50, `--force --max-cost-usd <N>` with the approved amount as the input `N`, preview `--dry-run`; paid, asks the user first). A `replaces` naming a conversation-derived fact now says to re-extract its page instead of hinting at a fence edit.' },
+ { since: '0.60.282.0', text: 'New `gbrain facts relink --conversation` links the conversation extractor\'s facts that were stored without an entity, for free: a fact naming exactly one entity page in full is linked (context note `entity relinked from mention`), one write per page (a receipted coordinator request on a managed brain), no model call (#6764). Doctor `unlinked_facts` now prescribes it first for those rows (consent none, the agent runs it, preview `--dry-run`); a fact it cannot resolve is recorded (`fact_relink_attempts` outcome `conversation_unresolved`), and only then does the doctor offer the paid re-extraction of its page, capped at the amount the user approves (`--max-cost-usd <N>`). A re-extraction of the page keeps a relinked fact\'s entity on the claim\'s new row. Rows the free pass could not resolve no longer count toward doctor\'s 25% new-fact warning. Once a page was re-extracted on its current content, doctor stops offering the paid re-extraction for it and lists the facts left for linking by hand (`--entity`); editing the page offers it again.' },
+ // Wave 18 lane 4 (#6725 #6723 #6724).
+ { since: '0.60.282.0', text: '`volunteer_context` and the retrieval reflex now point at one page per name per source: when a meeting, transcript or note page shares an entity page\'s exact title, the pointer goes to the explicit exact slug, then the linkable entity type, then anything else, as `entity` already chose (#6725). The choice runs after the privacy and activation gate, so a private or withheld entity page falls back to the readable page, and same-title pages in different sources are still both volunteered.' },
+ { since: '0.60.282.0', text: '`entity` and `context_pack` now resolve names across every source the caller can read, like `volunteer_context` (#6723): the home source first (the connection\'s source, or its GBRAIN_SOURCE / .gbrain-source binding), then the other readable sources sorted by id. A name only another readable source holds now returns a card instead of `found: false`; a name the home source holds still resolves there. `source_id` pins one source (refusals match `recall`: `scope_denied`, `not_found`, `invalid_params`), `context_pack` takes source-qualified `entity_refs`, and every card, `names` row and suggestion carries `source_id`. A bound connection\'s lookups that its own source misses get a `source_binding_narrowed` notice naming where each name resolved. Sources outside the grant are never read; a remote `__all__` still resolves nothing. Each pack card\'s activation verdict, newer mentions, records, page status and pinned questions now come from its own source: a pinned question joins the pack only when its source and `scope_entity` match a packed card, and a requested name that packs no card no longer pulls in a pin by slug.' },
+ { since: '0.60.282.0', text: '`context_pack` now returns `entity_facts[]`, the packed entities\' own facts (up to 5 per card, newest first, read in the card\'s own source and visibility), each tagged with its card\'s `source_id` and `slug` and carrying `fact_id`, confidence, `attributed_to`, provenance and trust (#6724). `facts[]` is unchanged hot memory. `text` gains a `## Entity facts` section before hot memory, and a fact in both renders once. Under `budget_tokens` entity facts pack after cards and before hot facts; a remote caller still never sees a private fact.' },
+ // Wave 18 lane 5 (#6781 #6780 #6719 #6758 #6759 #6772 #6765 #6774 #6776 #6775).
+ { since: '0.60.282.0', text: 'A managed sync backlog that cannot be read is now movement_state unknown (unknown.reason backlog_read_failed) on sources status, writer status and doctor, never nothing_pending (#6781). Doctor managed_sync_not_moving warns with details.health unknown, and gbrain sources writer movement exits 1 with the new code movement_unknown (--warn-only still exits 0) where it used to exit 0. Rerun the movement command; if the read keeps failing, run gbrain doctor --json.' },
+ { since: '0.60.282.0', text: 'gbrain config set now accepts twelve keys gbrain already reads at runtime but refused as unknown (#6780), including facts.absorb_warn_threshold, think.trajectory_enabled, embedding_image_ocr_max_usd and agent.search_snippet_chars; a source scan guard keeps every getConfig key registered.' },
+ { since: '0.60.282.0', text: 'A terminal write failure with origin owner_exception no longer gets the database-trigger hint (#6719): it says the owner hit an unexpected exception, nothing was committed and the cause is unknown, and points at gbrain write-request <id> --json (error_detail) and the consumer log; an origin that names no database refusal stays unknown instead of being read as a trigger.' },
+ { since: '0.60.282.0', text: 'Every agent-contract event now records the gbrain version that wrote it (#6758). When doctor agent_contract warns, details.builds splits the counted events into this_build, other_builds and unknown_build, details.incident is historical when none came from the running build, and the message names how many another build recorded. The warning and its 7-day window are unchanged.' },
+ { since: '0.60.282.0', text: 'Doctor persistence_counter_drift now names each drifting scope\'s direction (overcharge for a positive delta, a bounded charge with no data lost; undercount for a negative one) and splits the receipts behind it into requests and topology_changes (#6759). The check is still read-only; there is no counter reconcile repair yet.' },
+ { since: '0.60.282.0', text: 'An embedding error from a provider that reports one input over the model\'s context with a 5xx or no HTTP status (llama.cpp "larger than the max context size", Ollama 500 "input length exceeds the context length") is no longer retried as transient (#6772): the bad chunk is isolated, its siblings embed, and the over-length heal splits it. Only explicit token or context-limit wording counts; "input queue is too long", connection-limit and other 5xx errors still retry.' },
+ { since: '0.60.282.0', text: 'Writer coordination lock path fallback (#6765): when a checkout contains GBRAIN_HOME (or is it), its native writer lock no longer lands inside the checkout; a claim places it under GBRAIN_COORDINATION_HOME (absolute, outside the checkout), else ~/.gbrain/persistence, in a directory namespaced by the checkout and host, and refuses with storage_error when even that resolves inside the checkout. Ordinary layouts keep persistenceHome()/locks, and a path a reservation already records always wins. A writer transfer keeps the recorded lock (successor reservation first, then the host binding) instead of recomputing it from the accepting process\'s home. A reservation an older release wedged with its lock inside the checkout ("must live outside the canonical checkout") is repaired by the next claim on the host that reserved it. Who: brains whose source checkout contains GBRAIN_HOME, and container deployments. What to do: in a container, set GBRAIN_COORDINATION_HOME to a mounted directory outside the checkout so the lock survives recreation; re-run the claim on a wedged source; gbrain sources writer status --json shows onboarding.sources[].coordination_lock (path, rule, old_path_wedge, and coordination_home_ignored when GBRAIN_COORDINATION_HOME names another directory than the recorded lock, which wins; doctor coordination_lock_location warns about the same case).' },
+ { since: '0.60.282.0', text: 'A graduation intent marker that recorded a boot id or PID namespace this process cannot read now reads unknown, not alive, so a marker from another host or container is never taken as a live run because a local process shares its pid (#6774).' },
+ { since: '0.60.282.0', text: '`scripts/eval-spend-guard.sh` runs the guarded command in its own process group and stops the whole group (helpers and grandchildren included) on an interrupt, after the kill grace, and when the command exits leaving processes behind. A terminal stdin is now EOF (the command cannot read the terminal from its own group); pipe or redirect input if it needs any (#6776).' },
+ { since: '0.60.282.0', text: 'While its command runs, `scripts/eval-spend-guard.sh` keeps a run lease in `<ledger>.leases/<run_id>.lease` (run id, guard pid, process group id, host, boot id) and removes it once the run is reconciled. When a guard was SIGKILLed and its process group may still be running, the next guard on that host prints a STALE RUN report on stderr with the lease path, the pgid and the commands to inspect it (ps -o pid,pgid,cmd -g <pgid>) and stop it (kill -TERM -- -<pgid>), appends a cost-0 status "unknown" ledger row (stale_run_id, pgid, lease) and renames the lease to .reported; a later start retires a .reported lease once its group has exited or the host rebooted (or remove it by hand). Nothing is killed automatically, and the stale run\'s reservation stays counted at its estimate (#6776).' },
+ { since: '0.60.282.0', text: '`gbrain claw-test` runs each phase in its own process group: a phase timeout, SIGINT and SIGTERM stop everything the phase started, and SIGINT stops the running phase even when it was not sent from the terminal (a second SIGINT kills it) (#6775).' },
+ // #6712 follow-up (#6891).
+ { since: '0.60.283.0', text: 'New doctor check `sync_overwritten_db_edits` warns when an incremental managed sync published a committed file edit over a page that was also edited in the database since its last import, with no `file_drift` hold (the bug #6887 fixes): the database edit survives only in the page\'s history. It counts the pages per source from page history and write receipts (also after receipt compaction) and warns only when the records prove it; findings it cannot prove are counted as unknown. New explicit-only repair `gbrain repair overwritten-edits --source <id>` previews each page with a diff, and `--apply --expect <hash>` restores the edit as a new revision through a database-only `revert_version` bound to the previewed revision (a page that moved is `changed_since_preview`); it never rewrites the committed file. Only the host that owns the source\'s checkout compares that file and holds it `file_drift` when it differs from the restored page; on any other host the restore applies with the file left unheld (outcome `restored_file_unheld`), and the owner host runs `gbrain repair file-drift --source <id> --slug <slug> --prefer database` afterward to write the restored edit to the file (no command writes only the hold).' },
+ { since: '0.60.286.0', text: '`takes_scorecard` takes two new parameters, `group_by` (`holder` or `source`) and `min_n`, for trusted local callers: the answer then adds `groups` (per-holder or per-source accuracy, shrunk accuracy, a Wilson interval, recency-weighted accuracy, Brier and Brier skill, citations, open, overdue and unresolved counts, `low_n`) and `journal` totals from the private forecast journal. A remote caller that passes either parameter is refused with the new code `scorecard_group_by_local_only` instead of having it ignored; without them, remote and local output is unchanged. `gbrain takes scorecard --group-by holder|source [--min-n N]` is the CLI form; it and the new `gbrain takes journal` and `gbrain takes horizon` commands are host-bound, so a thin client refuses them.' },
+ // #6884 (purge sweep per batch, capacity-capped purge runs).
+ { since: '0.60.287.0', text: 'A batch of page purges no longer reads the whole write journal once per page: the first queued purge of a source sweeps once for its own claims and those of the purges queued behind it, and each of those scans only the journal rows added since. Purge receipts\' `journal_sweep` gains `batch` (how many purges that sweep covered) and `watermark` (the sequence a purge started past; null when it swept from the start). A purge whose claims changed since the batch sweep sweeps on its own as before.' },
+ { since: '0.60.287.0', text: 'The managed purge (autopilot purge phase, the purge job and `gbrain pages purge-deleted`) submits only while the writer has outstanding-request room (a background run stops at `persistence.capacity.background_pause_pct` of the cap). The rest is reported as `write_capacity_deferred` and counted in `capacity_deferred` (cycle: `purged_pages_capacity_deferred`, phase status warn) and is submitted by the next run, where it used to fail each page with `queue_capacity` (`managed_purge_failed`) and count each failure toward parking it.' },
+ { since: '0.60.288.0', text: 'On a managed brain `gbrain sync --dry-run --json` adds a `convergence` object: a read-only shadow of the level-triggered sync (#6712 PR 4a) that classifies every path of the source the way the coming pass will (matched, import, held, drift and the other classes, each tagged with who acts: none, owner or repair), with predicted file_drift decisions after a read-only screen, `legacy_unverified` counts, deletes with the mass-delete valve verdict and up to 20 sample paths per class. `--redact-paths` turns the sample paths into sha256 prefixes and drops slugs, so the counts can be shared. `gbrain sync status --detail --json` adds the same object (`convergence`, `dry_run: true`) and `convergence_read`; a plain `sync status` skips that heavy read. Nothing is written or admitted, existing keys keep their meaning, and sync behaves exactly as before.' },
+ // #6712 PR 4b (the level-triggered sync pass, design v3.2 §13) and #6885. `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
- { since: '0.60.279.0', text: 'On a managed brain a plain `gbrain sync` of a non-company source no longer imports only `last_commit..HEAD`: each pass compares every file at HEAD with what the database absorbed (the page and its import record) and admits what differs, so out-of-band changes (a reset or revert, a rewritten history, a lost manifest, an interrupted run) converge on the next plain sync with no flag. When nothing moved since the last converged pass (same HEAD, parser, schema pack and selection, nothing open), the tick is idle and only `last_sync_at` changes; a full comparison still runs at least every 200 passes or 24 hours. A pass uses at most 4 rounds. Company-brain sources keep their cursor.' },
- { since: '0.60.279.0', text: 'In committed mode (the default) a managed sync never imports, adopts or writes over a file whose working copy differs from the commit. When the committed file is unchanged since its import, the uncommitted edit is left alone and nothing is held; when the commit moved under an uncommitted edit, the file is held `worktree_dirty` and the page and the edit stay as they are. Commit or restore the file and sync again.' },
- { since: '0.60.279.0', text: 'A page deleted in the database is no longer brought back by a managed sync from a file that is still committed, even after `gbrain delete --purge` or a mirrored purge replay: a purge now leaves a deletion marker (the file versions the brain held) while the file is still in `last_commit` or on disk, and an unchanged file then counts as synced. A file that changed after its page was deleted is held `file_drift` with side `deleted` and state `tombstone_edited` (soft-deleted) or `purged_differs` (purged, naming its slug), and the rest of the source syncs; `gbrain repair file-drift --held --side deleted --state <state>` resolves it. A full pass retires the marker once the file has left both the commit and the disk, so a new file at that path imports as a new page. A page purged before this release has no such marker, and `--full` can still import its file.' },
- { since: '0.60.279.0', text: '`storage.keep_db` is now applied by the managed sync pass itself on the brain host, and the separate keep_db worker that resident owners ran every 10 minutes is retired. A page under a keep_db prefix whose file is clean in the commit gets the database-wins write when its database copy moved (whether or not the file changed too); the write is bound to the committed bytes and the page revision the pass read, so a later edit refuses it. A file with uncommitted changes never gets a database-wins write: it is held like any dirty file. While `sync.admission` is not `normal` they wait as `paused_keep_db`. Remote callers never write them.' },
- { since: '0.60.279.0', text: 'A managed sync that would delete more than half of a source\'s file-backed pages (on a source with more than 20) no longer applies those deletes: it writes one withheld record (count, ratio, a hash of the set and up to 20 sample paths), imports everything else, holds no page and still advances `last_commit`. `gbrain sync status` reads `blocked` / `deletes_withheld` with the dry run (`gbrain sync --source <id> --dry-run --json`) as its next step, and `convergence.deletes_withheld` carries the record. If the checkout is wrong or incomplete, restore it and sync; if the deletion is intended, run `GBRAIN_ALLOW_MASS_RECONCILE=1 gbrain sync --source <id>` on the brain host, which applies the deletes and clears the record. Remote callers never apply them.' },
- { since: '0.60.279.0', text: '`gbrain sync status --json` on a managed source now reports the live pass as `convergence` (`dry_run: false`) on a plain status too, read from the pass row: its kind, outcome, stop reason, round, candidates, settled and remaining counts, held Decisions by side, `db_ahead`, `legacy_unverified`, keep_db writes, a withheld mass delete, the open episode, `not_converged_streak` and `classes`, where each class names who acts (`none`, `owner` or `repair`; `gbrain sync status --help` lists them). New field `admission` (`sync.admission`\'s value, `set_at`, `effective`) and new reasons `pass_unfinished`, `not_converged`, `settle_mismatch`, `deletes_withheld`, `selection_scoped` and `admission_paused`; a source is never `synced` while its newest pass is open or ended unconverged. Held `file_drift` files in `gbrain sources status --json` and in sync results carry `side` (`both`, `unknown`, `deleted`) and, for a deleted side, `state`.' },
- { since: '0.60.279.0', text: 'A file that a managed sync settles at the same level in 3 passes in a row but that never reads settled afterwards is now held `settle_mismatch` (it needs a person) instead of being re-imported on every pass, and the rest of the source syncs; within one pass such a file is re-admitted at most once. `gbrain sync status` reports `settle_mismatch` from the second pass. Run `gbrain doctor --json` and `gbrain sources writer status --source <id> --json` (read-only), fix or report what they name, then `gbrain sources retry-held <id>` and sync.' },
- { since: '0.60.279.0', text: 'A managed sync run at a selection other than the source\'s configured one (`--exclude`, `--include-hidden`, `--src-subpath`, a different `--strategy`, or `--working-tree` against `sync.include_working_tree`) now ends `synced` with reason `selection_scoped` when that selection converges, and does not advance `last_commit`, `last_sync_at`, the slug-root pin or `chunker_version`. `gbrain sync status` reads `synced` / `selection_scoped`, and its next step is the plain `gbrain sync`, which syncs the configured selection and advances the commit.' },
- { since: '0.60.279.0', text: '`gbrain repair file-drift` takes `--held [--side both|unknown|deleted [--state tombstone_edited|purged_differs|file_gone]]` to preview and resolve a source\'s held `file_drift` files as one Decision, narrowed by `--only` and `--skip`. In each deleted state the two `--prefer` values do opposite things: `tombstone_edited` keeps the deletion and removes the file (`database`) or restores the page and imports the file (`file`); `purged_differs` removes the file or imports it as a new page; `file_gone` recreates the file or soft-deletes the page. A selection that mixes sides or states refuses `file_drift_mixed_selection` with the narrower commands, and `--side deleted` without `--state` refuses `file_drift_state_required`; nothing is previewed. Holds written before this release carry no side and are listed for a `--slug` preview.' },
- { since: '0.60.279.0', text: 'A `gbrain sync` that follows another drainer now counts the lease holder\'s sync-pass writes as progress, not only its commits and cursor saves, so a pass that spends minutes reading and classifying a large source is not mistaken for a wedged holder. A follower on an older gbrain counts only commits and cursor saves: beside a holder on this release that commits nothing for 5 minutes (a long classify round) it stops `blocked` (exit 1) with `drain_stalled`, cause `no_progress`. Upgrade every host that syncs a source together.' },
- { since: '0.60.279.0', text: 'Doctor reads a non-company managed source\'s sync from its pass row instead of a cursor. When its passes keep stopping (`blocked`, a `not_converged` streak or a `settle_mismatch` streak), `managed_sync_not_moving` warns that managed sync does not converge, `git_held_files` warns even with no file held (the source is listed under `details.passes`) and `managed_sync_blocked` warns, then fails after 60 minutes; each names `gbrain sync status --source <id> --json` as the read-only next step. `terminal_failures` lists what blocks an open pass\'s checkpoint. A source whose newest pass ended `synced` or `up_to_date` at HEAD reads healthy.' },
- { since: '0.60.279.0', text: 'A managed `gbrain sync` of a non-company source now reads the checkout only through allow-listed Git plumbing (`ls-tree`, `ls-files -s`, `diff-tree --no-renames`, `cat-file --batch`, `hash-object --no-filters`) and the files\' own bytes, so the repository\'s clean, process or textconv programs never run during that sync. Before, discovery ran a porcelain `git diff`, which runs them on modified files. Company-brain sources and `--dry-run` keep the earlier discovery.' },
- { since: '0.60.279.0', text: 'A managed sync now reserves each admitted import group\'s estimated embedding cost inside that group\'s admission (one record per group), so a killed sync keeps what it reserved and a replay of the group adds nothing. When a pass\'s reservations, or an open `--full` re-import\'s, reach the approved amount (`sync.cost_gate_min_usd`, $0.50 by default, or what `gbrain sync --yes` approved), the rest of that pass imports without embeddings; the next pass does not inherit that. If the pass record is lost while reservations exist, the cost is unknown and embeddings wait until the owner approves again with `gbrain sync --source <id> --no-pull --yes`.' },
- { since: '0.60.279.0', text: '`gbrain sources set-strategy <id> <strategy>` now also refuses with `sync_run_unfinished` (exit 1, nothing written) while a sync holds the source\'s drain lease or while a re-import the source\'s sync opened (a `--full`, say) is still open. Before, it refused only over an unfinished cursor, which a non-company source no longer has. Wait for the running sync, or finish the re-import with `gbrain sync --source <id> --no-pull`; `gbrain sync status --source <id> --json` shows where it stands. Setting the strategy a source already has is not refused.' },
- { since: '0.60.279.0', text: 'New doctor check `sync_admission_restricted` warns on a managed brain while `sync.admission` is not `normal`, with the value, how long ago it was set and the restore command `gbrain config set sync.admission normal`, which is the user\'s to run (never applied automatically). It reads ok on `normal` and on a brain without managed persistence.' },
- { since: '0.60.279.0', text: 'New brain-wide setting `sync.admission`: `normal` (the default), `imports_only` or `classify_only`, set on the brain host with `gbrain config set sync.admission <value>` (any other value is refused, exit 2, and nothing is written). Under `imports_only` managed sync admits no deletes and no `storage.keep_db` writes; those paths wait (`paused_deletes`, `paused_keep_db`) while imports and the checkpoint go on. Under `classify_only` it reads and classifies, writes no page and stops `resumable` / `admission_paused` (exit 0), with a `next` that asks the user to restore it. The value is read when a pass starts and in every admission, and a delete or keep_db write checks it again just before it publishes (it completes `cancelled` with `admission_paused`, nothing written). `gbrain sync status --json` reports `admission: {value, set_at, effective}`.' },
- { since: '0.60.279.0', text: 'A managed sync now records an import for each page an older gbrain imported whose file still equals the page (such pages have no import record and are counted as `legacy_unverified`). It checks every such page in the source\'s first full round, then up to 500 per pass; a later edit of that file then imports normally instead of being held for a decision. The check is read-only until it writes the record, and a page that differs from its file is left as it is. `convergence.legacy_unverified` counts the pages not yet checked.' },
- { since: '0.60.279.0', text: 'After a parser or schema-pack change, a managed sync re-imports the pages whose file and page are unchanged but whose import record names the older parser (class `reparse`, which sync finishes by itself, with no hold), as the pre-pass prescreen did; the first pass after the change reads the whole source.' },
- { since: '0.60.279.0', text: 'An interrupted `gbrain sync --full` no longer ends with the run that started it: the next plain `gbrain sync` continues the re-import under the selection the `--full` started with, and there is no command to abandon it. A `--full` with a narrower selection (a CLI `--exclude`, say) finishes its own re-import and ends `synced` with status reason `selection_scoped`, without moving `last_commit`; the next plain sync then syncs the configured selection. A plain sync closes any open re-import, and stamps `chunker_version` only when the re-import covered the whole configured selection. To pause paid work, rely on the cost gate; to pause everything, set `sync.admission classify_only`.' },
- { since: '0.60.279.0', text: 'A managed sync pass that runs 4 rounds without the source settling (another writer keeps changing it) stops `not_converged`: outcome `resumable`, exit 0, everything it admitted stands, and `next` reruns the same sync. After 3 such passes in a row, `next` switches to a report: `gbrain sync status --source <id> --json` with `safe_to_loop: false` and `fix.next: report`, and a sync job ends needing an operator, so an agent loop stops instead of retrying. The count resets when a pass converges.' },
- { since: '0.60.279.0', text: 'New explicit repair `gbrain repair legacy-twins --source <id>` (#6885) merges the page pairs syncs before #6857 forked: a legacy page with no recorded file whose slug spells the file\'s name differently from today\'s slug rules, and the twin at today\'s slug that records the file. The read-only preview lists each pair (both pages\' ids, slugs and revisions, the file, whether the contents match) and lists as decisions, never merged, pairs whose contents differ, several legacy pages for one twin, and twins whose file is missing or drifted. `--apply --expect <hash> --yes` merges exactly the approved pairs: the legacy page takes over the file and keeps its id, links and history, the twin\'s links, timeline, aliases and the facts other pages state about it move over, its slug becomes an alias, and the twin is soft-deleted (its file untouched) and purged after 72 hours. It refuses off the owner host (`not_owner_host`), when the checkout cannot be read (`legacy_twins_storage_unknown`), and when the pairs are more than half of a source\'s file-backed pages (`legacy_twin_mass_merge_refused`, unless `GBRAIN_ALLOW_MASS_RECONCILE=1`). Nothing changes on upgrade; it runs only when named.' },
++ { since: '0.60.288.0', text: 'On a managed brain a plain `gbrain sync` of a non-company source no longer imports only `last_commit..HEAD`: each pass compares every file at HEAD with what the database absorbed (the page and its import record) and admits what differs, so out-of-band changes (a reset or revert, a rewritten history, a lost manifest, an interrupted run) converge on the next plain sync with no flag. When nothing moved since the last converged pass (same HEAD, parser, schema pack and selection, nothing open), the tick is idle and only `last_sync_at` changes; a full comparison still runs at least every 200 passes or 24 hours. A pass uses at most 4 rounds. Company-brain sources keep their cursor.' },
++ { since: '0.60.288.0', text: 'In committed mode (the default) a managed sync never imports a dirty working copy, as before: the level-triggered pass keeps the cursor path\'s guarantee and never adopts or writes over such a file either. When the committed file is unchanged since its import, the uncommitted edit is left alone and nothing is held; when the commit moved under an uncommitted edit, the file is held `worktree_dirty` and the page and the edit stay as they are. Commit or restore the file and sync again.' },
++ { since: '0.60.288.0', text: 'A page deleted in the database is no longer brought back by a managed sync from a file that is still committed, even after `gbrain delete --purge` or a mirrored purge replay: a purge now leaves a deletion marker (the file versions the brain held) while the file is still in `last_commit` or on disk, and an unchanged file then counts as synced. A file that changed after its page was deleted is held `file_drift` with side `deleted` and state `tombstone_edited` (soft-deleted) or `purged_differs` (purged, naming its slug), and the rest of the source syncs; `gbrain repair file-drift --held --side deleted --state <state>` resolves it. A full pass retires the marker once the file has left both the commit and the disk, so a new file at that path imports as a new page. A page purged before this release has no such marker, and `--full` can still import its file.' },
++ { since: '0.60.288.0', text: '`storage.keep_db` is now applied by the managed sync pass itself on the brain host, and the separate keep_db worker that resident owners ran every 10 minutes is retired. A page under a keep_db prefix whose file is clean in the commit gets the database-wins write when its database copy moved (whether or not the file changed too); the write is bound to the committed bytes and the page revision the pass read, so a later edit refuses it. A file with uncommitted changes never gets a database-wins write: it is held like any dirty file. A pass admits at most 200 of these writes; the rest wait as `keep_db_pending`, and the next sync runs a full pass that admits them. While `sync.admission` is not `normal` they wait as `paused_keep_db`. Remote callers never write them.' },
++ { since: '0.60.288.0', text: 'A managed sync that would delete more than half of a source\'s file-backed pages (on a source with more than 20) no longer applies those deletes: it writes one withheld record (count, ratio, a hash of the set and up to 20 sample paths), imports everything else, holds no page and still advances `last_commit`. `gbrain sync status` reads `blocked` / `deletes_withheld` with the dry run (`gbrain sync --source <id> --dry-run --json`) as its next step, and `convergence.deletes_withheld` carries the record. If the checkout is wrong or incomplete, restore it and sync; if the deletion is intended, run `GBRAIN_ALLOW_MASS_RECONCILE=1 gbrain sync --source <id>` on the brain host, which applies the deletes and clears the record. Remote callers never apply them.' },
++ { since: '0.60.288.0', text: '`gbrain sync status --json` on a managed source now reports the live pass as `convergence` (`dry_run: false`) on a plain status too, read from the pass row: its kind, outcome, stop reason, round, candidates, settled and remaining counts, held Decisions by side, `db_ahead`, `legacy_unverified`, keep_db writes, a withheld mass delete, the open episode, `not_converged_streak` and `classes`, where each class names who acts (`none`, `owner` or `repair`; `gbrain sync status --help` lists them). New field `admission` (`sync.admission`\'s value, `set_at`, `effective`) and new reasons `pass_unfinished`, `not_converged`, `settle_mismatch`, `deletes_withheld`, `selection_scoped` and `admission_paused`; a source is never `synced` while its newest pass is open or ended unconverged. A non-company source has no cursor, so `run_id`, `cursor`, `rate_pages_per_min` and `eta_seconds` read null there. Held `file_drift` files in `gbrain sources status --json` and in sync results carry `side` (`both`, `unknown`, `deleted`) and, for a deleted side, `state`.' },
++ { since: '0.60.288.0', text: 'A file that a managed sync settles at the same level in 3 passes in a row but that never reads settled afterwards is now held `settle_mismatch` (it needs a person) instead of being re-imported on every pass, and the rest of the source syncs; within one pass such a file is re-admitted at most once. `gbrain sync status` reports `settle_mismatch` from the second pass. Run `gbrain doctor --json` and `gbrain sources writer status --source <id> --json` (read-only), fix or report what they name, then `gbrain sources retry-held <id>` and sync.' },
++ { since: '0.60.288.0', text: 'A managed sync run at a selection other than the source\'s configured one (`--exclude`, `--include-hidden`, `--src-subpath`, a different `--strategy`, or `--working-tree` against `sync.include_working_tree`) now ends `synced` with reason `selection_scoped` when that selection converges, and does not advance `last_commit`, `last_sync_at`, the slug-root pin or `chunker_version`. `gbrain sync status` reads `synced` / `selection_scoped`, and its next step is the plain `gbrain sync`, which syncs the configured selection and advances the commit.' },
++ { since: '0.60.288.0', text: '`gbrain repair file-drift` takes `--held [--side both|unknown|deleted [--state tombstone_edited|purged_differs|file_gone]]` to preview and resolve a source\'s held `file_drift` files as one Decision, narrowed by `--only` and `--skip`. In each deleted state the two `--prefer` values do opposite things: `tombstone_edited` keeps the deletion and removes the file (`database`) or restores the page and imports the file (`file`); `purged_differs` removes the file or imports it as a new page; `file_gone` recreates the file or soft-deletes the page. A selection that mixes sides or states refuses `file_drift_mixed_selection` with the narrower commands, and `--side deleted` without `--state` refuses `file_drift_state_required`; nothing is previewed. Holds written before this release carry no side and are listed for a `--slug` preview.' },
++ { since: '0.60.288.0', text: '`gbrain sources refresh` no longer refuses `sync_in_progress` because a non-company source\'s managed sync is unfinished: that sync keeps no cursor and reconciles whatever HEAD its next pass reads, so moving the checkout strands nothing, and the refresh\'s own sync of the members converges at the new HEAD. A company brain\'s unfinished cursor, or an older binary\'s cursor the first pass has not retired yet, still refuses with its resume command.' },
++ { since: '0.60.288.0', text: 'A `gbrain sync` that follows another drainer now counts the lease holder\'s sync-pass writes as progress, not only its commits and cursor saves, so a pass that spends minutes reading and classifying a large source is not mistaken for a wedged holder. A follower on an older gbrain counts only commits and cursor saves: beside a holder on this release that commits nothing for 5 minutes (a long classify round) it stops `blocked` (exit 1) with `drain_stalled`, cause `no_progress`, so upgrade every host that syncs a source together. Until the next schema migration, the only release to downgrade to is the one immediately before this one; its checkpoint cleanup does not keep the sync-pass rows, so after coming back the first sync runs a full pass with the embedding cost unknown until approved again.' },
++ { since: '0.60.288.0', text: 'Doctor reads a non-company managed source\'s sync from its pass row instead of a cursor. When its passes keep stopping (`blocked`, a `not_converged` streak or a `settle_mismatch` streak), `managed_sync_not_moving` warns that managed sync does not converge, `git_held_files` warns even with no file held (the source is listed under `details.passes`) and `managed_sync_blocked` warns, then fails after 60 minutes; each names `gbrain sync status --source <id> --json` as the read-only next step. `terminal_failures` lists what blocks an open pass\'s checkpoint. A source whose newest pass ended `synced` or `up_to_date` at HEAD reads healthy.' },
++ { since: '0.60.288.0', text: 'A managed `gbrain sync` of a non-company source now reads the checkout only through allow-listed Git plumbing (`ls-tree`, `ls-files -s`, `diff-tree --no-renames`, `cat-file --batch`, `hash-object --no-filters`) and the files\' own bytes, so the repository\'s clean, process or textconv programs never run during that sync. Before, discovery ran a porcelain `git diff`, which runs them on modified files. Company-brain sources and `--dry-run` keep the earlier discovery.' },
++ { since: '0.60.288.0', text: 'A managed sync now reserves each admitted import group\'s estimated embedding cost inside that group\'s admission (one record per group), so a killed sync keeps what it reserved and a replay of the group adds nothing. When a pass\'s reservations, or an open `--full` re-import\'s, reach the approved amount (`sync.cost_gate_min_usd`, $0.50 by default, or what `gbrain sync --yes` approved), the rest of that pass imports without embeddings; the next pass does not inherit that. If the pass record is lost while reservations exist, the cost is unknown and embeddings wait until the owner approves again with `gbrain sync --source <id> --no-pull --yes`.' },
++ { since: '0.60.288.0', text: '`gbrain sources set-strategy <id> <strategy>` now also refuses with `sync_run_unfinished` (exit 1, nothing written) while a sync holds the source\'s drain lease or while a re-import the source\'s sync opened (a `--full`, say) is still open. Before, it refused only over an unfinished cursor, which a non-company source no longer has. Wait for the running sync, or finish the re-import with `gbrain sync --source <id> --no-pull`; `gbrain sync status --source <id> --json` shows where it stands. Setting the strategy a source already has is not refused.' },
++ { since: '0.60.288.0', text: 'Doctor `managed_sync_not_moving` now also warns when a managed source\'s newest sync pass found nothing to do (`up_to_date`) but took longer than its target: 0.5 s for an idle tick (1 s on a source over 100,000 pages), 2 s for a full round (15 s over 100,000 pages). The warning names the pass\'s `timings_ms` (an idle tick now records `setup` and `kind`), its fix is the read-only `gbrain sync status --source <id> --json --detail`, and it never fails.' },
++ { since: '0.60.288.0', text: 'New doctor check `sync_admission_restricted` warns on a managed brain while `sync.admission` is not `normal`, with the value, how long ago it was set and the restore command `gbrain config set sync.admission normal`, which is the user\'s to run (never applied automatically). It reads ok on `normal` and on a brain without managed persistence.' },
++ { since: '0.60.288.0', text: 'New brain-wide setting `sync.admission`: `normal` (the default), `imports_only` or `classify_only`, set on the brain host with `gbrain config set sync.admission <value>` (any other value is refused, exit 2, and nothing is written). Under `imports_only` managed sync admits no deletes and no `storage.keep_db` writes; those paths wait (`paused_deletes`, `paused_keep_db`) while imports and the checkpoint go on. Under `classify_only` it reads and classifies, writes no page and stops `resumable` / `admission_paused` (exit 0), with a `next` that asks the user to restore it. The value is read when a pass starts and in every admission, and a delete or keep_db write checks it again just before it publishes (it completes `cancelled` with `admission_paused`, nothing written). `gbrain sync status --json` reports `admission: {value, set_at, effective}`.' },
++ { since: '0.60.288.0', text: 'A managed sync now records an import for each page an older gbrain imported whose file still equals the page (such pages have no import record and are counted as `legacy_unverified`). It checks every such page in the source\'s first full round, then up to 500 per pass; a later edit of that file then imports normally instead of being held for a decision. The check is read-only until it writes the record, and a page that differs from its file is left as it is. `convergence.legacy_unverified` counts the pages not yet checked.' },
++ { since: '0.60.288.0', text: 'After a parser or schema-pack change, a managed sync re-imports the pages whose file and page are unchanged but whose import record names the older parser (class `reparse`, which sync finishes by itself, with no hold), as the pre-pass prescreen did; the first pass after the change reads the whole source.' },
++ { since: '0.60.288.0', text: 'An interrupted `gbrain sync --full` no longer ends with the run that started it: the next plain `gbrain sync` continues the re-import under the selection the `--full` started with, and there is no command to abandon it. A `--full` with a narrower selection (a CLI `--exclude`, say) finishes its own re-import and ends `synced` with status reason `selection_scoped`, without moving `last_commit`; the next plain sync then syncs the configured selection. A plain sync closes any open re-import, and stamps `chunker_version` only when the re-import covered the whole configured selection. To pause paid work, rely on the cost gate; to pause everything, set `sync.admission classify_only`.' },
++ { since: '0.60.288.0', text: 'A managed sync pass that runs 4 rounds without the source settling (another writer keeps changing it) stops `not_converged`: outcome `resumable`, exit 0, everything it admitted stands, and `next` reruns the same sync. After 3 such passes in a row, `next` switches to a report: `gbrain sync status --source <id> --json` with `safe_to_loop: false` and `fix.next: report`, and a sync job ends needing an operator, so an agent loop stops instead of retrying. The count resets when a pass converges.' },
++ { since: '0.60.288.0', text: 'New explicit repair `gbrain repair legacy-twins --source <id>` (#6885) merges the page pairs syncs before #6857 forked: a legacy page with no recorded file whose slug spells the file\'s name differently from today\'s slug rules, and the twin at today\'s slug that records the file. The read-only preview lists each pair (both pages\' ids, slugs and revisions, the file, whether the contents match) and lists as decisions, never merged, pairs whose contents differ, several legacy pages for one twin, and twins whose file is missing or drifted. `--apply --expect <hash> --yes` merges exactly the approved pairs: the legacy page takes over the file and keeps its id, links and history, the twin\'s links, timeline, aliases and the facts other pages state about it move over, its slug becomes an alias, and the twin is soft-deleted (its file untouched) and purged after 72 hours. It refuses off the owner host (`not_owner_host`), when the checkout cannot be read (`legacy_twins_storage_unknown`), and when the pairs are more than half of a source\'s file-backed pages (`legacy_twin_mass_merge_refused`, unless `GBRAIN_ALLOW_MASS_RECONCILE=1`). Nothing changes on upgrade; it runs only when named.' },
];
/** The newest disclosed change's release: the notice id moves only when a release adds rows. */