Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
fix(crash-robot): pull-request ceiling 820 s, the slowest measured pr-scope cell plus about 30%
garrytan7e552a05c022
diff --git a/.github/workflows/persistence-validation.yml b/.github/workflows/persistence-validation.ymlindex 567175f710..c343ce654c 100644--- a/.github/workflows/persistence-validation.yml+++ b/.github/workflows/persistence-validation.yml@@ -375,7 +375,7 @@ jobs:# ROBOT_RANDOM_SEEDS), so a passed run of a tree stands for any run of it and a# master push may reuse it. ROBOT_SECONDS is the ceiling a run fails past, sized# from ubicloud-standard-4 measurements (docs/ci-event-parity.md#crash-robot-ceilings):- # 480 s on pull requests and merge-queue runs (named exception,+ # 820 s on pull requests and merge-queue runs (named exception,# docs/TESTING.md#event-parity: scope pr skips the Postgres lease-bound seams),# 1200 s PGLite and 1800 s Postgres elsewhere. The nightly Test schedule adds that# day's exploration seeds. Each cell writes its share of the ceiling to the job summary.@@ -385,7 +385,7 @@ jobs:DATABASE_URL: postgres://[email protected]:5432/gbrain_testGBRAIN_PGBOUNCER_URL: postgres://[email protected]:55433/gbrain_testROBOT_SCOPE: ${{ (github.event_name == 'pull_request' || github.event_name == 'merge_group') && 'pr' || 'full' }}- ROBOT_SECONDS: ${{ (github.event_name == 'pull_request' || github.event_name == 'merge_group') && '480' || (matrix.engine == 'postgres' && '1800' || '1200') }}+ ROBOT_SECONDS: ${{ (github.event_name == 'pull_request' || github.event_name == 'merge_group') && '820' || (matrix.engine == 'postgres' && '1800' || '1200') }}ROBOT_EXPLORE: ${{ github.event_name == 'schedule' && 'nightly' || '' }}run: >-bun --no-env-file scripts/persistence/validate.ts --engine=${{ matrix.engine }}diff --git a/docs/ci-event-parity.md b/docs/ci-event-parity.mdindex 1f2c3e8bc6..5fa4faf185 100644--- a/docs/ci-event-parity.md+++ b/docs/ci-event-parity.md@@ -33,7 +33,7 @@ checks ([below](#full-ci-on-pull-requests)), never per-cell matrix names.| `persistence-validation.yml` | `convergence` selected on pull requests by `scripts/ci-convergence-scope.sh` (test.yml `changes`; never by `package.json` alone) | Named exception | Every merge-queue run and every push to master; the nightly cell runs in `convergence-nightly.yml` || `convergence-nightly.yml` | The convergence gate's nightly cell (2,000 pages, 50 ms, 20 kills, run-id seed): schedule and dispatch only, outside `test-status`; the PR cell (200 pages, 10 ms, 6 kills, seed 6650) runs in `persistence-validation.yml` | Named exception | Itself (nightly Convergence schedule) || `persistence-validation.yml` | `SOAK_OPERATIONS` 2,500 vs 10,000 | Named exception | Every push to master and the nightly Test schedule |-| `persistence-validation.yml` | Crash robot `--robot-scope=pr` (Postgres lease-bound seams skipped, 480 s ceiling) vs `full` (1200 s PGLite, 1800 s Postgres; [ceilings](#crash-robot-ceilings)); the nightly adds that day's exploration seeds | Named exception | The full-ci dispatch, every push to master (same fixed list, so it may reuse that run) and the nightly Test schedule |+| `persistence-validation.yml` | Crash robot `--robot-scope=pr` (Postgres lease-bound seams skipped, 820 s ceiling) vs `full` (1200 s PGLite, 1800 s Postgres; [ceilings](#crash-robot-ceilings)); the nightly adds that day's exploration seeds | Named exception | The full-ci dispatch, every push to master (same fixed list, so it may reuse that run) and the nightly Test schedule || `native-locks.yml` | `inputs.scope` (OpenClaw, musl, Windows probes, Bun 1.4.0 and cross-target cells) | Named exception | Every push to master and the nightly Test schedule (`full`) || `e2e.yml` | Doc-only merge-queue entry selects no E2E file | Named exception | Every push to master (whole corpus) and the nightly E2E schedule || `e2e.yml` | Full-corpus coverage lanes and their `e2e-status` checks | Named exception | Nightly E2E schedule (or a `full_corpus` dispatch) |@@ -134,8 +134,11 @@ Measured on ubicloud-standard-4, full scope, run 39996381819:- **Postgres, 1800 s.** The slowest cell ran 1,290 s, including one 128 s wait for adead owner's effect-claim lease on a random seed. A nightly with two such waitslands near 1,550 s, and 1800 s is that plus about 15%.-- **Pull requests, 480 s.** Scope `pr` crashes each seam once and skips the Postgres- lease-bound seams.+- **Pull requests, 820 s.** Scope `pr` crashes each seam once and skips the Postgres+ lease-bound seams. Measured on #7444's pull-request run 40003479271: PGLite 510 s+ (Bun 1.4.0) and 427 s (1.4.4); Postgres 567 s and 632 s, each with one or two waits+ of about 130 s for a dead owner's claim lease at a `consumer:*` seam. 820 s is the+ slowest cell plus about 30%.## Cost of paritydiff --git a/test/scripts/data-safety-native-workflow.test.ts b/test/scripts/data-safety-native-workflow.test.tsindex 4b35ee5967..fde9c536c7 100644--- a/test/scripts/data-safety-native-workflow.test.ts+++ b/test/scripts/data-safety-native-workflow.test.ts@@ -324,7 +324,7 @@ describe('data-safety native CI coverage', () => {}});- test('the crash robot runs a fixed list beside the soak: scope pr under 480 s on pull requests, full under 1200/1800 s elsewhere, exploration nightly, Postgres through PgBouncer', () => {+ test('the crash robot runs a fixed list beside the soak: scope pr under 820 s on pull requests, full under 1200/1800 s elsewhere, exploration nightly, Postgres through PgBouncer', () => {const persistence = load(readFileSync(join(import.meta.dir, '../../.github/workflows/persistence-validation.yml'), 'utf8')) as {jobs: { 'crash-robot': { steps: Step[]; services: Record<string, { env?: Record<string, string> }> } };};@@ -332,7 +332,7 @@ describe('data-safety native CI coverage', () => {expect(job.services.pgbouncer?.env?.POOL_MODE).toBe('transaction');const step = job.steps.find(entry => entry.run?.includes('scripts/persistence/validate.ts'));expect(step?.env?.ROBOT_SCOPE).toBe("${{ (github.event_name == 'pull_request' || github.event_name == 'merge_group') && 'pr' || 'full' }}");- expect(step?.env?.ROBOT_SECONDS).toBe("${{ (github.event_name == 'pull_request' || github.event_name == 'merge_group') && '480' || (matrix.engine == 'postgres' && '1800' || '1200') }}");+ expect(step?.env?.ROBOT_SECONDS).toBe("${{ (github.event_name == 'pull_request' || github.event_name == 'merge_group') && '820' || (matrix.engine == 'postgres' && '1800' || '1200') }}");expect(step?.env?.ROBOT_EXPLORE).toBe("${{ github.event_name == 'schedule' && 'nightly' || '' }}");expect(step?.env?.GBRAIN_PGBOUNCER_URL).toContain(':55433/');const argv = (env: Record<string, string>) => Bun.spawnSync(['bash', '-e', '-o', 'pipefail', '-c', `@@ -340,7 +340,7 @@ describe('data-safety native CI coverage', () => {${step!.run!.replaceAll('${{ matrix.engine }}', 'postgres')}`], { env: { PATH: process.env.PATH ?? '', ...env } }).stdout.toString().trim().split('\n');const head = ['--no-env-file', 'scripts/persistence/validate.ts', '--engine=postgres', '--schedules=0', '--operations=0', '--no-crashes'];- expect(argv({ ROBOT_SCOPE: 'pr', ROBOT_SECONDS: '480', ROBOT_EXPLORE: '' })).toEqual([...head, '--robot-scope=pr', '--robot-seconds=480',+ expect(argv({ ROBOT_SCOPE: 'pr', ROBOT_SECONDS: '820', ROBOT_EXPLORE: '' })).toEqual([...head, '--robot-scope=pr', '--robot-seconds=820','--manifest=.context/persistence-robot.json']);const nightly = argv({ ROBOT_SCOPE: 'full', ROBOT_SECONDS: '1800', ROBOT_EXPLORE: 'nightly' });expect(nightly.slice(0, -2)).toEqual([...head, '--robot-scope=full', '--robot-seconds=1800']);