Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

W1: hot-check doctor goldens for belief_ledger_coverage; disclose the retention-purge change

garrytan396344182d09
diff --git a/src/core/behavior-change-notice.ts b/src/core/behavior-change-notice.ts
index 13e777b583..26f608e046 100644
--- a/src/core/behavior-change-notice.ts
+++ b/src/core/behavior-change-notice.ts
@@ -648,6 +648,8 @@ export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText }
// W1 trust prerequisites (#6783 §12 (a) and (b)).
{ since: '0.60.253.0', text: 'A write less trusted than a take or timeline row no longer deletes, replaces or deactivates it. A page publish (`put_page`, sync, a maintenance republish) that drops or rewrites such a row, `takes_remove`, the takes reconcile (`gbrain extract takes`) and the timeline orphan prune now keep the row as it is and file a `forget` proposal (`gbrain trust review`): `gbrain trust confirm tp<id>` applies the change, `gbrain trust drop tp<id>` keeps the row. A refused `takes_remove` returns `forget_requires_owner` with the proposal ref. The page text keeps what the writer published, and the put_page response lists the proposals under `contested`.' },
{ since: '0.60.253.0', text: 'Lowering a row\'s trust tier now lowers what was derived from it: facts, takes, pages and timeline rows reached through their recorded derivation inputs drop to the least trusted of their current inputs (an agent edit that lowers a page, an owner tier change, the `gbrain trust claim-sources` relower repair, a derived republish, a fence field rewrite). Raising a tier never promotes a derivative, and recorded history keeps its tiers. A lowered row\'s `write_origin.input_lowered` names the tier it had; on a managed brain a dependent in another source is marked `needs_rederive` instead.' },
+ // W1 belief ledger (#6806). `since` is a placeholder equal to the branch's VERSION until the merge-slot stamp.
+ { since: '0.60.253.0', text: 'On a managed brain, `gbrain pages purge-deleted` (retention cleanup of pages soft-deleted more than 72 hours ago) no longer writes purge tombstones: it removes the page as before but records no page, fact or take tombstone, so the same content can be imported again later, as on a brain without managed persistence. Only `gbrain delete <slug> --purge` and `purge_fact` forget content. A page purge now also holds its source exclusively while it publishes, so other writes to that source wait for it.' },
];
/** The newest disclosed change's release: the notice id moves only when a release adds rows. */
diff --git a/test/fixtures/goldens/doctor/hot-checks-pglite-json.json b/test/fixtures/goldens/doctor/hot-checks-pglite-json.json
index 5b0d511dc2..e3bded47c0 100644
--- a/test/fixtures/goldens/doctor/hot-checks-pglite-json.json
+++ b/test/fixtures/goldens/doctor/hot-checks-pglite-json.json
@@ -2621,6 +2621,45 @@
"name": "revision_backfill",
"status": "ok"
},
+ {
+ "category": "brain",
+ "elapsed_ms": "<volatile>",
+ "fix": {
+ "actor": "agent",
+ "argv": [
+ "gbrain",
+ "beliefs",
+ "enable",
+ "--source",
+ "default",
+ "--brain",
+ "host"
+ ],
+ "command": "gbrain beliefs enable --source default --brain host",
+ "consent": [],
+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/designs/BELIEF_LEDGER.md#73-the-doctor-coverage-check",
+ "next": "ask_user",
+ "requires_exclusive": false,
+ "user_message": "Do you want gbrain to keep a belief ledger (a recorded history of facts, takes and links) for this source?",
+ "verify": {
+ "argv": [
+ "gbrain",
+ "doctor",
+ "--only",
+ "belief_ledger_coverage",
+ "--json",
+ "--brain",
+ "host"
+ ]
+ },
+ "why": "Enabling baselines every page of the source and records each later change; only a managed source is certified."
+ },
+ "message": "The belief ledger is off: no source records what this brain had recorded, and when.",
+ "name": "belief_ledger_coverage",
+ "readiness_state": "disabled_by_choice",
+ "severity": "info",
+ "status": "ok"
+ },
{
"category": "brain",
"details": {
@@ -6328,6 +6367,45 @@
"name": "revision_backfill",
"status": "ok"
},
+ {
+ "category": "brain",
+ "elapsed_ms": "<volatile>",
+ "fix": {
+ "actor": "agent",
+ "argv": [
+ "gbrain",
+ "beliefs",
+ "enable",
+ "--source",
+ "default",
+ "--brain",
+ "host"
+ ],
+ "command": "gbrain beliefs enable --source default --brain host",
+ "consent": [],
+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/designs/BELIEF_LEDGER.md#73-the-doctor-coverage-check",
+ "next": "ask_user",
+ "requires_exclusive": false,
+ "user_message": "Do you want gbrain to keep a belief ledger (a recorded history of facts, takes and links) for this source?",
+ "verify": {
+ "argv": [
+ "gbrain",
+ "doctor",
+ "--only",
+ "belief_ledger_coverage",
+ "--json",
+ "--brain",
+ "host"
+ ]
+ },
+ "why": "Enabling baselines every page of the source and records each later change; only a managed source is certified."
+ },
+ "message": "The belief ledger is off: no source records what this brain had recorded, and when.",
+ "name": "belief_ledger_coverage",
+ "readiness_state": "disabled_by_choice",
+ "severity": "info",
+ "status": "ok"
+ },
{
"category": "brain",
"details": {
diff --git a/test/fixtures/goldens/doctor/hot-checks-postgres-json.json b/test/fixtures/goldens/doctor/hot-checks-postgres-json.json
index 85fa6c3bbb..83ba1972b7 100644
--- a/test/fixtures/goldens/doctor/hot-checks-postgres-json.json
+++ b/test/fixtures/goldens/doctor/hot-checks-postgres-json.json
@@ -2617,6 +2617,45 @@
"name": "revision_backfill",
"status": "ok"
},
+ {
+ "category": "brain",
+ "elapsed_ms": "<volatile>",
+ "fix": {
+ "actor": "agent",
+ "argv": [
+ "gbrain",
+ "beliefs",
+ "enable",
+ "--source",
+ "default",
+ "--brain",
+ "host"
+ ],
+ "command": "gbrain beliefs enable --source default --brain host",
+ "consent": [],
+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/designs/BELIEF_LEDGER.md#73-the-doctor-coverage-check",
+ "next": "ask_user",
+ "requires_exclusive": false,
+ "user_message": "Do you want gbrain to keep a belief ledger (a recorded history of facts, takes and links) for this source?",
+ "verify": {
+ "argv": [
+ "gbrain",
+ "doctor",
+ "--only",
+ "belief_ledger_coverage",
+ "--json",
+ "--brain",
+ "host"
+ ]
+ },
+ "why": "Enabling baselines every page of the source and records each later change; only a managed source is certified."
+ },
+ "message": "The belief ledger is off: no source records what this brain had recorded, and when.",
+ "name": "belief_ledger_coverage",
+ "readiness_state": "disabled_by_choice",
+ "severity": "info",
+ "status": "ok"
+ },
{
"category": "brain",
"details": {
@@ -6319,6 +6358,45 @@
"name": "revision_backfill",
"status": "ok"
},
+ {
+ "category": "brain",
+ "elapsed_ms": "<volatile>",
+ "fix": {
+ "actor": "agent",
+ "argv": [
+ "gbrain",
+ "beliefs",
+ "enable",
+ "--source",
+ "default",
+ "--brain",
+ "host"
+ ],
+ "command": "gbrain beliefs enable --source default --brain host",
+ "consent": [],
+ "docs": "https://github.com/garrytan/gbrain/blob/master/docs/designs/BELIEF_LEDGER.md#73-the-doctor-coverage-check",
+ "next": "ask_user",
+ "requires_exclusive": false,
+ "user_message": "Do you want gbrain to keep a belief ledger (a recorded history of facts, takes and links) for this source?",
+ "verify": {
+ "argv": [
+ "gbrain",
+ "doctor",
+ "--only",
+ "belief_ledger_coverage",
+ "--json",
+ "--brain",
+ "host"
+ ]
+ },
+ "why": "Enabling baselines every page of the source and records each later change; only a managed source is certified."
+ },
+ "message": "The belief ledger is off: no source records what this brain had recorded, and when.",
+ "name": "belief_ledger_coverage",
+ "readiness_state": "disabled_by_choice",
+ "severity": "info",
+ "status": "ok"
+ },
{
"category": "brain",
"details": {