@auto-engineer/pipeline 0.14.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +5 -6
- package/CHANGELOG.md +24 -0
- package/README.md +279 -0
- package/dist/src/builder/define.d.ts +6 -2
- package/dist/src/builder/define.d.ts.map +1 -1
- package/dist/src/builder/define.js +17 -7
- package/dist/src/builder/define.js.map +1 -1
- package/dist/src/core/descriptors.d.ts +6 -2
- package/dist/src/core/descriptors.d.ts.map +1 -1
- package/dist/src/graph/filter-graph.d.ts +3 -0
- package/dist/src/graph/filter-graph.d.ts.map +1 -0
- package/dist/src/graph/filter-graph.js +80 -0
- package/dist/src/graph/filter-graph.js.map +1 -0
- package/dist/src/graph/types.d.ts +8 -0
- package/dist/src/graph/types.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/projections/await-tracker-projection.d.ts +31 -0
- package/dist/src/projections/await-tracker-projection.d.ts.map +1 -0
- package/dist/src/projections/await-tracker-projection.js +35 -0
- package/dist/src/projections/await-tracker-projection.js.map +1 -0
- package/dist/src/projections/index.d.ts +4 -0
- package/dist/src/projections/index.d.ts.map +1 -0
- package/dist/src/projections/index.js +4 -0
- package/dist/src/projections/index.js.map +1 -0
- package/dist/src/projections/item-status-projection.d.ts +22 -0
- package/dist/src/projections/item-status-projection.d.ts.map +1 -0
- package/dist/src/projections/item-status-projection.js +11 -0
- package/dist/src/projections/item-status-projection.js.map +1 -0
- package/dist/src/projections/latest-run-projection.d.ts +15 -0
- package/dist/src/projections/latest-run-projection.d.ts.map +1 -0
- package/dist/src/projections/latest-run-projection.js +7 -0
- package/dist/src/projections/latest-run-projection.js.map +1 -0
- package/dist/src/projections/message-log-projection.d.ts +51 -0
- package/dist/src/projections/message-log-projection.d.ts.map +1 -0
- package/dist/src/projections/message-log-projection.js +51 -0
- package/dist/src/projections/message-log-projection.js.map +1 -0
- package/dist/src/projections/node-status-projection.d.ts +23 -0
- package/dist/src/projections/node-status-projection.d.ts.map +1 -0
- package/dist/src/projections/node-status-projection.js +10 -0
- package/dist/src/projections/node-status-projection.js.map +1 -0
- package/dist/src/projections/phased-execution-projection.d.ts +77 -0
- package/dist/src/projections/phased-execution-projection.d.ts.map +1 -0
- package/dist/src/projections/phased-execution-projection.js +54 -0
- package/dist/src/projections/phased-execution-projection.js.map +1 -0
- package/dist/src/projections/settled-instance-projection.d.ts +67 -0
- package/dist/src/projections/settled-instance-projection.d.ts.map +1 -0
- package/dist/src/projections/settled-instance-projection.js +66 -0
- package/dist/src/projections/settled-instance-projection.js.map +1 -0
- package/dist/src/projections/stats-projection.d.ts +9 -0
- package/dist/src/projections/stats-projection.d.ts.map +1 -0
- package/dist/src/projections/stats-projection.js +16 -0
- package/dist/src/projections/stats-projection.js.map +1 -0
- package/dist/src/runtime/await-tracker.d.ts +17 -7
- package/dist/src/runtime/await-tracker.d.ts.map +1 -1
- package/dist/src/runtime/await-tracker.js +32 -29
- package/dist/src/runtime/await-tracker.js.map +1 -1
- package/dist/src/runtime/context.d.ts +1 -1
- package/dist/src/runtime/context.d.ts.map +1 -1
- package/dist/src/runtime/event-command-map.d.ts +3 -3
- package/dist/src/runtime/event-command-map.d.ts.map +1 -1
- package/dist/src/runtime/event-command-map.js +6 -2
- package/dist/src/runtime/event-command-map.js.map +1 -1
- package/dist/src/runtime/phased-executor.d.ts +14 -9
- package/dist/src/runtime/phased-executor.d.ts.map +1 -1
- package/dist/src/runtime/phased-executor.js +113 -105
- package/dist/src/runtime/phased-executor.js.map +1 -1
- package/dist/src/runtime/pipeline-runtime.d.ts.map +1 -1
- package/dist/src/runtime/pipeline-runtime.js +2 -2
- package/dist/src/runtime/pipeline-runtime.js.map +1 -1
- package/dist/src/runtime/settled-tracker.d.ts +12 -10
- package/dist/src/runtime/settled-tracker.d.ts.map +1 -1
- package/dist/src/runtime/settled-tracker.js +89 -80
- package/dist/src/runtime/settled-tracker.js.map +1 -1
- package/dist/src/server/pipeline-server.d.ts +31 -9
- package/dist/src/server/pipeline-server.d.ts.map +1 -1
- package/dist/src/server/pipeline-server.js +424 -123
- package/dist/src/server/pipeline-server.js.map +1 -1
- package/dist/src/server/sse-manager.d.ts +0 -1
- package/dist/src/server/sse-manager.d.ts.map +1 -1
- package/dist/src/server/sse-manager.js +0 -3
- package/dist/src/server/sse-manager.js.map +1 -1
- package/dist/src/store/index.d.ts +3 -0
- package/dist/src/store/index.d.ts.map +1 -0
- package/dist/src/store/index.js +3 -0
- package/dist/src/store/index.js.map +1 -0
- package/dist/src/store/pipeline-event-store.d.ts +10 -0
- package/dist/src/store/pipeline-event-store.d.ts.map +1 -0
- package/dist/src/store/pipeline-event-store.js +112 -0
- package/dist/src/store/pipeline-event-store.js.map +1 -0
- package/dist/src/store/pipeline-read-model.d.ts +49 -0
- package/dist/src/store/pipeline-read-model.d.ts.map +1 -0
- package/dist/src/store/pipeline-read-model.js +156 -0
- package/dist/src/store/pipeline-read-model.js.map +1 -0
- package/dist/src/store/sqlite-pipeline-event-store.d.ts +14 -0
- package/dist/src/store/sqlite-pipeline-event-store.d.ts.map +1 -0
- package/dist/src/store/sqlite-pipeline-event-store.js +20 -0
- package/dist/src/store/sqlite-pipeline-event-store.js.map +1 -0
- package/dist/src/testing/fixtures/kanban-full.pipeline.js +2 -2
- package/dist/src/testing/fixtures/kanban-full.pipeline.js.map +1 -1
- package/dist/src/testing/fixtures/kanban.pipeline.js +2 -2
- package/dist/src/testing/fixtures/kanban.pipeline.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/ketchup-plan.md +1216 -0
- package/package.json +6 -4
- package/src/builder/define.specs.ts +5 -4
- package/src/builder/define.ts +24 -11
- package/src/config/pipeline-config.specs.ts +32 -0
- package/src/core/descriptors.ts +7 -2
- package/src/graph/filter-graph.specs.ts +267 -0
- package/src/graph/filter-graph.ts +111 -0
- package/src/graph/types.specs.ts +0 -14
- package/src/graph/types.ts +10 -0
- package/src/index.ts +1 -0
- package/src/projections/await-tracker-projection.specs.ts +24 -0
- package/src/projections/await-tracker-projection.ts +68 -0
- package/src/projections/index.ts +11 -0
- package/src/projections/item-status-projection.specs.ts +130 -0
- package/src/projections/item-status-projection.ts +32 -0
- package/src/projections/latest-run-projection.ts +20 -0
- package/src/projections/message-log-projection.ts +113 -0
- package/src/projections/node-status-projection.ts +33 -0
- package/src/projections/phased-execution-projection.specs.ts +202 -0
- package/src/projections/phased-execution-projection.ts +146 -0
- package/src/projections/settled-instance-projection.specs.ts +296 -0
- package/src/projections/settled-instance-projection.ts +160 -0
- package/src/projections/stats-projection.ts +26 -0
- package/src/runtime/await-tracker.specs.ts +57 -34
- package/src/runtime/await-tracker.ts +43 -31
- package/src/runtime/context.ts +1 -1
- package/src/runtime/event-command-map.ts +11 -4
- package/src/runtime/phased-executor.specs.ts +357 -81
- package/src/runtime/phased-executor.ts +134 -128
- package/src/runtime/pipeline-runtime.specs.ts +65 -0
- package/src/runtime/pipeline-runtime.ts +6 -4
- package/src/runtime/settled-tracker.specs.ts +716 -120
- package/src/runtime/settled-tracker.ts +100 -102
- package/src/server/pipeline-server.e2e.specs.ts +10 -16
- package/src/server/pipeline-server.specs.ts +1441 -211
- package/src/server/pipeline-server.ts +535 -144
- package/src/server/sse-manager.specs.ts +67 -36
- package/src/server/sse-manager.ts +0 -4
- package/src/store/index.ts +2 -0
- package/src/store/pipeline-event-store.specs.ts +357 -0
- package/src/store/pipeline-event-store.ts +156 -0
- package/src/store/pipeline-read-model.specs.ts +1170 -0
- package/src/store/pipeline-read-model.ts +223 -0
- package/src/store/sqlite-pipeline-event-store.specs.ts +13 -0
- package/src/store/sqlite-pipeline-event-store.ts +36 -0
- package/src/testing/fixtures/kanban-full.pipeline.ts +2 -2
- package/src/testing/fixtures/kanban.pipeline.ts +2 -2
- package/tsconfig.json +1 -1
- package/vitest.config.ts +1 -8
- package/claude.md +0 -160
- package/dist/src/__tests__/e2e/helpers.d.ts +0 -48
- package/dist/src/__tests__/e2e/helpers.d.ts.map +0 -1
- package/dist/src/__tests__/e2e/helpers.js +0 -253
- package/dist/src/__tests__/e2e/helpers.js.map +0 -1
- package/dist/src/__tests__/e2e/kanban-migration.e2e.specs.d.ts +0 -2
- package/dist/src/__tests__/e2e/kanban-migration.e2e.specs.d.ts.map +0 -1
- package/dist/src/__tests__/e2e/kanban-migration.e2e.specs.js +0 -195
- package/dist/src/__tests__/e2e/kanban-migration.e2e.specs.js.map +0 -1
- package/dist/src/__tests__/e2e/types.d.ts +0 -107
- package/dist/src/__tests__/e2e/types.d.ts.map +0 -1
- package/dist/src/__tests__/e2e/types.js +0 -2
- package/dist/src/__tests__/e2e/types.js.map +0 -1
- package/dist/src/builder/define.specs.d.ts +0 -2
- package/dist/src/builder/define.specs.d.ts.map +0 -1
- package/dist/src/builder/define.specs.js +0 -435
- package/dist/src/builder/define.specs.js.map +0 -1
- package/dist/src/core/descriptors.specs.d.ts +0 -2
- package/dist/src/core/descriptors.specs.d.ts.map +0 -1
- package/dist/src/core/descriptors.specs.js +0 -24
- package/dist/src/core/descriptors.specs.js.map +0 -1
- package/dist/src/core/types.specs.d.ts +0 -2
- package/dist/src/core/types.specs.d.ts.map +0 -1
- package/dist/src/core/types.specs.js +0 -40
- package/dist/src/core/types.specs.js.map +0 -1
- package/dist/src/file-syncer/crypto/jwe-encryptor.d.ts +0 -15
- package/dist/src/file-syncer/crypto/jwe-encryptor.d.ts.map +0 -1
- package/dist/src/file-syncer/crypto/jwe-encryptor.js +0 -64
- package/dist/src/file-syncer/crypto/jwe-encryptor.js.map +0 -1
- package/dist/src/file-syncer/crypto/provider-resolver.d.ts +0 -24
- package/dist/src/file-syncer/crypto/provider-resolver.d.ts.map +0 -1
- package/dist/src/file-syncer/crypto/provider-resolver.js +0 -71
- package/dist/src/file-syncer/crypto/provider-resolver.js.map +0 -1
- package/dist/src/file-syncer/discovery/bareImports.d.ts +0 -3
- package/dist/src/file-syncer/discovery/bareImports.d.ts.map +0 -1
- package/dist/src/file-syncer/discovery/bareImports.js +0 -36
- package/dist/src/file-syncer/discovery/bareImports.js.map +0 -1
- package/dist/src/file-syncer/discovery/dts.d.ts +0 -8
- package/dist/src/file-syncer/discovery/dts.d.ts.map +0 -1
- package/dist/src/file-syncer/discovery/dts.js +0 -99
- package/dist/src/file-syncer/discovery/dts.js.map +0 -1
- package/dist/src/file-syncer/index.d.ts +0 -46
- package/dist/src/file-syncer/index.d.ts.map +0 -1
- package/dist/src/file-syncer/index.js +0 -392
- package/dist/src/file-syncer/index.js.map +0 -1
- package/dist/src/file-syncer/sync/resolveSyncFileSet.d.ts +0 -7
- package/dist/src/file-syncer/sync/resolveSyncFileSet.d.ts.map +0 -1
- package/dist/src/file-syncer/sync/resolveSyncFileSet.js +0 -86
- package/dist/src/file-syncer/sync/resolveSyncFileSet.js.map +0 -1
- package/dist/src/file-syncer/types/wire.d.ts +0 -14
- package/dist/src/file-syncer/types/wire.d.ts.map +0 -1
- package/dist/src/file-syncer/types/wire.js +0 -2
- package/dist/src/file-syncer/types/wire.js.map +0 -1
- package/dist/src/file-syncer/utils/hash.d.ts +0 -5
- package/dist/src/file-syncer/utils/hash.d.ts.map +0 -1
- package/dist/src/file-syncer/utils/hash.js +0 -19
- package/dist/src/file-syncer/utils/hash.js.map +0 -1
- package/dist/src/file-syncer/utils/path.d.ts +0 -13
- package/dist/src/file-syncer/utils/path.d.ts.map +0 -1
- package/dist/src/file-syncer/utils/path.js +0 -74
- package/dist/src/file-syncer/utils/path.js.map +0 -1
- package/dist/src/graph/types.specs.d.ts +0 -2
- package/dist/src/graph/types.specs.d.ts.map +0 -1
- package/dist/src/graph/types.specs.js +0 -148
- package/dist/src/graph/types.specs.js.map +0 -1
- package/dist/src/logging/event-logger.specs.d.ts +0 -2
- package/dist/src/logging/event-logger.specs.d.ts.map +0 -1
- package/dist/src/logging/event-logger.specs.js +0 -81
- package/dist/src/logging/event-logger.specs.js.map +0 -1
- package/dist/src/plugins/handler-adapter.specs.d.ts +0 -2
- package/dist/src/plugins/handler-adapter.specs.d.ts.map +0 -1
- package/dist/src/plugins/handler-adapter.specs.js +0 -129
- package/dist/src/plugins/handler-adapter.specs.js.map +0 -1
- package/dist/src/plugins/plugin-loader.specs.d.ts +0 -2
- package/dist/src/plugins/plugin-loader.specs.d.ts.map +0 -1
- package/dist/src/plugins/plugin-loader.specs.js +0 -246
- package/dist/src/plugins/plugin-loader.specs.js.map +0 -1
- package/dist/src/runtime/await-tracker.specs.d.ts +0 -2
- package/dist/src/runtime/await-tracker.specs.d.ts.map +0 -1
- package/dist/src/runtime/await-tracker.specs.js +0 -46
- package/dist/src/runtime/await-tracker.specs.js.map +0 -1
- package/dist/src/runtime/context.specs.d.ts +0 -2
- package/dist/src/runtime/context.specs.d.ts.map +0 -1
- package/dist/src/runtime/context.specs.js +0 -26
- package/dist/src/runtime/context.specs.js.map +0 -1
- package/dist/src/runtime/event-command-map.specs.d.ts +0 -2
- package/dist/src/runtime/event-command-map.specs.d.ts.map +0 -1
- package/dist/src/runtime/event-command-map.specs.js +0 -108
- package/dist/src/runtime/event-command-map.specs.js.map +0 -1
- package/dist/src/runtime/phased-executor.specs.d.ts +0 -2
- package/dist/src/runtime/phased-executor.specs.d.ts.map +0 -1
- package/dist/src/runtime/phased-executor.specs.js +0 -256
- package/dist/src/runtime/phased-executor.specs.js.map +0 -1
- package/dist/src/runtime/pipeline-runtime.specs.d.ts +0 -2
- package/dist/src/runtime/pipeline-runtime.specs.d.ts.map +0 -1
- package/dist/src/runtime/pipeline-runtime.specs.js +0 -192
- package/dist/src/runtime/pipeline-runtime.specs.js.map +0 -1
- package/dist/src/runtime/settled-tracker.specs.d.ts +0 -2
- package/dist/src/runtime/settled-tracker.specs.d.ts.map +0 -1
- package/dist/src/runtime/settled-tracker.specs.js +0 -361
- package/dist/src/runtime/settled-tracker.specs.js.map +0 -1
- package/dist/src/server/full-orchestration.e2e.specs.d.ts +0 -2
- package/dist/src/server/full-orchestration.e2e.specs.d.ts.map +0 -1
- package/dist/src/server/full-orchestration.e2e.specs.js +0 -561
- package/dist/src/server/full-orchestration.e2e.specs.js.map +0 -1
- package/dist/src/server/pipeline-server.e2e.specs.d.ts +0 -2
- package/dist/src/server/pipeline-server.e2e.specs.d.ts.map +0 -1
- package/dist/src/server/pipeline-server.e2e.specs.js +0 -381
- package/dist/src/server/pipeline-server.e2e.specs.js.map +0 -1
- package/dist/src/server/pipeline-server.specs.d.ts +0 -2
- package/dist/src/server/pipeline-server.specs.d.ts.map +0 -1
- package/dist/src/server/pipeline-server.specs.js +0 -662
- package/dist/src/server/pipeline-server.specs.js.map +0 -1
- package/dist/src/server/sse-manager.specs.d.ts +0 -2
- package/dist/src/server/sse-manager.specs.d.ts.map +0 -1
- package/dist/src/server/sse-manager.specs.js +0 -158
- package/dist/src/server/sse-manager.specs.js.map +0 -1
- package/dist/src/testing/event-capture.specs.d.ts +0 -2
- package/dist/src/testing/event-capture.specs.d.ts.map +0 -1
- package/dist/src/testing/event-capture.specs.js +0 -114
- package/dist/src/testing/event-capture.specs.js.map +0 -1
- package/dist/src/testing/fixtures/kanban-full.pipeline.specs.d.ts +0 -2
- package/dist/src/testing/fixtures/kanban-full.pipeline.specs.d.ts.map +0 -1
- package/dist/src/testing/fixtures/kanban-full.pipeline.specs.js +0 -263
- package/dist/src/testing/fixtures/kanban-full.pipeline.specs.js.map +0 -1
- package/dist/src/testing/fixtures/kanban.pipeline.specs.d.ts +0 -2
- package/dist/src/testing/fixtures/kanban.pipeline.specs.d.ts.map +0 -1
- package/dist/src/testing/fixtures/kanban.pipeline.specs.js +0 -29
- package/dist/src/testing/fixtures/kanban.pipeline.specs.js.map +0 -1
- package/dist/src/testing/kanban-todo.e2e.specs.d.ts +0 -2
- package/dist/src/testing/kanban-todo.e2e.specs.d.ts.map +0 -1
- package/dist/src/testing/kanban-todo.e2e.specs.js +0 -160
- package/dist/src/testing/kanban-todo.e2e.specs.js.map +0 -1
- package/dist/src/testing/mock-handlers.specs.d.ts +0 -2
- package/dist/src/testing/mock-handlers.specs.d.ts.map +0 -1
- package/dist/src/testing/mock-handlers.specs.js +0 -193
- package/dist/src/testing/mock-handlers.specs.js.map +0 -1
- package/dist/src/testing/real-execution.e2e.specs.d.ts +0 -2
- package/dist/src/testing/real-execution.e2e.specs.d.ts.map +0 -1
- package/dist/src/testing/real-execution.e2e.specs.js +0 -140
- package/dist/src/testing/real-execution.e2e.specs.js.map +0 -1
- package/dist/src/testing/real-plugin.e2e.specs.d.ts +0 -2
- package/dist/src/testing/real-plugin.e2e.specs.d.ts.map +0 -1
- package/dist/src/testing/real-plugin.e2e.specs.js +0 -65
- package/dist/src/testing/real-plugin.e2e.specs.js.map +0 -1
- package/dist/src/testing/server-startup.e2e.specs.d.ts +0 -2
- package/dist/src/testing/server-startup.e2e.specs.d.ts.map +0 -1
- package/dist/src/testing/server-startup.e2e.specs.js +0 -104
- package/dist/src/testing/server-startup.e2e.specs.js.map +0 -1
- package/dist/src/testing/snapshot-compare.specs.d.ts +0 -2
- package/dist/src/testing/snapshot-compare.specs.d.ts.map +0 -1
- package/dist/src/testing/snapshot-compare.specs.js +0 -112
- package/dist/src/testing/snapshot-compare.specs.js.map +0 -1
- package/dist/src/testing/snapshot-sanitize.specs.d.ts +0 -2
- package/dist/src/testing/snapshot-sanitize.specs.d.ts.map +0 -1
- package/dist/src/testing/snapshot-sanitize.specs.js +0 -104
- package/dist/src/testing/snapshot-sanitize.specs.js.map +0 -1
- package/docs/testing-analysis.md +0 -395
- package/pomodoro-plan.md +0 -651
- package/src/core/descriptors.specs.ts +0 -28
- package/src/core/types.specs.ts +0 -44
- package/src/runtime/context.specs.ts +0 -28
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import type { InMemoryDatabase } from '@event-driven-io/emmett';
|
|
2
|
+
import type { NodeStatus } from '../graph/types';
|
|
3
|
+
import type { AwaitTrackerDocument } from '../projections/await-tracker-projection';
|
|
4
|
+
import type { ItemStatusDocument } from '../projections/item-status-projection';
|
|
5
|
+
import type { LatestRunDocument } from '../projections/latest-run-projection';
|
|
6
|
+
import type { MessageLogDocument } from '../projections/message-log-projection';
|
|
7
|
+
import type { NodeStatusDocument } from '../projections/node-status-projection';
|
|
8
|
+
import type { PhasedExecutionDocument } from '../projections/phased-execution-projection';
|
|
9
|
+
import type { SettledInstanceDocument } from '../projections/settled-instance-projection';
|
|
10
|
+
import type { StatsDocument } from '../projections/stats-projection';
|
|
11
|
+
|
|
12
|
+
export interface CommandStats {
|
|
13
|
+
pendingCount: number;
|
|
14
|
+
endedCount: number;
|
|
15
|
+
aggregateStatus: NodeStatus;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface SettledStats {
|
|
19
|
+
status: NodeStatus;
|
|
20
|
+
pendingCount: number;
|
|
21
|
+
endedCount: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface MessageStats {
|
|
25
|
+
totalMessages: number;
|
|
26
|
+
totalCommands: number;
|
|
27
|
+
totalEvents: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export class PipelineReadModel {
|
|
31
|
+
private readonly itemStatusCollection;
|
|
32
|
+
private readonly nodeStatusCollection;
|
|
33
|
+
private readonly messageLogCollection;
|
|
34
|
+
private readonly statsCollection;
|
|
35
|
+
private readonly latestRunCollection;
|
|
36
|
+
private readonly settledInstanceCollection;
|
|
37
|
+
private readonly phasedExecutionCollection;
|
|
38
|
+
private readonly awaitTrackerCollection;
|
|
39
|
+
|
|
40
|
+
constructor(database: InMemoryDatabase) {
|
|
41
|
+
this.itemStatusCollection = database.collection<ItemStatusDocument>('ItemStatus');
|
|
42
|
+
this.nodeStatusCollection = database.collection<NodeStatusDocument>('NodeStatus');
|
|
43
|
+
this.messageLogCollection = database.collection<MessageLogDocument>('MessageLog');
|
|
44
|
+
this.statsCollection = database.collection<StatsDocument>('Stats');
|
|
45
|
+
this.latestRunCollection = database.collection<LatestRunDocument>('LatestRun');
|
|
46
|
+
this.settledInstanceCollection = database.collection<SettledInstanceDocument>('SettledInstance');
|
|
47
|
+
this.phasedExecutionCollection = database.collection<PhasedExecutionDocument>('PhasedExecution');
|
|
48
|
+
this.awaitTrackerCollection = database.collection<AwaitTrackerDocument>('AwaitTracker');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
async computeCommandStats(correlationId: string, commandType: string): Promise<CommandStats> {
|
|
52
|
+
const items = await this.itemStatusCollection.find(
|
|
53
|
+
(doc) => doc.correlationId === correlationId && doc.commandType === commandType,
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
if (items.length === 0) {
|
|
57
|
+
return { pendingCount: 0, endedCount: 0, aggregateStatus: 'idle' };
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
let pendingCount = 0;
|
|
61
|
+
let endedCount = 0;
|
|
62
|
+
let hasError = false;
|
|
63
|
+
|
|
64
|
+
for (const item of items) {
|
|
65
|
+
if (item.status === 'running') {
|
|
66
|
+
pendingCount++;
|
|
67
|
+
} else {
|
|
68
|
+
endedCount++;
|
|
69
|
+
if (item.status === 'error') {
|
|
70
|
+
hasError = true;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
let aggregateStatus: NodeStatus;
|
|
76
|
+
if (pendingCount > 0) {
|
|
77
|
+
aggregateStatus = 'running';
|
|
78
|
+
} else if (hasError) {
|
|
79
|
+
aggregateStatus = 'error';
|
|
80
|
+
} else {
|
|
81
|
+
aggregateStatus = 'success';
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return { pendingCount, endedCount, aggregateStatus };
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
async hasCorrelation(correlationId: string): Promise<boolean> {
|
|
88
|
+
const nodes = await this.nodeStatusCollection.find((doc) => doc.correlationId === correlationId);
|
|
89
|
+
return nodes.length > 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
async getNodeStatus(correlationId: string, commandName: string): Promise<NodeStatusDocument | null> {
|
|
93
|
+
const nodes = await this.nodeStatusCollection.find(
|
|
94
|
+
(doc) => doc.correlationId === correlationId && doc.commandName === commandName,
|
|
95
|
+
);
|
|
96
|
+
if (nodes.length === 0) {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
const node = nodes[0];
|
|
100
|
+
return {
|
|
101
|
+
correlationId: node.correlationId,
|
|
102
|
+
commandName: node.commandName,
|
|
103
|
+
status: node.status,
|
|
104
|
+
pendingCount: node.pendingCount,
|
|
105
|
+
endedCount: node.endedCount,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
async getItemStatus(correlationId: string, commandType: string, itemKey: string): Promise<ItemStatusDocument | null> {
|
|
110
|
+
const items = await this.itemStatusCollection.find(
|
|
111
|
+
(doc) => doc.correlationId === correlationId && doc.commandType === commandType && doc.itemKey === itemKey,
|
|
112
|
+
);
|
|
113
|
+
if (items.length === 0) {
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
const item = items[0];
|
|
117
|
+
return {
|
|
118
|
+
correlationId: item.correlationId,
|
|
119
|
+
commandType: item.commandType,
|
|
120
|
+
itemKey: item.itemKey,
|
|
121
|
+
currentRequestId: item.currentRequestId,
|
|
122
|
+
status: item.status,
|
|
123
|
+
attemptCount: item.attemptCount,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
async getMessages(correlationId?: string): Promise<MessageLogDocument[]> {
|
|
128
|
+
if (correlationId) {
|
|
129
|
+
return this.messageLogCollection.find((doc) => doc.correlationId === correlationId);
|
|
130
|
+
}
|
|
131
|
+
return this.messageLogCollection.find(() => true);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
async getStats(): Promise<MessageStats> {
|
|
135
|
+
const docs = await this.statsCollection.find((doc) => doc.totalMessages !== undefined);
|
|
136
|
+
if (docs.length === 0) {
|
|
137
|
+
return { totalMessages: 0, totalCommands: 0, totalEvents: 0 };
|
|
138
|
+
}
|
|
139
|
+
const stats = docs[0];
|
|
140
|
+
return {
|
|
141
|
+
totalMessages: stats.totalMessages,
|
|
142
|
+
totalCommands: stats.totalCommands,
|
|
143
|
+
totalEvents: stats.totalEvents,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
async getLatestCorrelationId(): Promise<string | undefined> {
|
|
148
|
+
const docs = await this.latestRunCollection.find(() => true);
|
|
149
|
+
if (docs.length === 0) {
|
|
150
|
+
return undefined;
|
|
151
|
+
}
|
|
152
|
+
return docs[0].latestCorrelationId;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
async getSettledInstance(templateId: string, correlationId: string): Promise<SettledInstanceDocument | null> {
|
|
156
|
+
const instances = await this.settledInstanceCollection.find(
|
|
157
|
+
(doc) => doc.templateId === templateId && doc.correlationId === correlationId,
|
|
158
|
+
);
|
|
159
|
+
if (instances.length === 0) {
|
|
160
|
+
return null;
|
|
161
|
+
}
|
|
162
|
+
return instances[0];
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
async getActiveSettledInstances(correlationId: string): Promise<SettledInstanceDocument[]> {
|
|
166
|
+
return this.settledInstanceCollection.find((doc) => doc.correlationId === correlationId && doc.status === 'active');
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
async getPhasedExecution(executionId: string): Promise<PhasedExecutionDocument | null> {
|
|
170
|
+
const executions = await this.phasedExecutionCollection.find((doc) => doc.executionId === executionId);
|
|
171
|
+
if (executions.length === 0) {
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
return executions[0];
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
async getActivePhasedExecutions(correlationId: string): Promise<PhasedExecutionDocument[]> {
|
|
178
|
+
return this.phasedExecutionCollection.find((doc) => doc.correlationId === correlationId && doc.status === 'active');
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
async getAwaitState(correlationId: string): Promise<AwaitTrackerDocument | null> {
|
|
182
|
+
const docs = await this.awaitTrackerCollection.find(
|
|
183
|
+
(doc) => doc.correlationId === correlationId && doc.status === 'pending',
|
|
184
|
+
);
|
|
185
|
+
if (docs.length === 0) {
|
|
186
|
+
return null;
|
|
187
|
+
}
|
|
188
|
+
return docs[0];
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
async computeSettledStats(correlationId: string, templateId: string): Promise<SettledStats> {
|
|
192
|
+
const instance = await this.getSettledInstance(templateId, correlationId);
|
|
193
|
+
|
|
194
|
+
if (instance === null) {
|
|
195
|
+
return { status: 'idle', pendingCount: 0, endedCount: 0 };
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const endedCount = instance.firedCount ?? 0;
|
|
199
|
+
|
|
200
|
+
if (instance.status === 'active') {
|
|
201
|
+
const hasFailure = this.hasFailedEvent(instance);
|
|
202
|
+
const hasFiredBefore = endedCount > 0;
|
|
203
|
+
const allCompleted = instance.commandTrackers.every((t) => t.hasCompleted);
|
|
204
|
+
const isPending = !allCompleted;
|
|
205
|
+
const status = hasFailure ? 'error' : hasFiredBefore ? 'success' : 'running';
|
|
206
|
+
return { status, pendingCount: isPending ? 1 : 0, endedCount };
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
const status = this.hasFailedEvent(instance) ? 'error' : endedCount > 0 ? 'success' : 'idle';
|
|
210
|
+
return { status, pendingCount: 0, endedCount };
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
private hasFailedEvent(instance: SettledInstanceDocument): boolean {
|
|
214
|
+
for (const tracker of instance.commandTrackers) {
|
|
215
|
+
for (const event of tracker.events) {
|
|
216
|
+
if (event.type.includes('Failed')) {
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return false;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { createSQLitePipelineEventStore } from './sqlite-pipeline-event-store';
|
|
3
|
+
|
|
4
|
+
describe('SQLitePipelineEventStore', () => {
|
|
5
|
+
describe('createSQLitePipelineEventStore', () => {
|
|
6
|
+
it('should create SQLite event store with fileName config', async () => {
|
|
7
|
+
const context = await createSQLitePipelineEventStore({ fileName: ':memory:' });
|
|
8
|
+
expect(context.eventStore).toBeDefined();
|
|
9
|
+
expect(context.readModel).toBeDefined();
|
|
10
|
+
await context.close();
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { getInMemoryDatabase, type InMemoryDatabase } from '@event-driven-io/emmett';
|
|
2
|
+
import { getSQLiteEventStore, type SQLiteEventStore } from '@event-driven-io/emmett-sqlite';
|
|
3
|
+
import { PipelineReadModel } from './pipeline-read-model';
|
|
4
|
+
|
|
5
|
+
export interface SQLitePipelineEventStoreContext {
|
|
6
|
+
eventStore: SQLiteEventStore;
|
|
7
|
+
database: InMemoryDatabase;
|
|
8
|
+
readModel: PipelineReadModel;
|
|
9
|
+
close: () => Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface SQLitePipelineEventStoreConfig {
|
|
13
|
+
fileName: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export async function createSQLitePipelineEventStore(
|
|
17
|
+
config: SQLitePipelineEventStoreConfig,
|
|
18
|
+
): Promise<SQLitePipelineEventStoreContext> {
|
|
19
|
+
const database = getInMemoryDatabase();
|
|
20
|
+
|
|
21
|
+
const eventStore = getSQLiteEventStore({
|
|
22
|
+
fileName: config.fileName,
|
|
23
|
+
schema: { autoMigration: 'CreateOrUpdate' },
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const readModel = new PipelineReadModel(database);
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
eventStore,
|
|
30
|
+
database,
|
|
31
|
+
readModel,
|
|
32
|
+
close: async () => {
|
|
33
|
+
// Minimal implementation for Burst 88
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|
|
@@ -195,8 +195,8 @@ export function createKanbanFullPipeline() {
|
|
|
195
195
|
aiOptions: { maxTokens: 3000 },
|
|
196
196
|
}))
|
|
197
197
|
.onComplete({
|
|
198
|
-
success: 'AllComponentsImplemented',
|
|
199
|
-
failure: 'ComponentsFailed',
|
|
198
|
+
success: { name: 'AllComponentsImplemented', displayName: 'All Components Implemented' },
|
|
199
|
+
failure: { name: 'ComponentsFailed', displayName: 'Components Failed' },
|
|
200
200
|
itemKey: (e) => (e.data as { filePath?: string }).filePath ?? '',
|
|
201
201
|
})
|
|
202
202
|
|
|
@@ -103,8 +103,8 @@ export function createKanbanPipeline() {
|
|
|
103
103
|
.groupInto(['molecule', 'organism', 'page'], (c) => c.type)
|
|
104
104
|
.process('ImplementComponent', (c) => ({ filePath: c.filePath }))
|
|
105
105
|
.onComplete({
|
|
106
|
-
success: 'AllComponentsImplemented',
|
|
107
|
-
failure: 'ComponentsFailed',
|
|
106
|
+
success: { name: 'AllComponentsImplemented', displayName: 'All Components Implemented' },
|
|
107
|
+
failure: { name: 'ComponentsFailed', displayName: 'Components Failed' },
|
|
108
108
|
itemKey: (e) => (e.data as { filePath?: string }).filePath ?? '',
|
|
109
109
|
})
|
|
110
110
|
|
package/tsconfig.json
CHANGED
package/vitest.config.ts
CHANGED
|
@@ -16,14 +16,7 @@ export default defineConfig({
|
|
|
16
16
|
statements: 100,
|
|
17
17
|
},
|
|
18
18
|
include: ['src/**/*.ts'],
|
|
19
|
-
exclude: [
|
|
20
|
-
'src/**/*.specs.ts',
|
|
21
|
-
'src/index.ts',
|
|
22
|
-
'src/core/descriptors.ts',
|
|
23
|
-
'src/graph/types.ts',
|
|
24
|
-
'src/runtime/context.ts',
|
|
25
|
-
'src/testing/fixtures/**/*.ts',
|
|
26
|
-
],
|
|
19
|
+
exclude: ['src/**/*.specs.ts', 'src/**/index.ts', 'src/testing/fixtures/**/*.ts'],
|
|
27
20
|
},
|
|
28
21
|
},
|
|
29
22
|
});
|
package/claude.md
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
# Development Guide
|
|
2
|
-
|
|
3
|
-
## Pomodoro + TDD + TCR + 100% Coverage
|
|
4
|
-
|
|
5
|
-
```
|
|
6
|
-
╔═════════════════════════════════════════════════════════════════════╗
|
|
7
|
-
║ Red ───► Green ───►[TCR]───► Refactor ───►[TCR]───► Done ║
|
|
8
|
-
║ ║
|
|
9
|
-
║ [TCR] = test ──┬── pass ──► commit ──► continue ║
|
|
10
|
-
║ └── fail ──► REVERT ──► RETHINK ║
|
|
11
|
-
║ ║
|
|
12
|
-
║ REVERT means STOP. Don't fix in place. ║
|
|
13
|
-
║ RETHINK means try again with SMALLER STEPS OR try a NEW DESIGN ║
|
|
14
|
-
╚═════════════════════════════════════════════════════════════════════╝
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## 🍅 Pomodoro Workflow
|
|
20
|
-
|
|
21
|
-
One atomic test + implementation per cycle (5-15 min).
|
|
22
|
-
|
|
23
|
-
**Planning a Pomodoro:**
|
|
24
|
-
|
|
25
|
-
- Independent, valuable, small, testable
|
|
26
|
-
- Define: value added, code surface size (S/M/L), complexity (S/M/L)
|
|
27
|
-
- 1-2 line approach description
|
|
28
|
-
- Create `pomodoro-plan.md` with sections: TODO / DONE
|
|
29
|
-
- Commit the plan with initial pomodoros
|
|
30
|
-
|
|
31
|
-
**Execution:**
|
|
32
|
-
|
|
33
|
-
1. Write ONE failing test (Red)
|
|
34
|
-
2. Write MINIMAL code to pass (Green)
|
|
35
|
-
3. TCR: `test && commit || revert` (include plan update)
|
|
36
|
-
4. Refactor if needed
|
|
37
|
-
5. TCR: `test && commit || revert`
|
|
38
|
-
6. Move pomodoro to DONE in the `pomodoro-plan.md`, commit with TCR
|
|
39
|
-
|
|
40
|
-
**TCR Command:**
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
pnpm test --run && \
|
|
44
|
-
git add -A && git commit -m "<COMMITIZEN FORMAT>" || \
|
|
45
|
-
git checkout -- packages/<package>/
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
---
|
|
49
|
-
|
|
50
|
-
## 🎯 TDD + 100% Coverage
|
|
51
|
-
|
|
52
|
-
All thresholds enforced at 100%. Tests drive the code.
|
|
53
|
-
|
|
54
|
-
| Do | Don't |
|
|
55
|
-
| ------------------------------- | ---------------------------------------- |
|
|
56
|
-
| Let tests drive all code | Write code without a failing test first |
|
|
57
|
-
| Add branches only when tested | Defensive `??`, `?:`, `if/else` untested |
|
|
58
|
-
| Test all error paths | Leave error handling unverified |
|
|
59
|
-
| Remove dead code after each run | Keep unused code "just in case" |
|
|
60
|
-
|
|
61
|
-
**NEVER Exclude Files to Dodge Coverage**
|
|
62
|
-
|
|
63
|
-
```
|
|
64
|
-
╔══════════════════════════════════════════════════════════════════════╗
|
|
65
|
-
║ Excluding a file from coverage to avoid testing it is FORBIDDEN. ║
|
|
66
|
-
║ "Hard to test" code (file system, dynamic imports, network, etc.) ║
|
|
67
|
-
║ → Inject dependencies and mock them. That's what mocks are for. ║
|
|
68
|
-
╚══════════════════════════════════════════════════════════════════════╝
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Coverage exclusions are ONLY for:
|
|
72
|
-
|
|
73
|
-
- Type-only files (interfaces, type definitions)
|
|
74
|
-
- Barrel exports (index.ts re-exports)
|
|
75
|
-
- Files that are genuinely 0% logic (pure declarations)
|
|
76
|
-
|
|
77
|
-
If you're tempted to exclude a file because it's "infrastructure" or "integration-focused" — STOP. The coverage requirement exists precisely to force testable design.
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## 📝 Testing Guidelines
|
|
82
|
-
|
|
83
|
-
### Test Title = Spec
|
|
84
|
-
|
|
85
|
-
The `it('should...')` title defines what you're testing. Body proves exactly that.
|
|
86
|
-
|
|
87
|
-
```ts
|
|
88
|
-
// ✅ Title matches body
|
|
89
|
-
it('should reject empty usernames', () => {
|
|
90
|
-
const result = validate({ username: '' });
|
|
91
|
-
expect(result.valid).toBe(false);
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
// ❌ Body does more than title claims
|
|
95
|
-
it('should reject empty usernames', () => {
|
|
96
|
-
const result = validate({ username: '' });
|
|
97
|
-
expect(result.valid).toBe(false);
|
|
98
|
-
expect(result.errors).toContain('Username required'); // second spec
|
|
99
|
-
expect(logger.warn).toHaveBeenCalled(); // third spec
|
|
100
|
-
});
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### Stubs Over Mocks
|
|
104
|
-
|
|
105
|
-
Use deterministic stubs. Mock at boundaries only when stubs aren't possible.
|
|
106
|
-
|
|
107
|
-
```ts
|
|
108
|
-
// ✅ Deterministic stub
|
|
109
|
-
function createTestIdGenerator() {
|
|
110
|
-
let counter = 0;
|
|
111
|
-
return () => `test-id-${counter++}`;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
it('creates user with generated id', () => {
|
|
115
|
-
const generateId = createTestIdGenerator();
|
|
116
|
-
const user = createUser({ name: 'Alice' }, generateId);
|
|
117
|
-
expect(user).toEqual({ id: 'test-id-0', name: 'Alice' });
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
// ❌ Mocking couples tests to implementation
|
|
121
|
-
it('creates user with generated id', () => {
|
|
122
|
-
const mockGenerateId = vi.fn().mockReturnValue('user-123');
|
|
123
|
-
const user = createUser({ name: 'Alice' }, mockGenerateId);
|
|
124
|
-
expect(mockGenerateId).toHaveBeenCalled();
|
|
125
|
-
});
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
### Assert Whole Objects
|
|
129
|
-
|
|
130
|
-
Catch structural changes. Don't cherry-pick properties.
|
|
131
|
-
|
|
132
|
-
```ts
|
|
133
|
-
// ✅ Catches any unexpected changes
|
|
134
|
-
expect(result).toEqual({ type: 'USER', name: 'Alice', processed: true });
|
|
135
|
-
|
|
136
|
-
// ❌ Misses if extra properties added/removed
|
|
137
|
-
expect(result.type).toBe('USER');
|
|
138
|
-
expect(result.processed).toBe(true);
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
### Squint Test
|
|
142
|
-
|
|
143
|
-
All tests should look identical when you squint: **SETUP → EXECUTE → VERIFY**
|
|
144
|
-
|
|
145
|
-
```ts
|
|
146
|
-
// ✅ Single clear structure
|
|
147
|
-
it('transforms user to uppercase', () => {
|
|
148
|
-
const input = { type: 'user' }; // SETUP
|
|
149
|
-
const result = transform(input); // EXECUTE
|
|
150
|
-
expect(result).toEqual({ type: 'USER' }); // VERIFY
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
// ❌ Multiple execute/verify = split into separate tests
|
|
154
|
-
it('does too many things', () => {
|
|
155
|
-
const result = transform({ type: 'user' });
|
|
156
|
-
expect(result.type).toBe('USER');
|
|
157
|
-
const updated = updateResult(result); // second execute
|
|
158
|
-
expect(updated.modified).toBe(true); // second verify
|
|
159
|
-
});
|
|
160
|
-
```
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { CommandAck, GoldenMaster, PipelineResponse, PipelineSnapshot, PositionalMessage, RegistryResponse, SanitizedEvent, SessionInfo, StatsResponse } from './types';
|
|
2
|
-
export declare function fetchRegistry(baseUrl: string): Promise<RegistryResponse>;
|
|
3
|
-
export declare function fetchPipeline(baseUrl: string): Promise<PipelineResponse>;
|
|
4
|
-
export declare function fetchSessions(baseUrl: string): Promise<SessionInfo[]>;
|
|
5
|
-
export declare function fetchMessages(baseUrl: string, count?: number): Promise<PositionalMessage[]>;
|
|
6
|
-
export declare function fetchStats(baseUrl: string): Promise<StatsResponse>;
|
|
7
|
-
export declare function dispatchCommand(baseUrl: string, commandType: string, data?: Record<string, unknown>): Promise<CommandAck>;
|
|
8
|
-
export declare function delay(ms: number): Promise<void>;
|
|
9
|
-
export declare function waitForPipelineCompletion(baseUrl: string, timeoutMs: number, criticalNodes?: string[]): Promise<void>;
|
|
10
|
-
export declare function recordStatusProgression(baseUrl: string, timeoutMs: number, pollIntervalMs?: number): Promise<PipelineSnapshot[]>;
|
|
11
|
-
export declare function sanitizeEventData(data: Record<string, unknown>): Record<string, unknown>;
|
|
12
|
-
export declare function extractEventSequence(messages: PositionalMessage[]): SanitizedEvent[];
|
|
13
|
-
export declare function writeSnapshot(snapshotDir: string, filename: string, data: unknown): Promise<void>;
|
|
14
|
-
export declare function readSnapshot<T>(snapshotDir: string, filename: string): Promise<T | null>;
|
|
15
|
-
export declare function createGoldenMaster(baseUrl: string, timeoutMs: number): Promise<GoldenMaster>;
|
|
16
|
-
export declare function groupEventsByCorrelationId(events: PositionalMessage[]): Map<string, PositionalMessage[]>;
|
|
17
|
-
export declare function extractEventTypes(events: PositionalMessage[]): string[];
|
|
18
|
-
export declare function compareEventSets(expected: string[], actual: string[]): {
|
|
19
|
-
missing: string[];
|
|
20
|
-
extra: string[];
|
|
21
|
-
};
|
|
22
|
-
export declare function validateSequentialDependencies(events: PositionalMessage[], dependencies: [string, string][]): boolean;
|
|
23
|
-
export interface FileSnapshot {
|
|
24
|
-
contextFiles: {
|
|
25
|
-
exportResult: boolean;
|
|
26
|
-
schemaJson: boolean;
|
|
27
|
-
schemaGraphql: boolean;
|
|
28
|
-
iaScheme: boolean;
|
|
29
|
-
};
|
|
30
|
-
serverFiles: {
|
|
31
|
-
packageJson: boolean;
|
|
32
|
-
srcExists: boolean;
|
|
33
|
-
domainSlices: string[];
|
|
34
|
-
};
|
|
35
|
-
clientFiles: {
|
|
36
|
-
packageJson: boolean;
|
|
37
|
-
srcExists: boolean;
|
|
38
|
-
molecules: string[];
|
|
39
|
-
organisms: string[];
|
|
40
|
-
pages: string[];
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
export declare function captureFileSnapshot(exampleDir: string): Promise<FileSnapshot>;
|
|
44
|
-
export declare function compareFileSnapshots(expected: FileSnapshot, actual: FileSnapshot): {
|
|
45
|
-
matches: boolean;
|
|
46
|
-
differences: string[];
|
|
47
|
-
};
|
|
48
|
-
//# sourceMappingURL=help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