Skip to content

fix(agbossjs/agboss#760): the explorer bites one sabotage per file, and a reset that deletes — the gate in 4 min under load - #41

Merged
PavelRavvich merged 2 commits into
mainfrom
fix/760-explorer-bites-split
Nov 4, 2026
Merged

PavelRavvich merged 2 commits into
mainfrom
fix/760-explorer-bites-split

Conversation

@PavelRavvich

Copy link
Copy Markdown
Member

Refs agbossjs/agboss#760

What changed

  • tests/contracts/explorer-bites.test.ts → one file per sabotage, each its own nested vitest on its own fixture and its own 15-min budget: explorer-bites-finish.test.ts (a finish that only releases) and explorer-bites-caller-clock.test.ts (leases on the caller's clock); shared runner explorer-bites.ts, the sets in fixtures/explorer-bites.sets.ts.
  • Each runs only the cases its assertions read (testNamePattern): the finish set's lease world and its two #520 finish races; the caller-clock set's lease world (exhaustive + walks) and each outbound-call world's walks. Explorer options unchanged.
  • Each file asserts exactly which cases ran; the finish set's lease world fails both searches with a minimal schedule and no-takeover-of-finished-work; every caller-clock case fails with a minimal schedule, one-live-holder in the lease world.
  • tests/support/database.ts — a contract case's reset DELETEs every table (children first, by foreign key) instead of a TRUNCATE per table: 333 → 9 ms a reset under load. The first full gate showed the main interleavings (PostgreSQL) lease world reaching its 900 s limit after 6 of 7 skews; the explorer resets before every schedule it replays.
  • test-run.json — contracts minFiles 3.

How it was tested

  • Measured before (the old file alone, load 6–7): 1 720 s — 786 s on outbound-call worlds that pass on the finish sabotage, 400 s on the caller-clock set's outbound-call worlds, 234 s on contract suites never read.
  • After the split alone: the two files 30 s and 262 s side by side; in a full gate 46 s and 261 s — but that gate failed on the main interleavings (PostgreSQL) lease world (its 900 s limit after 6 of 7 skews), which led to the reset.
  • After the reset: VITEST_MAX_FORKS=3 npm run check under the shared lock, green three times under load (load averages 7.7–9.5 with other agents' gates and Docker): the whole check in 225 s, 218 s, 196 s (with npm ci and the pack); store-conformance.test.ts 126 s (before: its lease world alone > 900 s), the bites 2.4 s and 9.7 s; check-test-run: tests 61/61 files, contracts 3/3 files ran.

🤖 Generated with Claude Code

https://claude.ai/code/session_012Kh8JmysuhZyQRSpNyJdPg

PavelRavvich and others added 2 commits November 4, 2026 19:23
…only the cases they read

explorer-bites.test.ts ran both broken sets' whole storeConformance — 29 min alone
on a loaded machine, past its 15-min hook. Each sabotage is now a file of its own
(explorer-bites-finish, explorer-bites-caller-clock) whose nested vitest runs only
the cases its assertions read: the lease world and the two #520 finish races (30 s),
and the lease world's searches with each outbound-call world's walks (262 s). The
contract suites and the worlds a sabotage passes proved nothing here. Each file
also asserts exactly which cases ran, and every one of the caller-clock set fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Kh8JmysuhZyQRSpNyJdPg
…t truncate

The explorer resets the schema before every schedule it replays; a TRUNCATE per
table (new files for each of 28) took 333 ms a reset on a loaded machine, a DELETE
of the few rows 9 ms. In the first full gate under load the main
interleavings (PostgreSQL) lease world reached its 900 s time limit after 6 of its
7 skews; the reset was most of it. Tables are emptied children first (by their
foreign keys); sequences kept, as TRUNCATE without RESTART IDENTITY kept them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Kh8JmysuhZyQRSpNyJdPg
@PavelRavvich
PavelRavvich merged commit 571592d into main Nov 4, 2026
4 checks passed
@PavelRavvich
PavelRavvich deleted the fix/760-explorer-bites-split branch November 4, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant