| ... | @@ -17,7 +17,7 @@ const layer = it.layer( | ... | @@ -17,7 +17,7 @@ const layer = it.layer( |
| 17 | ); | 17 | ); |
| 18 | | 18 | |
| 19 | layer("OrchestrationEventStore", (it) => { | 19 | layer("OrchestrationEventStore", (it) => { |
| 20 | it.effect("stores json columns as strings and replays decoded events", () => | 20 | it.effect("stores json columns as strings and replays CLI-origin events", () => |
| 21 | Effect.gen(function* () { | 21 | Effect.gen(function* () { |
| 22 | const eventStore = yield* OrchestrationEventStore; | 22 | const eventStore = yield* OrchestrationEventStore; |
| 23 | const sql = yield* SqlClient.SqlClient; | 23 | const sql = yield* SqlClient.SqlClient; |
| ... | @@ -34,6 +34,9 @@ layer("OrchestrationEventStore", (it) => { | ... | @@ -34,6 +34,9 @@ layer("OrchestrationEventStore", (it) => { |
| 34 | correlationId: CommandId.make("cmd-store-roundtrip"), | 34 | correlationId: CommandId.make("cmd-store-roundtrip"), |
| 35 | metadata: { | 35 | metadata: { |
| 36 | adapterKey: "codex", | 36 | adapterKey: "codex", |
| | 37 | origin: { |
| | 38 | surface: "cli", |
| | 39 | }, |
| 37 | }, | 40 | }, |
| 38 | payload: { | 41 | payload: { |
| 39 | projectId: ProjectId.make("project-roundtrip"), | 42 | projectId: ProjectId.make("project-roundtrip"), |
| ... | @@ -66,6 +69,7 @@ layer("OrchestrationEventStore", (it) => { | ... | @@ -66,6 +69,7 @@ layer("OrchestrationEventStore", (it) => { |
| 66 | assert.equal(replayed.length, 1); | 69 | assert.equal(replayed.length, 1); |
| 67 | assert.equal(replayed[0]?.type, "project.created"); | 70 | assert.equal(replayed[0]?.type, "project.created"); |
| 68 | assert.equal(replayed[0]?.metadata.adapterKey, "codex"); | 71 | assert.equal(replayed[0]?.metadata.adapterKey, "codex"); |
| | 72 | assert.deepEqual(replayed[0]?.metadata.origin, { surface: "cli" }); |
| 69 | }), | 73 | }), |
| 70 | ); | 74 | ); |
| 71 | | 75 | |