Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
chore(behavior-change): unstamped #7632 row uses since TBD (stamped at the merge slot)
garrytanbad97e299a10
diff --git a/src/core/behavior-change-notice.ts b/src/core/behavior-change-notice.tsindex 2a3b75b01f..e0d01f12ce 100644--- a/src/core/behavior-change-notice.ts+++ b/src/core/behavior-change-notice.ts@@ -1305,7 +1305,7 @@ export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText;// GBRA-95 RLS backfill. `since` is stamped at the merge slot.{ since: '0.60.463.0', id: 'rls_backfill_unguarded_tables', text: 'On Postgres, a schema migration now enables row-level security on every gbrain table still without it. A table could be left without RLS because its RLS came only from a full schema replay, which `gbrain apply-migrations --yes` does not run (the four incremental-derivation tables, `page_segment_derivations`, `page_derivation_spend` and the two purge tables), or only from the auto-RLS event trigger, which needs a superuser and is absent on many managed brains. Supabase gives public tables anon and authenticated grants, so with the Data API on such a table was reachable with the anon key. Only a table still without RLS changes; one with a `GBRAIN:RLS_EXEMPT` comment is left alone; no row is read or written. Under a role that does not bypass RLS or does not own a table, the migration names the table on stderr and leaves it, and `gbrain doctor` (rls) keeps naming it with the fix. `gbrain repair missing-tables` now recreates a cache table with RLS on. A role that neither owns a table nor bypasses RLS reads no rows from it and cannot insert or update it once RLS is on (a read-only reporting role or a scoped write role, for example): give that role policies before upgrading (docs/ENGINES.md has the source-scope recipe), or, to keep a table open to it on purpose, add the `GBRAIN:RLS_EXEMPT reason=...` comment to that table. A write role set up with an earlier copy of that recipe also needs its new policies on `page_derivation_spend` and the two purge tables: without them its segmented derivation writes are refused, and the derivation purge triggers its writes fire read no purge, so they do not hold back a purged claim.' },// #7632 guard definers. `since` is stamped at the merge slot.- { since: '0.60.464.0', id: 'guard_triggers_security_definer', text: 'On Postgres, the seven triggers that refuse purged content and keep withdrawn facts withdrawn now read the purge and withdrawal ledgers as the role that owns them (`SECURITY DEFINER`, `search_path = pg_catalog, public, pg_temp`). Before, they read under the writing role\'s row-level security, so a write role with no policy on a ledger saw no purge and no withdrawal: a purged claim, page, take or derivation was stored again and a withdrawn fact was saved active. Owners and roles that bypass RLS see no change, and `anon` and `authenticated` gain nothing: EXECUTE on the guards is revoked from PUBLIC, `anon` and `authenticated`, the guards that refuse a write (`facts_refuse_purged`, `takes_refuse_purged`, `pages_refuse_purged`) now fire AFTER ROW so RLS refuses a row first, and the derivation guard fires only when the writing role can see the page. A scoped write role is now refused where it was let through; it learns whether content it supplies itself is purged or withdrawn in a source it can already write; and the guards perform two fixed side effects for it as the owner (expiring the facts its own statement just inserted when they are withdrawn, and adding its page to a running derivation purge\'s page list). Every other gbrain function that pins a search_path now ends it with `pg_temp` (ALTER only, no body changes). Where the migrating role does not own a guard or its table, the migration names it on stderr and leaves it, and `gbrain doctor` (`guard_functions`) prints the SQL to run as the owner.' },+ { since: 'TBD', id: 'guard_triggers_security_definer', text: 'On Postgres, the seven triggers that refuse purged content and keep withdrawn facts withdrawn now read the purge and withdrawal ledgers as the role that owns them (`SECURITY DEFINER`, `search_path = pg_catalog, public, pg_temp`). Before, they read under the writing role\'s row-level security, so a write role with no policy on a ledger saw no purge and no withdrawal: a purged claim, page, take or derivation was stored again and a withdrawn fact was saved active. Owners and roles that bypass RLS see no change, and `anon` and `authenticated` gain nothing: EXECUTE on the guards is revoked from PUBLIC, `anon` and `authenticated`, the guards that refuse a write (`facts_refuse_purged`, `takes_refuse_purged`, `pages_refuse_purged`) now fire AFTER ROW so RLS refuses a row first, and the derivation guard fires only when the writing role can see the page. A scoped write role is now refused where it was let through; it learns whether content it supplies itself is purged or withdrawn in a source it can already write; and the guards perform two fixed side effects for it as the owner (expiring the facts its own statement just inserted when they are withdrawn, and adding its page to a running derivation purge\'s page list). Every other gbrain function that pins a search_path now ends it with `pg_temp` (ALTER only, no body changes). Where the migrating role does not own a guard or its table, the migration names it on stderr and leaves it, and `gbrain doctor` (`guard_functions`) prints the SQL to run as the owner.' },];/** The newest disclosed change's release: the notice id moves only when a release adds rows. */