Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
docs: say when wakeshift emit cannot record a run
garrytan36bebb369504
diff --git a/docs/guides/wakeshift.md b/docs/guides/wakeshift.mdindex 0e21c4cd45..e7739b9966 100644--- a/docs/guides/wakeshift.md+++ b/docs/guides/wakeshift.md@@ -48,7 +48,7 @@ status=okgbrain-run wakeshift emit cron.finished --name nightly-digest --status "$status"```-`emit` only records the run (name, status, time) in the brain; the drainer wakes the watchers on its next tick. It never calls Wakeshift itself, never waits, and exits 0 when reporting back is off (with one line on stderr) or when the name isn't registered (it records the run and says so; `gbrain doctor` lists unregistered names it saw). `gbrain wakeshift cron list` shows the names with their last run, and `cron remove <name>` removes one and ends its open watches. Runs older than 30 days are dropped. No report path or slug goes into the wake: the agent reads the output where the cron writes it.+`emit` only records the run (name, status, time) in the brain; the drainer wakes the watchers on its next tick. It never calls Wakeshift itself, never waits, and exits 0 when reporting back is off (with one line on stderr) or when the name isn't registered (it records the run and says so; `gbrain doctor` lists unregistered names it saw). It also exits 0 when it can't open the brain, and then the run is not recorded: on a PGLite brain that happens whenever `gbrain serve` or a job worker holds the brain, so on PGLite a watch on a cron only wakes for runs that finish while neither is running. A Postgres brain has no such lock. `gbrain wakeshift cron list` shows the names with their last run, and `cron remove <name>` removes one and ends its open watches. Runs older than 30 days are dropped. No report path or slug goes into the wake: the agent reads the output where the cron writes it.## The keydiff --git a/test/wakeshift-emit-connect.test.ts b/test/wakeshift-emit-connect.test.tsindex 0fe4421d5a..60329b12ac 100644--- a/test/wakeshift-emit-connect.test.ts+++ b/test/wakeshift-emit-connect.test.ts@@ -3,7 +3,7 @@* serve holding the PGLite lock, a Postgres outage) must not fail that script: one stderr line, exit 0. A bad* argument list still exits 2. Spawns the real CLI against an unreachable Postgres, so the connect itself fails.*- * Serial because it spawns a subprocess and writes a tmpdir.+ * Spawns a subprocess and writes its own tmpdir; it never mutates this process's environment.*/import { describe, test, expect, beforeAll, afterAll } from 'bun:test';import { mkdtempSync, mkdirSync, writeFileSync, rmSync } from 'node:fs';