Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

Add the commits_waiting behaviour row, runbook caller action and Postgres-arm weights (GST-2515)

garrytan0eecfb9447a3
diff --git a/docs/guides/sync-unblock-runbook.md b/docs/guides/sync-unblock-runbook.md
index bd81c5995f..eea1be4c97 100644
--- a/docs/guides/sync-unblock-runbook.md
+++ b/docs/guides/sync-unblock-runbook.md
@@ -390,7 +390,7 @@ run converges on the next plain sync with no flag.
| `deletes_withheld` | blocked | The pass's deletes crossed the mass-delete threshold (#2828) or an absolute cap (#7130: `sync.max_deletes`, default 500; `sync.max_delete_ratio`, default 0.01 above 50 deletes; per source `<key>.source.<id>`). The record's `trip` names which. It wrote one withheld record and synced everything else; no per-page hold is written. | Ask the user: restore the checkout if it is wrong; when the deletion is intended, raise the cap for that source (`gbrain config set sync.max_deletes.source.<id> <n>`) or run `GBRAIN_ALLOW_MASS_RECONCILE=1 gbrain sync --source <id>` on the brain host. `gbrain sync --source <id> --dry-run --json` lists the set and its hash. |
| `admission_paused` | resumable | `sync.admission` is `imports_only` or `classify_only`. | Ask the user to run `gbrain config set sync.admission normal` when the pause is over; it is never lifted automatically. |
| `selection_scoped` | synced | The pass converged at a selection other than the source's configured one (a CLI `--exclude`, say) and did not advance `last_commit`. | None; the next plain sync runs the configured selection. |
-| `commits_waiting` | resumable | Nothing else is pending (or only holds that need no person), but the checkout's `HEAD` is past `last_commit`: commits landed that no sync has imported yet. A company-brain source never reads it, because it syncs to its approved revision. | The plain sync, which imports them. |
+| `commits_waiting` | resumable | Nothing else is pending (or only holds that need no person), but the checkout's `HEAD` is past `last_commit`: commits landed that no sync has imported yet. A company-brain source never reads it, because it syncs to its approved revision. | Run `next.argv`, the plain sync, which imports them; status reads `synced` once it lands, and it is safe to loop. A script waiting for `state: synced` keeps waiting until a sync runs, so run `next` rather than wait when nothing watches the source (`sync.on_commit` off). |
The run's own JSON (`outcome`, `drain.stop_reason`) adds three stops a status
read never shows as its reason: `grant_scope` (a grant that covers only part of
diff --git a/scripts/postgres-arm-weights.json b/scripts/postgres-arm-weights.json
index 71d553184d..4b9c3e2937 100644
--- a/scripts/postgres-arm-weights.json
+++ b/scripts/postgres-arm-weights.json
@@ -582,6 +582,7 @@
"test/sync-drain-head-blocked-6543.test.ts": 7438,
"test/sync-drain-inpass-stall.test.ts": 5788,
"test/sync-drain-write-capacity.test.ts": 9692,
+ "test/sync-drift-rescreen-progress-gst2515.test.ts": 51193,
"test/sync-dry-run-drain-7167.test.ts": 7631,
"test/sync-exits-l4-6712.test.ts": 12728,
"test/sync-fenced-slices-gbra133.test.ts": 25583,
@@ -627,6 +628,7 @@
"test/sync-restored-file-purge.test.ts": 200599,
"test/sync-slug-root-mode-6694.test.ts": 16628,
"test/sync-staged-catchup.test.ts": 8602,
+ "test/sync-status-commits-waiting-gst2515.test.ts": 25676,
"test/sync-status-failure-detail-6513.test.ts": 7065,
"test/sync-status-truthful-7243.test.ts": 14660,
"test/sync-storage-invalid-8007.test.ts": 45745,
diff --git a/src/core/behavior-change-notice.ts b/src/core/behavior-change-notice.ts
index 1eb3ff7858..ef7bbb595b 100644
--- a/src/core/behavior-change-notice.ts
+++ b/src/core/behavior-change-notice.ts
@@ -1547,6 +1547,7 @@ export const BEHAVIOR_CHANGES: ReadonlyArray<{ since: string; text: ChangeText;
{ since: '0.60.685.0', id: 'owner_facts_shared_gst2346', text: 'A credential bound to the brain owner (`gbrain access owner set`), or a stdio server started with `--stdio-member <owner>`, speaking for itself, now saves `remember` facts the way a credential bound to no member does: with no `visibility`, a fact is shared on its subject\'s page and every reader of the source recalls it, where it used to be kept private on the owner\'s member page. It stays private on that page when the call passes `visibility: "private"` or the subject\'s page or `facts.default_visibility` keeps facts private, and the reply names the `page` and `visibility` either way. Its `visibility: "world"` is saved instead of refused (`member_share_required`), except onto a page whose facts are kept private (`share_target_restricted`, as `share: true`), and its `forget` withdraws a shared fact it reads instead of saying only the brain host can. An owner agent that follows a planted instruction can therefore share a fact without passing any flag; to keep a fact private, pass `visibility: "private"`. Member credentials, attested QM calls (`x-qm-actor`), audiences (`X-Gbrain-On-Behalf-Of`), subagent jobs and slug-fenced clients are unchanged, and with writeback on the owner\'s credential is no longer told its saves stay private.' },
{ since: '0.60.686.0', id: 'readers_label_setter_gst2476', text: 'New `gbrain repair visibility (--slug <page>... | --slugs-file <file>) --readers <ids|none>` sets or removes a page\'s `readable_by` through the label-only door: the page keeps its trust tier and provenance and its file changes only on that line. Unknown or disabled members and unknown groups refuse `access_member_invalid`; a list without the brain owner refuses unless `--allow-without-owner`. Every `repair visibility` write to a managed page with no file outside a declared `storage.db_only` path is now held `canonical_file_missing` with nothing written, instead of failing `source_changed`.' },
{ since: '0.60.686.0', id: 'fence_fact_private_in_place_gst2487', text: 'A page write that only makes a `## Facts` row private (same claim, world to private) now makes the stored row private in place, keeping its id and trust tier, even when the row is more trusted than the writer. Before, such a row stayed live and world beside a contested private copy, so `gbrain repair visibility --class facts` could leave a fact remote callers still read while the page and its file read as fixed (`fact_left_readable`, `fact_left_world`). On a brain without managed persistence the repair now also makes the fenced row private. A write that makes a more trusted private row world is still held for the owner as before.' },
+ { since: '0.60.688.0', id: 'sync_status_commits_waiting_gst2515', text: '`gbrain sync status` now reads `resumable` / `commits_waiting` when a managed source has nothing else pending (or only holds that need no person) but its checkout\'s HEAD is past the last synced commit. It used to read `synced` (`nothing_pending` or `held_by_design`) until some later sync ran. Its `next` is the plain sync (`gbrain sync` with `resume_argv`), which imports the waiting commits; status reads `synced` again once that sync lands. A script that treats `state: synced` as up to date now sees `resumable` while commits wait: run `next.argv`, or keep waiting for a resident to sync. A hold that needs a person (`held_needs_human`), a selection-scoped convergence, pending Git push holds and company-brain sources (which sync to their approved revision) keep their own reasons.' },
];
/** The newest disclosed change's release: the notice id moves only when a release adds rows. */