Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
6520183
perf(server): add bounded server work tracing
chuks-qua Sep 24, 2026
55cd8ae
feat(server): add execution-scoped worker mailbox scheduler
chuks-qua Sep 24, 2026
9e6b064
perf(server): attribute event apply trace by type
chuks-qua Sep 24, 2026
2322bd4
fix(server): keep execution mailbox closed after Stop
chuks-qua Sep 24, 2026
ae7af2f
feat(server): add acknowledged canonical SQLite writer worker
chuks-qua Sep 24, 2026
65d74b3
perf(server): split narrative checkpoint trace timings
chuks-qua Sep 24, 2026
3c467e9
feat(server): write parent narrative recovery in SQLite worker
chuks-qua Sep 24, 2026
33ad5f1
feat(server): atomically classify parent narrative recovery
chuks-qua Sep 24, 2026
ff0b0ec
feat(server): fence async turn event application before finalization
chuks-qua Sep 24, 2026
cd79780
feat(server): route canonical provider commits through SQLite writer
chuks-qua Sep 24, 2026
b25293b
fix(server): include provider phase in write identity
chuks-qua Sep 24, 2026
9e5782b
fix(server): preserve checkpoint failure across Stop
chuks-qua Sep 24, 2026
b7bdb46
feat(server): add data-only parent turn writer operations
chuks-qua Sep 24, 2026
c78d528
feat(server): model worker-owned execution commands
chuks-qua Sep 24, 2026
b79e404
feat(server): replay durable canonical writer receipts
chuks-qua Sep 24, 2026
060772e
fix(server): acknowledge handled canonical receipts
chuks-qua Sep 24, 2026
fc0e86c
feat(server): run execution mailboxes in Bun workers
chuks-qua Sep 24, 2026
93f7077
feat(server): carry canonical turn inputs through worker commands
chuks-qua Sep 24, 2026
39621f2
fix(server): retry failed writer acknowledgements
chuks-qua Sep 24, 2026
aea9185
feat(server): checkpoint parent narration through writer receipts
chuks-qua Sep 24, 2026
9371eaa
fix(server): clear failed narrative guard after finalization
chuks-qua Sep 24, 2026
e410cb9
fix(server): retain provider diagnostics after writer commits
chuks-qua Sep 24, 2026
8f9fc36
perf(server): avoid main thread recovery lookup
chuks-qua Sep 24, 2026
86b542d
perf(server): trace assistant text writes during active turns
chuks-qua Sep 24, 2026
bcebc7b
test(server): verify Stop isolation across six fixture tasks
chuks-qua Sep 24, 2026
d55a582
fix(test): hydrate stopped turn narrative through public RPC
chuks-qua Sep 24, 2026
f8d2d06
fix(server): report exact leases after execution worker loss
chuks-qua Sep 24, 2026
2eeb210
fix(test): read structured server work stalls
chuks-qua Sep 24, 2026
e079d90
test(server): stop one task while six peers continue
chuks-qua Sep 24, 2026
671c209
fix(server): release SQLite locks between writer recovery batches
chuks-qua Sep 24, 2026
6873f23
Revert "perf(server): avoid main thread recovery lookup"
chuks-qua Sep 24, 2026
2ff986a
Revert "fix(server): retain provider diagnostics after writer commits"
chuks-qua Sep 24, 2026
783bff6
Revert "feat(server): checkpoint parent narration through writer rece…
chuks-qua Sep 24, 2026
1cdcdef
Revert "feat(server): route canonical provider commits through SQLite…
chuks-qua Sep 24, 2026
a8aa3bb
feat(server): persist supported execution semantics in canonical writer
chuks-qua Sep 24, 2026
247cca9
test(server): prove semantic begin receipt rollback
chuks-qua Sep 24, 2026
618497c
fix(server): validate semantic writer rows and bound publication scope
chuks-qua Sep 24, 2026
763ea5b
fix(server): replay canonical events from semantic receipts
chuks-qua Sep 24, 2026
c109826
feat(server): route semantic execution writes through SQLite worker
chuks-qua Sep 24, 2026
0a3756a
feat(server): stage terminal projection on canonical writer
chuks-qua Sep 24, 2026
407b7b6
test(server): prove semantic writer failure and lost reply
chuks-qua Sep 24, 2026
4493628
feat(server): stage terminal projection under execution lease
chuks-qua Sep 24, 2026
888f53e
test(server): run execution and writer workers together
chuks-qua Sep 24, 2026
9d25e26
feat(server): fence Stop and terminal outcome in writer
chuks-qua Sep 24, 2026
ea85532
feat(server): checkpoint worker execution through writer
chuks-qua Sep 24, 2026
5087a1e
feat(server): carry provider phase and cursor through mailbox
chuks-qua Sep 24, 2026
84a80db
feat(server): retain provider commit receipts across worker retries
chuks-qua Sep 24, 2026
008a97e
fix(server): allow terminal staging after execution Stop
chuks-qua Sep 24, 2026
f5bfb21
test(server): prove stopped worker preserves partial assistant
chuks-qua Sep 24, 2026
1d6ff42
refactor(server): prepare cloneable parent turn starts during admission
chuks-qua Sep 24, 2026
5d203cd
test(server): align admission fixtures with stable message IDs
chuks-qua Sep 24, 2026
2fd668d
feat(server): reconcile lost execution workers through writer
chuks-qua Sep 24, 2026
de4e55f
feat(server): project Codex collaboration on canonical writer
chuks-qua Sep 24, 2026
08c3b0d
test(server): preserve both worker transport cases after merge
chuks-qua Sep 24, 2026
da153f7
feat(server): stream bounded committed publication pages
chuks-qua Sep 24, 2026
fc5f490
fix(server): fence worker replacement until turn recovery
chuks-qua Sep 24, 2026
bca7dbb
feat(server): classify lost worker around durable turn start
chuks-qua Sep 24, 2026
25ec8c2
refactor(server): share committed publication page limit
chuks-qua Sep 24, 2026
819b08c
fix(server): require writer evidence before releasing lost turn
chuks-qua Sep 24, 2026
fcd250c
fix(server): page durable publication replay from SQLite
chuks-qua Sep 24, 2026
81bc829
refactor(server): isolate narrative turn state from SQLite
chuks-qua Sep 24, 2026
1f786fa
refactor(server): capture bounded file observations before worker han…
chuks-qua Sep 24, 2026
7109916
fix(server): bind file observations to exact evidence
chuks-qua Sep 24, 2026
4462313
refactor(server): isolate assistant execution decisions from finalizer
chuks-qua Sep 24, 2026
2956e48
feat(server): coordinate lost worker recovery before replacement
chuks-qua Sep 24, 2026
0a0decb
refactor(server): bind narrative buffers to one state identity
chuks-qua Sep 24, 2026
bcf1576
fix(server): avoid retaining empty narrative adapters
chuks-qua Sep 24, 2026
5131b48
feat(server): checkpoint assistant text in semantic writer
chuks-qua Sep 24, 2026
0b2855c
feat(server): hand off file turn identity to execution tracker
chuks-qua Sep 24, 2026
e215555
refactor(server): isolate narrative recovery delta
chuks-qua Sep 24, 2026
d1732fd
refactor(server): isolate plan execution parsing state
chuks-qua Sep 24, 2026
252194f
feat(server): reduce live Codex events per execution
chuks-qua Sep 24, 2026
2454267
feat(server): route narrative deltas through execution worker
chuks-qua Sep 24, 2026
635ddd5
feat(server): persist narrative deltas in semantic writer
chuks-qua Sep 24, 2026
fa60335
feat(server): bound narrative delta writer commands
chuks-qua Sep 24, 2026
5577bf1
feat(server): preserve assigned assistant ID in writer terminal proje…
chuks-qua Sep 24, 2026
a8d04bc
fix(server): reject public assistant rows during writer staging
chuks-qua Sep 24, 2026
e6c3e56
feat(server): project Codex parent assistant messages as data
chuks-qua Sep 24, 2026
e630cee
feat(server): persist bounded live publication receipts
chuks-qua Sep 24, 2026
4db9e49
feat(server): cover Codex live reducer event variants
chuks-qua Sep 24, 2026
f450b6d
fix(server): bind staged assistant identity to terminal finish
chuks-qua Sep 24, 2026
b7019d6
refactor(server): extract task tool writer intents
chuks-qua Sep 24, 2026
e993ff9
fix(server): bound task tool parent traversal
chuks-qua Sep 24, 2026
bd5f9af
refactor(server): freeze turn diff evidence as execution data
chuks-qua Sep 24, 2026
8d0b5f5
feat(server): settle turn diff with terminal assistant
chuks-qua Sep 24, 2026
70114ba
feat(server): release committed live events on host
chuks-qua Sep 24, 2026
e9107f2
test(server): exercise live receipts through real execution workers
chuks-qua Sep 24, 2026
c5263a5
feat(server): persist Codex context projections in semantic writer
chuks-qua Sep 24, 2026
0684444
feat(server): commit compound live events through execution handler
chuks-qua Sep 24, 2026
4e19561
feat(server): commit live text and narrative as one operation
chuks-qua Sep 24, 2026
c03b1e5
fix(server): acknowledge effect-free live boundaries
chuks-qua Sep 24, 2026
e5c15e9
feat(server): commit task tool effects with live events
chuks-qua Sep 24, 2026
74c6a30
feat(server): prepare Codex system and error projections
chuks-qua Sep 24, 2026
461b9fc
fix(server): release compound live receipts after writer commit
chuks-qua Sep 24, 2026
3fbda03
feat(server): acknowledge transient Codex statuses per execution
chuks-qua Sep 24, 2026
b80f5e1
feat(server): fence pre-edit file observations by attempt
chuks-qua Sep 24, 2026
4f15a3e
fix(server): fence error publication behind terminal commit
chuks-qua Sep 24, 2026
1e3b5c4
feat(server): commit bound Codex system live events
chuks-qua Sep 24, 2026
e04681d
feat(server): project Codex plan intents as bounded execution data
chuks-qua Sep 24, 2026
fb592a0
feat(server): stage Codex live message before publication
chuks-qua Sep 24, 2026
cc80907
feat(server): own execution mailbox admission and stop
chuks-qua Sep 24, 2026
e58cc1a
feat(server): commit live Codex plan projections with receipts
chuks-qua Sep 24, 2026
2ba38b6
feat(server): admit parent turns through execution owner
chuks-qua Sep 24, 2026
577b983
fix(providers): bind Codex callbacks to dispatch attempts
chuks-qua Sep 25, 2026
68b5dba
feat(server): route provider batches to execution owner
chuks-qua Sep 25, 2026
9d58814
fix(server): roll back rejected child projections
chuks-qua Sep 25, 2026
f7f9be8
feat(server): persist sealed execution file evidence at terminal
chuks-qua Sep 25, 2026
e0e874e
feat(server): assign durable per-thread live publication IDs
chuks-qua Sep 25, 2026
15fa703
feat(server): bind provider batches to execution attempts
chuks-qua Sep 25, 2026
ad4c30d
feat(server): give Codex turns worker-owned execution
chuks-qua Sep 25, 2026
0a73175
chore: merge main into worker-owned turns
chuks-qua Sep 25, 2026
fe98cec
fix(server): trace only the main event loop
chuks-qua Sep 25, 2026
4d3e90a
docs(performance): record issue 1760 matched runs
chuks-qua Sep 25, 2026
cf9dca2
refactor(perf): simplify stopped-run completion check
chuks-qua Sep 25, 2026
990dee6
test(providers): expect Codex delivery attempts
chuks-qua Sep 25, 2026
25ac818
test(server): align conversation paging and worker teardown
chuks-qua Sep 25, 2026
4e77fc3
fix(server): restrict agent cleanup to fixture workspace
chuks-qua Sep 25, 2026
904e8da
perf(server): load bounded state for terminal batches
chuks-qua Sep 25, 2026
fc892ce
perf(server): reuse narrative message resolutions and queries
chuks-qua Sep 25, 2026
84af532
perf(contracts): omit unused schema modules from bundles
chuks-qua Sep 25, 2026
2a08ac7
perf(server): group bounded independent event commits
chuks-qua Sep 25, 2026
8c7bf59
perf(server): reclaim released execution memory
chuks-qua Sep 25, 2026
722dd18
perf(server): start legacy event workers on demand
chuks-qua Sep 25, 2026
da074aa
perf(server): checkpoint only the changed tool result
chuks-qua Sep 25, 2026
57e4992
perf(server): persist turn settings in one atomic write
chuks-qua Sep 25, 2026
aea783f
perf(server): clone only changed recovery records
chuks-qua Sep 25, 2026
8a498f7
perf(server): collect idle memory after completion callbacks
chuks-qua Sep 25, 2026
cc6f0ec
test(server): tolerate fractional trace clock arithmetic
chuks-qua Sep 25, 2026
6841e8f
docs(perf): record worker runtime performance recovery
chuks-qua Sep 25, 2026
bb1e241
docs(perf): exclude reused terminal output timing
chuks-qua Sep 25, 2026
626f3e8
fix(web): bind follow-up execution before terminal events
chuks-qua Sep 25, 2026
81e6f25
fix(server): renew event generations after journal eviction
chuks-qua Sep 26, 2026
419b537
fix(web): retain live publications when cursor writes fail
chuks-qua Sep 26, 2026
2842af4
docs(performance): drop issue-scoped working notes
chuks-qua Sep 27, 2026
b121cfb
refactor(server): drop the CanonicalAgentEventSink compatibility facade
chuks-qua Sep 27, 2026
acfb860
refactor(server): share execution identity and lease matching
chuks-qua Sep 27, 2026
dc50921
refactor(server): collapse duplicated worker result and effect shapes
chuks-qua Sep 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
| Last turn shows native agent changes, settles durably, and identifies Git fallback | [Last turn native diff](turn-diff-review.md) | Codex composer and Review Electron proof, plus focused Git/RPC and migration checks |
| A thread starts, runs, stops, clears active state, and retains a cancelled reconnect snapshot | [Thread lifecycle](thread-lifecycle.md) | `runtime live --scenario stop` |
| Provider events become durable assistant conversation data | [Provider events and durability](provider-events-and-durability.md) | `runtime live --scenario completion` |
| Consecutive replies settle while switching away and back during streaming | [Provider events and durability](provider-events-and-durability.md#consecutive-turns-and-navigation) | Real-provider Electron follow-ups, mid-turn navigation, idle observation, and reload |
| Seven active tasks keep event order while model and terminal controls settle | [Multi-surface journeys](multi-surface-journeys.md#seven-active-tasks-and-controls) | Fixture-owned seven-task public RPC run, then Electron controls and reload |
| Codex reroutes, warnings, diagnostics, and authentication recovery remain bounded, durable, and thread-scoped | [Provider events and durability](provider-events-and-durability.md) | Composer notice journey and `runtime health` |
| Approval review offers only valid access modes, waits for a real permission request, and keeps Full Access review-free | [Provider events and durability](provider-events-and-durability.md) | Approval review journey and focused policy and mapper tests |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ If cleanup is incomplete, use the receipt's exact path with
`--cleanup-receipt <receipt-path> --confirm-run` before another run. Do not
delete tasks by title or age.

For the worker-owned turn change in issue #1760, collect at least ten matched
receipts. Compare server-loop delay, public event throughput, memory, and
`metrics.workerQueue` peaks with the recorded baseline. Require model-picker
and Stop acknowledgement within 2 seconds, terminal readiness within 5 seconds,
and ordered durable events in every run. Run `--stop-one` as a separate case;
require the six peers to finish and the stopped task to remain cancelled after
reload. Trace and fix a missed budget before calling the run complete.

In the owned Electron app, create separate direct tasks in `.dev/fixture-repo`.
Open and close the model picker, open a Terminal, switch tasks, and reload.
Capture the settled controls and terminal output in a screenshot, record the
Expand All @@ -28,6 +36,10 @@ final conversation check and [Electron live testing](../../../electorn-live-test
for the desktop control and capture. Report any unavailable control or missing
capture as a gap. A public RPC receipt alone does not prove the desktop path.

Also run the [consecutive-turn navigation journey](provider-events-and-durability.md#consecutive-turns-and-navigation)
with real Codex. The seven-task fixture starts one turn per task and cannot prove
successful follow-ups or renderer state while switching during streaming.

## Provider completeness

Use this journey when a change affects turn diffs, Review, provider events, automatic review, or workspace invalidation. Resolve the upstream Codex source with the OpenSrc command in the repository instructions before a Codex run. Record the resolved upstream commit in the receipt. The cache is read-only.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
1. Open the project for this worktree.
2. Start a short thread with a selected provider and model.
3. Wait for the final reply.
4. Reload or reopen the conversation and confirm that the reply remains.
4. Send a follow-up in the same conversation. Require its reply, cleared activity indicator, and restored Send control.
5. Run the consecutive-turn journey below, then reload and confirm that replies remain.

## Driving it with verify-mcode

Expand All @@ -32,6 +33,28 @@ This fixture checks the production Codex event boundary, not a real model run or

## Runtime checks

### Consecutive turns and navigation

In the owned Electron app, select a real provider and model and create a direct
task under `.dev/fixture-repo`. Record its ID before proceeding.

1. Send a short prompt, wait for completion, then send a second prompt in the
same task. Require both replies and a restored Send control after each turn.
2. Send a longer follow-up. After assistant text starts streaming, switch to
another fixture task and back before completion. Capture active runtime state
before leaving, while away, and after returning. The response must continue
and finish once, without cancellation or text appearing in the other task.
3. Send another follow-up after navigation. Require a completed public runtime,
no Stop control or thinking indicator, and no reactivation for 40 seconds.
4. Reload, reopen the same task, verify the durable replies through
`conversation.page`, and send one more follow-up to completion.
5. Save a video of the mid-turn switch, settled screenshots, terminal outcomes,
provider/model, and exact owned IDs. Delete only the tasks created for proof.

A first-turn server receipt does not cover this journey. Compare desktop state
with the public runtime from that desktop's server; its isolated database can
differ from the worktree server. Report which providers were actually exercised.

Run `runtime health`, then run:

```sh
Expand Down
2 changes: 1 addition & 1 deletion .agents/skills/verify-mcode/scripts/runtime.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const FOCUSED_TEST_FILES = [
"src/features/agents/turns/__tests__/turn-event-sink.test.ts",
"src/features/agents/turns/__tests__/turn-finalizer.test.ts",
"src/features/agents/turns/__tests__/turn-runtime.test.ts",
"src/features/agents/canonical/__tests__/canonical-agent-event-sink.test.ts",
"src/features/agents/canonical/__tests__/canonical-agent-boundary.test.ts",
"src/features/agents/collaboration/adapters/__tests__/codex-collaboration-event-adapter.test.ts",
"src/features/providers/composition/__tests__/provider-event-ingress.test.ts",
"src/features/projects/git/__tests__/git-repository-fetch.test.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { afterEach, describe, expect, it } from "vitest";
import * as NodeChildProcess from "node:child_process";
import * as NodeFSPromises from "node:fs/promises";
import * as NodeOS from "node:os";
import * as NodePath from "node:path";
Expand All @@ -24,6 +25,8 @@ describe("buildServerRuntimeBundles", () => {
const serverOutFile = NodePath.join(outputRoot, "server.cjs");
const ptyHostOutFile = NodePath.join(outputRoot, "pty-host.cjs");
const providerEventWorkerOutFile = NodePath.join(outputRoot, "provider-event.worker.cjs");
const canonicalWriterWorkerOutFile = NodePath.join(outputRoot, "canonical-agent-writer.worker.cjs");
const executionWorkerOutFile = NodePath.join(outputRoot, "execution.worker.cjs");

try {
compileServerWithSwc(serverRoot);
Expand All @@ -36,7 +39,11 @@ describe("buildServerRuntimeBundles", () => {

expect(() => new NodeVM.Script(bundledEntry, { filename: "server.cjs" })).not.toThrow();
await NodeFSPromises.access(providerEventWorkerOutFile);
await NodeFSPromises.access(canonicalWriterWorkerOutFile);
await NodeFSPromises.access(executionWorkerOutFile);
expect(await NodeFSPromises.readFile(executionWorkerOutFile, "utf8")).toContain("writer-request");
expect(await NodeFSPromises.readFile(serverOutFile, "utf8")).toContain("provider-event.worker.cjs");
expect(startAndCloseBundledWorker(executionWorkerOutFile)).toBe("ready,closed");
} finally {
await NodeFSPromises.rm(outputRoot, { recursive: true, force: true });
await NodeFSPromises.rm(distTsc, { recursive: true, force: true });
Expand All @@ -63,17 +70,39 @@ describe("buildServerRuntimeBundles", () => {
"composition",
"provider-event.worker.js",
);
const canonicalWriterWorkerEntry = NodePath.join(
serverRoot,
"dist-tsc",
"features",
"agents",
"canonical",
"canonical-agent-writer.worker.js",
);
const executionWorkerEntry = NodePath.join(
serverRoot,
"dist-tsc",
"features",
"agents",
"execution",
"execution.worker.js",
);
const serverOutFile = NodePath.join(fixtureRoot, "dist", "server.cjs");
const ptyHostOutFile = NodePath.join(fixtureRoot, "dist", "pty-host.cjs");
const providerEventWorkerOutFile = NodePath.join(fixtureRoot, "dist", "provider-event.worker.cjs");
const canonicalWriterWorkerOutFile = NodePath.join(fixtureRoot, "dist", "canonical-agent-writer.worker.cjs");
const executionWorkerOutFile = NodePath.join(fixtureRoot, "dist", "execution.worker.cjs");

await Promise.all([
NodeFSPromises.mkdir(NodePath.dirname(ptyHostEntry), { recursive: true }),
NodeFSPromises.mkdir(NodePath.dirname(providerEventWorkerEntry), { recursive: true }),
NodeFSPromises.mkdir(NodePath.dirname(canonicalWriterWorkerEntry), { recursive: true }),
NodeFSPromises.mkdir(NodePath.dirname(executionWorkerEntry), { recursive: true }),
]);
await NodeFSPromises.writeFile(serverEntry, 'console.log("server-entry");\n');
await NodeFSPromises.writeFile(ptyHostEntry, 'console.log("pty-host-entry");\n');
await NodeFSPromises.writeFile(providerEventWorkerEntry, 'console.log("provider-event-worker");\n');
await NodeFSPromises.writeFile(canonicalWriterWorkerEntry, 'console.log("canonical-writer-worker");\n');
await NodeFSPromises.writeFile(executionWorkerEntry, 'console.log("execution-worker");\n');

await buildServerRuntimeBundles({
serverRoot,
Expand All @@ -85,8 +114,36 @@ describe("buildServerRuntimeBundles", () => {
await NodeFSPromises.access(serverOutFile);
await NodeFSPromises.access(ptyHostOutFile);
await NodeFSPromises.access(providerEventWorkerOutFile);
await NodeFSPromises.access(canonicalWriterWorkerOutFile);
await NodeFSPromises.access(executionWorkerOutFile);
expect(await NodeFSPromises.readFile(serverOutFile, "utf8")).toContain("server-entry");
expect(await NodeFSPromises.readFile(ptyHostOutFile, "utf8")).toContain("pty-host-entry");
expect(await NodeFSPromises.readFile(providerEventWorkerOutFile, "utf8")).toContain("provider-event-worker");
expect(await NodeFSPromises.readFile(canonicalWriterWorkerOutFile, "utf8")).toContain("canonical-writer-worker");
expect(await NodeFSPromises.readFile(executionWorkerOutFile, "utf8")).toContain("execution-worker");
}, 30_000);
});

function startAndCloseBundledWorker(workerPath) {
const script = `
import { pathToFileURL } from "node:url";
const worker = new Worker(pathToFileURL(process.env.MCODE_TEST_EXECUTION_WORKER), { type: "module", ref: true });
const received = [];
const timer = setTimeout(() => { worker.terminate(); process.exit(1); }, 3000);
worker.onmessage = (event) => {
received.push(event.data.kind);
if (event.data.kind === "ready") worker.postMessage({ kind: "close" });
if (event.data.kind === "closed") {
clearTimeout(timer);
worker.terminate();
process.stdout.write(received.join(","));
}
};
worker.onerror = () => { clearTimeout(timer); process.exit(1); };
`;
return NodeChildProcess.execFileSync("bun", ["-e", script], {
encoding: "utf8",
timeout: 5_000,
env: { ...process.env, MCODE_TEST_EXECUTION_WORKER: workerPath },
});
}
2 changes: 1 addition & 1 deletion apps/desktop/scripts/build-main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ await buildServerRuntimeBundles({
production: true,
});

console.log("Server bundles complete: dist/server/server.cjs, dist/server/pty-host.cjs");
console.log("Server bundles complete: dist/server/server.cjs, dist/server/pty-host.cjs, dist/server/execution.worker.cjs");

const drizzleSrc = NodePath.resolve(serverRoot, "drizzle");
const drizzleDst = NodePath.resolve(desktopRoot, "dist/server/drizzle");
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/scripts/dev-electron.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ const serverEsbuildCfg = {
...shared,
entryPoints: [NodePath.resolve(serverRoot, "dist-tsc/index.js")],
outfile: serverOutFile,
external: ["bun:sqlite", "node-pty", "electron", "koffi"],
external: ["bun", "bun:sqlite", "node-pty", "electron", "koffi"],
banner: {
js: 'var __importMetaUrl = require("url").pathToFileURL(__filename).href;',
},
Expand Down
10 changes: 10 additions & 0 deletions apps/server/drizzle/0065_ambitious_blindfold.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CREATE TABLE `canonical_writer_operation_receipts` (
`execution_id` text NOT NULL,
`operation_id` text NOT NULL,
`kind` text NOT NULL,
`input_hash` text NOT NULL,
`receipt_json` text NOT NULL,
`created_at` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL,
PRIMARY KEY(`execution_id`, `operation_id`),
FOREIGN KEY (`execution_id`) REFERENCES `canonical_agent_turns`(`execution_id`) ON UPDATE no action ON DELETE cascade
);
5 changes: 5 additions & 0 deletions apps/server/drizzle/0066_fat_amazoness.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CREATE TABLE `canonical_writer_live_publication_heads` (
`thread_id` text PRIMARY KEY NOT NULL,
`last_sequence` integer NOT NULL,
FOREIGN KEY (`thread_id`) REFERENCES `threads`(`id`) ON UPDATE no action ON DELETE cascade
);
Loading
Loading