Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Merge remote-tracking branch 'origin/capy/6803-wave-c' into capy/6803-wave
garrytan269b0ab33df1
diff --cc src/cli/main.tsindex 7356427f75,a397b94119..0399baadff--- a/src/cli/main.ts+++ b/src/cli/main.ts@@@ -2436,9 -2436,8 +2436,9 @@@ async function prepareConnectedDispatch// the only thing that stops the cron orphan-pileup. Disposed in the finally.let syncWatchdog: { dispose(): void } | null = null;// #6340: `sync status` / `sync unblock` read and schedule on the brain's own engine: no watchdog, no serve delegation (a delegate would refuse the subcommand).- const syncOperator = command === 'sync' && (args[0] === 'status' || args[0] === 'unblock');+ const syncOperator = command === 'sync' && (await import('../commands/sync/operator.ts')).syncOperatorVerb(args) !== null;if (command === 'sync' && !syncOperator) {+ (await import('../commands/sync/args.ts')).noteRetryFailedDeprecated(args);try {const { resolveSyncHardDeadline } = await import('../commands/sync.ts');const res = resolveSyncHardDeadline(args, {diff --cc src/commands/doctor/registry.tsindex fb5861f6fd,87bdd3f471..cc90d593ea--- a/src/commands/doctor/registry.ts+++ b/src/commands/doctor/registry.ts@@@ -170,6 -171,9 +171,10 @@@ export const DOCTOR_CHECK_REGISTRY: reaserveBuildDriftEntry,schemaPackConsistencyEntry,embeddingStateEntry,+ // #6803 C2: then the cheap incident checks, before any full scan (CHEAP_INCIDENT_CHECKS, pinned by name in test/doctor-entry-deadline-6803.test.ts).+ linksExtractionLagEntry,+ contentSanityEntry,++ partialEmbeddingEntry,pgvectorEntry,rlsEntry,schemaVersionEntry,diff --cc src/core/behavior-change-notice.tsindex 51308acb9f,4c1d72bf9c..dbeafdc521--- a/src/core/behavior-change-notice.ts+++ b/src/core/behavior-change-notice.ts@@@ -722,15 -722,11 +722,20 @@@ export const BEHAVIOR_CHANGES: Readonly// 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.' },+ // FIFO claim foreground guard (fgp-park-before-claim, #6862).+ { since: '0.60.271.0', text: 'A foreground write no longer loses to an idle drain\'s sync head. While a managed sync drains, a page write that may go ahead of the queued sync groups (none of them names its page) now holds back the next sync group even when the drain\'s lanes are idle and the write\'s own process is still claiming it; before, the drain could start a group in that moment and the write waited for it. The sync side still gets one group after each such write commits, so a stream of writes cannot stall it.' },+ // #6803 lane C (bounded status and doctor reads). `since` is a placeholder equal to the branch VERSION until the merge-slot stamp.+ { since: '0.60.267.0', text: '`gbrain sync --status` now prints the `gbrain sync status` envelope (with a one-line hint) instead of running a full sync of the source, which nothing used to stop because no sync path read the flag. `gbrain sync --preview` and `--check`, which sync never read either, now refuse with `invalid_params` and a `--dry-run` fix; `--dry-run` is unchanged.' },+ { since: '0.60.267.0', text: 'A plain non-interactive CLI `gbrain doctor --json` (stderr not a terminal, no `--budget-ms`, `--tier`, `--fix` or remediation flag) now caps its check run at `doctor.default_budget_ms` (90000 ms; file plane; connect and migrations are not counted) and prints one stderr line saying so; checks past it report health unknown, and the JSON gains `tier`, `complete`, `unknown_sections`, `elapsed_ms` and `budget_ms`. `--budget-ms 0` turns it off for one run and `gbrain config set doctor.default_budget_ms 0` for good. `gbrain config set` now accepts `doctor.entry_budget_ms` and `doctor.orphan_ratio.full_scan_max_pages`.' },+ { since: '0.60.267.0', text: 'Doctor entries now stop their database statements at their own budget on every tier (Postgres cancels the statement; PGLite refuses the next one), so a slow check no longer keeps a backend running after the report. The cheap incident checks (`links_extraction_lag`, now its own entry, `partial_embedding` and content sanity) run right after the ops sections, the frontmatter and fence scans report partial results at the deadline, `--only <check> --budget-ms N` gives that check the whole N, and a check past its budget names which budget (`details.limit`) and prints that rerun.' },+ { since: '0.60.267.0', text: '`gbrain sync status` and write and sync receipts wait at most 1.5 s for the shared capacity snapshot and read capacity as unknown for that call when it is late, without clearing or re-announcing a background pause; a snapshot fetch that timed out is no longer cached for a minute. Doctor now computes the capacity forecast once per run instead of twice.' },];/** The newest disclosed change's release: the notice id moves only when a release adds rows. */