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.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
fix(link): install delivery tables when journals open [H17]
Corey Olson2de150f8139e
diff --git a/relay/board-link-inbox.js b/relay/board-link-inbox.jsindex 1cdc9091..bc874934 100644--- a/relay/board-link-inbox.js+++ b/relay/board-link-inbox.js@@ -17,12 +17,6 @@ function withDatabase(file, write, work) {if (!write) return work(db);db.exec('BEGIN IMMEDIATE');try {- db.exec(`CREATE TABLE IF NOT EXISTS board_link_delivery (- delivery_id INTEGER PRIMARY KEY AUTOINCREMENT, source_board TEXT NOT NULL,- correlation TEXT NOT NULL, link_id TEXT NOT NULL, generation INTEGER NOT NULL,- position INTEGER NOT NULL, digest TEXT NOT NULL, envelope TEXT NOT NULL, receipt TEXT NOT NULL,- UNIQUE(source_board,correlation))`);- db.exec('CREATE INDEX IF NOT EXISTS board_link_delivery_position ON board_link_delivery(source_board,link_id,generation,position DESC)');const result = work(db);db.exec('COMMIT');return result;diff --git a/relay/journal.js b/relay/journal.jsindex 26899558..c87a3da6 100644--- a/relay/journal.js+++ b/relay/journal.js@@ -95,6 +95,12 @@ export function createRelayJournal({ directory, boardId, maxBytes = DEFAULT_BYTE// first mint can take a name a creator registered, even if enrollment never finished (#579).db.exec(`CREATE TABLE IF NOT EXISTS journal_registration (target TEXT PRIMARY KEY, creator TEXT NOT NULL,sequence INTEGER NOT NULL UNIQUE, digest TEXT NOT NULL)`);+ db.exec(`CREATE TABLE IF NOT EXISTS board_link_delivery (+ delivery_id INTEGER PRIMARY KEY AUTOINCREMENT, source_board TEXT NOT NULL,+ correlation TEXT NOT NULL, link_id TEXT NOT NULL, generation INTEGER NOT NULL,+ position INTEGER NOT NULL, digest TEXT NOT NULL, envelope TEXT NOT NULL, receipt TEXT NOT NULL,+ UNIQUE(source_board,correlation))`);+ db.exec('CREATE INDEX IF NOT EXISTS board_link_delivery_position ON board_link_delivery(source_board,link_id,generation,position DESC)');db.exec('INSERT OR IGNORE INTO journal_head (slot,sequence) SELECT 1, COALESCE(MAX(sequence),0) FROM journal_record');if (!db.prepare('PRAGMA table_info(journal_head)').all().some((column) => column.name === 'last_activity_at')) {db.exec('ALTER TABLE journal_head ADD COLUMN last_activity_at TEXT');