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.

chore(merge): merge main into core/198 [C7]

Corey Olson39692ad53c95
diff --cc src/board.js
index d9ff0f97,3763f55a..e6582620
--- a/src/board.js
+++ b/src/board.js
@@@ -22,9 -22,14 +22,15 @@@ import
mkdirSync,
} from 'node:fs';
import { dirname } from 'node:path';
+ import { sharedSchemaOwner } from './board-schema.js';
+ import { expectedBoardSchema } from './board-schema.js';
+ import { sharedSchemaDiagnostic } from './board-schema.js';
+ import { reportSharedSchema } from './board-schema.js';
import { DatabaseSync } from 'node:sqlite';
import { boardNotWritable } from './board-access.js';
+import { ensureHotIndexes } from './board-hot.js';
+ import { boardBusyError } from './board-access.js';
+ export { boardBusyError } from './board-access.js';
import {
briefFiles,
briefSections,
@@@ -313,14 -305,18 +306,19 @@@ export function openBoard(file, clock
try {
db = new DatabaseSync(file);
db.exec(`PRAGMA busy_timeout = ${BOARD_BUSY_TIMEOUT_MS}`);
- if (file !== ':memory:') db.exec('PRAGMA journal_mode = WAL');
- migrateEventLogVersion(db);
- migrate(db);
- // Only trunk code adds indexes to a shared board; a worktree reads it as the trunk left it (#1044).
- if (isMain !== false) ensureHotIndexes(db);
- db.prepare('INSERT OR IGNORE INTO board_meta (meta_key, meta_value) VALUES (?, ?)').run('board_id', randomBytes(16).toString('hex'));
+ if (file !== ':memory:' && isMain !== false) db.exec('PRAGMA journal_mode = WAL');
const board = { db, clock };
- guardStore(board);
+ if (isMain !== false || file === ':memory:') {
+ migrateEventLogVersion(db);
+ migrate(db);
++ ensureHotIndexes(db);
+ db.prepare('INSERT OR IGNORE INTO board_meta (meta_key, meta_value) VALUES (?, ?)').run('board_id', randomBytes(16).toString('hex'));
+ guardStore(board);
+ } else {
+ // Read compatibility before any local effect; persistent schema belongs to trunk alone.
+ readEventLogVersion(db);
+ reportSharedSchema(file, sharedSchemaDiagnostic(db, expectedBoardSchema(SCHEMA, migrate, storeTriggers)), onDiagnostic);
+ }
guardMoves(board);
return board;
} catch (error) {