Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Carry the fence-row hold's CHANGELOG entry under Unreleased and record the label-hold suites' Postgres-arm weights
garrytan43368b70cfae
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 522c7fb9bb..d6f0779030 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -20,6 +20,11 @@ identifiers and attribution are available in the pre-removal Git revision- `src/core/repair/visibility.ts`, `src/core/repair/readers.ts`: a named page that is already private, or already names the requested readers, and has no guard row is listed (`visibility private kept, label guard raised`, `readers [...] kept, label guard raised`) and applied by raising the guard under the page's row lock, with no page write or commit.- Tests: `test/owner-label-guard.test.ts` covers both routes with unbound, other-member and owner-bound reads before, during and after, accept and reject, an agent's own page, a page that named no readers, accept on an agent page keeping its tier, a re-run of the label repair raising the guard on already-labelled pages (repo-less and a managed batch with no commit), the cases that must pass, and the committed file on a managed Git source, on PGLite and Postgres.+**A less trusted write that makes a private fenced fact world no longer stores a world fact before the owner decides.** An agent `put_page` that turned a more trusted private `## Facts` row world (the same claim at its row number or restated at another, or a different claim at its row number) stored its row world at once, so remote recall returned the private claim while the owner's proposal waited, and accepting that proposal then failed as stale. The writer's row is now stored private and contested, its proposal records the widening, `gbrain trust confirm tp<id>` makes the claim world and `gbrain trust drop tp<id>` keeps it private, and later writes of that fence by the same writer, and the background facts reconcile, keep it private meanwhile. A claim the page already holds world is not treated as a widening, and an accept applies the widening only while the page's fence row still asks for world. A `remember` that restates a private claim world is not covered by this change. The page text still holds the visibility the writer wrote, so a remote page read shows that row until the owner decides (GST-2511).++- `src/core/trust/fence-guard.ts`, `src/core/trust/supersede-handlers.ts`: a contested replacement that would make a guarded private row world, or a new world row restating a more trusted private claim of the page, is inserted private, its `supersede_fact` proposal carries `visibility: {from, to}`, the owner's accept sets it (undo restores it), and a lower-tier write keeps that contested row private while its widening is pending, rejected or undone (GST-2511).+- `src/core/cycle/extract-facts.ts`: the fence reconcile keeps the visibility of a contested row whose widening proposal is pending, rejected or undone, instead of widening it to the page's cell (GST-2511).+**An agent edit can no longer make a private page readable before you decide.** A local `put_page` (or `capture`, `edit_page`, `append_page`, `revert_version`, `restore_page`) from a writer less trusted than the page used to publish at once even when it dropped or widened the page's `visibility`, `access`, `confidentiality` or `readable_by`. The only safeguard was a `lower_page` item in `gbrain trust review`, and until you dealt with it, remote callers and other members could read the page. The usual cause was an agent that rewrote a page and forgot its frontmatter. Now that write publishes with the page's earlier labels kept, in the database and in the file it commits, and its receipt names the kept keys (`privacy_labels_kept`). The `lower_page` item shows the labels the edit asked for. `gbrain trust confirm tp<id>` applies exactly those labels if the page hasn't changed since, `gbrain trust drop tp<id>` keeps the earlier ones, and undoing a confirm puts them back while the page is still as the confirm left it. The same hold covers a derived page publication by a maintenance job (for example a dream patterns run that rewrites one of your pages), a page with no trust tier recorded yet (`unknown`), which counts as yours, and an agent that deletes a page and writes it again: a delete no longer lowers the page's tier. A credential bound to you reads the page throughout. Unaffected: writes that only narrow a label, writes that leave the labels alone, writers at or above the page's tier, your own synced edits, and `gbrain repair visibility` (GST-2518).### Itemized changes@@ -78,8 +83,6 @@ Since v0.60.677.0, every unknown-side `file_drift` hold written under the earlie**A visibility repair now closes a fenced fact instead of leaving a world copy beside it.** When `gbrain repair visibility --class facts` made a `## Facts` row private and the stored row was more trusted than the repair, the fence guard kept the original world row live and filed a contested private copy, so remote callers could still read the fact while the page and its file read as fixed. A write that only makes a fence row private now makes the stored row private in place, keeping its id and trust tier, and files no proposal. On a brain without managed persistence the repair makes the fenced row private itself, because that import does not re-project the fence. A write that makes a more trusted private row world is still held for the owner.-**A less trusted write that makes a private fenced fact world no longer stores a world fact before the owner decides.** An agent `put_page` that turned a more trusted private `## Facts` row world (the same claim at its row number or restated at another, or a different claim at its row number) stored its row world at once, so remote recall returned the private claim while the owner's proposal waited, and accepting that proposal then failed as stale. The writer's row is now stored private and contested, its proposal records the widening, `gbrain trust confirm tp<id>` makes the claim world and `gbrain trust drop tp<id>` keeps it private, and later writes of that fence by the same writer, and the background facts reconcile, keep it private meanwhile. A claim the page already holds world is not treated as a widening, and an accept applies the widening only while the page's fence row still asks for world. A `remember` that restates a private claim world is not covered by this change. The page text still holds the visibility the writer wrote, so a remote page read shows that row until the owner decides (GST-2511).-### Itemized changes#### Set who reads a page, label-only (GST-2476, #9184)@@ -94,8 +97,6 @@ Since v0.60.677.0, every unknown-side `file_drift` hold written under the earlie- `src/core/trust/fence-guard.ts`: a guarded row whose claim the writer kept and whose visibility it only narrowed (world to private) moves to the new row's position and turns private in place, instead of being detached and contested.- `src/core/repair/visibility.ts`: on a brain without managed persistence, a fenced fact row the label write made private in the fence is made private in the database too; `fact_left_readable` and `fact_left_world` stay for the rows that still cannot be closed.- Tests: `test/label-only-repairs.test.ts` (managed and repo-less, PGLite and Postgres) and `test/trust-guarded-supersession.test.ts` (narrowing applies in place; widening stays guarded).-- `src/core/trust/fence-guard.ts`, `src/core/trust/supersede-handlers.ts`: a contested replacement that would make a guarded private row world, or a new world row restating a more trusted private claim of the page, is inserted private, its `supersede_fact` proposal carries `visibility: {from, to}`, the owner's accept sets it (undo restores it), and a lower-tier write keeps that contested row private while its widening is pending, rejected or undone (GST-2511).-- `src/core/cycle/extract-facts.ts`: the fence reconcile keeps the visibility of a contested row whose widening proposal is pending, rejected or undone, instead of widening it to the page's cell (GST-2511).## [0.60.685.0] - 2026-11-12diff --git a/scripts/postgres-arm-weights-postgres-only.json b/scripts/postgres-arm-weights-postgres-only.jsonindex ba7e82c9f6..65c965ef92 100644--- a/scripts/postgres-arm-weights-postgres-only.json+++ b/scripts/postgres-arm-weights-postgres-only.json@@ -173,6 +173,7 @@"test/link-cross-source.test.ts": 9942,"test/link-preparation-shared-index.test.ts": 12132,"test/links-attendance-blocked.test.ts": 5618,+ "test/lower-tier-label-hold.test.ts": 32889,"test/managed-cycle-pull-upstream.test.ts": 5996,"test/managed-facts-withdrawal-recovery-6506.test.ts": 6012,"test/managed-facts-withdrawn-skip-6506.test.ts": 2621,@@ -207,7 +208,7 @@"test/origin-guard-6948.test.ts": 18397,"test/origin-twins-6948.test.ts": 1635,"test/overwritten-edits-6712.test.ts": 39503,- "test/owner-label-guard.test.ts": 26999,+ "test/owner-label-guard.test.ts": 29339,"test/owner-refusal.test.ts": 5596,"test/pack-relation-direction-engine.test.ts": 7462,"test/page-embedding-budget.test.ts": 1684,diff --git a/scripts/postgres-arm-weights.json b/scripts/postgres-arm-weights.jsonindex 4e2c631c65..80271938d1 100644--- a/scripts/postgres-arm-weights.json+++ b/scripts/postgres-arm-weights.json@@ -271,6 +271,7 @@"test/links-extraction-yield.test.ts": 7936,"test/list-jobs-row-bound.test.ts": 8733,"test/list-pages-empty-type-notice-gbra449.test.ts": 7004,+ "test/lower-tier-label-hold.test.ts": 66672,"test/maintenance-lowering-7917-7918.test.ts": 18406,"test/maintenance-trust-marker-7905.test.ts": 37567,"test/managed-cycle-pull-upstream.test.ts": 8793,@@ -321,7 +322,7 @@"test/orphan-effect-diagnostics-7985.test.ts": 13288,"test/overwritten-edits-6712.test.ts": 58270,"test/owner-facts-d1-gst2346.test.ts": 19218,- "test/owner-label-guard.test.ts": 55926,+ "test/owner-label-guard.test.ts": 61117,"test/owner-member-boundary.test.ts": 8601,"test/owner-reads-restricted.test.ts": 75912,"test/owner-refusal.test.ts": 6032,