Skip to content

Add queued inbox message modes for agents#4290

Draft
samwillis wants to merge 4 commits intomainfrom
samwillis/agents-inbox-message-modes-plan
Draft

Add queued inbox message modes for agents#4290
samwillis wants to merge 4 commits intomainfrom
samwillis/agents-inbox-message-modes-plan

Conversation

@samwillis
Copy link
Copy Markdown
Contributor

Summary

  • Add first-class inbox message delivery modes (queued, steer, and paused) with pending/processed/cancelled status metadata across the agents runtime and server APIs.
  • Promote queued inbox messages one at a time in the runtime, pause at edited messages, and avoid deleted/cancelled lifecycle events waking agents as runnable prompts.
  • Add the agents UI queued-message drawer with edit/delete/steer/reorder controls, fractional queue positions, and inline optimistic display for idle queued sends.

Test plan

  • pnpm -C packages/agents-runtime typecheck
  • pnpm -C packages/agents-server typecheck
  • pnpm -C packages/agents-server-ui typecheck
  • Browser smoke tested http://localhost:5173/__agent_ui/ for queued sends, inline idle optimistic display, and Horton generation.

Made with Cursor

samwillis and others added 4 commits May 7, 2026 18:20
Co-authored-by: Cursor <cursoragent@cursor.com>
Add runtime-backed inbox queue modes with editable pending messages, queue draining, steer support, and a shared drawer UI so prompts are processed predictably across clients.

Co-authored-by: Cursor <cursoragent@cursor.com>
Pause the queue head while a pending message is edited and resume processing when it returns to queued mode.

Co-authored-by: Cursor <cursoragent@cursor.com>
Always send inbox prompts as queued while projecting idle optimistic sends directly into the chat until the runtime processes them.

Co-authored-by: Cursor <cursoragent@cursor.com>
@samwillis samwillis marked this pull request as draft May 7, 2026 20:01
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

❌ 58 Tests Failed:

Tests completed Failed Passed Skipped
1442 58 1384 2
View the top 3 failed test(s) by shortest run time
test/process-wake.test.ts > processWake > prefers the newest actionable catch-up event when reconstructing the wake event
Stack Traces | 0.00152s run time
AssertionError: expected [ 'inbox' ] to deeply equal [ 'message_received' ]

- Expected
+ Received

  [
-   "message_received",
+   "inbox",
  ]

 ❯ test/process-wake.test.ts:1758:23
