Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

ci(robot): PR-scope Postgres crash-robot ceiling 620 s after dead-owner effect-claim release

garrytana261dc0b3b6d
diff --git a/.github/workflows/persistence-validation.yml b/.github/workflows/persistence-validation.yml
index 3beb5080ce..4f7a15a3f7 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):
- # 820 s PGLite and 1020 s Postgres on pull requests and merge-queue runs (named exception,
+ # 820 s PGLite and 620 s Postgres 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_test
GBRAIN_PGBOUNCER_URL: postgres://[email protected]:55433/gbrain_test
ROBOT_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') && (matrix.engine == 'postgres' && '820' || '820') || (matrix.engine == 'postgres' && '1800' || '1200') }}
+ ROBOT_SECONDS: ${{ (github.event_name == 'pull_request' || github.event_name == 'merge_group') && (matrix.engine == 'postgres' && '620' || '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.md
index d3c026f53f..3bd75632dc 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, 820 s PGLite and 1020 s Postgres ceilings) 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 PGLite and 620 s Postgres ceilings) 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,25 +134,23 @@ 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 a
dead owner's effect-claim lease on a random seed. A nightly with two such waits
lands near 1,550 s, and 1800 s is that plus about 15%.
-- **Pull requests, 820 s PGLite and 1020 s Postgres.** Scope `pr` crashes each seam once
+- **Pull requests, 820 s PGLite and 620 s Postgres.** Scope `pr` crashes each seam once
and skips the Postgres lease-bound seams. PGLite measured 510 s and 427 s (run
40003479271), then 529 s and 474 s (run 40018836178); 820 s is the slowest plus about 30%.
- A Postgres crash run takes about 10 s, or about 130 s when the killed process held an
- effect claim: recovery waits out that claim's 2-minute lease, since only request claims
- of a provably dead owner are released early. Three crashes can land there: random-5113's
- `consumer:preparing` #2 (every run), and the fixed list's `consumer:preparing` #31 and
- `effect_recovery:before_clear` #1 (about half the runs each). A cell is its base time plus
- one to three such waits:
-
- | Run | Cell | Time | Lease waits |
- |---|---|---|---|
- | 40003479271 | postgres / Bun 1.4.0 | 567 s | 1 |
- | 40003479271 | postgres / Bun 1.4.4 | 632 s | 2 |
- | 40018836178 | postgres / Bun 1.4.0 | 701 s | 2 |
- | 40018836178 | postgres / Bun 1.4.4 | 785 s | 3 |
-
- 1020 s is the slowest plus about 30%. Re-tighten it after dead-owner effect-claim release
- lands: the waits then drop to seconds.
+ A Postgres crash run takes about 10 s. Before #7454 it took about 130 s when the killed
+ process held an effect claim, because recovery waited out that claim's 2-minute lease;
+ since #7454 a dead owner's effect claim is released early, so no cell waits on a lease.
+ Measured on master after #7454 (run 40059909892, two attempts):
+
+ | Attempt | Cell | Time |
+ |---|---|---|
+ | 1 | postgres / Bun 1.4.0 | 357 s |
+ | 1 | postgres / Bun 1.4.4 | 367 s |
+ | 2 | postgres / Bun 1.4.0 | 475 s |
+ | 2 | postgres / Bun 1.4.4 | 362 s |
+
+ 620 s is the slowest plus about 30%. The cells before #7454 ran 567 to 785 s with one to
+ three lease waits, under a 1020 s ceiling.
## Cost of parity
diff --git a/test/scripts/data-safety-native-workflow.test.ts b/test/scripts/data-safety-native-workflow.test.ts
index 38deabffa2..b3b294cc27 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 820/1020 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/620 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') && (matrix.engine == 'postgres' && '820' || '820') || (matrix.engine == 'postgres' && '1800' || '1200') }}");
+ expect(step?.env?.ROBOT_SECONDS).toBe("${{ (github.event_name == 'pull_request' || github.event_name == 'merge_group') && (matrix.engine == 'postgres' && '620' || '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', `