Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
fix(#6803): managed_sync_blocked (master #6861) joins the cheap incident checks; regenerate Postgres hot-checks golden
garrytanb7e3431d18f4
diff --git a/src/commands/doctor/registry.ts b/src/commands/doctor/registry.tsindex c9741e0493..3c92f5b752 100644--- a/src/commands/doctor/registry.ts+++ b/src/commands/doctor/registry.ts@@ -252,7 +252,7 @@ export const DOCTOR_CHECK_REGISTRY: readonly DoctorEntry[] = [* these must join the group: test/doctor-entry-deadline-6803.test.ts).*/export const CHEAP_INCIDENT_CHECKS: ReadonlySet<string> = new Set([- 'persistence_capacity', 'managed_sync_not_moving', 'text_projection_readiness', 'partial_embedding', 'links_extraction_lag',+ 'persistence_capacity', 'managed_sync_not_moving', 'managed_sync_blocked', 'text_projection_readiness', 'partial_embedding', 'links_extraction_lag',]);const CONNECTION_LANE: ReadonlySet<DoctorEntry> = new Set([offlineConnectionEntry, dbChecksGateEntry, connectionEntry, connectionGateEntry]);diff --git a/src/core/behavior-change-notice.ts b/src/core/behavior-change-notice.tsindex 11264c9a6e..8584382a50 100644--- a/src/core/behavior-change-notice.ts+++ b/src/core/behavior-change-notice.ts@@ -739,7 +739,7 @@ export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText }// #6803 wave (projection queue, held embedding budgets, bounded doctor/status reads, extraction nudge). `since` is the branch VERSION until the merge-slot stamp.{ since: '0.60.272.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.272.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.272.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 (`persistence_capacity`, `managed_sync_not_moving`, `text_projection_readiness`, `partial_embedding` and `links_extraction_lag`, now its own entry) 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.272.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 (`persistence_capacity`, `managed_sync_not_moving`, `managed_sync_blocked`, `text_projection_readiness`, `partial_embedding` and `links_extraction_lag`, now its own entry) 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.272.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.' },{ since: '0.60.272.0', text: '`gbrain projections drain` now seals image pages the importer already attested safe (one image chunk written at or after the safe-chunk fence, unchanged since) in place, keyless, with no chunk write or provider call, so image search ranks them again; every other image page stays queued and out of search until its importer re-imports it (`gbrain embed --stale --images --dry-run`, then the paid run). Its `--json` gains `limited`, `sealed`, `sealed_with_visual`, `sealed_text_only`, `statistics_refreshed` and `remaining_by_class`, and under a resident PGLite owner it prints an exclusive stop, drain and start step instead of only refusing. The resident drains text only and probes at most 500 queued rows per tick.' },{ since: '0.60.272.0', text: 'Doctor `text_projection_readiness` counts the queue by class (`pending`, `sealable`, `reimport`, `protected`, `archived`, `failed`, `as_of`): it warns on pending, sealable, reimport and failed rows, with `gbrain projections drain --limit <n>` (asks first) or the paid importer as the fix, and reports protected-OCR and archived-source images as by design (search reports the `projection_by_design` stage for them instead of `projection_pending`). On a PGLite resident it can move from ok to warn; on Postgres it can move from warn to ok. Embed paths no longer queue `embedding_recovery` rows for image pages, `gbrain embed --stale --images` skips sealable pages and reports `ocr_required`, and a read-only notice after upgrading names `gbrain projections drain --dry-run` when image rows are queued.' },diff --git a/test/fixtures/goldens/doctor/hot-checks-postgres-json.json b/test/fixtures/goldens/doctor/hot-checks-postgres-json.jsonindex 8da2657996..a6e5c1c168 100644--- a/test/fixtures/goldens/doctor/hot-checks-postgres-json.json+++ b/test/fixtures/goldens/doctor/hot-checks-postgres-json.json@@ -678,7 +678,7 @@"by_day": [{"content_decisions": 0,- "day": "2026-10-16",+ "day": "2026-10-17","interventions": 1}],@@ -4694,7 +4694,7 @@"by_day": [{"content_decisions": 0,- "day": "2026-10-16",+ "day": "2026-10-17","interventions": 1}],