test/runtime-dsl.test.ts > C: state collections > C1: ctx.state inserts are reflected in full stream history
Stack Traces | 0.043s run time
Error: Snapshot `C: state collections > C1: ctx.state inserts are reflected in full stream history > entity history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "state-writer-c1",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
+     "key": "msg-in-1778184262660-ohhrf6",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
-     "payload": "go",
+       "payload": "go",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:04:22.660Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:04:22.660Z",
+     },
    },
    {
      "key": "item-1",
      "operation": "insert",
      "type": "state:items",

 ❯ test/runtime-dsl.test.ts:3094:37
test/runtime-dsl.test.ts > D: shared state > D2: shared state stream exists even before any writes
Stack Traces | 0.0434s run time
Error: Snapshot `D: shared state > D2: shared state stream exists even before any writes > entity history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "ss-creator2-d2",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "go",
+     "key": "msg-in-1778184262837-mnbppi",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "go",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:04:22.837Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:04:22.837Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:3139:37
test/runtime-dsl.test.ts > C: state collections > C2: setup-initialized state remains visible in final history
Stack Traces | 0.0443s run time
Error: Snapshot `C: state collections > C2: setup-initialized state remains visible in final history > entity history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "status-entity-c2",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
+     "key": "msg-in-1778184262704-eeisqf",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
-     "payload": "go",
+       "payload": "go",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:04:22.704Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:04:22.704Z",
+     },
    },
    {
      "key": "current",
      "operation": "insert",
      "type": "state:status",

 ❯ test/runtime-dsl.test.ts:3102:37
test/runtime-dsl.test.ts > B: spawn mechanics > B4: spawn marks the child manifest row as observed
Stack Traces | 0.0446s run time
Error: Snapshot `B: spawn mechanics > B4: spawn marks the child manifest row as observed > entity history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "obs-parent-b4",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "go",
+     "key": "msg-in-1778184262617-b7d4da",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "go",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:04:22.617Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:04:22.617Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:3084:37
test/runtime-dsl.test.ts > D: shared state > D1: mkdb produces entity history with a manifest entry
Stack Traces | 0.0447s run time
Error: Snapshot `D: shared state > D1: mkdb produces entity history with a manifest entry > entity history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "ss-creator-d1",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "go",
+     "key": "msg-in-1778184262793-dn3pjc",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "go",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:04:22.793Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:04:22.793Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:3129:37
test/runtime-dsl.test.ts > C: state collections > C3: self-authored state writes do not trigger a second run
Stack Traces | 0.0448s run time
Error: Snapshot `C: state collections > C3: self-authored state writes do not trigger a second run > entity history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "state-loop-c3",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "save",
+     "key": "msg-in-1778184262748-470ahz",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "save",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:04:22.748Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:04:22.748Z",
+     },
    },
    {
      "key": "note-1",
      "operation": "insert",
      "type": "state:notes",

 ❯ test/runtime-dsl.test.ts:3119:37
test/runtime-dsl.test.ts > A: basic entity lifecycle > A10: async tool completion preserves a single clean run history
Stack Traces | 0.0456s run time
Error: Snapshot `A: basic entity lifecycle > A10: async tool completion preserves a single clean run history > entity history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "toolful-a9",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
+     "key": "msg-in-1778184202208-xrju3h",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
-     "payload": "async_lookup widget-7",
+       "payload": "async_lookup widget-7",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:03:22.208Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:03:22.208Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:2954:37
test/runtime-dsl.test.ts > D: shared state > D3: writes to shared state are reflected in both histories
Stack Traces | 0.0466s run time
Error: Snapshot `D: shared state > D3: writes to shared state are reflected in both histories > entity history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "ss-writer-d3",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "write something",
+     "key": "msg-in-1778184262881-yb6twb",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "write something",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:04:22.881Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:04:22.881Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:3151:37
test/runtime-dsl.test.ts > A: basic entity lifecycle > A8: manifest history includes the configured agent
Stack Traces | 0.0488s run time
Error: Snapshot `A: basic entity lifecycle > A8: manifest history includes the configured agent > entity history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "manifested-a8",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "go",
+     "key": "msg-in-1778184202108-kcl3kb",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "go",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:03:22.108Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:03:22.108Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:2918:37
test/runtime-dsl.test.ts > A: basic entity lifecycle > A11: repeated tool calls keep ordering stable and use the last result
Stack Traces | 0.0497s run time
Error: Snapshot `A: basic entity lifecycle > A11: repeated tool calls keep ordering stable and use the last result > entity history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "toolful-a9",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "sync_echo first && sync_echo second",
+     "key": "msg-in-1778184202255-bqsnbo",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "sync_echo first && sync_echo second",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:03:22.255Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:03:22.255Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:2971:37
test/runtime-dsl.test.ts > A: basic entity lifecycle > A4: agent text output is reflected in the final history
Stack Traces | 0.0499s run time
Error: Snapshot `A: basic entity lifecycle > A4: agent text output is reflected in the final history > entity history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "texter-a4",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "go",
+     "key": "msg-in-1778184171859-gjkwiq",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "go",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:02:51.859Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:02:51.859Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:2861:37
test/runtime-dsl.test.ts > A: basic entity lifecycle > A13: failing tools close the run cleanly with durable failure history
Stack Traces | 0.0509s run time
Error: Snapshot `A: basic entity lifecycle > A13: failing tools close the run cleanly with durable failure history > entity history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "toolful-a9",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "fail_tool deterministic-boom",
+     "key": "msg-in-1778184202398-654uxt",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "fail_tool deterministic-boom",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:03:22.398Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:03:22.398Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:3016:37
test/runtime-dsl.test.ts > A: basic entity lifecycle > A9: sync tool calls appear in-order within one completed run
Stack Traces | 0.0518s run time
Error: Snapshot `A: basic entity lifecycle > A9: sync tool calls appear in-order within one completed run > entity history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "toolful-a9",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "sync_echo hello tool",
+     "key": "msg-in-1778184202157-6dn37p",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "sync_echo hello tool",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:03:22.157Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:03:22.157Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:2939:37
test/runtime-dsl.test.ts > A: basic entity lifecycle > A7: setup state writes appear before the run history
Stack Traces | 0.0542s run time
Error: Snapshot `A: basic entity lifecycle > A7: setup state writes appear before the run history > entity history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "stateful-a7",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
+     "key": "msg-in-1778184202055-xeho7r",
      "operation": "insert",
-     "payload": "go",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "go",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:03:22.055Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:03:22.055Z",
+     },
    },
    {
      "key": "current",
      "operation": "insert",
      "type": "state:status",

 ❯ test/runtime-dsl.test.ts:2910:32
test/runtime-dsl.test.ts > A: basic entity lifecycle > A3: single message produces a full run history
Stack Traces | 0.0578s run time
Error: Snapshot `A: basic entity lifecycle > A3: single message produces a full run history > entity history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "runner-a3",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "hello",
+     "key": "msg-in-1778184171801-5nmd0n",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "hello",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:02:51.801Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:02:51.801Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:2852:37
test/runtime-dsl.test.ts > A: basic entity lifecycle > A2: spawn with initial message writes inbox history before any run
Stack Traces | 0.0651s run time
AssertionError: expected +0 to be 1 // Object.is equality

- Expected
+ Received

- 1
+ 0

 ❯ test/runtime-dsl.test.ts:2836:47
test/runtime-dsl.test.ts > H: pipeline sequencing > H1: pipeline writes its state row during the first wake before stage execution
Stack Traces | 0.0686s run time
Error: Snapshot `H: pipeline sequencing > H1: pipeline writes its state row during the first wake before stage execution > entity history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "pipeline-h1",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
+     "key": "msg-in-1778184475801-5b3rm5",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
-     "payload": "run_pipeline seed :: stage-one",
+       "payload": "run_pipeline seed :: stage-one",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:07:55.801Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:07:55.801Z",
+     },
    },
    {
      "key": "current",
      "operation": "insert",
      "type": "state:status",

 ❯ test/runtime-dsl.test.ts:4749:37
test/runtime-dsl.test.ts > G: map-reduce ordering > G2: map-reduce with one chunk still uses the orchestration path
Stack Traces | 0.0704s run time
AssertionError: expected undefined to match object { payload: 'summarize:only-one' }

- Expected: 
{
  "payload": "summarize:only-one",
}

+ Received: 
undefined

 ❯ test/runtime-dsl.test.ts:4632:7
test/runtime-dsl.test.ts > D: shared state > D9: a setup-registered shared-state effect fires on the first wake write and survives a later wake
Stack Traces | 0.0754s run time
Error: Snapshot `D: shared state > D9: a setup-registered shared-state effect fires on the first wake write and survives a later wake > entity history 1` mismatched

- Expected
+ Received

@@ -6,14 +6,18 @@
      "entityType": "ss-effect-d9",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "spawn",
-     "operation": "insert",
-     "payload": "insert art-1 Alpha|First body",
+     "key": "msg-in-1778184263518-2d0701",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "spawn",
+       "payload": "insert art-1 Alpha|First body",
-     "type": "message_received",
+       "timestamp": "2026-05-07T20:04:23.518Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",
@@ -110,14 +114,21 @@
      },
      "operation": "insert",
      "type": "manifest",
    },
    {
-     "from": "user",
-     "operation": "insert",
+     "key": "msg-in-1778184263553-mq9gn2",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
-     "payload": "read art-1",
+       "payload": "read art-1",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:04:23.553Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:04:23.553Z",
+     },
    },
    {
      "key": "run-1",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:3444:37
test/runtime-dsl.test.ts > N: wake primitives verification > N1: WakeEvent type is "wake" when parent is re-woken by child completion
Stack Traces | 0.0755s run time
AssertionError: expected 'inbox' to be 'message_received' // Object.is equality

Expected: "message_received"
Received: "inbox"

 ❯ test/runtime-dsl.test.ts:6266:41
test/runtime-dsl.test.ts > B: spawn mechanics > B3: spawn manifest history includes the resolved entityUrl
Stack Traces | 0.078s run time
Error: Snapshot `B: spawn mechanics > B3: spawn manifest history includes the resolved entityUrl > entity history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "spawner-b3",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "go",
+     "key": "msg-in-1778184262541-ql07bm",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "go",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:04:22.541Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:04:22.541Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:3076:37
test/runtime-dsl.test.ts > F: coordination orchestration > F1: dispatcher routes to the requested specialist type and records the child
Stack Traces | 0.0782s run time
Error: Snapshot `F: coordination orchestration > F1: dispatcher routes to the requested specialist type and records the child > parent history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "dispatcher-f1",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "dispatch assistant hello routing",
+     "key": "msg-in-1778184294561-7oyihx",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "dispatch assistant hello routing",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:04:54.561Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:04:54.561Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:3825:7
test/runtime-dsl.test.ts > M: deep researcher coordination > M1: researcher workers start from spawn initialMessage without an extra send
Stack Traces | 0.081s run time
AssertionError: expected +0 to be 1 // Object.is equality

- Expected
+ Received

- 1
+ 0

 ❯ test/runtime-dsl.test.ts:4992:54
test/runtime-dsl.test.ts > A: basic entity lifecycle > A5: multiple messages produce two completed runs
Stack Traces | 0.0874s run time
Error: Snapshot `A: basic entity lifecycle > A5: multiple messages produce two completed runs > entity history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "multi-a5",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
+     "key": "msg-in-1778184171909-ae3h2b",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
-     "payload": "msg 1",
+       "payload": "msg 1",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:02:51.909Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:02:51.909Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",
@@ -58,14 +65,21 @@
      "operation": "update",
      "status": "completed",
      "type": "run",
    },
    {
-     "from": "user",
-     "operation": "insert",
+     "key": "msg-in-1778184171948-mzu0lc",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
-     "payload": "msg 2",
+       "payload": "msg 2",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:02:51.948Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:02:51.948Z",
+     },
    },
    {
      "key": "run-1",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:2872:37
test/runtime-dsl.test.ts > D: shared state > D4: a second entity can connect to existing shared state and read prior rows
Stack Traces | 0.0877s run time
AssertionError: expected [] to deeply equal [ 'insert art-1 Alpha|First body' ]

- Expected
+ Received

- [
-   "insert art-1 Alpha|First body",
- ]
+ []

 ❯ test/runtime-dsl.test.ts:3185:7
test/runtime-dsl.test.ts > A: basic entity lifecycle > A14: an entity can recover from a failed tool call in a later run
Stack Traces | 0.0892s run time
Error: Snapshot `A: basic entity lifecycle > A14: an entity can recover from a failed tool call in a later run > entity history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "toolful-a9",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "fail_tool deterministic-boom",
+     "key": "msg-in-1778184202447-b14aaj",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "fail_tool deterministic-boom",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:03:22.447Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:03:22.447Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",
@@ -79,14 +86,21 @@
      "operation": "update",
      "status": "completed",
      "type": "run",
    },
    {
-     "from": "user",
-     "operation": "insert",
+     "key": "msg-in-1778184202486-yhvnq2",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
-     "payload": "sync_echo recovered",
+       "payload": "sync_echo recovered",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:03:22.486Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:03:22.486Z",
+     },
    },
    {
      "key": "run-1",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:3041:37
test/runtime-dsl.test.ts > D: shared state > D6: multi-collection shared state stays consistent across writer and reader entities
Stack Traces | 0.0898s run time
Error: Snapshot `D: shared state > D6: multi-collection shared state stays consistent across writer and reader entities > writer history 1` mismatched

- Expected
+ Received

@@ -6,14 +6,21 @@
      "entityType": "ss-writer-d6",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "write_article art-1 Alpha|First body && write_comment c-1 art-1|Looks good",
+     "key": "msg-in-1778184263161-72s1ui",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "write_article art-1 Alpha|First body && write_comment c-1 art-1|Looks good",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:04:23.161Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:04:23.161Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:3306:37
test/runtime-dsl.test.ts > A: basic entity lifecycle > A12: stateful note writes persist across wakes and can be read later
Stack Traces | 0.093s run time
Error: Snapshot `A: basic entity lifecycle > A12: stateful note writes persist across wakes and can be read later > entity history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "toolful-a9",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
+     "key": "msg-in-1778184202304-773o8u",
      "operation": "insert",
-     "payload": "stateful_note write memo-1 first draft",
-     "type": "message_received",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "stateful_note write memo-1 first draft",
+       "processed_at": "2026-05-07T20:03:22.304Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:03:22.304Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",
@@ -92,14 +99,21 @@
      "operation": "update",
      "status": "completed",
      "type": "run",
    },
    {
-     "from": "user",
-     "operation": "insert",
+     "key": "msg-in-1778184202347-eiuucf",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
-     "payload": "stateful_note read memo-1",
+       "payload": "stateful_note read memo-1",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:03:22.347Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:03:22.347Z",
+     },
    },
    {
      "key": "run-1",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:3002:37
test/runtime-dsl.test.ts > G: map-reduce ordering > G1: map-reduce returns results in chunk order even when completions differ
Stack Traces | 0.12s run time
Error: Snapshot `G: map-reduce ordering > G1: map-reduce returns results in chunk order even when completions differ > parent history 1` mismatched

- Expected
+ Received

@@ -4,16 +4,10 @@
      "entityType": "map-reduce-g1",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "map_chunks summarize :: alpha@30|beta@0|gamma@10",
-     "type": "message_received",
-   },
-   {
      "key": "current",
      "operation": "insert",
      "type": "state:status",
      "value": {
        "key": "current",

 ❯ test/runtime-dsl.test.ts:4590:7
test/runtime-dsl.test.ts > K: wiki coordination > K1: wiki specialists accumulate shared articles that a later query can read
Stack Traces | 0.123s run time
Error: Snapshot `K: wiki coordination > K1: wiki specialists accumulate shared articles that a later query can read > parent history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "wiki-parent-k1",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "create_wiki Durable Streams :: History|Applications",
+     "key": "msg-in-1778184477697-6koihz",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "create_wiki Durable Streams :: History|Applications",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:07:57.697Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:07:57.697Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",
@@ -182,14 +189,21 @@
      },
      "operation": "insert",
      "type": "manifest",
    },
    {
-     "from": "user",
-     "operation": "insert",
+     "key": "msg-in-1778184477769-bqy4mk",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
-     "payload": "query_wiki Durable Streams",
+       "payload": "query_wiki Durable Streams",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:07:57.769Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:07:57.769Z",
+     },
    },
    {
      "key": "run-1",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:5494:37
test/runtime-dsl.test.ts > J: debate coordination > J1: debate parent reads both sides from shared state before issuing a ruling
Stack Traces | 0.123s run time
AssertionError: expected +0 to be 1 // Object.is equality

- Expected
+ Received

- 1
+ 0

 ❯ test/runtime-dsl.test.ts:5349:7
test/runtime-dsl.test.ts > D: shared state > D10: separate entities can contribute to different collections in one shared state
Stack Traces | 0.133s run time
Error: Snapshot `D: shared state > D10: separate entities can contribute to different collections in one shared state > writer A history 1` mismatched

- Expected
+ Received

@@ -6,14 +6,21 @@
      "entityType": "ss-writer-d6",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "write_article art-1 Alpha|First body",
+     "key": "msg-in-1778184263605-832gyw",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "write_article art-1 Alpha|First body",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:04:23.605Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:04:23.605Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:3489:38
test/runtime-dsl.test.ts > D: shared state > D8: a later writer can overwrite a shared row and a new reader sees the latest value
Stack Traces | 0.135s run time
Error: Snapshot `D: shared state > D8: a later writer can overwrite a shared row and a new reader sees the latest value > writer A history 1` mismatched

- Expected
+ Received

@@ -6,14 +6,21 @@
      "entityType": "ss-creator-d4",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "insert art-1 Alpha|First body",
+     "key": "msg-in-1778184263396-yvqns6",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "insert art-1 Alpha|First body",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:04:23.396Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:04:23.396Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:3395:38
test/runtime-dsl.test.ts > H: pipeline sequencing > H2: pipeline feeds each stage the previous stage output and persists final state
Stack Traces | 0.136s run time
Error: Snapshot `H: pipeline sequencing > H2: pipeline feeds each stage the previous stage output and persists final state > parent history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "pipeline-h1",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
+     "key": "msg-in-1778184475870-w72m3r",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
-     "payload": "run_pipeline seed :: stage-one|stage-two|stage-three",
+       "payload": "run_pipeline seed :: stage-one|stage-two|stage-three",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:07:55.870Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:07:55.870Z",
+     },
    },
    {
      "key": "current",
      "operation": "insert",
      "type": "state:status",

 ❯ test/runtime-dsl.test.ts:4778:37
test/runtime-dsl.test.ts > D: shared state > D7: multiple entities can contribute durable rows to the same shared collection
Stack Traces | 0.136s run time
Error: Snapshot `D: shared state > D7: multiple entities can contribute durable rows to the same shared collection > writer A history 1` mismatched

- Expected
+ Received

@@ -6,14 +6,21 @@
      "entityType": "ss-creator-d4",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "insert art-1 Alpha|First body",
+     "key": "msg-in-1778184263259-6vgq8h",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "insert art-1 Alpha|First body",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:04:23.259Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:04:23.259Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:3341:38
test/runtime-dsl.test.ts > D: shared state > D5: shared state update and delete events remain durable across wakes
Stack Traces | 0.145s run time
AssertionError: expected [] to deeply equal [ …(3) ]

- Expected
+ Received

- [
-   "insert art-1 Alpha|First body",
-   "update art-1 Beta|Second body",
-   "delete art-1",
- ]
+ []

 ❯ test/runtime-dsl.test.ts:3252:7
test/process-wake.test.ts > processWake > continues in-process when a new message arrives after the first handler pass
Stack Traces | 0.164s run time
AssertionError: expected [ 'message_received', 'inbox' ] to deeply equal [ 'message_received', …(1) ]

- Expected
+ Received

  [
    "message_received",
-   "message_received",
+   "inbox",
  ]

 ❯ test/process-wake.test.ts:994:23
test/runtime-dsl.test.ts > I: peer review coordination > I1: peer review aggregates three reviewer writes through shared state
Stack Traces | 0.165s run time
Error: Snapshot `I: peer review coordination > I1: peer review aggregates three reviewer writes through shared state > parent history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "peer-review-i1",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "start_review launch checklist",
+     "key": "msg-in-1778184476986-okh85n",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "start_review launch checklist",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:07:56.986Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:07:56.986Z",
+     },
    },
    {
      "key": "current",
      "operation": "insert",
      "type": "state:status",
@@ -204,14 +211,21 @@
      },
      "operation": "insert",
      "type": "manifest",
    },
    {
-     "from": "user",
-     "operation": "insert",
+     "key": "msg-in-1778184477097-0igf7z",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
-     "payload": "summarize_reviews",
+       "payload": "summarize_reviews",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:07:57.097Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:07:57.097Z",
+     },
    },
    {
      "key": "run-1",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:5165:37
test/runtime-dsl.test.ts > E: observation replay > E2: updating an observed row preserves a single derived row key
Stack Traces | 0.192s run time
Error: Snapshot `E: observation replay > E2: updating an observed row preserves a single derived row key > child history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "observed-child-e1",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
+     "key": "msg-in-1778184294225-tg10i4",
      "operation": "insert",
-     "payload": "insert item-1 alpha",
-     "type": "message_received",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "insert item-1 alpha",
+       "processed_at": "2026-05-07T20:04:54.225Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:04:54.225Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",
@@ -67,14 +74,21 @@
      "operation": "update",
      "status": "completed",
      "type": "run",
    },
    {
-     "from": "user",
-     "operation": "insert",
+     "key": "msg-in-1778184294289-tje56b",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
-     "payload": "update item-1 beta",
+       "payload": "update item-1 beta",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:04:54.289Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:04:54.289Z",
+     },
    },
    {
      "key": "run-1",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:3743:36
test/runtime-dsl.test.ts > E: observation replay > E3: an observed row update is replayed as an update, not a second insert
Stack Traces | 0.193s run time
Error: Snapshot `E: observation replay > E3: an observed row update is replayed as an update, not a second insert > child history 1` mismatched

- Expected
+ Received

@@ -4,14 +4,21 @@
      "entityType": "observed-child-e1",
      "operation": "insert",
      "type": "entity_created",
    },
    {
-     "from": "user",
-     "operation": "insert",
-     "payload": "insert item-1 alpha",
+     "key": "msg-in-1778184294416-5dwph9",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
+       "payload": "insert item-1 alpha",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:04:54.416Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:04:54.416Z",
+     },
    },
    {
      "key": "run-0",
      "operation": "insert",
      "status": "started",
@@ -67,14 +74,21 @@
      "operation": "update",
      "status": "completed",
      "type": "run",
    },
    {
-     "from": "user",
-     "operation": "insert",
+     "key": "msg-in-1778184294484-yba0m7",
+     "operation": "insert",
+     "type": "inbox",
+     "value": {
+       "from": "user",
+       "mode": "immediate",
-     "payload": "update item-1 beta",
+       "payload": "update item-1 beta",
-     "type": "message_received",
+       "processed_at": "2026-05-07T20:04:54.484Z",
+       "status": "processed",
+       "timestamp": "2026-05-07T20:04:54.484Z",
+     },
    },
    {
      "key": "run-1",
      "operation": "insert",
      "status": "started",

 ❯ test/runtime-dsl.test.ts:3798:36
test/scheduler-integration.test.ts > Scheduler Integration > manifest future_send updates replace pending task and settle to sent
Stack Traces | 6.12s run time
Error: Timed out after 6000ms
 ❯ waitFor test/test-utils.ts:31:9
 ❯ test/scheduler-integration.test.ts:209:5
test/scheduler-integration.test.ts > Scheduler Integration > delayed_send survives server restart and lands exactly once
Stack Traces | 6.15s run time
Error: Timed out after 6000ms
 ❯ waitFor test/test-utils.ts:31:9
 ❯ test/scheduler-integration.test.ts:108:5
test/runtime-dsl.test.ts > L: reactive observation flows > L1: explicit observe plus createEffect forwards insert, update, and delete notices
Stack Traces | 30s run time
Error: Test timed out in 30000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
 ❯ test/runtime-dsl.test.ts:5954:3
test/runtime-dsl.test.ts > E: observation replay > E1: observed effects do not duplicate old child rows after parent re-wake
Stack Traces | 30s run time
Error: Test timed out in 30000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
 ❯ test/runtime-dsl.test.ts:3648:3
test/runtime-dsl.test.ts > B: spawn mechanics > B1: spawn creates a child entity that can receive messages
Stack Traces | 30s run time
Error: Test timed out in 30000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
 ❯ test/runtime-dsl.test.ts:3046:3
test/runtime-dsl.test.ts > L: reactive observation flows > L4: watching the same child twice stays deduped
Stack Traces | 30s run time
Error: Test timed out in 30000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
 ❯ test/runtime-dsl.test.ts:6137:3
test/runtime-dsl.test.ts > L: reactive observation flows > L5: one watcher can observe multiple children and preserve source attribution
Stack Traces | 30s run time
Error: Test timed out in 30000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
 ❯ test/runtime-dsl.test.ts:6187:3
test/runtime-dsl.test.ts > F: coordination orchestration > F6: wait_for_all before spawning perspectives returns the documented error path
Stack Traces | 30s run time
Error: Test timed out in 30000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
 ❯ test/runtime-dsl.test.ts:4042:3
test/runtime-dsl.test.ts > A: basic entity lifecycle > A6: agent-less entity records only inbound messages
Stack Traces | 30s run time
Error: Test timed out in 30000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
 ❯ test/runtime-dsl.test.ts:2896:3
test/runtime-dsl.test.ts > B: spawn mechanics > B2: spawn with initial message writes the child history
Stack Traces | 30s run time
Error: Test timed out in 30000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
 ❯ test/runtime-dsl.test.ts:3059:3
test/runtime-dsl.test.ts > F: coordination orchestration > F9: manager-worker records a targeted child failure and uses a placeholder only for that perspective
Stack Traces | 30s run time
Error: Expected 1 additional wake error(s), but they did not occur
 ❯ drainRuntimeWakes test/runtime-dsl.ts:588:15
 ❯ waitForRuntimeSettled test/runtime-dsl.ts:618:5
 ❯ Object.waitForSettled test/runtime-dsl.ts:931:7
 ❯ test/runtime-dsl.test.ts:2805:3
test/runtime-dsl.test.ts > F: coordination orchestration > F8: repeated spawn_perspectives reuses the same child streams for later questions
Stack Traces | 30s run time
Error: Timeout (30000ms) waiting for completed run on /manager-f2/manager-4
[
  {
    "args": {},
    "entityType": "manager-f2",
    "operation": "insert",
    "type": "entity_created"
  },
  {
    "key": "msg-in-1778184385011-a2bbg2",
    "operation": "insert",
    "type": "inbox",
    "value": {
      "from": "user",
      "mode": "immediate",
      "payload": "spawn_perspectives first question",
      "processed_at": "2026-05-07T20:06:25.011Z",
      "status": "processed",
      "timestamp": "2026-05-07T20:06:25.011Z"
    }
  },
  {
    "key": "current",
    "operation": "insert",
    "type": "state:status",
    "value": {
      "key": "current",
      "value": "idle"
    }
  }
]
 ❯ waitForHistory test/runtime-dsl.ts:661:11
 ❯ test/runtime-dsl.ts:766:37
 ❯ timeStep test/runtime-dsl.ts:238:12
 ❯ test/runtime-dsl.test.ts:4118:5
test/runtime-dsl.test.ts > F: coordination orchestration > F2: manager-worker spawns, observes, and later collects all perspectives in a stable order
Stack Traces | 30s run time
Error: Timeout (30000ms) waiting for completed run on /manager-f2/manager-1
[
  {
    "args": {},
    "entityType": "manager-f2",
    "operation": "insert",
    "type": "entity_created"
  },
  {
    "key": "msg-in-1778184294640-cvqzoo",
    "operation": "insert",
    "type": "inbox",
    "value": {
      "from": "user",
      "mode": "immediate",
      "payload": "spawn_perspectives Should we ship the feature?",
      "processed_at": "2026-05-07T20:04:54.640Z",
      "status": "processed",
      "timestamp": "2026-05-07T20:04:54.640Z"
    }
  },
  {
    "key": "current",
    "operation": "insert",
    "type": "state:status",
    "value": {
      "key": "current",
      "value": "idle"
    }
  }
]
 ❯ waitForHistory test/runtime-dsl.ts:661:11
 ❯ test/runtime-dsl.ts:766:37
 ❯ timeStep test/runtime-dsl.ts:238:12
 ❯ test/runtime-dsl.test.ts:3834:5
test/runtime-dsl.test.ts > L: reactive observation flows > L2: re-waking the watcher without new child changes does not duplicate prior observation notices
Stack Traces | 30s run time
Error: Timeout (30000ms) waiting for completed run on /observation-watcher-l1/watcher-l2
[
  {
    "args": {},
    "entityType": "observation-watcher-l1",
    "operation": "insert",
    "type": "entity_created"
  },
  {
    "key": "msg-in-1778184508772-81v46j",
    "operation": "insert",
    "type": "inbox",
    "value": {
      "from": "user",
      "mode": "immediate",
      "payload": "watch /observed-child-e1/child-l2",
      "processed_at": "2026-05-07T20:08:28.772Z",
      "status": "processed",
      "timestamp": "2026-05-07T20:08:28.772Z"
    }
  }
]
 ❯ waitForHistory test/runtime-dsl.ts:661:11
 ❯ test/runtime-dsl.ts:766:37
 ❯ timeStep test/runtime-dsl.ts:238:12
 ❯ test/runtime-dsl.test.ts:6020:5
test/runtime-dsl.test.ts > F: coordination orchestration > F10: manager-worker can retry after a targeted failure and later collect full results
Stack Traces | 30s run time
Error: Expected 1 additional wake error(s), but they did not occur
 ❯ drainRuntimeWakes test/runtime-dsl.ts:588:15
 ❯ waitForRuntimeSettled test/runtime-dsl.ts:618:5
 ❯ Object.waitForSettled test/runtime-dsl.ts:931:7
 ❯ test/runtime-dsl.test.ts:2805:3
test/runtime-dsl.test.ts > F: coordination orchestration > F7: manager-worker uses placeholders when every perspective child is silent
Stack Traces | 30s run time
Error: Timeout (30000ms) waiting for completed run on /manager-f2/manager-3
[
  {
    "args": {},
    "entityType": "manager-f2",
    "operation": "insert",
    "type": "entity_created"
  },
  {
    "key": "msg-in-1778184354972-ts2zm5",
    "operation": "insert",
    "type": "inbox",
    "value": {
      "from": "user",
      "mode": "immediate",
      "payload": "spawn_perspectives __silent__",
      "processed_at": "2026-05-07T20:05:54.972Z",
      "status": "processed",
      "timestamp": "2026-05-07T20:05:54.972Z"
    }
  },
  {
    "key": "current",
    "operation": "insert",
    "type": "state:status",
    "value": {
      "key": "current",
      "value": "idle"
    }
  }
]
 ❯ waitForHistory test/runtime-dsl.ts:661:11
 ❯ test/runtime-dsl.ts:766:37
 ❯ timeStep test/runtime-dsl.ts:238:12
 ❯ test/runtime-dsl.test.ts:4080:5
test/runtime-dsl.test.ts > L: reactive observation flows > L3: a child delete while the watcher is asleep replays as one delete notice
Stack Traces | 30s run time
Error: Timeout (30000ms) waiting for completed run on /observation-watcher-l1/watcher-l3
[
  {
    "args": {},
    "entityType": "observation-watcher-l1",
    "operation": "insert",
    "type": "entity_created"
  },
  {
    "key": "msg-in-1778184538814-g7ajgm",
    "operation": "insert",
    "type": "inbox",
    "value": {
      "from": "user",
      "mode": "immediate",
      "payload": "watch /observed-child-e1/child-l3",
      "processed_at": "2026-05-07T20:08:58.814Z",
      "status": "processed",
      "timestamp": "2026-05-07T20:08:58.814Z"
    }
  }
]
 ❯ waitForHistory test/runtime-dsl.ts:661:11
 ❯ test/runtime-dsl.ts:766:37
 ❯ timeStep test/runtime-dsl.ts:238:12
 ❯ test/runtime-dsl.test.ts:6079:5

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

wakeOffset: string
): string {
if (wakeEvent.type === `message_received`) {
if (wakeEvent.type === `inbox` || wakeEvent.type === `message_received`) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's completely remove message_recieved

collectionNameByEventType.set(def.type, name)
rowOffsetsByCollection.set(name, new Map())
}
// Back-compat for streams written before the inbox collection's event type
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems fine to have no backwards compatibility?

payload: unknown
timestamp: string
mode?: `immediate` | `queued` | `paused` | `steer`
status?: `pending` | `processed` | `cancelled`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not necessarily needed for this PR but I'm annoyed that these types still exist as I tried to derive everything from entity-schema.ts but missed this

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.

2 participants