Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
goldens+regen: postgres catalog goldens for v261, llms regen, config key line fold
garrytan21b792488e3f
diff --git a/llms-full.txt b/llms-full.txtindex 1ace5531d2..3ea83fc108 100644--- a/llms-full.txt+++ b/llms-full.txt@@ -6824,7 +6824,8 @@ Timing knobs the drain uses:| `persistence.maintenance_preparation_ms` | One maintenance write's preparation (fact-fence adoption, maintenance page writes). | 120000 | As above; a maintenance write gets a terminal `preparation_stalled` receipt (no hold). || `persistence.preparation_ceiling_ms` | Hard ceiling for a preparation that ignores cancellation (any kind), from claim start. | 600000 (60000–3600000, at least the largest budget plus 30 s) | The owner frees the root, sets the request's attempts to the limit (its next claim finishes it `preparation_stalled`), and stops claiming once it holds one such stuck preparation (`restart_required` in its log line). || `persistence.max_preparation_attempts` | Deadline releases (and reclaims after a kill while preparing) one request may spend. | 2 (1–10) | The next claim finishes it `preparation_stalled` without preparing again. |-| `preparation_deadlines` write switch (`persistence.preparation_deadlines`, `GBRAIN_PREPARATION_DEADLINES`) | Kill switch for the four keys above and the attempt counter. `remember`, `put_page` and `edit_page` keep their own 30 s budget either way. | on | `gbrain config set persistence.preparation_deadlines false` (or `GBRAIN_PREPARATION_DEADLINES=0`) restores the previous behaviour exactly: no deadline on sync or maintenance writes, no counter, no `preparation_stalled` holds. A running `serve` picks the change up within 5 seconds. |+| `persistence.max_transient_retries` | Transient interruptions one request is retried after: a statement the database ended with `57014`, or a publication cancelled past `persistence.publication_ceiling_ms`. Lock timeouts, serialization failures, deadlocks and lost connections are never counted. | 5 (0–20) | Each interruption schedules the next claim after 1 s, 2 s, 4 s, 8 s, then 15 s (no claim is held while it waits); the next one past the limit finishes the request `write_interrupted` and the sync holds the file. |+| `preparation_deadlines` write switch (`persistence.preparation_deadlines`, `GBRAIN_PREPARATION_DEADLINES`) | Kill switch for the five keys above and both counters. `remember`, `put_page` and `edit_page` keep their own 30 s budget either way. | on | `gbrain config set persistence.preparation_deadlines false` (or `GBRAIN_PREPARATION_DEADLINES=0`) restores the previous behaviour exactly: no deadline on sync or maintenance writes, no counter, no `preparation_stalled` holds. A running `serve` picks the change up within 5 seconds. || Page write wait | One page's (or group's) publication before the drain re-checks. | 30 s inside a drain (5 s, checkpoint 8 s, for a single pass) | The drain re-enters; this is not a stop. || `sync` job deadline | A managed `sync` Minions job's drain: its `timeout_ms` (autopilot stamps `max(2 × --interval, 300 s)`), or the queue's wall-clock limit for a job without one, capped at an hour, less a 60 s reserve. `sync.job_drain=false` (or job data `drain: false`) keeps the single pass. | per job | Stops as `resumable` / `deadline`; on a worker-backed brain a stop that is safe to repeat queues one follow-up job (`continuation_job_id`). || `GBRAIN_SYNC_BULK_MAX_TXN_MS` (was `sync.bulk_max_txn_ms`, retired in 0.60.266.0) | Target time per bulk group; sizes the next group from the last one's time per page. | 15000 | A smaller next group. |diff --git a/src/core/config.ts b/src/core/config.tsindex 874c586f71..351379df16 100644--- a/src/core/config.ts+++ b/src/core/config.ts@@ -1779,8 +1779,7 @@ export const KNOWN_CONFIG_KEYS: readonly string[] = ['persistence.limits.principal_terminal_bytes', 'persistence.limits.brain_terminal_bytes','persistence.limits.brain_recovery_bytes', 'persistence.limits.worktree_recovery_bytes','persistence.receipt_retention_days', 'persistence.unbound_write', 'persistence.max_claim_ms', // #5254: persistence/unbound-source.ts; #6176: persistence/claim-phase.ts- 'persistence.sync_preparation_ms', 'persistence.maintenance_preparation_ms', 'persistence.preparation_ceiling_ms', 'persistence.max_preparation_attempts', 'persistence.preparation_deadlines', // #6278: persistence/preparation-budget.ts, switches.ts- 'persistence.max_transient_retries', // large-pages hardening (b): persistence/preparation-budget.ts, transient-retry.ts+ 'persistence.sync_preparation_ms', 'persistence.maintenance_preparation_ms', 'persistence.preparation_ceiling_ms', 'persistence.max_preparation_attempts', 'persistence.preparation_deadlines', 'persistence.max_transient_retries', // #6278: persistence/preparation-budget.ts, switches.ts; transient-retry.ts'persistence.publication_ceiling_ms', 'persistence.terminal_failures.window_days', 'persistence.terminal_failures.spike_factor', 'persistence.terminal_failures.spike_min', // #6405: persistence/sync-drain.ts (in-pass publication ceiling); #6650: persistence/terminal-failures.ts'persistence.capacity.warn_days', 'persistence.capacity.fail_days', 'persistence.capacity.background_pause_pct', // #6696: persistence/capacity-forecast.ts, admission-origin.ts'persistence.maintenance.compaction_stale_hours', // #6696 (A11): persistence/compaction-pass.ts, doctor persistence_compactiondiff --git a/test/fixtures/goldens/catalog/postgres-engine-init-default.json b/test/fixtures/goldens/catalog/postgres-engine-init-default.jsonindex 5ed10941dc..e1a346cc30 100644--- a/test/fixtures/goldens/catalog/postgres-engine-init-default.json+++ b/test/fixtures/goldens/catalog/postgres-engine-init-default.json@@ -324,6 +324,7 @@"persistence_requests.persistence_requests_sequence_key": "u UNIQUE (sequence)","persistence_requests.persistence_requests_state_check": "c CHECK ((state = ANY (ARRAY['queued'::text, 'running'::text, 'recovering'::text, 'committed'::text, 'conflict'::text, 'failed'::text, 'cancelled'::text])))","persistence_requests.persistence_requests_target_kind_check": "c CHECK ((target_kind = ANY (ARRAY['page'::text, 'skill_bundle'::text])))",+ "persistence_requests.persistence_requests_transient_interruptions_check": "c CHECK ((transient_interruptions >= 0))","persistence_requests.persistence_requests_worktree_id_fkey": "f FOREIGN KEY (worktree_id) REFERENCES persistence_worktrees(id)","persistence_source_bindings.persistence_source_bindings_pkey": "p PRIMARY KEY (source_id)","persistence_source_bindings.persistence_source_bindings_worktree_id_fkey": "f FOREIGN KEY (worktree_id) REFERENCES persistence_worktrees(id)",@@ -3203,7 +3204,9 @@"41 preparation_attempts integer/int4 NOT NULL DEFAULT 0","42 client_request_id text/text NULL","43 admitter_segment_reader boolean/bool NULL",- "44 consumer_segment_reader boolean/bool NULL"+ "44 consumer_segment_reader boolean/bool NULL",+ "45 transient_interruptions integer/int4 NOT NULL DEFAULT 0",+ "46 next_attempt_at timestamp with time zone/timestamptz NULL"],"flags": "relkind=r rls=true force_rls=false"},diff --git a/test/fixtures/goldens/catalog/postgres-engine-init-fts-portuguese.json b/test/fixtures/goldens/catalog/postgres-engine-init-fts-portuguese.jsonindex 8ed3666a79..efee1ef849 100644--- a/test/fixtures/goldens/catalog/postgres-engine-init-fts-portuguese.json+++ b/test/fixtures/goldens/catalog/postgres-engine-init-fts-portuguese.json@@ -324,6 +324,7 @@"persistence_requests.persistence_requests_sequence_key": "u UNIQUE (sequence)","persistence_requests.persistence_requests_state_check": "c CHECK ((state = ANY (ARRAY['queued'::text, 'running'::text, 'recovering'::text, 'committed'::text, 'conflict'::text, 'failed'::text, 'cancelled'::text])))","persistence_requests.persistence_requests_target_kind_check": "c CHECK ((target_kind = ANY (ARRAY['page'::text, 'skill_bundle'::text])))",+ "persistence_requests.persistence_requests_transient_interruptions_check": "c CHECK ((transient_interruptions >= 0))","persistence_requests.persistence_requests_worktree_id_fkey": "f FOREIGN KEY (worktree_id) REFERENCES persistence_worktrees(id)","persistence_source_bindings.persistence_source_bindings_pkey": "p PRIMARY KEY (source_id)","persistence_source_bindings.persistence_source_bindings_worktree_id_fkey": "f FOREIGN KEY (worktree_id) REFERENCES persistence_worktrees(id)",@@ -3203,7 +3204,9 @@"41 preparation_attempts integer/int4 NOT NULL DEFAULT 0","42 client_request_id text/text NULL","43 admitter_segment_reader boolean/bool NULL",- "44 consumer_segment_reader boolean/bool NULL"+ "44 consumer_segment_reader boolean/bool NULL",+ "45 transient_interruptions integer/int4 NOT NULL DEFAULT 0",+ "46 next_attempt_at timestamp with time zone/timestamptz NULL"],"flags": "relkind=r rls=true force_rls=false"},diff --git a/test/fixtures/goldens/catalog/postgres-engine-init-high-dims.json b/test/fixtures/goldens/catalog/postgres-engine-init-high-dims.jsonindex 913b09d0d3..bf4ce7079a 100644--- a/test/fixtures/goldens/catalog/postgres-engine-init-high-dims.json+++ b/test/fixtures/goldens/catalog/postgres-engine-init-high-dims.json@@ -324,6 +324,7 @@"persistence_requests.persistence_requests_sequence_key": "u UNIQUE (sequence)","persistence_requests.persistence_requests_state_check": "c CHECK ((state = ANY (ARRAY['queued'::text, 'running'::text, 'recovering'::text, 'committed'::text, 'conflict'::text, 'failed'::text, 'cancelled'::text])))","persistence_requests.persistence_requests_target_kind_check": "c CHECK ((target_kind = ANY (ARRAY['page'::text, 'skill_bundle'::text])))",+ "persistence_requests.persistence_requests_transient_interruptions_check": "c CHECK ((transient_interruptions >= 0))","persistence_requests.persistence_requests_worktree_id_fkey": "f FOREIGN KEY (worktree_id) REFERENCES persistence_worktrees(id)","persistence_source_bindings.persistence_source_bindings_pkey": "p PRIMARY KEY (source_id)","persistence_source_bindings.persistence_source_bindings_worktree_id_fkey": "f FOREIGN KEY (worktree_id) REFERENCES persistence_worktrees(id)",@@ -3199,7 +3200,9 @@"41 preparation_attempts integer/int4 NOT NULL DEFAULT 0","42 client_request_id text/text NULL","43 admitter_segment_reader boolean/bool NULL",- "44 consumer_segment_reader boolean/bool NULL"+ "44 consumer_segment_reader boolean/bool NULL",+ "45 transient_interruptions integer/int4 NOT NULL DEFAULT 0",+ "46 next_attempt_at timestamp with time zone/timestamptz NULL"],"flags": "relkind=r rls=true force_rls=false"},