Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

test(board): abort restore with native SQLite trigger [A7,C7]

Corey Olson46f6a97951da
diff --git a/test/board-busy.test.js b/test/board-busy.test.js
index 03deaac6..f4303998 100644
--- a/test/board-busy.test.js
+++ b/test/board-busy.test.js
@@ -416,10 +416,9 @@ test('native import observes committed and rolled-back write ownership without c
assert.match(boardWriteHolderText(file), /private-import/);
// budget: exercise the declared over-two-second diagnostic during a genuine native restore write.
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 2_100);
- if (${rollback}) throw new Error('private import rollback');
return 1;
});
- board.db.exec('CREATE TEMP TRIGGER hold_private_import BEFORE INSERT ON main.item BEGIN SELECT hold_private_import(); END');
+ board.db.exec("CREATE TEMP TRIGGER hold_private_import BEFORE INSERT ON main.item BEGIN SELECT hold_private_import(); ${rollback ? "SELECT RAISE(ABORT, 'private import rollback');" : ''} END");
try {
if (${rollback}) {
assert.throws(() => importBoard(board, document), /private import rollback/);