iterate 0.3.0 → 0.4.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.
Files changed (241) hide show
  1. package/README.md +164 -82
  2. package/dist/{next/api.d.ts → api.d.ts} +197 -33
  3. package/dist/{next/app-server.d.ts → app-server.d.ts} +7 -0
  4. package/dist/{next/app-server.mjs → app-server.mjs} +17 -15
  5. package/dist/app-server.mjs.map +1 -0
  6. package/dist/{next/app-session.mjs → app-session.mjs} +12 -15
  7. package/dist/app-session.mjs.map +1 -0
  8. package/dist/{next/app.mjs → app.mjs} +53 -14
  9. package/dist/app.mjs.map +1 -0
  10. package/dist/{next/client → client}/live-state.d.ts +11 -11
  11. package/dist/client/oauth.d.ts +17 -0
  12. package/dist/{next/client → client}/react.d.ts +10 -42
  13. package/dist/{next/client → client}/socket.d.ts +1 -0
  14. package/dist/client.mjs +156 -4
  15. package/dist/client.mjs.map +1 -0
  16. package/dist/{next/expression.d.ts → expression.d.ts} +11 -69
  17. package/dist/{next/expression.mjs → expression.mjs} +11 -109
  18. package/dist/expression.mjs.map +1 -0
  19. package/dist/lib-BWr-5mFO.mjs +36 -0
  20. package/dist/lib-BWr-5mFO.mjs.map +1 -0
  21. package/dist/{next/lib.d.ts → lib.d.ts} +16 -2
  22. package/dist/{next/lib.mjs → lib.mjs} +32 -3
  23. package/dist/lib.mjs.map +1 -0
  24. package/dist/node.d.ts +15 -3
  25. package/dist/node.mjs +36 -174
  26. package/dist/node.mjs.map +1 -1
  27. package/dist/{next/oauth-scopes.mjs → oauth-scopes.mjs} +1 -1
  28. package/dist/oauth-scopes.mjs.map +1 -0
  29. package/dist/{next/oauth.mjs → oauth.mjs} +14 -2
  30. package/dist/oauth.mjs.map +1 -0
  31. package/dist/principal.d.ts +8 -0
  32. package/dist/principal.mjs +8 -0
  33. package/dist/principal.mjs.map +1 -0
  34. package/dist/project-ingress.d.ts +58 -0
  35. package/dist/project-ingress.mjs +104 -0
  36. package/dist/project-ingress.mjs.map +1 -0
  37. package/dist/{next/react.mjs → react.mjs} +12 -12
  38. package/dist/react.mjs.map +1 -0
  39. package/dist/sdk/auth.d.ts +25 -0
  40. package/dist/sdk/index.d.ts +155 -0
  41. package/dist/sdk/record-pipelined-steps.d.ts +19 -0
  42. package/dist/sdk.mjs +245 -2
  43. package/dist/sdk.mjs.map +1 -0
  44. package/dist/{next/stream → stream}/processor.d.ts +28 -23
  45. package/dist/{next/stream → stream}/processor.mjs +48 -25
  46. package/dist/stream/processor.mjs.map +1 -0
  47. package/dist/{next/stream → stream}/run.d.ts +9 -6
  48. package/dist/{next/stream → stream}/run.mjs +13 -8
  49. package/dist/stream/run.mjs.map +1 -0
  50. package/dist/stream/test-support.d.ts +45 -0
  51. package/dist/stream/test-support.mjs +196 -0
  52. package/dist/stream/test-support.mjs.map +1 -0
  53. package/package.json +65 -219
  54. package/THIRD_PARTY_NOTICES.md +0 -55
  55. package/bin/iterate.js +0 -94
  56. package/dist/api-url-B6404M82.mjs +0 -17
  57. package/dist/api-url-B6404M82.mjs.map +0 -1
  58. package/dist/app-ref-BipL0feU.mjs +0 -35
  59. package/dist/app-ref-BipL0feU.mjs.map +0 -1
  60. package/dist/app-ref-C1CrgXqX.mjs +0 -7
  61. package/dist/app-ref-C1CrgXqX.mjs.map +0 -1
  62. package/dist/app-ref-DYai_om1.mjs +0 -7
  63. package/dist/app-ref-DYai_om1.mjs.map +0 -1
  64. package/dist/cli-D0c-pDL_.mjs +0 -1010
  65. package/dist/cli-D0c-pDL_.mjs.map +0 -1
  66. package/dist/client.d.ts +0 -3
  67. package/dist/cloudflare-BTm90gQ4.mjs +0 -951
  68. package/dist/cloudflare-BTm90gQ4.mjs.map +0 -1
  69. package/dist/contract-s4FW4eES.mjs +0 -309
  70. package/dist/contract-s4FW4eES.mjs.map +0 -1
  71. package/dist/document-review/index.d.ts +0 -5
  72. package/dist/document-review/types.d.ts +0 -107
  73. package/dist/document-review.mjs +0 -7015
  74. package/dist/document-review.mjs.map +0 -1
  75. package/dist/durable-object-processor-durability-CNsTjAJS.mjs +0 -205
  76. package/dist/durable-object-processor-durability-CNsTjAJS.mjs.map +0 -1
  77. package/dist/idempotency-DleloJNt.mjs +0 -28
  78. package/dist/idempotency-DleloJNt.mjs.map +0 -1
  79. package/dist/index.d.mts +0 -5
  80. package/dist/index.mjs +0 -8
  81. package/dist/index.mjs.map +0 -1
  82. package/dist/itx/api-url.d.ts +0 -6
  83. package/dist/itx/itx-node-client.d.ts +0 -65
  84. package/dist/itx/itx-session.d.ts +0 -215
  85. package/dist/itx/owned-rpc-session.d.ts +0 -14
  86. package/dist/itx/query-client.d.ts +0 -10
  87. package/dist/itx-api.generated.d.ts +0 -6195
  88. package/dist/itx-session-sjud8GiT.mjs +0 -534
  89. package/dist/itx-session-sjud8GiT.mjs.map +0 -1
  90. package/dist/live-state-BJNqOwFw.mjs +0 -299
  91. package/dist/live-state-BJNqOwFw.mjs.map +0 -1
  92. package/dist/next/app-server.mjs.map +0 -1
  93. package/dist/next/app-session.mjs.map +0 -1
  94. package/dist/next/app.mjs.map +0 -1
  95. package/dist/next/client/oauth.d.ts +0 -12
  96. package/dist/next/client.mjs +0 -156
  97. package/dist/next/client.mjs.map +0 -1
  98. package/dist/next/expression.mjs.map +0 -1
  99. package/dist/next/lib.mjs.map +0 -1
  100. package/dist/next/oauth-scopes.mjs.map +0 -1
  101. package/dist/next/oauth.mjs.map +0 -1
  102. package/dist/next/principal.d.ts +0 -64
  103. package/dist/next/principal.mjs +0 -98
  104. package/dist/next/principal.mjs.map +0 -1
  105. package/dist/next/project-ingress.d.ts +0 -37
  106. package/dist/next/project-ingress.mjs +0 -75
  107. package/dist/next/project-ingress.mjs.map +0 -1
  108. package/dist/next/react.mjs.map +0 -1
  109. package/dist/next/sdk/auth.d.ts +0 -5
  110. package/dist/next/sdk/index.d.ts +0 -112
  111. package/dist/next/sdk.mjs +0 -139
  112. package/dist/next/sdk.mjs.map +0 -1
  113. package/dist/next/stream/processor.mjs.map +0 -1
  114. package/dist/next/stream/run.mjs.map +0 -1
  115. package/dist/next-node.d.ts +0 -15
  116. package/dist/next-node.mjs +0 -51
  117. package/dist/next-node.mjs.map +0 -1
  118. package/dist/processor-host-capabilities-BMFH3KTM.mjs +0 -56
  119. package/dist/processor-host-capabilities-BMFH3KTM.mjs.map +0 -1
  120. package/dist/processors/cloudflare.d.ts +0 -3
  121. package/dist/processors/durable-object-processor-durability.d.ts +0 -79
  122. package/dist/processors/event-consumption-metrics.d.ts +0 -82
  123. package/dist/processors/idempotency.d.ts +0 -13
  124. package/dist/processors/index.d.ts +0 -12
  125. package/dist/processors/processor-contracts.d.ts +0 -342
  126. package/dist/processors/processor-facet.d.ts +0 -186
  127. package/dist/processors/processor-host-capabilities.d.ts +0 -60
  128. package/dist/processors/prompt-sections.d.ts +0 -17
  129. package/dist/processors/rpc-types.d.ts +0 -515
  130. package/dist/processors/schemas.d.ts +0 -102
  131. package/dist/processors/stream-handle.d.ts +0 -45
  132. package/dist/processors/stream-processor-keepalive.d.ts +0 -95
  133. package/dist/processors/stream-processor-registry.d.ts +0 -233
  134. package/dist/processors/stream-processor-runner.d.ts +0 -289
  135. package/dist/processors/stream-processor.d.ts +0 -339
  136. package/dist/processors/stream-runtime-metrics.d.ts +0 -107
  137. package/dist/processors/testing.d.ts +0 -302
  138. package/dist/processors-BoNyeBfQ.mjs +0 -10
  139. package/dist/processors-BoNyeBfQ.mjs.map +0 -1
  140. package/dist/processors-cloudflare.mjs +0 -3
  141. package/dist/processors-testing.mjs +0 -435
  142. package/dist/processors-testing.mjs.map +0 -1
  143. package/dist/processors.mjs +0 -52
  144. package/dist/processors.mjs.map +0 -1
  145. package/dist/protocol-DnK_f2m6.mjs +0 -251
  146. package/dist/protocol-DnK_f2m6.mjs.map +0 -1
  147. package/dist/sdk/capnweb/index.d.ts +0 -2
  148. package/dist/sdk/capnweb/live-state/compact.d.ts +0 -5
  149. package/dist/sdk/capnweb/live-state/diff.d.ts +0 -41
  150. package/dist/sdk/capnweb/live-state/engine.d.ts +0 -44
  151. package/dist/sdk/capnweb/live-state/index.d.ts +0 -41
  152. package/dist/sdk/capnweb/live-state/protocol.d.ts +0 -87
  153. package/dist/sdk/capnweb/live-state/retain.d.ts +0 -23
  154. package/dist/sdk/capnweb/live-state/store.d.ts +0 -20
  155. package/dist/sdk/capnweb/live-state/types.d.ts +0 -11
  156. package/dist/sdk/capnweb/react.d.ts +0 -45
  157. package/dist/sdk/capnweb/react.mjs +0 -316
  158. package/dist/sdk/capnweb/react.mjs.map +0 -1
  159. package/dist/sdk/capnweb.mjs +0 -4
  160. package/dist/sdk/itx/react.d.ts +0 -191
  161. package/dist/sdk/itx/react.mjs +0 -383
  162. package/dist/sdk/itx/react.mjs.map +0 -1
  163. package/dist/sdk-DMB-IM11.mjs +0 -933
  164. package/dist/sdk-DMB-IM11.mjs.map +0 -1
  165. package/dist/sdk.d.ts +0 -339
  166. package/dist/serve-itx.d.ts +0 -46
  167. package/dist/starter-apps/flake-dashboard/app-ref.d.ts +0 -31
  168. package/dist/starter-apps/flake-dashboard/configured-worker.mjs +0 -1055
  169. package/dist/starter-apps/flake-dashboard/configured-worker.mjs.map +0 -1
  170. package/dist/starter-apps/flake-dashboard/contract.d.ts +0 -4839
  171. package/dist/starter-apps/flake-dashboard/contract.mjs +0 -2
  172. package/dist/starter-apps/flake-dashboard/index.d.ts +0 -17
  173. package/dist/starter-apps/flake-dashboard/index.mjs +0 -56
  174. package/dist/starter-apps/flake-dashboard/index.mjs.map +0 -1
  175. package/dist/starter-apps/flake-dashboard/worker.d.ts +0 -4607
  176. package/dist/starter-apps/github-ai-linter/ai-linter.d.ts +0 -8914
  177. package/dist/starter-apps/github-ai-linter/configured-worker.mjs +0 -17987
  178. package/dist/starter-apps/github-ai-linter/configured-worker.mjs.map +0 -1
  179. package/dist/starter-apps/github-ai-linter/contract.d.ts +0 -9193
  180. package/dist/starter-apps/github-ai-linter/index.d.ts +0 -10
  181. package/dist/starter-apps/github-ai-linter/index.mjs +0 -36
  182. package/dist/starter-apps/github-ai-linter/index.mjs.map +0 -1
  183. package/dist/starter-apps/github-ai-linter/prompt.d.ts +0 -13
  184. package/dist/starter-apps/github-ai-linter/review-bot.d.ts +0 -808
  185. package/dist/starter-apps/github-ai-linter/rules.d.ts +0 -34
  186. package/dist/starter-apps/github-ai-linter/worker-ref.d.ts +0 -19
  187. package/dist/starter-apps/github-ai-linter/worker.d.ts +0 -19
  188. package/dist/starter-apps/github-ai-linter/worker.mjs +0 -947
  189. package/dist/starter-apps/github-ai-linter/worker.mjs.map +0 -1
  190. package/dist/starter-apps/guestbook/app-ref.d.ts +0 -27
  191. package/dist/starter-apps/guestbook/client.d.ts +0 -7
  192. package/dist/starter-apps/guestbook/client.mjs +0 -59
  193. package/dist/starter-apps/guestbook/configured-worker.mjs +0 -205
  194. package/dist/starter-apps/guestbook/configured-worker.mjs.map +0 -1
  195. package/dist/starter-apps/guestbook/index.d.ts +0 -9
  196. package/dist/starter-apps/guestbook/index.mjs +0 -31
  197. package/dist/starter-apps/guestbook/index.mjs.map +0 -1
  198. package/dist/starter-apps/guestbook/processor.d.ts +0 -2267
  199. package/dist/starter-apps/guestbook/worker.d.ts +0 -26
  200. package/dist/starter-apps/guestbook/worker.mjs +0 -191
  201. package/dist/starter-apps/guestbook/worker.mjs.map +0 -1
  202. package/dist/starter-apps/media/configured-worker.mjs +0 -577
  203. package/dist/starter-apps/media/configured-worker.mjs.map +0 -1
  204. package/dist/starter-apps/media/index.mjs +0 -36
  205. package/dist/starter-apps/media/index.mjs.map +0 -1
  206. package/dist/starter-apps/media/ref.mjs +0 -20
  207. package/dist/starter-apps/media/ref.mjs.map +0 -1
  208. package/dist/starter-apps/media/worker.mjs +0 -579
  209. package/dist/starter-apps/media/worker.mjs.map +0 -1
  210. package/dist/starter-apps/notes/configured-worker.mjs +0 -6134
  211. package/dist/starter-apps/notes/configured-worker.mjs.map +0 -1
  212. package/dist/starter-apps/notes/index.mjs +0 -23
  213. package/dist/starter-apps/notes/index.mjs.map +0 -1
  214. package/dist/starter-apps/notes/ref.mjs +0 -21
  215. package/dist/starter-apps/notes/ref.mjs.map +0 -1
  216. package/dist/starter-apps/notes/worker.mjs +0 -427
  217. package/dist/starter-apps/notes/worker.mjs.map +0 -1
  218. package/dist/starter-apps/todo/client.mjs +0 -59
  219. package/dist/starter-apps/todo/configured-worker.mjs +0 -2864
  220. package/dist/starter-apps/todo/configured-worker.mjs.map +0 -1
  221. package/dist/starter-apps/todo/index.d.ts +0 -8
  222. package/dist/starter-apps/todo/index.mjs +0 -29
  223. package/dist/starter-apps/todo/index.mjs.map +0 -1
  224. package/dist/stream-processor-keepalive-DAQTP6m3.mjs +0 -2082
  225. package/dist/stream-processor-keepalive-DAQTP6m3.mjs.map +0 -1
  226. package/dist/usingCtx-mZx5nsAW.mjs +0 -11800
  227. package/dist/usingCtx-mZx5nsAW.mjs.map +0 -1
  228. package/dist/worker-ref-DZxPDmb_.mjs +0 -390
  229. package/dist/worker-ref-DZxPDmb_.mjs.map +0 -1
  230. package/dist/worker.d.mts +0 -33
  231. package/dist/worker.mjs +0 -18
  232. package/dist/worker.mjs.map +0 -1
  233. package/menubar/Iterate.entitlements +0 -12
  234. package/menubar/Iterate.swift +0 -914
  235. package/menubar/IterateIcon.swift +0 -145
  236. package/menubar/README.md +0 -28
  237. package/menubar/build-menubar-app.sh +0 -59
  238. /package/dist/{next/api.mjs → api.mjs} +0 -0
  239. /package/dist/{next/app-session.d.ts → app-session.d.ts} +0 -0
  240. /package/dist/{next/app.d.ts → app.d.ts} +0 -0
  241. /package/dist/{next/oauth-scopes.d.ts → oauth-scopes.d.ts} +0 -0
@@ -1,4607 +0,0 @@
1
- import type { z } from "zod";
2
- import { StreamProcessor, type ProcessEventArgs, type ReduceArgs } from "../../processors/index.ts";
3
- import { StreamProcessorDurableObject, type ProcessorHostDeps, type StreamEvent } from "../../sdk.ts";
4
- import { FlakeDashboardProcessorContract, type FlakeDashboardRenderResult, type FlakeDashboardState } from "./contract.ts";
5
- /**
6
- * Where a project's CI artifacts live. Supplied by the config worker
7
- * (FlakeDashboardApp.create's config) — the starter app itself carries no
8
- * organization identity. secretPath names a project secret holding a
9
- * Depot org API read token.
10
- */
11
- export interface DepotIngestionConfig {
12
- orgId: string;
13
- secretPath: string;
14
- }
15
- /**
16
- * The whole app is this worker: everything is processEvent and reduce.
17
- * `FlakeDashboardApp.processEvent` ingests workflow_run webhooks (CI's
18
- * credential-free reporting signal) into run-recorded events and wakes the
19
- * processor for /flakes events; `FlakeDashboardProcessor.reduce` folds them;
20
- * the processor's own processEvent drives the issue render and transition
21
- * proposals. No HTTP is served.
22
- */
23
- export declare class FlakeDashboardApp extends StreamProcessorDurableObject<FlakeDashboardState> {
24
- #private;
25
- protected readonly streamPath = "/flakes";
26
- protected readonly recovery = true;
27
- protected createProcessor(deps: ProcessorHostDeps): FlakeDashboardProcessor;
28
- /**
29
- * Every flake-relevant event lands here — the same override point the
30
- * platform's own delivery uses (widened public so the config worker can
31
- * forward events over RPC). A /flakes event is a wake hint: catch-up
32
- * re-reads committed events from the stream and owns validation, ordering,
33
- * checkpointing, and dedupe.
34
- */
35
- processEvent(event: StreamEvent, options?: {
36
- depot?: DepotIngestionConfig;
37
- }): Promise<void>;
38
- /** Internal RPC surface used by smoke checks and debugging. */
39
- getState(): Promise<FlakeDashboardState>;
40
- }
41
- type FlakeDashboardProcessorDeps = {
42
- /**
43
- * Upsert the GitHub dashboard issue from folded state. Injected so the
44
- * harness tests run against a fake; the worker builds the real one over
45
- * itx's GitHub integration. Throwing settles the render as failed.
46
- */
47
- renderDashboard: (state: FlakeDashboardState) => Promise<Extract<FlakeDashboardRenderResult, {
48
- status: "succeeded";
49
- }>>;
50
- };
51
- /**
52
- * One instance runs on the project's `/flakes` stream. CI appends
53
- * `run-recorded` events; this processor folds them into per-test stats, owns
54
- * the GitHub issue render as its durable obligation, and proposes lifecycle
55
- * transitions when a default-branch streak crosses a threshold.
56
- */
57
- export declare class FlakeDashboardProcessor extends StreamProcessor<FlakeDashboardProcessorContract, FlakeDashboardProcessorDeps> {
58
- #private;
59
- readonly contract: {
60
- slug: string;
61
- version: string;
62
- description: string;
63
- stateSchema: z.ZodObject<{
64
- birthCertificate: z.ZodDefault<z.ZodNullable<z.ZodObject<{
65
- config: z.ZodObject<{
66
- repository: z.ZodObject<{
67
- owner: z.ZodString;
68
- repo: z.ZodString;
69
- }, z.core.$strip>;
70
- issueTitle: z.ZodString;
71
- defaultBranch: z.ZodString;
72
- }, z.core.$strip>;
73
- }, z.core.$strip>>>;
74
- tests: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
75
- kind: z.ZodDefault<z.ZodEnum<{
76
- unknown: "unknown";
77
- flake: "flake";
78
- failing: "failing";
79
- }>>;
80
- pattern: z.ZodDefault<z.ZodString>;
81
- suites: z.ZodDefault<z.ZodArray<z.ZodString>>;
82
- lastSeenOffset: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
83
- recent: z.ZodDefault<z.ZodArray<z.ZodObject<{
84
- outcome: z.ZodEnum<{
85
- pass: "pass";
86
- "flake-fail": "flake-fail";
87
- "unexpected-error": "unexpected-error";
88
- "pinned-fail": "pinned-fail";
89
- "unexpected-pass": "unexpected-pass";
90
- "retried-pass": "retried-pass";
91
- }>;
92
- commit: z.ZodString;
93
- at: z.ZodString;
94
- }, z.core.$strip>>>;
95
- counts: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
96
- recentErrors: z.ZodDefault<z.ZodArray<z.ZodObject<{
97
- error: z.ZodString;
98
- commit: z.ZodString;
99
- at: z.ZodString;
100
- }, z.core.$strip>>>;
101
- lastFlakeAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
102
- firstRecordedAt: z.ZodString;
103
- lastRecordedAt: z.ZodString;
104
- defaultBranchStreak: z.ZodDefault<z.ZodNullable<z.ZodObject<{
105
- outcome: z.ZodEnum<{
106
- pass: "pass";
107
- "flake-fail": "flake-fail";
108
- "unexpected-error": "unexpected-error";
109
- "pinned-fail": "pinned-fail";
110
- "unexpected-pass": "unexpected-pass";
111
- "retried-pass": "retried-pass";
112
- }>;
113
- runs: z.ZodNumber;
114
- firstAt: z.ZodString;
115
- lastAt: z.ZodString;
116
- }, z.core.$strip>>>;
117
- lastMainWrapperAt: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
118
- proposed: z.ZodDefault<z.ZodArray<z.ZodString>>;
119
- }, z.core.$strip>>>;
120
- unknownFlakes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
121
- record: z.ZodObject<{
122
- name: z.ZodString;
123
- kind: z.ZodDefault<z.ZodEnum<{
124
- unknown: "unknown";
125
- flake: "flake";
126
- failing: "failing";
127
- }>>;
128
- outcome: z.ZodEnum<{
129
- pass: "pass";
130
- "flake-fail": "flake-fail";
131
- "unexpected-error": "unexpected-error";
132
- "pinned-fail": "pinned-fail";
133
- "unexpected-pass": "unexpected-pass";
134
- "retried-pass": "retried-pass";
135
- }>;
136
- pattern: z.ZodOptional<z.ZodString>;
137
- durationMs: z.ZodNumber;
138
- at: z.ZodString;
139
- error: z.ZodOptional<z.ZodString>;
140
- }, z.core.$strip>;
141
- passStreak: z.ZodNumber;
142
- lastRunAt: z.ZodString;
143
- recent: z.ZodArray<z.ZodObject<{
144
- outcome: z.ZodEnum<{
145
- pass: "pass";
146
- "flake-fail": "flake-fail";
147
- "unexpected-error": "unexpected-error";
148
- "pinned-fail": "pinned-fail";
149
- "unexpected-pass": "unexpected-pass";
150
- "retried-pass": "retried-pass";
151
- }>;
152
- commit: z.ZodString;
153
- at: z.ZodString;
154
- }, z.core.$strip>>;
155
- }, z.core.$strip>>>>;
156
- mainRuns: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
157
- latest: z.ZodObject<{
158
- runId: z.ZodString;
159
- commit: z.ZodString;
160
- summary: z.ZodObject<{
161
- headSha: z.ZodString;
162
- branch: z.ZodString;
163
- status: z.ZodEnum<{
164
- incomplete: "incomplete";
165
- complete: "complete";
166
- }>;
167
- startedAt: z.ZodISODateTime;
168
- finishedAt: z.ZodISODateTime;
169
- testCount: z.ZodNumber;
170
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
171
- name: z.ZodString;
172
- outcome: z.ZodEnum<{
173
- skip: "skip";
174
- pass: "pass";
175
- fail: "fail";
176
- }>;
177
- }, z.core.$strip>>>;
178
- unknownFlakeCount: z.ZodNumber;
179
- failedCount: z.ZodNumber;
180
- diagnostics: z.ZodArray<z.ZodString>;
181
- runUrl: z.ZodURL;
182
- }, z.core.$strip>;
183
- }, z.core.$strip>;
184
- complete: z.ZodNullable<z.ZodObject<{
185
- runId: z.ZodString;
186
- commit: z.ZodString;
187
- summary: z.ZodObject<{
188
- headSha: z.ZodString;
189
- branch: z.ZodString;
190
- status: z.ZodEnum<{
191
- incomplete: "incomplete";
192
- complete: "complete";
193
- }>;
194
- startedAt: z.ZodISODateTime;
195
- finishedAt: z.ZodISODateTime;
196
- testCount: z.ZodNumber;
197
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
198
- name: z.ZodString;
199
- outcome: z.ZodEnum<{
200
- skip: "skip";
201
- pass: "pass";
202
- fail: "fail";
203
- }>;
204
- }, z.core.$strip>>>;
205
- unknownFlakeCount: z.ZodNumber;
206
- failedCount: z.ZodNumber;
207
- diagnostics: z.ZodArray<z.ZodString>;
208
- runUrl: z.ZodURL;
209
- }, z.core.$strip>;
210
- }, z.core.$strip>>;
211
- inventory: z.ZodDefault<z.ZodNullable<z.ZodObject<{
212
- startedAt: z.ZodISODateTime;
213
- names: z.ZodArray<z.ZodString>;
214
- }, z.core.$strip>>>;
215
- }, z.core.$strip>>>;
216
- suites: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
217
- recentRunOffsets: z.ZodDefault<z.ZodArray<z.ZodNumber>>;
218
- }, z.core.$strip>>>;
219
- lastDataOffset: z.ZodDefault<z.ZodNumber>;
220
- render: z.ZodDefault<z.ZodNullable<z.ZodObject<{
221
- throughOffset: z.ZodNumber;
222
- issueNumber: z.ZodNullable<z.ZodNumber>;
223
- issueUrl: z.ZodNullable<z.ZodString>;
224
- }, z.core.$strip>>>;
225
- }, z.core.$strip>;
226
- processorDeps?: readonly [] | undefined;
227
- events: {
228
- readonly "events.iterate.com/flakes/created": {
229
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
230
- readonly payloadSchema: z.ZodObject<{
231
- config: z.ZodObject<{
232
- repository: z.ZodObject<{
233
- owner: z.ZodString;
234
- repo: z.ZodString;
235
- }, z.core.$strip>;
236
- issueTitle: z.ZodString;
237
- defaultBranch: z.ZodString;
238
- }, z.core.$strip>;
239
- }, z.core.$strip>;
240
- readonly examples: readonly [{
241
- readonly description: "The dogfood dashboard for this repo.";
242
- readonly payload: {
243
- readonly config: {
244
- readonly repository: {
245
- readonly owner: "iterate";
246
- readonly repo: "iterate";
247
- };
248
- readonly issueTitle: "Flake dashboard";
249
- readonly defaultBranch: "main";
250
- };
251
- };
252
- }];
253
- };
254
- readonly "events.iterate.com/flakes/run-recorded": {
255
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
256
- readonly payloadSchema: z.ZodObject<{
257
- runId: z.ZodString;
258
- suite: z.ZodString;
259
- branch: z.ZodString;
260
- commit: z.ZodString;
261
- records: z.ZodArray<z.ZodObject<{
262
- name: z.ZodString;
263
- kind: z.ZodDefault<z.ZodEnum<{
264
- unknown: "unknown";
265
- flake: "flake";
266
- failing: "failing";
267
- }>>;
268
- outcome: z.ZodEnum<{
269
- pass: "pass";
270
- "flake-fail": "flake-fail";
271
- "unexpected-error": "unexpected-error";
272
- "pinned-fail": "pinned-fail";
273
- "unexpected-pass": "unexpected-pass";
274
- "retried-pass": "retried-pass";
275
- }>;
276
- pattern: z.ZodOptional<z.ZodString>;
277
- durationMs: z.ZodNumber;
278
- at: z.ZodString;
279
- error: z.ZodOptional<z.ZodString>;
280
- }, z.core.$strip>>;
281
- summary: z.ZodOptional<z.ZodObject<{
282
- headSha: z.ZodString;
283
- branch: z.ZodString;
284
- status: z.ZodEnum<{
285
- incomplete: "incomplete";
286
- complete: "complete";
287
- }>;
288
- startedAt: z.ZodISODateTime;
289
- finishedAt: z.ZodISODateTime;
290
- testCount: z.ZodNumber;
291
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
292
- name: z.ZodString;
293
- outcome: z.ZodEnum<{
294
- skip: "skip";
295
- pass: "pass";
296
- fail: "fail";
297
- }>;
298
- }, z.core.$strip>>>;
299
- unknownFlakeCount: z.ZodNumber;
300
- failedCount: z.ZodNumber;
301
- diagnostics: z.ZodArray<z.ZodString>;
302
- runUrl: z.ZodURL;
303
- }, z.core.$strip>>;
304
- }, z.core.$strip>;
305
- };
306
- readonly "events.iterate.com/flakes/transition-proposed": {
307
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
308
- readonly payloadSchema: z.ZodObject<{
309
- testName: z.ZodString;
310
- transition: z.ZodEnum<{
311
- unwrap: "unwrap";
312
- "switch-to-failing": "switch-to-failing";
313
- "unwrap-failing": "unwrap-failing";
314
- }>;
315
- evidence: z.ZodObject<{
316
- consecutiveRuns: z.ZodNumber;
317
- firstAt: z.ZodString;
318
- lastAt: z.ZodString;
319
- }, z.core.$strip>;
320
- }, z.core.$strip>;
321
- };
322
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
323
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
324
- readonly payloadSchema: z.ZodObject<{
325
- throughOffset: z.ZodNumber;
326
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
327
- status: z.ZodLiteral<"succeeded">;
328
- issueNumber: z.ZodNumber;
329
- issueUrl: z.ZodString;
330
- }, z.core.$strip>, z.ZodObject<{
331
- status: z.ZodLiteral<"failed">;
332
- error: z.ZodString;
333
- }, z.core.$strip>], "status">;
334
- }, z.core.$strip>;
335
- };
336
- };
337
- consumes: readonly ("events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled")[];
338
- emits: readonly ["events.iterate.com/flakes/transition-proposed", "events.iterate.com/flakes/dashboard-render-settled"];
339
- buildEvent: <const Event extends ((Omit<{
340
- type: string;
341
- payload?: Record<string, unknown> | undefined;
342
- metadata?: Record<string, unknown> | undefined;
343
- source?: {
344
- processor?: {
345
- slug: string;
346
- version: string;
347
- stream: {
348
- path: string;
349
- projectId: string | null;
350
- streamId: string;
351
- };
352
- whileProcessing?: {
353
- offset: number;
354
- type: string;
355
- } | undefined;
356
- } | undefined;
357
- copiedFrom?: {
358
- name: string;
359
- streamId: string;
360
- streamCreatedAt: string;
361
- cursorChangedAtSourceOffset: number;
362
- createdAt: string;
363
- offset: number;
364
- path: string;
365
- projectId: string | null;
366
- type: string;
367
- }[] | undefined;
368
- } | undefined;
369
- idempotencyKey?: string | undefined;
370
- ephemeral?: true | undefined;
371
- }, "payload" | "type"> & {
372
- type: "events.iterate.com/flakes/transition-proposed";
373
- payload: {
374
- testName: string;
375
- transition: "unwrap" | "switch-to-failing" | "unwrap-failing";
376
- evidence: {
377
- consecutiveRuns: number;
378
- firstAt: string;
379
- lastAt: string;
380
- };
381
- };
382
- }) | (Omit<{
383
- type: string;
384
- payload?: Record<string, unknown> | undefined;
385
- metadata?: Record<string, unknown> | undefined;
386
- source?: {
387
- processor?: {
388
- slug: string;
389
- version: string;
390
- stream: {
391
- path: string;
392
- projectId: string | null;
393
- streamId: string;
394
- };
395
- whileProcessing?: {
396
- offset: number;
397
- type: string;
398
- } | undefined;
399
- } | undefined;
400
- copiedFrom?: {
401
- name: string;
402
- streamId: string;
403
- streamCreatedAt: string;
404
- cursorChangedAtSourceOffset: number;
405
- createdAt: string;
406
- offset: number;
407
- path: string;
408
- projectId: string | null;
409
- type: string;
410
- }[] | undefined;
411
- } | undefined;
412
- idempotencyKey?: string | undefined;
413
- ephemeral?: true | undefined;
414
- }, "payload" | "type"> & {
415
- type: "events.iterate.com/flakes/dashboard-render-settled";
416
- payload: {
417
- throughOffset: number;
418
- result: {
419
- status: "succeeded";
420
- issueNumber: number;
421
- issueUrl: string;
422
- } | {
423
- status: "failed";
424
- error: string;
425
- };
426
- };
427
- }) | (Omit<{
428
- type: string;
429
- payload?: Record<string, unknown> | undefined;
430
- metadata?: Record<string, unknown> | undefined;
431
- source?: {
432
- processor?: {
433
- slug: string;
434
- version: string;
435
- stream: {
436
- path: string;
437
- projectId: string | null;
438
- streamId: string;
439
- };
440
- whileProcessing?: {
441
- offset: number;
442
- type: string;
443
- } | undefined;
444
- } | undefined;
445
- copiedFrom?: {
446
- name: string;
447
- streamId: string;
448
- streamCreatedAt: string;
449
- cursorChangedAtSourceOffset: number;
450
- createdAt: string;
451
- offset: number;
452
- path: string;
453
- projectId: string | null;
454
- type: string;
455
- }[] | undefined;
456
- } | undefined;
457
- idempotencyKey?: string | undefined;
458
- ephemeral?: true | undefined;
459
- }, "payload" | "type"> & {
460
- type: "events.iterate.com/flakes/created";
461
- payload: {
462
- config: {
463
- repository: {
464
- owner: string;
465
- repo: string;
466
- };
467
- issueTitle: string;
468
- defaultBranch: string;
469
- };
470
- };
471
- }) | (Omit<{
472
- type: string;
473
- payload?: Record<string, unknown> | undefined;
474
- metadata?: Record<string, unknown> | undefined;
475
- source?: {
476
- processor?: {
477
- slug: string;
478
- version: string;
479
- stream: {
480
- path: string;
481
- projectId: string | null;
482
- streamId: string;
483
- };
484
- whileProcessing?: {
485
- offset: number;
486
- type: string;
487
- } | undefined;
488
- } | undefined;
489
- copiedFrom?: {
490
- name: string;
491
- streamId: string;
492
- streamCreatedAt: string;
493
- cursorChangedAtSourceOffset: number;
494
- createdAt: string;
495
- offset: number;
496
- path: string;
497
- projectId: string | null;
498
- type: string;
499
- }[] | undefined;
500
- } | undefined;
501
- idempotencyKey?: string | undefined;
502
- ephemeral?: true | undefined;
503
- }, "payload" | "type"> & {
504
- type: "events.iterate.com/flakes/run-recorded";
505
- payload: {
506
- runId: string;
507
- suite: string;
508
- branch: string;
509
- commit: string;
510
- records: {
511
- name: string;
512
- outcome: "pass" | "flake-fail" | "unexpected-error" | "pinned-fail" | "unexpected-pass" | "retried-pass";
513
- durationMs: number;
514
- at: string;
515
- kind?: "unknown" | "flake" | "failing" | undefined;
516
- pattern?: string | undefined;
517
- error?: string | undefined;
518
- }[];
519
- summary?: {
520
- headSha: string;
521
- branch: string;
522
- status: "incomplete" | "complete";
523
- startedAt: string;
524
- finishedAt: string;
525
- testCount: number;
526
- unknownFlakeCount: number;
527
- failedCount: number;
528
- diagnostics: string[];
529
- runUrl: string;
530
- tests?: {
531
- name: string;
532
- outcome: "skip" | "pass" | "fail";
533
- }[] | undefined;
534
- } | undefined;
535
- };
536
- })) & {
537
- type: string;
538
- }>(event: Event) => Event extends unknown ? Omit<Event, "payload"> & Pick<Event["type"] extends infer T ? T extends Event["type"] ? T extends unknown ? (T extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
539
- readonly "events.iterate.com/flakes/created": {
540
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
541
- readonly payloadSchema: z.ZodObject<{
542
- config: z.ZodObject<{
543
- repository: z.ZodObject<{
544
- owner: z.ZodString;
545
- repo: z.ZodString;
546
- }, z.core.$strip>;
547
- issueTitle: z.ZodString;
548
- defaultBranch: z.ZodString;
549
- }, z.core.$strip>;
550
- }, z.core.$strip>;
551
- readonly examples: readonly [{
552
- readonly description: "The dogfood dashboard for this repo.";
553
- readonly payload: {
554
- readonly config: {
555
- readonly repository: {
556
- readonly owner: "iterate";
557
- readonly repo: "iterate";
558
- };
559
- readonly issueTitle: "Flake dashboard";
560
- readonly defaultBranch: "main";
561
- };
562
- };
563
- }];
564
- };
565
- readonly "events.iterate.com/flakes/run-recorded": {
566
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
567
- readonly payloadSchema: z.ZodObject<{
568
- runId: z.ZodString;
569
- suite: z.ZodString;
570
- branch: z.ZodString;
571
- commit: z.ZodString;
572
- records: z.ZodArray<z.ZodObject<{
573
- name: z.ZodString;
574
- kind: z.ZodDefault<z.ZodEnum<{
575
- unknown: "unknown";
576
- flake: "flake";
577
- failing: "failing";
578
- }>>;
579
- outcome: z.ZodEnum<{
580
- pass: "pass";
581
- "flake-fail": "flake-fail";
582
- "unexpected-error": "unexpected-error";
583
- "pinned-fail": "pinned-fail";
584
- "unexpected-pass": "unexpected-pass";
585
- "retried-pass": "retried-pass";
586
- }>;
587
- pattern: z.ZodOptional<z.ZodString>;
588
- durationMs: z.ZodNumber;
589
- at: z.ZodString;
590
- error: z.ZodOptional<z.ZodString>;
591
- }, z.core.$strip>>;
592
- summary: z.ZodOptional<z.ZodObject<{
593
- headSha: z.ZodString;
594
- branch: z.ZodString;
595
- status: z.ZodEnum<{
596
- incomplete: "incomplete";
597
- complete: "complete";
598
- }>;
599
- startedAt: z.ZodISODateTime;
600
- finishedAt: z.ZodISODateTime;
601
- testCount: z.ZodNumber;
602
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
603
- name: z.ZodString;
604
- outcome: z.ZodEnum<{
605
- skip: "skip";
606
- pass: "pass";
607
- fail: "fail";
608
- }>;
609
- }, z.core.$strip>>>;
610
- unknownFlakeCount: z.ZodNumber;
611
- failedCount: z.ZodNumber;
612
- diagnostics: z.ZodArray<z.ZodString>;
613
- runUrl: z.ZodURL;
614
- }, z.core.$strip>>;
615
- }, z.core.$strip>;
616
- };
617
- readonly "events.iterate.com/flakes/transition-proposed": {
618
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
619
- readonly payloadSchema: z.ZodObject<{
620
- testName: z.ZodString;
621
- transition: z.ZodEnum<{
622
- unwrap: "unwrap";
623
- "switch-to-failing": "switch-to-failing";
624
- "unwrap-failing": "unwrap-failing";
625
- }>;
626
- evidence: z.ZodObject<{
627
- consecutiveRuns: z.ZodNumber;
628
- firstAt: z.ZodString;
629
- lastAt: z.ZodString;
630
- }, z.core.$strip>;
631
- }, z.core.$strip>;
632
- };
633
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
634
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
635
- readonly payloadSchema: z.ZodObject<{
636
- throughOffset: z.ZodNumber;
637
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
638
- status: z.ZodLiteral<"succeeded">;
639
- issueNumber: z.ZodNumber;
640
- issueUrl: z.ZodString;
641
- }, z.core.$strip>, z.ZodObject<{
642
- status: z.ZodLiteral<"failed">;
643
- error: z.ZodString;
644
- }, z.core.$strip>], "status">;
645
- }, z.core.$strip>;
646
- };
647
- }[T] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<{
648
- type: string;
649
- payload?: Record<string, unknown> | undefined;
650
- metadata?: Record<string, unknown> | undefined;
651
- source?: {
652
- processor?: {
653
- slug: string;
654
- version: string;
655
- stream: {
656
- path: string;
657
- projectId: string | null;
658
- streamId: string;
659
- };
660
- whileProcessing?: {
661
- offset: number;
662
- type: string;
663
- } | undefined;
664
- } | undefined;
665
- copiedFrom?: {
666
- name: string;
667
- streamId: string;
668
- streamCreatedAt: string;
669
- cursorChangedAtSourceOffset: number;
670
- createdAt: string;
671
- offset: number;
672
- path: string;
673
- projectId: string | null;
674
- type: string;
675
- }[] | undefined;
676
- } | undefined;
677
- idempotencyKey?: string | undefined;
678
- ephemeral?: true | undefined;
679
- }, "payload" | "type"> & {
680
- type: T;
681
- payload: PayloadOutput;
682
- } & {
683
- payload: PayloadOutput;
684
- } & (import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
685
- readonly "events.iterate.com/flakes/created": {
686
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
687
- readonly payloadSchema: z.ZodObject<{
688
- config: z.ZodObject<{
689
- repository: z.ZodObject<{
690
- owner: z.ZodString;
691
- repo: z.ZodString;
692
- }, z.core.$strip>;
693
- issueTitle: z.ZodString;
694
- defaultBranch: z.ZodString;
695
- }, z.core.$strip>;
696
- }, z.core.$strip>;
697
- readonly examples: readonly [{
698
- readonly description: "The dogfood dashboard for this repo.";
699
- readonly payload: {
700
- readonly config: {
701
- readonly repository: {
702
- readonly owner: "iterate";
703
- readonly repo: "iterate";
704
- };
705
- readonly issueTitle: "Flake dashboard";
706
- readonly defaultBranch: "main";
707
- };
708
- };
709
- }];
710
- };
711
- readonly "events.iterate.com/flakes/run-recorded": {
712
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
713
- readonly payloadSchema: z.ZodObject<{
714
- runId: z.ZodString;
715
- suite: z.ZodString;
716
- branch: z.ZodString;
717
- commit: z.ZodString;
718
- records: z.ZodArray<z.ZodObject<{
719
- name: z.ZodString;
720
- kind: z.ZodDefault<z.ZodEnum<{
721
- unknown: "unknown";
722
- flake: "flake";
723
- failing: "failing";
724
- }>>;
725
- outcome: z.ZodEnum<{
726
- pass: "pass";
727
- "flake-fail": "flake-fail";
728
- "unexpected-error": "unexpected-error";
729
- "pinned-fail": "pinned-fail";
730
- "unexpected-pass": "unexpected-pass";
731
- "retried-pass": "retried-pass";
732
- }>;
733
- pattern: z.ZodOptional<z.ZodString>;
734
- durationMs: z.ZodNumber;
735
- at: z.ZodString;
736
- error: z.ZodOptional<z.ZodString>;
737
- }, z.core.$strip>>;
738
- summary: z.ZodOptional<z.ZodObject<{
739
- headSha: z.ZodString;
740
- branch: z.ZodString;
741
- status: z.ZodEnum<{
742
- incomplete: "incomplete";
743
- complete: "complete";
744
- }>;
745
- startedAt: z.ZodISODateTime;
746
- finishedAt: z.ZodISODateTime;
747
- testCount: z.ZodNumber;
748
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
749
- name: z.ZodString;
750
- outcome: z.ZodEnum<{
751
- skip: "skip";
752
- pass: "pass";
753
- fail: "fail";
754
- }>;
755
- }, z.core.$strip>>>;
756
- unknownFlakeCount: z.ZodNumber;
757
- failedCount: z.ZodNumber;
758
- diagnostics: z.ZodArray<z.ZodString>;
759
- runUrl: z.ZodURL;
760
- }, z.core.$strip>>;
761
- }, z.core.$strip>;
762
- };
763
- readonly "events.iterate.com/flakes/transition-proposed": {
764
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
765
- readonly payloadSchema: z.ZodObject<{
766
- testName: z.ZodString;
767
- transition: z.ZodEnum<{
768
- unwrap: "unwrap";
769
- "switch-to-failing": "switch-to-failing";
770
- "unwrap-failing": "unwrap-failing";
771
- }>;
772
- evidence: z.ZodObject<{
773
- consecutiveRuns: z.ZodNumber;
774
- firstAt: z.ZodString;
775
- lastAt: z.ZodString;
776
- }, z.core.$strip>;
777
- }, z.core.$strip>;
778
- };
779
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
780
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
781
- readonly payloadSchema: z.ZodObject<{
782
- throughOffset: z.ZodNumber;
783
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
784
- status: z.ZodLiteral<"succeeded">;
785
- issueNumber: z.ZodNumber;
786
- issueUrl: z.ZodString;
787
- }, z.core.$strip>, z.ZodObject<{
788
- status: z.ZodLiteral<"failed">;
789
- error: z.ZodString;
790
- }, z.core.$strip>], "status">;
791
- }, z.core.$strip>;
792
- };
793
- }[T] : never) extends infer T_1 ? T_1 extends import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
794
- readonly "events.iterate.com/flakes/created": {
795
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
796
- readonly payloadSchema: z.ZodObject<{
797
- config: z.ZodObject<{
798
- repository: z.ZodObject<{
799
- owner: z.ZodString;
800
- repo: z.ZodString;
801
- }, z.core.$strip>;
802
- issueTitle: z.ZodString;
803
- defaultBranch: z.ZodString;
804
- }, z.core.$strip>;
805
- }, z.core.$strip>;
806
- readonly examples: readonly [{
807
- readonly description: "The dogfood dashboard for this repo.";
808
- readonly payload: {
809
- readonly config: {
810
- readonly repository: {
811
- readonly owner: "iterate";
812
- readonly repo: "iterate";
813
- };
814
- readonly issueTitle: "Flake dashboard";
815
- readonly defaultBranch: "main";
816
- };
817
- };
818
- }];
819
- };
820
- readonly "events.iterate.com/flakes/run-recorded": {
821
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
822
- readonly payloadSchema: z.ZodObject<{
823
- runId: z.ZodString;
824
- suite: z.ZodString;
825
- branch: z.ZodString;
826
- commit: z.ZodString;
827
- records: z.ZodArray<z.ZodObject<{
828
- name: z.ZodString;
829
- kind: z.ZodDefault<z.ZodEnum<{
830
- unknown: "unknown";
831
- flake: "flake";
832
- failing: "failing";
833
- }>>;
834
- outcome: z.ZodEnum<{
835
- pass: "pass";
836
- "flake-fail": "flake-fail";
837
- "unexpected-error": "unexpected-error";
838
- "pinned-fail": "pinned-fail";
839
- "unexpected-pass": "unexpected-pass";
840
- "retried-pass": "retried-pass";
841
- }>;
842
- pattern: z.ZodOptional<z.ZodString>;
843
- durationMs: z.ZodNumber;
844
- at: z.ZodString;
845
- error: z.ZodOptional<z.ZodString>;
846
- }, z.core.$strip>>;
847
- summary: z.ZodOptional<z.ZodObject<{
848
- headSha: z.ZodString;
849
- branch: z.ZodString;
850
- status: z.ZodEnum<{
851
- incomplete: "incomplete";
852
- complete: "complete";
853
- }>;
854
- startedAt: z.ZodISODateTime;
855
- finishedAt: z.ZodISODateTime;
856
- testCount: z.ZodNumber;
857
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
858
- name: z.ZodString;
859
- outcome: z.ZodEnum<{
860
- skip: "skip";
861
- pass: "pass";
862
- fail: "fail";
863
- }>;
864
- }, z.core.$strip>>>;
865
- unknownFlakeCount: z.ZodNumber;
866
- failedCount: z.ZodNumber;
867
- diagnostics: z.ZodArray<z.ZodString>;
868
- runUrl: z.ZodURL;
869
- }, z.core.$strip>>;
870
- }, z.core.$strip>;
871
- };
872
- readonly "events.iterate.com/flakes/transition-proposed": {
873
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
874
- readonly payloadSchema: z.ZodObject<{
875
- testName: z.ZodString;
876
- transition: z.ZodEnum<{
877
- unwrap: "unwrap";
878
- "switch-to-failing": "switch-to-failing";
879
- "unwrap-failing": "unwrap-failing";
880
- }>;
881
- evidence: z.ZodObject<{
882
- consecutiveRuns: z.ZodNumber;
883
- firstAt: z.ZodString;
884
- lastAt: z.ZodString;
885
- }, z.core.$strip>;
886
- }, z.core.$strip>;
887
- };
888
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
889
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
890
- readonly payloadSchema: z.ZodObject<{
891
- throughOffset: z.ZodNumber;
892
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
893
- status: z.ZodLiteral<"succeeded">;
894
- issueNumber: z.ZodNumber;
895
- issueUrl: z.ZodString;
896
- }, z.core.$strip>, z.ZodObject<{
897
- status: z.ZodLiteral<"failed">;
898
- error: z.ZodString;
899
- }, z.core.$strip>], "status">;
900
- }, z.core.$strip>;
901
- };
902
- }[T] : never) ? T_1 extends {
903
- ephemeral: true;
904
- } ? {
905
- ephemeral: true;
906
- } : unknown : never : never) : never : never : never : never, "payload"> & ((Event["type"] extends infer T_2 ? T_2 extends Event["type"] ? T_2 extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
907
- readonly "events.iterate.com/flakes/created": {
908
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
909
- readonly payloadSchema: z.ZodObject<{
910
- config: z.ZodObject<{
911
- repository: z.ZodObject<{
912
- owner: z.ZodString;
913
- repo: z.ZodString;
914
- }, z.core.$strip>;
915
- issueTitle: z.ZodString;
916
- defaultBranch: z.ZodString;
917
- }, z.core.$strip>;
918
- }, z.core.$strip>;
919
- readonly examples: readonly [{
920
- readonly description: "The dogfood dashboard for this repo.";
921
- readonly payload: {
922
- readonly config: {
923
- readonly repository: {
924
- readonly owner: "iterate";
925
- readonly repo: "iterate";
926
- };
927
- readonly issueTitle: "Flake dashboard";
928
- readonly defaultBranch: "main";
929
- };
930
- };
931
- }];
932
- };
933
- readonly "events.iterate.com/flakes/run-recorded": {
934
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
935
- readonly payloadSchema: z.ZodObject<{
936
- runId: z.ZodString;
937
- suite: z.ZodString;
938
- branch: z.ZodString;
939
- commit: z.ZodString;
940
- records: z.ZodArray<z.ZodObject<{
941
- name: z.ZodString;
942
- kind: z.ZodDefault<z.ZodEnum<{
943
- unknown: "unknown";
944
- flake: "flake";
945
- failing: "failing";
946
- }>>;
947
- outcome: z.ZodEnum<{
948
- pass: "pass";
949
- "flake-fail": "flake-fail";
950
- "unexpected-error": "unexpected-error";
951
- "pinned-fail": "pinned-fail";
952
- "unexpected-pass": "unexpected-pass";
953
- "retried-pass": "retried-pass";
954
- }>;
955
- pattern: z.ZodOptional<z.ZodString>;
956
- durationMs: z.ZodNumber;
957
- at: z.ZodString;
958
- error: z.ZodOptional<z.ZodString>;
959
- }, z.core.$strip>>;
960
- summary: z.ZodOptional<z.ZodObject<{
961
- headSha: z.ZodString;
962
- branch: z.ZodString;
963
- status: z.ZodEnum<{
964
- incomplete: "incomplete";
965
- complete: "complete";
966
- }>;
967
- startedAt: z.ZodISODateTime;
968
- finishedAt: z.ZodISODateTime;
969
- testCount: z.ZodNumber;
970
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
971
- name: z.ZodString;
972
- outcome: z.ZodEnum<{
973
- skip: "skip";
974
- pass: "pass";
975
- fail: "fail";
976
- }>;
977
- }, z.core.$strip>>>;
978
- unknownFlakeCount: z.ZodNumber;
979
- failedCount: z.ZodNumber;
980
- diagnostics: z.ZodArray<z.ZodString>;
981
- runUrl: z.ZodURL;
982
- }, z.core.$strip>>;
983
- }, z.core.$strip>;
984
- };
985
- readonly "events.iterate.com/flakes/transition-proposed": {
986
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
987
- readonly payloadSchema: z.ZodObject<{
988
- testName: z.ZodString;
989
- transition: z.ZodEnum<{
990
- unwrap: "unwrap";
991
- "switch-to-failing": "switch-to-failing";
992
- "unwrap-failing": "unwrap-failing";
993
- }>;
994
- evidence: z.ZodObject<{
995
- consecutiveRuns: z.ZodNumber;
996
- firstAt: z.ZodString;
997
- lastAt: z.ZodString;
998
- }, z.core.$strip>;
999
- }, z.core.$strip>;
1000
- };
1001
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
1002
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
1003
- readonly payloadSchema: z.ZodObject<{
1004
- throughOffset: z.ZodNumber;
1005
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
1006
- status: z.ZodLiteral<"succeeded">;
1007
- issueNumber: z.ZodNumber;
1008
- issueUrl: z.ZodString;
1009
- }, z.core.$strip>, z.ZodObject<{
1010
- status: z.ZodLiteral<"failed">;
1011
- error: z.ZodString;
1012
- }, z.core.$strip>], "status">;
1013
- }, z.core.$strip>;
1014
- };
1015
- }[T_2] : never : never : never) extends infer T_3 ? T_3 extends (Event["type"] extends infer T_4 ? T_4 extends Event["type"] ? T_4 extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
1016
- readonly "events.iterate.com/flakes/created": {
1017
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
1018
- readonly payloadSchema: z.ZodObject<{
1019
- config: z.ZodObject<{
1020
- repository: z.ZodObject<{
1021
- owner: z.ZodString;
1022
- repo: z.ZodString;
1023
- }, z.core.$strip>;
1024
- issueTitle: z.ZodString;
1025
- defaultBranch: z.ZodString;
1026
- }, z.core.$strip>;
1027
- }, z.core.$strip>;
1028
- readonly examples: readonly [{
1029
- readonly description: "The dogfood dashboard for this repo.";
1030
- readonly payload: {
1031
- readonly config: {
1032
- readonly repository: {
1033
- readonly owner: "iterate";
1034
- readonly repo: "iterate";
1035
- };
1036
- readonly issueTitle: "Flake dashboard";
1037
- readonly defaultBranch: "main";
1038
- };
1039
- };
1040
- }];
1041
- };
1042
- readonly "events.iterate.com/flakes/run-recorded": {
1043
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
1044
- readonly payloadSchema: z.ZodObject<{
1045
- runId: z.ZodString;
1046
- suite: z.ZodString;
1047
- branch: z.ZodString;
1048
- commit: z.ZodString;
1049
- records: z.ZodArray<z.ZodObject<{
1050
- name: z.ZodString;
1051
- kind: z.ZodDefault<z.ZodEnum<{
1052
- unknown: "unknown";
1053
- flake: "flake";
1054
- failing: "failing";
1055
- }>>;
1056
- outcome: z.ZodEnum<{
1057
- pass: "pass";
1058
- "flake-fail": "flake-fail";
1059
- "unexpected-error": "unexpected-error";
1060
- "pinned-fail": "pinned-fail";
1061
- "unexpected-pass": "unexpected-pass";
1062
- "retried-pass": "retried-pass";
1063
- }>;
1064
- pattern: z.ZodOptional<z.ZodString>;
1065
- durationMs: z.ZodNumber;
1066
- at: z.ZodString;
1067
- error: z.ZodOptional<z.ZodString>;
1068
- }, z.core.$strip>>;
1069
- summary: z.ZodOptional<z.ZodObject<{
1070
- headSha: z.ZodString;
1071
- branch: z.ZodString;
1072
- status: z.ZodEnum<{
1073
- incomplete: "incomplete";
1074
- complete: "complete";
1075
- }>;
1076
- startedAt: z.ZodISODateTime;
1077
- finishedAt: z.ZodISODateTime;
1078
- testCount: z.ZodNumber;
1079
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
1080
- name: z.ZodString;
1081
- outcome: z.ZodEnum<{
1082
- skip: "skip";
1083
- pass: "pass";
1084
- fail: "fail";
1085
- }>;
1086
- }, z.core.$strip>>>;
1087
- unknownFlakeCount: z.ZodNumber;
1088
- failedCount: z.ZodNumber;
1089
- diagnostics: z.ZodArray<z.ZodString>;
1090
- runUrl: z.ZodURL;
1091
- }, z.core.$strip>>;
1092
- }, z.core.$strip>;
1093
- };
1094
- readonly "events.iterate.com/flakes/transition-proposed": {
1095
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
1096
- readonly payloadSchema: z.ZodObject<{
1097
- testName: z.ZodString;
1098
- transition: z.ZodEnum<{
1099
- unwrap: "unwrap";
1100
- "switch-to-failing": "switch-to-failing";
1101
- "unwrap-failing": "unwrap-failing";
1102
- }>;
1103
- evidence: z.ZodObject<{
1104
- consecutiveRuns: z.ZodNumber;
1105
- firstAt: z.ZodString;
1106
- lastAt: z.ZodString;
1107
- }, z.core.$strip>;
1108
- }, z.core.$strip>;
1109
- };
1110
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
1111
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
1112
- readonly payloadSchema: z.ZodObject<{
1113
- throughOffset: z.ZodNumber;
1114
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
1115
- status: z.ZodLiteral<"succeeded">;
1116
- issueNumber: z.ZodNumber;
1117
- issueUrl: z.ZodString;
1118
- }, z.core.$strip>, z.ZodObject<{
1119
- status: z.ZodLiteral<"failed">;
1120
- error: z.ZodString;
1121
- }, z.core.$strip>], "status">;
1122
- }, z.core.$strip>;
1123
- };
1124
- }[T_4] : never : never : never) ? T_3 extends {
1125
- ephemeral: true;
1126
- } ? {
1127
- ephemeral: true;
1128
- } : unknown : never : never) : never;
1129
- parseEvent: <const Event extends import("../../processors/schemas.ts").StreamEvent>(event: Event) => (Extract<"events.iterate.com/flakes/created", Event["type"]> extends infer T ? T extends Extract<"events.iterate.com/flakes/created", Event["type"]> ? T extends unknown ? (T extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
1130
- readonly "events.iterate.com/flakes/created": {
1131
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
1132
- readonly payloadSchema: z.ZodObject<{
1133
- config: z.ZodObject<{
1134
- repository: z.ZodObject<{
1135
- owner: z.ZodString;
1136
- repo: z.ZodString;
1137
- }, z.core.$strip>;
1138
- issueTitle: z.ZodString;
1139
- defaultBranch: z.ZodString;
1140
- }, z.core.$strip>;
1141
- }, z.core.$strip>;
1142
- readonly examples: readonly [{
1143
- readonly description: "The dogfood dashboard for this repo.";
1144
- readonly payload: {
1145
- readonly config: {
1146
- readonly repository: {
1147
- readonly owner: "iterate";
1148
- readonly repo: "iterate";
1149
- };
1150
- readonly issueTitle: "Flake dashboard";
1151
- readonly defaultBranch: "main";
1152
- };
1153
- };
1154
- }];
1155
- };
1156
- readonly "events.iterate.com/flakes/run-recorded": {
1157
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
1158
- readonly payloadSchema: z.ZodObject<{
1159
- runId: z.ZodString;
1160
- suite: z.ZodString;
1161
- branch: z.ZodString;
1162
- commit: z.ZodString;
1163
- records: z.ZodArray<z.ZodObject<{
1164
- name: z.ZodString;
1165
- kind: z.ZodDefault<z.ZodEnum<{
1166
- unknown: "unknown";
1167
- flake: "flake";
1168
- failing: "failing";
1169
- }>>;
1170
- outcome: z.ZodEnum<{
1171
- pass: "pass";
1172
- "flake-fail": "flake-fail";
1173
- "unexpected-error": "unexpected-error";
1174
- "pinned-fail": "pinned-fail";
1175
- "unexpected-pass": "unexpected-pass";
1176
- "retried-pass": "retried-pass";
1177
- }>;
1178
- pattern: z.ZodOptional<z.ZodString>;
1179
- durationMs: z.ZodNumber;
1180
- at: z.ZodString;
1181
- error: z.ZodOptional<z.ZodString>;
1182
- }, z.core.$strip>>;
1183
- summary: z.ZodOptional<z.ZodObject<{
1184
- headSha: z.ZodString;
1185
- branch: z.ZodString;
1186
- status: z.ZodEnum<{
1187
- incomplete: "incomplete";
1188
- complete: "complete";
1189
- }>;
1190
- startedAt: z.ZodISODateTime;
1191
- finishedAt: z.ZodISODateTime;
1192
- testCount: z.ZodNumber;
1193
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
1194
- name: z.ZodString;
1195
- outcome: z.ZodEnum<{
1196
- skip: "skip";
1197
- pass: "pass";
1198
- fail: "fail";
1199
- }>;
1200
- }, z.core.$strip>>>;
1201
- unknownFlakeCount: z.ZodNumber;
1202
- failedCount: z.ZodNumber;
1203
- diagnostics: z.ZodArray<z.ZodString>;
1204
- runUrl: z.ZodURL;
1205
- }, z.core.$strip>>;
1206
- }, z.core.$strip>;
1207
- };
1208
- readonly "events.iterate.com/flakes/transition-proposed": {
1209
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
1210
- readonly payloadSchema: z.ZodObject<{
1211
- testName: z.ZodString;
1212
- transition: z.ZodEnum<{
1213
- unwrap: "unwrap";
1214
- "switch-to-failing": "switch-to-failing";
1215
- "unwrap-failing": "unwrap-failing";
1216
- }>;
1217
- evidence: z.ZodObject<{
1218
- consecutiveRuns: z.ZodNumber;
1219
- firstAt: z.ZodString;
1220
- lastAt: z.ZodString;
1221
- }, z.core.$strip>;
1222
- }, z.core.$strip>;
1223
- };
1224
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
1225
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
1226
- readonly payloadSchema: z.ZodObject<{
1227
- throughOffset: z.ZodNumber;
1228
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
1229
- status: z.ZodLiteral<"succeeded">;
1230
- issueNumber: z.ZodNumber;
1231
- issueUrl: z.ZodString;
1232
- }, z.core.$strip>, z.ZodObject<{
1233
- status: z.ZodLiteral<"failed">;
1234
- error: z.ZodString;
1235
- }, z.core.$strip>], "status">;
1236
- }, z.core.$strip>;
1237
- };
1238
- }[T] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<{
1239
- type: string;
1240
- offset: number;
1241
- createdAt: string;
1242
- path: string;
1243
- payload?: Record<string, unknown> | undefined;
1244
- metadata?: Record<string, unknown> | undefined;
1245
- source?: {
1246
- processor?: {
1247
- slug: string;
1248
- version: string;
1249
- stream: {
1250
- path: string;
1251
- projectId: string | null;
1252
- streamId: string;
1253
- };
1254
- whileProcessing?: {
1255
- offset: number;
1256
- type: string;
1257
- } | undefined;
1258
- } | undefined;
1259
- copiedFrom?: {
1260
- name: string;
1261
- streamId: string;
1262
- streamCreatedAt: string;
1263
- cursorChangedAtSourceOffset: number;
1264
- createdAt: string;
1265
- offset: number;
1266
- path: string;
1267
- projectId: string | null;
1268
- type: string;
1269
- }[] | undefined;
1270
- } | undefined;
1271
- idempotencyKey?: string | undefined;
1272
- ephemeral?: true | undefined;
1273
- }, "payload" | "type"> & Omit<{
1274
- type: string;
1275
- payload?: Record<string, unknown> | undefined;
1276
- metadata?: Record<string, unknown> | undefined;
1277
- source?: {
1278
- processor?: {
1279
- slug: string;
1280
- version: string;
1281
- stream: {
1282
- path: string;
1283
- projectId: string | null;
1284
- streamId: string;
1285
- };
1286
- whileProcessing?: {
1287
- offset: number;
1288
- type: string;
1289
- } | undefined;
1290
- } | undefined;
1291
- copiedFrom?: {
1292
- name: string;
1293
- streamId: string;
1294
- streamCreatedAt: string;
1295
- cursorChangedAtSourceOffset: number;
1296
- createdAt: string;
1297
- offset: number;
1298
- path: string;
1299
- projectId: string | null;
1300
- type: string;
1301
- }[] | undefined;
1302
- } | undefined;
1303
- idempotencyKey?: string | undefined;
1304
- ephemeral?: true | undefined;
1305
- }, "payload" | "type"> & {
1306
- type: T;
1307
- payload: PayloadOutput;
1308
- } & {
1309
- payload: PayloadOutput;
1310
- } & (import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
1311
- readonly "events.iterate.com/flakes/created": {
1312
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
1313
- readonly payloadSchema: z.ZodObject<{
1314
- config: z.ZodObject<{
1315
- repository: z.ZodObject<{
1316
- owner: z.ZodString;
1317
- repo: z.ZodString;
1318
- }, z.core.$strip>;
1319
- issueTitle: z.ZodString;
1320
- defaultBranch: z.ZodString;
1321
- }, z.core.$strip>;
1322
- }, z.core.$strip>;
1323
- readonly examples: readonly [{
1324
- readonly description: "The dogfood dashboard for this repo.";
1325
- readonly payload: {
1326
- readonly config: {
1327
- readonly repository: {
1328
- readonly owner: "iterate";
1329
- readonly repo: "iterate";
1330
- };
1331
- readonly issueTitle: "Flake dashboard";
1332
- readonly defaultBranch: "main";
1333
- };
1334
- };
1335
- }];
1336
- };
1337
- readonly "events.iterate.com/flakes/run-recorded": {
1338
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
1339
- readonly payloadSchema: z.ZodObject<{
1340
- runId: z.ZodString;
1341
- suite: z.ZodString;
1342
- branch: z.ZodString;
1343
- commit: z.ZodString;
1344
- records: z.ZodArray<z.ZodObject<{
1345
- name: z.ZodString;
1346
- kind: z.ZodDefault<z.ZodEnum<{
1347
- unknown: "unknown";
1348
- flake: "flake";
1349
- failing: "failing";
1350
- }>>;
1351
- outcome: z.ZodEnum<{
1352
- pass: "pass";
1353
- "flake-fail": "flake-fail";
1354
- "unexpected-error": "unexpected-error";
1355
- "pinned-fail": "pinned-fail";
1356
- "unexpected-pass": "unexpected-pass";
1357
- "retried-pass": "retried-pass";
1358
- }>;
1359
- pattern: z.ZodOptional<z.ZodString>;
1360
- durationMs: z.ZodNumber;
1361
- at: z.ZodString;
1362
- error: z.ZodOptional<z.ZodString>;
1363
- }, z.core.$strip>>;
1364
- summary: z.ZodOptional<z.ZodObject<{
1365
- headSha: z.ZodString;
1366
- branch: z.ZodString;
1367
- status: z.ZodEnum<{
1368
- incomplete: "incomplete";
1369
- complete: "complete";
1370
- }>;
1371
- startedAt: z.ZodISODateTime;
1372
- finishedAt: z.ZodISODateTime;
1373
- testCount: z.ZodNumber;
1374
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
1375
- name: z.ZodString;
1376
- outcome: z.ZodEnum<{
1377
- skip: "skip";
1378
- pass: "pass";
1379
- fail: "fail";
1380
- }>;
1381
- }, z.core.$strip>>>;
1382
- unknownFlakeCount: z.ZodNumber;
1383
- failedCount: z.ZodNumber;
1384
- diagnostics: z.ZodArray<z.ZodString>;
1385
- runUrl: z.ZodURL;
1386
- }, z.core.$strip>>;
1387
- }, z.core.$strip>;
1388
- };
1389
- readonly "events.iterate.com/flakes/transition-proposed": {
1390
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
1391
- readonly payloadSchema: z.ZodObject<{
1392
- testName: z.ZodString;
1393
- transition: z.ZodEnum<{
1394
- unwrap: "unwrap";
1395
- "switch-to-failing": "switch-to-failing";
1396
- "unwrap-failing": "unwrap-failing";
1397
- }>;
1398
- evidence: z.ZodObject<{
1399
- consecutiveRuns: z.ZodNumber;
1400
- firstAt: z.ZodString;
1401
- lastAt: z.ZodString;
1402
- }, z.core.$strip>;
1403
- }, z.core.$strip>;
1404
- };
1405
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
1406
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
1407
- readonly payloadSchema: z.ZodObject<{
1408
- throughOffset: z.ZodNumber;
1409
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
1410
- status: z.ZodLiteral<"succeeded">;
1411
- issueNumber: z.ZodNumber;
1412
- issueUrl: z.ZodString;
1413
- }, z.core.$strip>, z.ZodObject<{
1414
- status: z.ZodLiteral<"failed">;
1415
- error: z.ZodString;
1416
- }, z.core.$strip>], "status">;
1417
- }, z.core.$strip>;
1418
- };
1419
- }[T] : never) extends infer T_1 ? T_1 extends import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
1420
- readonly "events.iterate.com/flakes/created": {
1421
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
1422
- readonly payloadSchema: z.ZodObject<{
1423
- config: z.ZodObject<{
1424
- repository: z.ZodObject<{
1425
- owner: z.ZodString;
1426
- repo: z.ZodString;
1427
- }, z.core.$strip>;
1428
- issueTitle: z.ZodString;
1429
- defaultBranch: z.ZodString;
1430
- }, z.core.$strip>;
1431
- }, z.core.$strip>;
1432
- readonly examples: readonly [{
1433
- readonly description: "The dogfood dashboard for this repo.";
1434
- readonly payload: {
1435
- readonly config: {
1436
- readonly repository: {
1437
- readonly owner: "iterate";
1438
- readonly repo: "iterate";
1439
- };
1440
- readonly issueTitle: "Flake dashboard";
1441
- readonly defaultBranch: "main";
1442
- };
1443
- };
1444
- }];
1445
- };
1446
- readonly "events.iterate.com/flakes/run-recorded": {
1447
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
1448
- readonly payloadSchema: z.ZodObject<{
1449
- runId: z.ZodString;
1450
- suite: z.ZodString;
1451
- branch: z.ZodString;
1452
- commit: z.ZodString;
1453
- records: z.ZodArray<z.ZodObject<{
1454
- name: z.ZodString;
1455
- kind: z.ZodDefault<z.ZodEnum<{
1456
- unknown: "unknown";
1457
- flake: "flake";
1458
- failing: "failing";
1459
- }>>;
1460
- outcome: z.ZodEnum<{
1461
- pass: "pass";
1462
- "flake-fail": "flake-fail";
1463
- "unexpected-error": "unexpected-error";
1464
- "pinned-fail": "pinned-fail";
1465
- "unexpected-pass": "unexpected-pass";
1466
- "retried-pass": "retried-pass";
1467
- }>;
1468
- pattern: z.ZodOptional<z.ZodString>;
1469
- durationMs: z.ZodNumber;
1470
- at: z.ZodString;
1471
- error: z.ZodOptional<z.ZodString>;
1472
- }, z.core.$strip>>;
1473
- summary: z.ZodOptional<z.ZodObject<{
1474
- headSha: z.ZodString;
1475
- branch: z.ZodString;
1476
- status: z.ZodEnum<{
1477
- incomplete: "incomplete";
1478
- complete: "complete";
1479
- }>;
1480
- startedAt: z.ZodISODateTime;
1481
- finishedAt: z.ZodISODateTime;
1482
- testCount: z.ZodNumber;
1483
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
1484
- name: z.ZodString;
1485
- outcome: z.ZodEnum<{
1486
- skip: "skip";
1487
- pass: "pass";
1488
- fail: "fail";
1489
- }>;
1490
- }, z.core.$strip>>>;
1491
- unknownFlakeCount: z.ZodNumber;
1492
- failedCount: z.ZodNumber;
1493
- diagnostics: z.ZodArray<z.ZodString>;
1494
- runUrl: z.ZodURL;
1495
- }, z.core.$strip>>;
1496
- }, z.core.$strip>;
1497
- };
1498
- readonly "events.iterate.com/flakes/transition-proposed": {
1499
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
1500
- readonly payloadSchema: z.ZodObject<{
1501
- testName: z.ZodString;
1502
- transition: z.ZodEnum<{
1503
- unwrap: "unwrap";
1504
- "switch-to-failing": "switch-to-failing";
1505
- "unwrap-failing": "unwrap-failing";
1506
- }>;
1507
- evidence: z.ZodObject<{
1508
- consecutiveRuns: z.ZodNumber;
1509
- firstAt: z.ZodString;
1510
- lastAt: z.ZodString;
1511
- }, z.core.$strip>;
1512
- }, z.core.$strip>;
1513
- };
1514
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
1515
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
1516
- readonly payloadSchema: z.ZodObject<{
1517
- throughOffset: z.ZodNumber;
1518
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
1519
- status: z.ZodLiteral<"succeeded">;
1520
- issueNumber: z.ZodNumber;
1521
- issueUrl: z.ZodString;
1522
- }, z.core.$strip>, z.ZodObject<{
1523
- status: z.ZodLiteral<"failed">;
1524
- error: z.ZodString;
1525
- }, z.core.$strip>], "status">;
1526
- }, z.core.$strip>;
1527
- };
1528
- }[T] : never) ? T_1 extends {
1529
- ephemeral: true;
1530
- } ? {
1531
- ephemeral: true;
1532
- } : unknown : never : never) : never : never : never : never) | (Extract<"events.iterate.com/flakes/run-recorded", Event["type"]> extends infer T_2 ? T_2 extends Extract<"events.iterate.com/flakes/run-recorded", Event["type"]> ? T_2 extends unknown ? (T_2 extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
1533
- readonly "events.iterate.com/flakes/created": {
1534
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
1535
- readonly payloadSchema: z.ZodObject<{
1536
- config: z.ZodObject<{
1537
- repository: z.ZodObject<{
1538
- owner: z.ZodString;
1539
- repo: z.ZodString;
1540
- }, z.core.$strip>;
1541
- issueTitle: z.ZodString;
1542
- defaultBranch: z.ZodString;
1543
- }, z.core.$strip>;
1544
- }, z.core.$strip>;
1545
- readonly examples: readonly [{
1546
- readonly description: "The dogfood dashboard for this repo.";
1547
- readonly payload: {
1548
- readonly config: {
1549
- readonly repository: {
1550
- readonly owner: "iterate";
1551
- readonly repo: "iterate";
1552
- };
1553
- readonly issueTitle: "Flake dashboard";
1554
- readonly defaultBranch: "main";
1555
- };
1556
- };
1557
- }];
1558
- };
1559
- readonly "events.iterate.com/flakes/run-recorded": {
1560
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
1561
- readonly payloadSchema: z.ZodObject<{
1562
- runId: z.ZodString;
1563
- suite: z.ZodString;
1564
- branch: z.ZodString;
1565
- commit: z.ZodString;
1566
- records: z.ZodArray<z.ZodObject<{
1567
- name: z.ZodString;
1568
- kind: z.ZodDefault<z.ZodEnum<{
1569
- unknown: "unknown";
1570
- flake: "flake";
1571
- failing: "failing";
1572
- }>>;
1573
- outcome: z.ZodEnum<{
1574
- pass: "pass";
1575
- "flake-fail": "flake-fail";
1576
- "unexpected-error": "unexpected-error";
1577
- "pinned-fail": "pinned-fail";
1578
- "unexpected-pass": "unexpected-pass";
1579
- "retried-pass": "retried-pass";
1580
- }>;
1581
- pattern: z.ZodOptional<z.ZodString>;
1582
- durationMs: z.ZodNumber;
1583
- at: z.ZodString;
1584
- error: z.ZodOptional<z.ZodString>;
1585
- }, z.core.$strip>>;
1586
- summary: z.ZodOptional<z.ZodObject<{
1587
- headSha: z.ZodString;
1588
- branch: z.ZodString;
1589
- status: z.ZodEnum<{
1590
- incomplete: "incomplete";
1591
- complete: "complete";
1592
- }>;
1593
- startedAt: z.ZodISODateTime;
1594
- finishedAt: z.ZodISODateTime;
1595
- testCount: z.ZodNumber;
1596
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
1597
- name: z.ZodString;
1598
- outcome: z.ZodEnum<{
1599
- skip: "skip";
1600
- pass: "pass";
1601
- fail: "fail";
1602
- }>;
1603
- }, z.core.$strip>>>;
1604
- unknownFlakeCount: z.ZodNumber;
1605
- failedCount: z.ZodNumber;
1606
- diagnostics: z.ZodArray<z.ZodString>;
1607
- runUrl: z.ZodURL;
1608
- }, z.core.$strip>>;
1609
- }, z.core.$strip>;
1610
- };
1611
- readonly "events.iterate.com/flakes/transition-proposed": {
1612
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
1613
- readonly payloadSchema: z.ZodObject<{
1614
- testName: z.ZodString;
1615
- transition: z.ZodEnum<{
1616
- unwrap: "unwrap";
1617
- "switch-to-failing": "switch-to-failing";
1618
- "unwrap-failing": "unwrap-failing";
1619
- }>;
1620
- evidence: z.ZodObject<{
1621
- consecutiveRuns: z.ZodNumber;
1622
- firstAt: z.ZodString;
1623
- lastAt: z.ZodString;
1624
- }, z.core.$strip>;
1625
- }, z.core.$strip>;
1626
- };
1627
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
1628
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
1629
- readonly payloadSchema: z.ZodObject<{
1630
- throughOffset: z.ZodNumber;
1631
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
1632
- status: z.ZodLiteral<"succeeded">;
1633
- issueNumber: z.ZodNumber;
1634
- issueUrl: z.ZodString;
1635
- }, z.core.$strip>, z.ZodObject<{
1636
- status: z.ZodLiteral<"failed">;
1637
- error: z.ZodString;
1638
- }, z.core.$strip>], "status">;
1639
- }, z.core.$strip>;
1640
- };
1641
- }[T_2] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<{
1642
- type: string;
1643
- offset: number;
1644
- createdAt: string;
1645
- path: string;
1646
- payload?: Record<string, unknown> | undefined;
1647
- metadata?: Record<string, unknown> | undefined;
1648
- source?: {
1649
- processor?: {
1650
- slug: string;
1651
- version: string;
1652
- stream: {
1653
- path: string;
1654
- projectId: string | null;
1655
- streamId: string;
1656
- };
1657
- whileProcessing?: {
1658
- offset: number;
1659
- type: string;
1660
- } | undefined;
1661
- } | undefined;
1662
- copiedFrom?: {
1663
- name: string;
1664
- streamId: string;
1665
- streamCreatedAt: string;
1666
- cursorChangedAtSourceOffset: number;
1667
- createdAt: string;
1668
- offset: number;
1669
- path: string;
1670
- projectId: string | null;
1671
- type: string;
1672
- }[] | undefined;
1673
- } | undefined;
1674
- idempotencyKey?: string | undefined;
1675
- ephemeral?: true | undefined;
1676
- }, "payload" | "type"> & Omit<{
1677
- type: string;
1678
- payload?: Record<string, unknown> | undefined;
1679
- metadata?: Record<string, unknown> | undefined;
1680
- source?: {
1681
- processor?: {
1682
- slug: string;
1683
- version: string;
1684
- stream: {
1685
- path: string;
1686
- projectId: string | null;
1687
- streamId: string;
1688
- };
1689
- whileProcessing?: {
1690
- offset: number;
1691
- type: string;
1692
- } | undefined;
1693
- } | undefined;
1694
- copiedFrom?: {
1695
- name: string;
1696
- streamId: string;
1697
- streamCreatedAt: string;
1698
- cursorChangedAtSourceOffset: number;
1699
- createdAt: string;
1700
- offset: number;
1701
- path: string;
1702
- projectId: string | null;
1703
- type: string;
1704
- }[] | undefined;
1705
- } | undefined;
1706
- idempotencyKey?: string | undefined;
1707
- ephemeral?: true | undefined;
1708
- }, "payload" | "type"> & {
1709
- type: T_2;
1710
- payload: PayloadOutput;
1711
- } & {
1712
- payload: PayloadOutput;
1713
- } & (import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T_2 extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
1714
- readonly "events.iterate.com/flakes/created": {
1715
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
1716
- readonly payloadSchema: z.ZodObject<{
1717
- config: z.ZodObject<{
1718
- repository: z.ZodObject<{
1719
- owner: z.ZodString;
1720
- repo: z.ZodString;
1721
- }, z.core.$strip>;
1722
- issueTitle: z.ZodString;
1723
- defaultBranch: z.ZodString;
1724
- }, z.core.$strip>;
1725
- }, z.core.$strip>;
1726
- readonly examples: readonly [{
1727
- readonly description: "The dogfood dashboard for this repo.";
1728
- readonly payload: {
1729
- readonly config: {
1730
- readonly repository: {
1731
- readonly owner: "iterate";
1732
- readonly repo: "iterate";
1733
- };
1734
- readonly issueTitle: "Flake dashboard";
1735
- readonly defaultBranch: "main";
1736
- };
1737
- };
1738
- }];
1739
- };
1740
- readonly "events.iterate.com/flakes/run-recorded": {
1741
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
1742
- readonly payloadSchema: z.ZodObject<{
1743
- runId: z.ZodString;
1744
- suite: z.ZodString;
1745
- branch: z.ZodString;
1746
- commit: z.ZodString;
1747
- records: z.ZodArray<z.ZodObject<{
1748
- name: z.ZodString;
1749
- kind: z.ZodDefault<z.ZodEnum<{
1750
- unknown: "unknown";
1751
- flake: "flake";
1752
- failing: "failing";
1753
- }>>;
1754
- outcome: z.ZodEnum<{
1755
- pass: "pass";
1756
- "flake-fail": "flake-fail";
1757
- "unexpected-error": "unexpected-error";
1758
- "pinned-fail": "pinned-fail";
1759
- "unexpected-pass": "unexpected-pass";
1760
- "retried-pass": "retried-pass";
1761
- }>;
1762
- pattern: z.ZodOptional<z.ZodString>;
1763
- durationMs: z.ZodNumber;
1764
- at: z.ZodString;
1765
- error: z.ZodOptional<z.ZodString>;
1766
- }, z.core.$strip>>;
1767
- summary: z.ZodOptional<z.ZodObject<{
1768
- headSha: z.ZodString;
1769
- branch: z.ZodString;
1770
- status: z.ZodEnum<{
1771
- incomplete: "incomplete";
1772
- complete: "complete";
1773
- }>;
1774
- startedAt: z.ZodISODateTime;
1775
- finishedAt: z.ZodISODateTime;
1776
- testCount: z.ZodNumber;
1777
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
1778
- name: z.ZodString;
1779
- outcome: z.ZodEnum<{
1780
- skip: "skip";
1781
- pass: "pass";
1782
- fail: "fail";
1783
- }>;
1784
- }, z.core.$strip>>>;
1785
- unknownFlakeCount: z.ZodNumber;
1786
- failedCount: z.ZodNumber;
1787
- diagnostics: z.ZodArray<z.ZodString>;
1788
- runUrl: z.ZodURL;
1789
- }, z.core.$strip>>;
1790
- }, z.core.$strip>;
1791
- };
1792
- readonly "events.iterate.com/flakes/transition-proposed": {
1793
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
1794
- readonly payloadSchema: z.ZodObject<{
1795
- testName: z.ZodString;
1796
- transition: z.ZodEnum<{
1797
- unwrap: "unwrap";
1798
- "switch-to-failing": "switch-to-failing";
1799
- "unwrap-failing": "unwrap-failing";
1800
- }>;
1801
- evidence: z.ZodObject<{
1802
- consecutiveRuns: z.ZodNumber;
1803
- firstAt: z.ZodString;
1804
- lastAt: z.ZodString;
1805
- }, z.core.$strip>;
1806
- }, z.core.$strip>;
1807
- };
1808
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
1809
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
1810
- readonly payloadSchema: z.ZodObject<{
1811
- throughOffset: z.ZodNumber;
1812
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
1813
- status: z.ZodLiteral<"succeeded">;
1814
- issueNumber: z.ZodNumber;
1815
- issueUrl: z.ZodString;
1816
- }, z.core.$strip>, z.ZodObject<{
1817
- status: z.ZodLiteral<"failed">;
1818
- error: z.ZodString;
1819
- }, z.core.$strip>], "status">;
1820
- }, z.core.$strip>;
1821
- };
1822
- }[T_2] : never) extends infer T_3 ? T_3 extends import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T_2 extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
1823
- readonly "events.iterate.com/flakes/created": {
1824
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
1825
- readonly payloadSchema: z.ZodObject<{
1826
- config: z.ZodObject<{
1827
- repository: z.ZodObject<{
1828
- owner: z.ZodString;
1829
- repo: z.ZodString;
1830
- }, z.core.$strip>;
1831
- issueTitle: z.ZodString;
1832
- defaultBranch: z.ZodString;
1833
- }, z.core.$strip>;
1834
- }, z.core.$strip>;
1835
- readonly examples: readonly [{
1836
- readonly description: "The dogfood dashboard for this repo.";
1837
- readonly payload: {
1838
- readonly config: {
1839
- readonly repository: {
1840
- readonly owner: "iterate";
1841
- readonly repo: "iterate";
1842
- };
1843
- readonly issueTitle: "Flake dashboard";
1844
- readonly defaultBranch: "main";
1845
- };
1846
- };
1847
- }];
1848
- };
1849
- readonly "events.iterate.com/flakes/run-recorded": {
1850
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
1851
- readonly payloadSchema: z.ZodObject<{
1852
- runId: z.ZodString;
1853
- suite: z.ZodString;
1854
- branch: z.ZodString;
1855
- commit: z.ZodString;
1856
- records: z.ZodArray<z.ZodObject<{
1857
- name: z.ZodString;
1858
- kind: z.ZodDefault<z.ZodEnum<{
1859
- unknown: "unknown";
1860
- flake: "flake";
1861
- failing: "failing";
1862
- }>>;
1863
- outcome: z.ZodEnum<{
1864
- pass: "pass";
1865
- "flake-fail": "flake-fail";
1866
- "unexpected-error": "unexpected-error";
1867
- "pinned-fail": "pinned-fail";
1868
- "unexpected-pass": "unexpected-pass";
1869
- "retried-pass": "retried-pass";
1870
- }>;
1871
- pattern: z.ZodOptional<z.ZodString>;
1872
- durationMs: z.ZodNumber;
1873
- at: z.ZodString;
1874
- error: z.ZodOptional<z.ZodString>;
1875
- }, z.core.$strip>>;
1876
- summary: z.ZodOptional<z.ZodObject<{
1877
- headSha: z.ZodString;
1878
- branch: z.ZodString;
1879
- status: z.ZodEnum<{
1880
- incomplete: "incomplete";
1881
- complete: "complete";
1882
- }>;
1883
- startedAt: z.ZodISODateTime;
1884
- finishedAt: z.ZodISODateTime;
1885
- testCount: z.ZodNumber;
1886
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
1887
- name: z.ZodString;
1888
- outcome: z.ZodEnum<{
1889
- skip: "skip";
1890
- pass: "pass";
1891
- fail: "fail";
1892
- }>;
1893
- }, z.core.$strip>>>;
1894
- unknownFlakeCount: z.ZodNumber;
1895
- failedCount: z.ZodNumber;
1896
- diagnostics: z.ZodArray<z.ZodString>;
1897
- runUrl: z.ZodURL;
1898
- }, z.core.$strip>>;
1899
- }, z.core.$strip>;
1900
- };
1901
- readonly "events.iterate.com/flakes/transition-proposed": {
1902
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
1903
- readonly payloadSchema: z.ZodObject<{
1904
- testName: z.ZodString;
1905
- transition: z.ZodEnum<{
1906
- unwrap: "unwrap";
1907
- "switch-to-failing": "switch-to-failing";
1908
- "unwrap-failing": "unwrap-failing";
1909
- }>;
1910
- evidence: z.ZodObject<{
1911
- consecutiveRuns: z.ZodNumber;
1912
- firstAt: z.ZodString;
1913
- lastAt: z.ZodString;
1914
- }, z.core.$strip>;
1915
- }, z.core.$strip>;
1916
- };
1917
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
1918
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
1919
- readonly payloadSchema: z.ZodObject<{
1920
- throughOffset: z.ZodNumber;
1921
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
1922
- status: z.ZodLiteral<"succeeded">;
1923
- issueNumber: z.ZodNumber;
1924
- issueUrl: z.ZodString;
1925
- }, z.core.$strip>, z.ZodObject<{
1926
- status: z.ZodLiteral<"failed">;
1927
- error: z.ZodString;
1928
- }, z.core.$strip>], "status">;
1929
- }, z.core.$strip>;
1930
- };
1931
- }[T_2] : never) ? T_3 extends {
1932
- ephemeral: true;
1933
- } ? {
1934
- ephemeral: true;
1935
- } : unknown : never : never) : never : never : never : never) | (Extract<"events.iterate.com/flakes/transition-proposed", Event["type"]> extends infer T_4 ? T_4 extends Extract<"events.iterate.com/flakes/transition-proposed", Event["type"]> ? T_4 extends unknown ? (T_4 extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
1936
- readonly "events.iterate.com/flakes/created": {
1937
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
1938
- readonly payloadSchema: z.ZodObject<{
1939
- config: z.ZodObject<{
1940
- repository: z.ZodObject<{
1941
- owner: z.ZodString;
1942
- repo: z.ZodString;
1943
- }, z.core.$strip>;
1944
- issueTitle: z.ZodString;
1945
- defaultBranch: z.ZodString;
1946
- }, z.core.$strip>;
1947
- }, z.core.$strip>;
1948
- readonly examples: readonly [{
1949
- readonly description: "The dogfood dashboard for this repo.";
1950
- readonly payload: {
1951
- readonly config: {
1952
- readonly repository: {
1953
- readonly owner: "iterate";
1954
- readonly repo: "iterate";
1955
- };
1956
- readonly issueTitle: "Flake dashboard";
1957
- readonly defaultBranch: "main";
1958
- };
1959
- };
1960
- }];
1961
- };
1962
- readonly "events.iterate.com/flakes/run-recorded": {
1963
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
1964
- readonly payloadSchema: z.ZodObject<{
1965
- runId: z.ZodString;
1966
- suite: z.ZodString;
1967
- branch: z.ZodString;
1968
- commit: z.ZodString;
1969
- records: z.ZodArray<z.ZodObject<{
1970
- name: z.ZodString;
1971
- kind: z.ZodDefault<z.ZodEnum<{
1972
- unknown: "unknown";
1973
- flake: "flake";
1974
- failing: "failing";
1975
- }>>;
1976
- outcome: z.ZodEnum<{
1977
- pass: "pass";
1978
- "flake-fail": "flake-fail";
1979
- "unexpected-error": "unexpected-error";
1980
- "pinned-fail": "pinned-fail";
1981
- "unexpected-pass": "unexpected-pass";
1982
- "retried-pass": "retried-pass";
1983
- }>;
1984
- pattern: z.ZodOptional<z.ZodString>;
1985
- durationMs: z.ZodNumber;
1986
- at: z.ZodString;
1987
- error: z.ZodOptional<z.ZodString>;
1988
- }, z.core.$strip>>;
1989
- summary: z.ZodOptional<z.ZodObject<{
1990
- headSha: z.ZodString;
1991
- branch: z.ZodString;
1992
- status: z.ZodEnum<{
1993
- incomplete: "incomplete";
1994
- complete: "complete";
1995
- }>;
1996
- startedAt: z.ZodISODateTime;
1997
- finishedAt: z.ZodISODateTime;
1998
- testCount: z.ZodNumber;
1999
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
2000
- name: z.ZodString;
2001
- outcome: z.ZodEnum<{
2002
- skip: "skip";
2003
- pass: "pass";
2004
- fail: "fail";
2005
- }>;
2006
- }, z.core.$strip>>>;
2007
- unknownFlakeCount: z.ZodNumber;
2008
- failedCount: z.ZodNumber;
2009
- diagnostics: z.ZodArray<z.ZodString>;
2010
- runUrl: z.ZodURL;
2011
- }, z.core.$strip>>;
2012
- }, z.core.$strip>;
2013
- };
2014
- readonly "events.iterate.com/flakes/transition-proposed": {
2015
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
2016
- readonly payloadSchema: z.ZodObject<{
2017
- testName: z.ZodString;
2018
- transition: z.ZodEnum<{
2019
- unwrap: "unwrap";
2020
- "switch-to-failing": "switch-to-failing";
2021
- "unwrap-failing": "unwrap-failing";
2022
- }>;
2023
- evidence: z.ZodObject<{
2024
- consecutiveRuns: z.ZodNumber;
2025
- firstAt: z.ZodString;
2026
- lastAt: z.ZodString;
2027
- }, z.core.$strip>;
2028
- }, z.core.$strip>;
2029
- };
2030
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
2031
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
2032
- readonly payloadSchema: z.ZodObject<{
2033
- throughOffset: z.ZodNumber;
2034
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
2035
- status: z.ZodLiteral<"succeeded">;
2036
- issueNumber: z.ZodNumber;
2037
- issueUrl: z.ZodString;
2038
- }, z.core.$strip>, z.ZodObject<{
2039
- status: z.ZodLiteral<"failed">;
2040
- error: z.ZodString;
2041
- }, z.core.$strip>], "status">;
2042
- }, z.core.$strip>;
2043
- };
2044
- }[T_4] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<{
2045
- type: string;
2046
- offset: number;
2047
- createdAt: string;
2048
- path: string;
2049
- payload?: Record<string, unknown> | undefined;
2050
- metadata?: Record<string, unknown> | undefined;
2051
- source?: {
2052
- processor?: {
2053
- slug: string;
2054
- version: string;
2055
- stream: {
2056
- path: string;
2057
- projectId: string | null;
2058
- streamId: string;
2059
- };
2060
- whileProcessing?: {
2061
- offset: number;
2062
- type: string;
2063
- } | undefined;
2064
- } | undefined;
2065
- copiedFrom?: {
2066
- name: string;
2067
- streamId: string;
2068
- streamCreatedAt: string;
2069
- cursorChangedAtSourceOffset: number;
2070
- createdAt: string;
2071
- offset: number;
2072
- path: string;
2073
- projectId: string | null;
2074
- type: string;
2075
- }[] | undefined;
2076
- } | undefined;
2077
- idempotencyKey?: string | undefined;
2078
- ephemeral?: true | undefined;
2079
- }, "payload" | "type"> & Omit<{
2080
- type: string;
2081
- payload?: Record<string, unknown> | undefined;
2082
- metadata?: Record<string, unknown> | undefined;
2083
- source?: {
2084
- processor?: {
2085
- slug: string;
2086
- version: string;
2087
- stream: {
2088
- path: string;
2089
- projectId: string | null;
2090
- streamId: string;
2091
- };
2092
- whileProcessing?: {
2093
- offset: number;
2094
- type: string;
2095
- } | undefined;
2096
- } | undefined;
2097
- copiedFrom?: {
2098
- name: string;
2099
- streamId: string;
2100
- streamCreatedAt: string;
2101
- cursorChangedAtSourceOffset: number;
2102
- createdAt: string;
2103
- offset: number;
2104
- path: string;
2105
- projectId: string | null;
2106
- type: string;
2107
- }[] | undefined;
2108
- } | undefined;
2109
- idempotencyKey?: string | undefined;
2110
- ephemeral?: true | undefined;
2111
- }, "payload" | "type"> & {
2112
- type: T_4;
2113
- payload: PayloadOutput;
2114
- } & {
2115
- payload: PayloadOutput;
2116
- } & (import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T_4 extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
2117
- readonly "events.iterate.com/flakes/created": {
2118
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
2119
- readonly payloadSchema: z.ZodObject<{
2120
- config: z.ZodObject<{
2121
- repository: z.ZodObject<{
2122
- owner: z.ZodString;
2123
- repo: z.ZodString;
2124
- }, z.core.$strip>;
2125
- issueTitle: z.ZodString;
2126
- defaultBranch: z.ZodString;
2127
- }, z.core.$strip>;
2128
- }, z.core.$strip>;
2129
- readonly examples: readonly [{
2130
- readonly description: "The dogfood dashboard for this repo.";
2131
- readonly payload: {
2132
- readonly config: {
2133
- readonly repository: {
2134
- readonly owner: "iterate";
2135
- readonly repo: "iterate";
2136
- };
2137
- readonly issueTitle: "Flake dashboard";
2138
- readonly defaultBranch: "main";
2139
- };
2140
- };
2141
- }];
2142
- };
2143
- readonly "events.iterate.com/flakes/run-recorded": {
2144
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
2145
- readonly payloadSchema: z.ZodObject<{
2146
- runId: z.ZodString;
2147
- suite: z.ZodString;
2148
- branch: z.ZodString;
2149
- commit: z.ZodString;
2150
- records: z.ZodArray<z.ZodObject<{
2151
- name: z.ZodString;
2152
- kind: z.ZodDefault<z.ZodEnum<{
2153
- unknown: "unknown";
2154
- flake: "flake";
2155
- failing: "failing";
2156
- }>>;
2157
- outcome: z.ZodEnum<{
2158
- pass: "pass";
2159
- "flake-fail": "flake-fail";
2160
- "unexpected-error": "unexpected-error";
2161
- "pinned-fail": "pinned-fail";
2162
- "unexpected-pass": "unexpected-pass";
2163
- "retried-pass": "retried-pass";
2164
- }>;
2165
- pattern: z.ZodOptional<z.ZodString>;
2166
- durationMs: z.ZodNumber;
2167
- at: z.ZodString;
2168
- error: z.ZodOptional<z.ZodString>;
2169
- }, z.core.$strip>>;
2170
- summary: z.ZodOptional<z.ZodObject<{
2171
- headSha: z.ZodString;
2172
- branch: z.ZodString;
2173
- status: z.ZodEnum<{
2174
- incomplete: "incomplete";
2175
- complete: "complete";
2176
- }>;
2177
- startedAt: z.ZodISODateTime;
2178
- finishedAt: z.ZodISODateTime;
2179
- testCount: z.ZodNumber;
2180
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
2181
- name: z.ZodString;
2182
- outcome: z.ZodEnum<{
2183
- skip: "skip";
2184
- pass: "pass";
2185
- fail: "fail";
2186
- }>;
2187
- }, z.core.$strip>>>;
2188
- unknownFlakeCount: z.ZodNumber;
2189
- failedCount: z.ZodNumber;
2190
- diagnostics: z.ZodArray<z.ZodString>;
2191
- runUrl: z.ZodURL;
2192
- }, z.core.$strip>>;
2193
- }, z.core.$strip>;
2194
- };
2195
- readonly "events.iterate.com/flakes/transition-proposed": {
2196
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
2197
- readonly payloadSchema: z.ZodObject<{
2198
- testName: z.ZodString;
2199
- transition: z.ZodEnum<{
2200
- unwrap: "unwrap";
2201
- "switch-to-failing": "switch-to-failing";
2202
- "unwrap-failing": "unwrap-failing";
2203
- }>;
2204
- evidence: z.ZodObject<{
2205
- consecutiveRuns: z.ZodNumber;
2206
- firstAt: z.ZodString;
2207
- lastAt: z.ZodString;
2208
- }, z.core.$strip>;
2209
- }, z.core.$strip>;
2210
- };
2211
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
2212
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
2213
- readonly payloadSchema: z.ZodObject<{
2214
- throughOffset: z.ZodNumber;
2215
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
2216
- status: z.ZodLiteral<"succeeded">;
2217
- issueNumber: z.ZodNumber;
2218
- issueUrl: z.ZodString;
2219
- }, z.core.$strip>, z.ZodObject<{
2220
- status: z.ZodLiteral<"failed">;
2221
- error: z.ZodString;
2222
- }, z.core.$strip>], "status">;
2223
- }, z.core.$strip>;
2224
- };
2225
- }[T_4] : never) extends infer T_5 ? T_5 extends import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T_4 extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
2226
- readonly "events.iterate.com/flakes/created": {
2227
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
2228
- readonly payloadSchema: z.ZodObject<{
2229
- config: z.ZodObject<{
2230
- repository: z.ZodObject<{
2231
- owner: z.ZodString;
2232
- repo: z.ZodString;
2233
- }, z.core.$strip>;
2234
- issueTitle: z.ZodString;
2235
- defaultBranch: z.ZodString;
2236
- }, z.core.$strip>;
2237
- }, z.core.$strip>;
2238
- readonly examples: readonly [{
2239
- readonly description: "The dogfood dashboard for this repo.";
2240
- readonly payload: {
2241
- readonly config: {
2242
- readonly repository: {
2243
- readonly owner: "iterate";
2244
- readonly repo: "iterate";
2245
- };
2246
- readonly issueTitle: "Flake dashboard";
2247
- readonly defaultBranch: "main";
2248
- };
2249
- };
2250
- }];
2251
- };
2252
- readonly "events.iterate.com/flakes/run-recorded": {
2253
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
2254
- readonly payloadSchema: z.ZodObject<{
2255
- runId: z.ZodString;
2256
- suite: z.ZodString;
2257
- branch: z.ZodString;
2258
- commit: z.ZodString;
2259
- records: z.ZodArray<z.ZodObject<{
2260
- name: z.ZodString;
2261
- kind: z.ZodDefault<z.ZodEnum<{
2262
- unknown: "unknown";
2263
- flake: "flake";
2264
- failing: "failing";
2265
- }>>;
2266
- outcome: z.ZodEnum<{
2267
- pass: "pass";
2268
- "flake-fail": "flake-fail";
2269
- "unexpected-error": "unexpected-error";
2270
- "pinned-fail": "pinned-fail";
2271
- "unexpected-pass": "unexpected-pass";
2272
- "retried-pass": "retried-pass";
2273
- }>;
2274
- pattern: z.ZodOptional<z.ZodString>;
2275
- durationMs: z.ZodNumber;
2276
- at: z.ZodString;
2277
- error: z.ZodOptional<z.ZodString>;
2278
- }, z.core.$strip>>;
2279
- summary: z.ZodOptional<z.ZodObject<{
2280
- headSha: z.ZodString;
2281
- branch: z.ZodString;
2282
- status: z.ZodEnum<{
2283
- incomplete: "incomplete";
2284
- complete: "complete";
2285
- }>;
2286
- startedAt: z.ZodISODateTime;
2287
- finishedAt: z.ZodISODateTime;
2288
- testCount: z.ZodNumber;
2289
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
2290
- name: z.ZodString;
2291
- outcome: z.ZodEnum<{
2292
- skip: "skip";
2293
- pass: "pass";
2294
- fail: "fail";
2295
- }>;
2296
- }, z.core.$strip>>>;
2297
- unknownFlakeCount: z.ZodNumber;
2298
- failedCount: z.ZodNumber;
2299
- diagnostics: z.ZodArray<z.ZodString>;
2300
- runUrl: z.ZodURL;
2301
- }, z.core.$strip>>;
2302
- }, z.core.$strip>;
2303
- };
2304
- readonly "events.iterate.com/flakes/transition-proposed": {
2305
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
2306
- readonly payloadSchema: z.ZodObject<{
2307
- testName: z.ZodString;
2308
- transition: z.ZodEnum<{
2309
- unwrap: "unwrap";
2310
- "switch-to-failing": "switch-to-failing";
2311
- "unwrap-failing": "unwrap-failing";
2312
- }>;
2313
- evidence: z.ZodObject<{
2314
- consecutiveRuns: z.ZodNumber;
2315
- firstAt: z.ZodString;
2316
- lastAt: z.ZodString;
2317
- }, z.core.$strip>;
2318
- }, z.core.$strip>;
2319
- };
2320
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
2321
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
2322
- readonly payloadSchema: z.ZodObject<{
2323
- throughOffset: z.ZodNumber;
2324
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
2325
- status: z.ZodLiteral<"succeeded">;
2326
- issueNumber: z.ZodNumber;
2327
- issueUrl: z.ZodString;
2328
- }, z.core.$strip>, z.ZodObject<{
2329
- status: z.ZodLiteral<"failed">;
2330
- error: z.ZodString;
2331
- }, z.core.$strip>], "status">;
2332
- }, z.core.$strip>;
2333
- };
2334
- }[T_4] : never) ? T_5 extends {
2335
- ephemeral: true;
2336
- } ? {
2337
- ephemeral: true;
2338
- } : unknown : never : never) : never : never : never : never) | (Extract<"events.iterate.com/flakes/dashboard-render-settled", Event["type"]> extends infer T_6 ? T_6 extends Extract<"events.iterate.com/flakes/dashboard-render-settled", Event["type"]> ? T_6 extends unknown ? (T_6 extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
2339
- readonly "events.iterate.com/flakes/created": {
2340
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
2341
- readonly payloadSchema: z.ZodObject<{
2342
- config: z.ZodObject<{
2343
- repository: z.ZodObject<{
2344
- owner: z.ZodString;
2345
- repo: z.ZodString;
2346
- }, z.core.$strip>;
2347
- issueTitle: z.ZodString;
2348
- defaultBranch: z.ZodString;
2349
- }, z.core.$strip>;
2350
- }, z.core.$strip>;
2351
- readonly examples: readonly [{
2352
- readonly description: "The dogfood dashboard for this repo.";
2353
- readonly payload: {
2354
- readonly config: {
2355
- readonly repository: {
2356
- readonly owner: "iterate";
2357
- readonly repo: "iterate";
2358
- };
2359
- readonly issueTitle: "Flake dashboard";
2360
- readonly defaultBranch: "main";
2361
- };
2362
- };
2363
- }];
2364
- };
2365
- readonly "events.iterate.com/flakes/run-recorded": {
2366
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
2367
- readonly payloadSchema: z.ZodObject<{
2368
- runId: z.ZodString;
2369
- suite: z.ZodString;
2370
- branch: z.ZodString;
2371
- commit: z.ZodString;
2372
- records: z.ZodArray<z.ZodObject<{
2373
- name: z.ZodString;
2374
- kind: z.ZodDefault<z.ZodEnum<{
2375
- unknown: "unknown";
2376
- flake: "flake";
2377
- failing: "failing";
2378
- }>>;
2379
- outcome: z.ZodEnum<{
2380
- pass: "pass";
2381
- "flake-fail": "flake-fail";
2382
- "unexpected-error": "unexpected-error";
2383
- "pinned-fail": "pinned-fail";
2384
- "unexpected-pass": "unexpected-pass";
2385
- "retried-pass": "retried-pass";
2386
- }>;
2387
- pattern: z.ZodOptional<z.ZodString>;
2388
- durationMs: z.ZodNumber;
2389
- at: z.ZodString;
2390
- error: z.ZodOptional<z.ZodString>;
2391
- }, z.core.$strip>>;
2392
- summary: z.ZodOptional<z.ZodObject<{
2393
- headSha: z.ZodString;
2394
- branch: z.ZodString;
2395
- status: z.ZodEnum<{
2396
- incomplete: "incomplete";
2397
- complete: "complete";
2398
- }>;
2399
- startedAt: z.ZodISODateTime;
2400
- finishedAt: z.ZodISODateTime;
2401
- testCount: z.ZodNumber;
2402
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
2403
- name: z.ZodString;
2404
- outcome: z.ZodEnum<{
2405
- skip: "skip";
2406
- pass: "pass";
2407
- fail: "fail";
2408
- }>;
2409
- }, z.core.$strip>>>;
2410
- unknownFlakeCount: z.ZodNumber;
2411
- failedCount: z.ZodNumber;
2412
- diagnostics: z.ZodArray<z.ZodString>;
2413
- runUrl: z.ZodURL;
2414
- }, z.core.$strip>>;
2415
- }, z.core.$strip>;
2416
- };
2417
- readonly "events.iterate.com/flakes/transition-proposed": {
2418
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
2419
- readonly payloadSchema: z.ZodObject<{
2420
- testName: z.ZodString;
2421
- transition: z.ZodEnum<{
2422
- unwrap: "unwrap";
2423
- "switch-to-failing": "switch-to-failing";
2424
- "unwrap-failing": "unwrap-failing";
2425
- }>;
2426
- evidence: z.ZodObject<{
2427
- consecutiveRuns: z.ZodNumber;
2428
- firstAt: z.ZodString;
2429
- lastAt: z.ZodString;
2430
- }, z.core.$strip>;
2431
- }, z.core.$strip>;
2432
- };
2433
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
2434
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
2435
- readonly payloadSchema: z.ZodObject<{
2436
- throughOffset: z.ZodNumber;
2437
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
2438
- status: z.ZodLiteral<"succeeded">;
2439
- issueNumber: z.ZodNumber;
2440
- issueUrl: z.ZodString;
2441
- }, z.core.$strip>, z.ZodObject<{
2442
- status: z.ZodLiteral<"failed">;
2443
- error: z.ZodString;
2444
- }, z.core.$strip>], "status">;
2445
- }, z.core.$strip>;
2446
- };
2447
- }[T_6] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<{
2448
- type: string;
2449
- offset: number;
2450
- createdAt: string;
2451
- path: string;
2452
- payload?: Record<string, unknown> | undefined;
2453
- metadata?: Record<string, unknown> | undefined;
2454
- source?: {
2455
- processor?: {
2456
- slug: string;
2457
- version: string;
2458
- stream: {
2459
- path: string;
2460
- projectId: string | null;
2461
- streamId: string;
2462
- };
2463
- whileProcessing?: {
2464
- offset: number;
2465
- type: string;
2466
- } | undefined;
2467
- } | undefined;
2468
- copiedFrom?: {
2469
- name: string;
2470
- streamId: string;
2471
- streamCreatedAt: string;
2472
- cursorChangedAtSourceOffset: number;
2473
- createdAt: string;
2474
- offset: number;
2475
- path: string;
2476
- projectId: string | null;
2477
- type: string;
2478
- }[] | undefined;
2479
- } | undefined;
2480
- idempotencyKey?: string | undefined;
2481
- ephemeral?: true | undefined;
2482
- }, "payload" | "type"> & Omit<{
2483
- type: string;
2484
- payload?: Record<string, unknown> | undefined;
2485
- metadata?: Record<string, unknown> | undefined;
2486
- source?: {
2487
- processor?: {
2488
- slug: string;
2489
- version: string;
2490
- stream: {
2491
- path: string;
2492
- projectId: string | null;
2493
- streamId: string;
2494
- };
2495
- whileProcessing?: {
2496
- offset: number;
2497
- type: string;
2498
- } | undefined;
2499
- } | undefined;
2500
- copiedFrom?: {
2501
- name: string;
2502
- streamId: string;
2503
- streamCreatedAt: string;
2504
- cursorChangedAtSourceOffset: number;
2505
- createdAt: string;
2506
- offset: number;
2507
- path: string;
2508
- projectId: string | null;
2509
- type: string;
2510
- }[] | undefined;
2511
- } | undefined;
2512
- idempotencyKey?: string | undefined;
2513
- ephemeral?: true | undefined;
2514
- }, "payload" | "type"> & {
2515
- type: T_6;
2516
- payload: PayloadOutput;
2517
- } & {
2518
- payload: PayloadOutput;
2519
- } & (import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T_6 extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
2520
- readonly "events.iterate.com/flakes/created": {
2521
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
2522
- readonly payloadSchema: z.ZodObject<{
2523
- config: z.ZodObject<{
2524
- repository: z.ZodObject<{
2525
- owner: z.ZodString;
2526
- repo: z.ZodString;
2527
- }, z.core.$strip>;
2528
- issueTitle: z.ZodString;
2529
- defaultBranch: z.ZodString;
2530
- }, z.core.$strip>;
2531
- }, z.core.$strip>;
2532
- readonly examples: readonly [{
2533
- readonly description: "The dogfood dashboard for this repo.";
2534
- readonly payload: {
2535
- readonly config: {
2536
- readonly repository: {
2537
- readonly owner: "iterate";
2538
- readonly repo: "iterate";
2539
- };
2540
- readonly issueTitle: "Flake dashboard";
2541
- readonly defaultBranch: "main";
2542
- };
2543
- };
2544
- }];
2545
- };
2546
- readonly "events.iterate.com/flakes/run-recorded": {
2547
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
2548
- readonly payloadSchema: z.ZodObject<{
2549
- runId: z.ZodString;
2550
- suite: z.ZodString;
2551
- branch: z.ZodString;
2552
- commit: z.ZodString;
2553
- records: z.ZodArray<z.ZodObject<{
2554
- name: z.ZodString;
2555
- kind: z.ZodDefault<z.ZodEnum<{
2556
- unknown: "unknown";
2557
- flake: "flake";
2558
- failing: "failing";
2559
- }>>;
2560
- outcome: z.ZodEnum<{
2561
- pass: "pass";
2562
- "flake-fail": "flake-fail";
2563
- "unexpected-error": "unexpected-error";
2564
- "pinned-fail": "pinned-fail";
2565
- "unexpected-pass": "unexpected-pass";
2566
- "retried-pass": "retried-pass";
2567
- }>;
2568
- pattern: z.ZodOptional<z.ZodString>;
2569
- durationMs: z.ZodNumber;
2570
- at: z.ZodString;
2571
- error: z.ZodOptional<z.ZodString>;
2572
- }, z.core.$strip>>;
2573
- summary: z.ZodOptional<z.ZodObject<{
2574
- headSha: z.ZodString;
2575
- branch: z.ZodString;
2576
- status: z.ZodEnum<{
2577
- incomplete: "incomplete";
2578
- complete: "complete";
2579
- }>;
2580
- startedAt: z.ZodISODateTime;
2581
- finishedAt: z.ZodISODateTime;
2582
- testCount: z.ZodNumber;
2583
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
2584
- name: z.ZodString;
2585
- outcome: z.ZodEnum<{
2586
- skip: "skip";
2587
- pass: "pass";
2588
- fail: "fail";
2589
- }>;
2590
- }, z.core.$strip>>>;
2591
- unknownFlakeCount: z.ZodNumber;
2592
- failedCount: z.ZodNumber;
2593
- diagnostics: z.ZodArray<z.ZodString>;
2594
- runUrl: z.ZodURL;
2595
- }, z.core.$strip>>;
2596
- }, z.core.$strip>;
2597
- };
2598
- readonly "events.iterate.com/flakes/transition-proposed": {
2599
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
2600
- readonly payloadSchema: z.ZodObject<{
2601
- testName: z.ZodString;
2602
- transition: z.ZodEnum<{
2603
- unwrap: "unwrap";
2604
- "switch-to-failing": "switch-to-failing";
2605
- "unwrap-failing": "unwrap-failing";
2606
- }>;
2607
- evidence: z.ZodObject<{
2608
- consecutiveRuns: z.ZodNumber;
2609
- firstAt: z.ZodString;
2610
- lastAt: z.ZodString;
2611
- }, z.core.$strip>;
2612
- }, z.core.$strip>;
2613
- };
2614
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
2615
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
2616
- readonly payloadSchema: z.ZodObject<{
2617
- throughOffset: z.ZodNumber;
2618
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
2619
- status: z.ZodLiteral<"succeeded">;
2620
- issueNumber: z.ZodNumber;
2621
- issueUrl: z.ZodString;
2622
- }, z.core.$strip>, z.ZodObject<{
2623
- status: z.ZodLiteral<"failed">;
2624
- error: z.ZodString;
2625
- }, z.core.$strip>], "status">;
2626
- }, z.core.$strip>;
2627
- };
2628
- }[T_6] : never) extends infer T_7 ? T_7 extends import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T_6 extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
2629
- readonly "events.iterate.com/flakes/created": {
2630
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
2631
- readonly payloadSchema: z.ZodObject<{
2632
- config: z.ZodObject<{
2633
- repository: z.ZodObject<{
2634
- owner: z.ZodString;
2635
- repo: z.ZodString;
2636
- }, z.core.$strip>;
2637
- issueTitle: z.ZodString;
2638
- defaultBranch: z.ZodString;
2639
- }, z.core.$strip>;
2640
- }, z.core.$strip>;
2641
- readonly examples: readonly [{
2642
- readonly description: "The dogfood dashboard for this repo.";
2643
- readonly payload: {
2644
- readonly config: {
2645
- readonly repository: {
2646
- readonly owner: "iterate";
2647
- readonly repo: "iterate";
2648
- };
2649
- readonly issueTitle: "Flake dashboard";
2650
- readonly defaultBranch: "main";
2651
- };
2652
- };
2653
- }];
2654
- };
2655
- readonly "events.iterate.com/flakes/run-recorded": {
2656
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
2657
- readonly payloadSchema: z.ZodObject<{
2658
- runId: z.ZodString;
2659
- suite: z.ZodString;
2660
- branch: z.ZodString;
2661
- commit: z.ZodString;
2662
- records: z.ZodArray<z.ZodObject<{
2663
- name: z.ZodString;
2664
- kind: z.ZodDefault<z.ZodEnum<{
2665
- unknown: "unknown";
2666
- flake: "flake";
2667
- failing: "failing";
2668
- }>>;
2669
- outcome: z.ZodEnum<{
2670
- pass: "pass";
2671
- "flake-fail": "flake-fail";
2672
- "unexpected-error": "unexpected-error";
2673
- "pinned-fail": "pinned-fail";
2674
- "unexpected-pass": "unexpected-pass";
2675
- "retried-pass": "retried-pass";
2676
- }>;
2677
- pattern: z.ZodOptional<z.ZodString>;
2678
- durationMs: z.ZodNumber;
2679
- at: z.ZodString;
2680
- error: z.ZodOptional<z.ZodString>;
2681
- }, z.core.$strip>>;
2682
- summary: z.ZodOptional<z.ZodObject<{
2683
- headSha: z.ZodString;
2684
- branch: z.ZodString;
2685
- status: z.ZodEnum<{
2686
- incomplete: "incomplete";
2687
- complete: "complete";
2688
- }>;
2689
- startedAt: z.ZodISODateTime;
2690
- finishedAt: z.ZodISODateTime;
2691
- testCount: z.ZodNumber;
2692
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
2693
- name: z.ZodString;
2694
- outcome: z.ZodEnum<{
2695
- skip: "skip";
2696
- pass: "pass";
2697
- fail: "fail";
2698
- }>;
2699
- }, z.core.$strip>>>;
2700
- unknownFlakeCount: z.ZodNumber;
2701
- failedCount: z.ZodNumber;
2702
- diagnostics: z.ZodArray<z.ZodString>;
2703
- runUrl: z.ZodURL;
2704
- }, z.core.$strip>>;
2705
- }, z.core.$strip>;
2706
- };
2707
- readonly "events.iterate.com/flakes/transition-proposed": {
2708
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
2709
- readonly payloadSchema: z.ZodObject<{
2710
- testName: z.ZodString;
2711
- transition: z.ZodEnum<{
2712
- unwrap: "unwrap";
2713
- "switch-to-failing": "switch-to-failing";
2714
- "unwrap-failing": "unwrap-failing";
2715
- }>;
2716
- evidence: z.ZodObject<{
2717
- consecutiveRuns: z.ZodNumber;
2718
- firstAt: z.ZodString;
2719
- lastAt: z.ZodString;
2720
- }, z.core.$strip>;
2721
- }, z.core.$strip>;
2722
- };
2723
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
2724
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
2725
- readonly payloadSchema: z.ZodObject<{
2726
- throughOffset: z.ZodNumber;
2727
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
2728
- status: z.ZodLiteral<"succeeded">;
2729
- issueNumber: z.ZodNumber;
2730
- issueUrl: z.ZodString;
2731
- }, z.core.$strip>, z.ZodObject<{
2732
- status: z.ZodLiteral<"failed">;
2733
- error: z.ZodString;
2734
- }, z.core.$strip>], "status">;
2735
- }, z.core.$strip>;
2736
- };
2737
- }[T_6] : never) ? T_7 extends {
2738
- ephemeral: true;
2739
- } ? {
2740
- ephemeral: true;
2741
- } : unknown : never : never) : never : never : never : never);
2742
- parseEventInput: <const Event extends import("../../processors/schemas.ts").StreamEventInput>(event: Event) => (Extract<"events.iterate.com/flakes/created", Event["type"]> extends infer T ? T extends Extract<"events.iterate.com/flakes/created", Event["type"]> ? T extends unknown ? (T extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
2743
- readonly "events.iterate.com/flakes/created": {
2744
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
2745
- readonly payloadSchema: z.ZodObject<{
2746
- config: z.ZodObject<{
2747
- repository: z.ZodObject<{
2748
- owner: z.ZodString;
2749
- repo: z.ZodString;
2750
- }, z.core.$strip>;
2751
- issueTitle: z.ZodString;
2752
- defaultBranch: z.ZodString;
2753
- }, z.core.$strip>;
2754
- }, z.core.$strip>;
2755
- readonly examples: readonly [{
2756
- readonly description: "The dogfood dashboard for this repo.";
2757
- readonly payload: {
2758
- readonly config: {
2759
- readonly repository: {
2760
- readonly owner: "iterate";
2761
- readonly repo: "iterate";
2762
- };
2763
- readonly issueTitle: "Flake dashboard";
2764
- readonly defaultBranch: "main";
2765
- };
2766
- };
2767
- }];
2768
- };
2769
- readonly "events.iterate.com/flakes/run-recorded": {
2770
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
2771
- readonly payloadSchema: z.ZodObject<{
2772
- runId: z.ZodString;
2773
- suite: z.ZodString;
2774
- branch: z.ZodString;
2775
- commit: z.ZodString;
2776
- records: z.ZodArray<z.ZodObject<{
2777
- name: z.ZodString;
2778
- kind: z.ZodDefault<z.ZodEnum<{
2779
- unknown: "unknown";
2780
- flake: "flake";
2781
- failing: "failing";
2782
- }>>;
2783
- outcome: z.ZodEnum<{
2784
- pass: "pass";
2785
- "flake-fail": "flake-fail";
2786
- "unexpected-error": "unexpected-error";
2787
- "pinned-fail": "pinned-fail";
2788
- "unexpected-pass": "unexpected-pass";
2789
- "retried-pass": "retried-pass";
2790
- }>;
2791
- pattern: z.ZodOptional<z.ZodString>;
2792
- durationMs: z.ZodNumber;
2793
- at: z.ZodString;
2794
- error: z.ZodOptional<z.ZodString>;
2795
- }, z.core.$strip>>;
2796
- summary: z.ZodOptional<z.ZodObject<{
2797
- headSha: z.ZodString;
2798
- branch: z.ZodString;
2799
- status: z.ZodEnum<{
2800
- incomplete: "incomplete";
2801
- complete: "complete";
2802
- }>;
2803
- startedAt: z.ZodISODateTime;
2804
- finishedAt: z.ZodISODateTime;
2805
- testCount: z.ZodNumber;
2806
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
2807
- name: z.ZodString;
2808
- outcome: z.ZodEnum<{
2809
- skip: "skip";
2810
- pass: "pass";
2811
- fail: "fail";
2812
- }>;
2813
- }, z.core.$strip>>>;
2814
- unknownFlakeCount: z.ZodNumber;
2815
- failedCount: z.ZodNumber;
2816
- diagnostics: z.ZodArray<z.ZodString>;
2817
- runUrl: z.ZodURL;
2818
- }, z.core.$strip>>;
2819
- }, z.core.$strip>;
2820
- };
2821
- readonly "events.iterate.com/flakes/transition-proposed": {
2822
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
2823
- readonly payloadSchema: z.ZodObject<{
2824
- testName: z.ZodString;
2825
- transition: z.ZodEnum<{
2826
- unwrap: "unwrap";
2827
- "switch-to-failing": "switch-to-failing";
2828
- "unwrap-failing": "unwrap-failing";
2829
- }>;
2830
- evidence: z.ZodObject<{
2831
- consecutiveRuns: z.ZodNumber;
2832
- firstAt: z.ZodString;
2833
- lastAt: z.ZodString;
2834
- }, z.core.$strip>;
2835
- }, z.core.$strip>;
2836
- };
2837
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
2838
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
2839
- readonly payloadSchema: z.ZodObject<{
2840
- throughOffset: z.ZodNumber;
2841
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
2842
- status: z.ZodLiteral<"succeeded">;
2843
- issueNumber: z.ZodNumber;
2844
- issueUrl: z.ZodString;
2845
- }, z.core.$strip>, z.ZodObject<{
2846
- status: z.ZodLiteral<"failed">;
2847
- error: z.ZodString;
2848
- }, z.core.$strip>], "status">;
2849
- }, z.core.$strip>;
2850
- };
2851
- }[T] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<{
2852
- type: string;
2853
- payload?: Record<string, unknown> | undefined;
2854
- metadata?: Record<string, unknown> | undefined;
2855
- source?: {
2856
- processor?: {
2857
- slug: string;
2858
- version: string;
2859
- stream: {
2860
- path: string;
2861
- projectId: string | null;
2862
- streamId: string;
2863
- };
2864
- whileProcessing?: {
2865
- offset: number;
2866
- type: string;
2867
- } | undefined;
2868
- } | undefined;
2869
- copiedFrom?: {
2870
- name: string;
2871
- streamId: string;
2872
- streamCreatedAt: string;
2873
- cursorChangedAtSourceOffset: number;
2874
- createdAt: string;
2875
- offset: number;
2876
- path: string;
2877
- projectId: string | null;
2878
- type: string;
2879
- }[] | undefined;
2880
- } | undefined;
2881
- idempotencyKey?: string | undefined;
2882
- ephemeral?: true | undefined;
2883
- }, "payload" | "type"> & {
2884
- type: T;
2885
- payload: PayloadOutput;
2886
- } & {
2887
- payload: PayloadOutput;
2888
- } & (import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
2889
- readonly "events.iterate.com/flakes/created": {
2890
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
2891
- readonly payloadSchema: z.ZodObject<{
2892
- config: z.ZodObject<{
2893
- repository: z.ZodObject<{
2894
- owner: z.ZodString;
2895
- repo: z.ZodString;
2896
- }, z.core.$strip>;
2897
- issueTitle: z.ZodString;
2898
- defaultBranch: z.ZodString;
2899
- }, z.core.$strip>;
2900
- }, z.core.$strip>;
2901
- readonly examples: readonly [{
2902
- readonly description: "The dogfood dashboard for this repo.";
2903
- readonly payload: {
2904
- readonly config: {
2905
- readonly repository: {
2906
- readonly owner: "iterate";
2907
- readonly repo: "iterate";
2908
- };
2909
- readonly issueTitle: "Flake dashboard";
2910
- readonly defaultBranch: "main";
2911
- };
2912
- };
2913
- }];
2914
- };
2915
- readonly "events.iterate.com/flakes/run-recorded": {
2916
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
2917
- readonly payloadSchema: z.ZodObject<{
2918
- runId: z.ZodString;
2919
- suite: z.ZodString;
2920
- branch: z.ZodString;
2921
- commit: z.ZodString;
2922
- records: z.ZodArray<z.ZodObject<{
2923
- name: z.ZodString;
2924
- kind: z.ZodDefault<z.ZodEnum<{
2925
- unknown: "unknown";
2926
- flake: "flake";
2927
- failing: "failing";
2928
- }>>;
2929
- outcome: z.ZodEnum<{
2930
- pass: "pass";
2931
- "flake-fail": "flake-fail";
2932
- "unexpected-error": "unexpected-error";
2933
- "pinned-fail": "pinned-fail";
2934
- "unexpected-pass": "unexpected-pass";
2935
- "retried-pass": "retried-pass";
2936
- }>;
2937
- pattern: z.ZodOptional<z.ZodString>;
2938
- durationMs: z.ZodNumber;
2939
- at: z.ZodString;
2940
- error: z.ZodOptional<z.ZodString>;
2941
- }, z.core.$strip>>;
2942
- summary: z.ZodOptional<z.ZodObject<{
2943
- headSha: z.ZodString;
2944
- branch: z.ZodString;
2945
- status: z.ZodEnum<{
2946
- incomplete: "incomplete";
2947
- complete: "complete";
2948
- }>;
2949
- startedAt: z.ZodISODateTime;
2950
- finishedAt: z.ZodISODateTime;
2951
- testCount: z.ZodNumber;
2952
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
2953
- name: z.ZodString;
2954
- outcome: z.ZodEnum<{
2955
- skip: "skip";
2956
- pass: "pass";
2957
- fail: "fail";
2958
- }>;
2959
- }, z.core.$strip>>>;
2960
- unknownFlakeCount: z.ZodNumber;
2961
- failedCount: z.ZodNumber;
2962
- diagnostics: z.ZodArray<z.ZodString>;
2963
- runUrl: z.ZodURL;
2964
- }, z.core.$strip>>;
2965
- }, z.core.$strip>;
2966
- };
2967
- readonly "events.iterate.com/flakes/transition-proposed": {
2968
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
2969
- readonly payloadSchema: z.ZodObject<{
2970
- testName: z.ZodString;
2971
- transition: z.ZodEnum<{
2972
- unwrap: "unwrap";
2973
- "switch-to-failing": "switch-to-failing";
2974
- "unwrap-failing": "unwrap-failing";
2975
- }>;
2976
- evidence: z.ZodObject<{
2977
- consecutiveRuns: z.ZodNumber;
2978
- firstAt: z.ZodString;
2979
- lastAt: z.ZodString;
2980
- }, z.core.$strip>;
2981
- }, z.core.$strip>;
2982
- };
2983
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
2984
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
2985
- readonly payloadSchema: z.ZodObject<{
2986
- throughOffset: z.ZodNumber;
2987
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
2988
- status: z.ZodLiteral<"succeeded">;
2989
- issueNumber: z.ZodNumber;
2990
- issueUrl: z.ZodString;
2991
- }, z.core.$strip>, z.ZodObject<{
2992
- status: z.ZodLiteral<"failed">;
2993
- error: z.ZodString;
2994
- }, z.core.$strip>], "status">;
2995
- }, z.core.$strip>;
2996
- };
2997
- }[T] : never) extends infer T_1 ? T_1 extends import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
2998
- readonly "events.iterate.com/flakes/created": {
2999
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
3000
- readonly payloadSchema: z.ZodObject<{
3001
- config: z.ZodObject<{
3002
- repository: z.ZodObject<{
3003
- owner: z.ZodString;
3004
- repo: z.ZodString;
3005
- }, z.core.$strip>;
3006
- issueTitle: z.ZodString;
3007
- defaultBranch: z.ZodString;
3008
- }, z.core.$strip>;
3009
- }, z.core.$strip>;
3010
- readonly examples: readonly [{
3011
- readonly description: "The dogfood dashboard for this repo.";
3012
- readonly payload: {
3013
- readonly config: {
3014
- readonly repository: {
3015
- readonly owner: "iterate";
3016
- readonly repo: "iterate";
3017
- };
3018
- readonly issueTitle: "Flake dashboard";
3019
- readonly defaultBranch: "main";
3020
- };
3021
- };
3022
- }];
3023
- };
3024
- readonly "events.iterate.com/flakes/run-recorded": {
3025
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
3026
- readonly payloadSchema: z.ZodObject<{
3027
- runId: z.ZodString;
3028
- suite: z.ZodString;
3029
- branch: z.ZodString;
3030
- commit: z.ZodString;
3031
- records: z.ZodArray<z.ZodObject<{
3032
- name: z.ZodString;
3033
- kind: z.ZodDefault<z.ZodEnum<{
3034
- unknown: "unknown";
3035
- flake: "flake";
3036
- failing: "failing";
3037
- }>>;
3038
- outcome: z.ZodEnum<{
3039
- pass: "pass";
3040
- "flake-fail": "flake-fail";
3041
- "unexpected-error": "unexpected-error";
3042
- "pinned-fail": "pinned-fail";
3043
- "unexpected-pass": "unexpected-pass";
3044
- "retried-pass": "retried-pass";
3045
- }>;
3046
- pattern: z.ZodOptional<z.ZodString>;
3047
- durationMs: z.ZodNumber;
3048
- at: z.ZodString;
3049
- error: z.ZodOptional<z.ZodString>;
3050
- }, z.core.$strip>>;
3051
- summary: z.ZodOptional<z.ZodObject<{
3052
- headSha: z.ZodString;
3053
- branch: z.ZodString;
3054
- status: z.ZodEnum<{
3055
- incomplete: "incomplete";
3056
- complete: "complete";
3057
- }>;
3058
- startedAt: z.ZodISODateTime;
3059
- finishedAt: z.ZodISODateTime;
3060
- testCount: z.ZodNumber;
3061
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
3062
- name: z.ZodString;
3063
- outcome: z.ZodEnum<{
3064
- skip: "skip";
3065
- pass: "pass";
3066
- fail: "fail";
3067
- }>;
3068
- }, z.core.$strip>>>;
3069
- unknownFlakeCount: z.ZodNumber;
3070
- failedCount: z.ZodNumber;
3071
- diagnostics: z.ZodArray<z.ZodString>;
3072
- runUrl: z.ZodURL;
3073
- }, z.core.$strip>>;
3074
- }, z.core.$strip>;
3075
- };
3076
- readonly "events.iterate.com/flakes/transition-proposed": {
3077
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
3078
- readonly payloadSchema: z.ZodObject<{
3079
- testName: z.ZodString;
3080
- transition: z.ZodEnum<{
3081
- unwrap: "unwrap";
3082
- "switch-to-failing": "switch-to-failing";
3083
- "unwrap-failing": "unwrap-failing";
3084
- }>;
3085
- evidence: z.ZodObject<{
3086
- consecutiveRuns: z.ZodNumber;
3087
- firstAt: z.ZodString;
3088
- lastAt: z.ZodString;
3089
- }, z.core.$strip>;
3090
- }, z.core.$strip>;
3091
- };
3092
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
3093
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
3094
- readonly payloadSchema: z.ZodObject<{
3095
- throughOffset: z.ZodNumber;
3096
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
3097
- status: z.ZodLiteral<"succeeded">;
3098
- issueNumber: z.ZodNumber;
3099
- issueUrl: z.ZodString;
3100
- }, z.core.$strip>, z.ZodObject<{
3101
- status: z.ZodLiteral<"failed">;
3102
- error: z.ZodString;
3103
- }, z.core.$strip>], "status">;
3104
- }, z.core.$strip>;
3105
- };
3106
- }[T] : never) ? T_1 extends {
3107
- ephemeral: true;
3108
- } ? {
3109
- ephemeral: true;
3110
- } : unknown : never : never) : never : never : never : never) | (Extract<"events.iterate.com/flakes/run-recorded", Event["type"]> extends infer T_2 ? T_2 extends Extract<"events.iterate.com/flakes/run-recorded", Event["type"]> ? T_2 extends unknown ? (T_2 extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
3111
- readonly "events.iterate.com/flakes/created": {
3112
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
3113
- readonly payloadSchema: z.ZodObject<{
3114
- config: z.ZodObject<{
3115
- repository: z.ZodObject<{
3116
- owner: z.ZodString;
3117
- repo: z.ZodString;
3118
- }, z.core.$strip>;
3119
- issueTitle: z.ZodString;
3120
- defaultBranch: z.ZodString;
3121
- }, z.core.$strip>;
3122
- }, z.core.$strip>;
3123
- readonly examples: readonly [{
3124
- readonly description: "The dogfood dashboard for this repo.";
3125
- readonly payload: {
3126
- readonly config: {
3127
- readonly repository: {
3128
- readonly owner: "iterate";
3129
- readonly repo: "iterate";
3130
- };
3131
- readonly issueTitle: "Flake dashboard";
3132
- readonly defaultBranch: "main";
3133
- };
3134
- };
3135
- }];
3136
- };
3137
- readonly "events.iterate.com/flakes/run-recorded": {
3138
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
3139
- readonly payloadSchema: z.ZodObject<{
3140
- runId: z.ZodString;
3141
- suite: z.ZodString;
3142
- branch: z.ZodString;
3143
- commit: z.ZodString;
3144
- records: z.ZodArray<z.ZodObject<{
3145
- name: z.ZodString;
3146
- kind: z.ZodDefault<z.ZodEnum<{
3147
- unknown: "unknown";
3148
- flake: "flake";
3149
- failing: "failing";
3150
- }>>;
3151
- outcome: z.ZodEnum<{
3152
- pass: "pass";
3153
- "flake-fail": "flake-fail";
3154
- "unexpected-error": "unexpected-error";
3155
- "pinned-fail": "pinned-fail";
3156
- "unexpected-pass": "unexpected-pass";
3157
- "retried-pass": "retried-pass";
3158
- }>;
3159
- pattern: z.ZodOptional<z.ZodString>;
3160
- durationMs: z.ZodNumber;
3161
- at: z.ZodString;
3162
- error: z.ZodOptional<z.ZodString>;
3163
- }, z.core.$strip>>;
3164
- summary: z.ZodOptional<z.ZodObject<{
3165
- headSha: z.ZodString;
3166
- branch: z.ZodString;
3167
- status: z.ZodEnum<{
3168
- incomplete: "incomplete";
3169
- complete: "complete";
3170
- }>;
3171
- startedAt: z.ZodISODateTime;
3172
- finishedAt: z.ZodISODateTime;
3173
- testCount: z.ZodNumber;
3174
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
3175
- name: z.ZodString;
3176
- outcome: z.ZodEnum<{
3177
- skip: "skip";
3178
- pass: "pass";
3179
- fail: "fail";
3180
- }>;
3181
- }, z.core.$strip>>>;
3182
- unknownFlakeCount: z.ZodNumber;
3183
- failedCount: z.ZodNumber;
3184
- diagnostics: z.ZodArray<z.ZodString>;
3185
- runUrl: z.ZodURL;
3186
- }, z.core.$strip>>;
3187
- }, z.core.$strip>;
3188
- };
3189
- readonly "events.iterate.com/flakes/transition-proposed": {
3190
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
3191
- readonly payloadSchema: z.ZodObject<{
3192
- testName: z.ZodString;
3193
- transition: z.ZodEnum<{
3194
- unwrap: "unwrap";
3195
- "switch-to-failing": "switch-to-failing";
3196
- "unwrap-failing": "unwrap-failing";
3197
- }>;
3198
- evidence: z.ZodObject<{
3199
- consecutiveRuns: z.ZodNumber;
3200
- firstAt: z.ZodString;
3201
- lastAt: z.ZodString;
3202
- }, z.core.$strip>;
3203
- }, z.core.$strip>;
3204
- };
3205
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
3206
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
3207
- readonly payloadSchema: z.ZodObject<{
3208
- throughOffset: z.ZodNumber;
3209
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
3210
- status: z.ZodLiteral<"succeeded">;
3211
- issueNumber: z.ZodNumber;
3212
- issueUrl: z.ZodString;
3213
- }, z.core.$strip>, z.ZodObject<{
3214
- status: z.ZodLiteral<"failed">;
3215
- error: z.ZodString;
3216
- }, z.core.$strip>], "status">;
3217
- }, z.core.$strip>;
3218
- };
3219
- }[T_2] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<{
3220
- type: string;
3221
- payload?: Record<string, unknown> | undefined;
3222
- metadata?: Record<string, unknown> | undefined;
3223
- source?: {
3224
- processor?: {
3225
- slug: string;
3226
- version: string;
3227
- stream: {
3228
- path: string;
3229
- projectId: string | null;
3230
- streamId: string;
3231
- };
3232
- whileProcessing?: {
3233
- offset: number;
3234
- type: string;
3235
- } | undefined;
3236
- } | undefined;
3237
- copiedFrom?: {
3238
- name: string;
3239
- streamId: string;
3240
- streamCreatedAt: string;
3241
- cursorChangedAtSourceOffset: number;
3242
- createdAt: string;
3243
- offset: number;
3244
- path: string;
3245
- projectId: string | null;
3246
- type: string;
3247
- }[] | undefined;
3248
- } | undefined;
3249
- idempotencyKey?: string | undefined;
3250
- ephemeral?: true | undefined;
3251
- }, "payload" | "type"> & {
3252
- type: T_2;
3253
- payload: PayloadOutput;
3254
- } & {
3255
- payload: PayloadOutput;
3256
- } & (import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T_2 extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
3257
- readonly "events.iterate.com/flakes/created": {
3258
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
3259
- readonly payloadSchema: z.ZodObject<{
3260
- config: z.ZodObject<{
3261
- repository: z.ZodObject<{
3262
- owner: z.ZodString;
3263
- repo: z.ZodString;
3264
- }, z.core.$strip>;
3265
- issueTitle: z.ZodString;
3266
- defaultBranch: z.ZodString;
3267
- }, z.core.$strip>;
3268
- }, z.core.$strip>;
3269
- readonly examples: readonly [{
3270
- readonly description: "The dogfood dashboard for this repo.";
3271
- readonly payload: {
3272
- readonly config: {
3273
- readonly repository: {
3274
- readonly owner: "iterate";
3275
- readonly repo: "iterate";
3276
- };
3277
- readonly issueTitle: "Flake dashboard";
3278
- readonly defaultBranch: "main";
3279
- };
3280
- };
3281
- }];
3282
- };
3283
- readonly "events.iterate.com/flakes/run-recorded": {
3284
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
3285
- readonly payloadSchema: z.ZodObject<{
3286
- runId: z.ZodString;
3287
- suite: z.ZodString;
3288
- branch: z.ZodString;
3289
- commit: z.ZodString;
3290
- records: z.ZodArray<z.ZodObject<{
3291
- name: z.ZodString;
3292
- kind: z.ZodDefault<z.ZodEnum<{
3293
- unknown: "unknown";
3294
- flake: "flake";
3295
- failing: "failing";
3296
- }>>;
3297
- outcome: z.ZodEnum<{
3298
- pass: "pass";
3299
- "flake-fail": "flake-fail";
3300
- "unexpected-error": "unexpected-error";
3301
- "pinned-fail": "pinned-fail";
3302
- "unexpected-pass": "unexpected-pass";
3303
- "retried-pass": "retried-pass";
3304
- }>;
3305
- pattern: z.ZodOptional<z.ZodString>;
3306
- durationMs: z.ZodNumber;
3307
- at: z.ZodString;
3308
- error: z.ZodOptional<z.ZodString>;
3309
- }, z.core.$strip>>;
3310
- summary: z.ZodOptional<z.ZodObject<{
3311
- headSha: z.ZodString;
3312
- branch: z.ZodString;
3313
- status: z.ZodEnum<{
3314
- incomplete: "incomplete";
3315
- complete: "complete";
3316
- }>;
3317
- startedAt: z.ZodISODateTime;
3318
- finishedAt: z.ZodISODateTime;
3319
- testCount: z.ZodNumber;
3320
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
3321
- name: z.ZodString;
3322
- outcome: z.ZodEnum<{
3323
- skip: "skip";
3324
- pass: "pass";
3325
- fail: "fail";
3326
- }>;
3327
- }, z.core.$strip>>>;
3328
- unknownFlakeCount: z.ZodNumber;
3329
- failedCount: z.ZodNumber;
3330
- diagnostics: z.ZodArray<z.ZodString>;
3331
- runUrl: z.ZodURL;
3332
- }, z.core.$strip>>;
3333
- }, z.core.$strip>;
3334
- };
3335
- readonly "events.iterate.com/flakes/transition-proposed": {
3336
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
3337
- readonly payloadSchema: z.ZodObject<{
3338
- testName: z.ZodString;
3339
- transition: z.ZodEnum<{
3340
- unwrap: "unwrap";
3341
- "switch-to-failing": "switch-to-failing";
3342
- "unwrap-failing": "unwrap-failing";
3343
- }>;
3344
- evidence: z.ZodObject<{
3345
- consecutiveRuns: z.ZodNumber;
3346
- firstAt: z.ZodString;
3347
- lastAt: z.ZodString;
3348
- }, z.core.$strip>;
3349
- }, z.core.$strip>;
3350
- };
3351
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
3352
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
3353
- readonly payloadSchema: z.ZodObject<{
3354
- throughOffset: z.ZodNumber;
3355
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
3356
- status: z.ZodLiteral<"succeeded">;
3357
- issueNumber: z.ZodNumber;
3358
- issueUrl: z.ZodString;
3359
- }, z.core.$strip>, z.ZodObject<{
3360
- status: z.ZodLiteral<"failed">;
3361
- error: z.ZodString;
3362
- }, z.core.$strip>], "status">;
3363
- }, z.core.$strip>;
3364
- };
3365
- }[T_2] : never) extends infer T_3 ? T_3 extends import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T_2 extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
3366
- readonly "events.iterate.com/flakes/created": {
3367
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
3368
- readonly payloadSchema: z.ZodObject<{
3369
- config: z.ZodObject<{
3370
- repository: z.ZodObject<{
3371
- owner: z.ZodString;
3372
- repo: z.ZodString;
3373
- }, z.core.$strip>;
3374
- issueTitle: z.ZodString;
3375
- defaultBranch: z.ZodString;
3376
- }, z.core.$strip>;
3377
- }, z.core.$strip>;
3378
- readonly examples: readonly [{
3379
- readonly description: "The dogfood dashboard for this repo.";
3380
- readonly payload: {
3381
- readonly config: {
3382
- readonly repository: {
3383
- readonly owner: "iterate";
3384
- readonly repo: "iterate";
3385
- };
3386
- readonly issueTitle: "Flake dashboard";
3387
- readonly defaultBranch: "main";
3388
- };
3389
- };
3390
- }];
3391
- };
3392
- readonly "events.iterate.com/flakes/run-recorded": {
3393
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
3394
- readonly payloadSchema: z.ZodObject<{
3395
- runId: z.ZodString;
3396
- suite: z.ZodString;
3397
- branch: z.ZodString;
3398
- commit: z.ZodString;
3399
- records: z.ZodArray<z.ZodObject<{
3400
- name: z.ZodString;
3401
- kind: z.ZodDefault<z.ZodEnum<{
3402
- unknown: "unknown";
3403
- flake: "flake";
3404
- failing: "failing";
3405
- }>>;
3406
- outcome: z.ZodEnum<{
3407
- pass: "pass";
3408
- "flake-fail": "flake-fail";
3409
- "unexpected-error": "unexpected-error";
3410
- "pinned-fail": "pinned-fail";
3411
- "unexpected-pass": "unexpected-pass";
3412
- "retried-pass": "retried-pass";
3413
- }>;
3414
- pattern: z.ZodOptional<z.ZodString>;
3415
- durationMs: z.ZodNumber;
3416
- at: z.ZodString;
3417
- error: z.ZodOptional<z.ZodString>;
3418
- }, z.core.$strip>>;
3419
- summary: z.ZodOptional<z.ZodObject<{
3420
- headSha: z.ZodString;
3421
- branch: z.ZodString;
3422
- status: z.ZodEnum<{
3423
- incomplete: "incomplete";
3424
- complete: "complete";
3425
- }>;
3426
- startedAt: z.ZodISODateTime;
3427
- finishedAt: z.ZodISODateTime;
3428
- testCount: z.ZodNumber;
3429
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
3430
- name: z.ZodString;
3431
- outcome: z.ZodEnum<{
3432
- skip: "skip";
3433
- pass: "pass";
3434
- fail: "fail";
3435
- }>;
3436
- }, z.core.$strip>>>;
3437
- unknownFlakeCount: z.ZodNumber;
3438
- failedCount: z.ZodNumber;
3439
- diagnostics: z.ZodArray<z.ZodString>;
3440
- runUrl: z.ZodURL;
3441
- }, z.core.$strip>>;
3442
- }, z.core.$strip>;
3443
- };
3444
- readonly "events.iterate.com/flakes/transition-proposed": {
3445
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
3446
- readonly payloadSchema: z.ZodObject<{
3447
- testName: z.ZodString;
3448
- transition: z.ZodEnum<{
3449
- unwrap: "unwrap";
3450
- "switch-to-failing": "switch-to-failing";
3451
- "unwrap-failing": "unwrap-failing";
3452
- }>;
3453
- evidence: z.ZodObject<{
3454
- consecutiveRuns: z.ZodNumber;
3455
- firstAt: z.ZodString;
3456
- lastAt: z.ZodString;
3457
- }, z.core.$strip>;
3458
- }, z.core.$strip>;
3459
- };
3460
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
3461
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
3462
- readonly payloadSchema: z.ZodObject<{
3463
- throughOffset: z.ZodNumber;
3464
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
3465
- status: z.ZodLiteral<"succeeded">;
3466
- issueNumber: z.ZodNumber;
3467
- issueUrl: z.ZodString;
3468
- }, z.core.$strip>, z.ZodObject<{
3469
- status: z.ZodLiteral<"failed">;
3470
- error: z.ZodString;
3471
- }, z.core.$strip>], "status">;
3472
- }, z.core.$strip>;
3473
- };
3474
- }[T_2] : never) ? T_3 extends {
3475
- ephemeral: true;
3476
- } ? {
3477
- ephemeral: true;
3478
- } : unknown : never : never) : never : never : never : never) | (Extract<"events.iterate.com/flakes/transition-proposed", Event["type"]> extends infer T_4 ? T_4 extends Extract<"events.iterate.com/flakes/transition-proposed", Event["type"]> ? T_4 extends unknown ? (T_4 extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
3479
- readonly "events.iterate.com/flakes/created": {
3480
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
3481
- readonly payloadSchema: z.ZodObject<{
3482
- config: z.ZodObject<{
3483
- repository: z.ZodObject<{
3484
- owner: z.ZodString;
3485
- repo: z.ZodString;
3486
- }, z.core.$strip>;
3487
- issueTitle: z.ZodString;
3488
- defaultBranch: z.ZodString;
3489
- }, z.core.$strip>;
3490
- }, z.core.$strip>;
3491
- readonly examples: readonly [{
3492
- readonly description: "The dogfood dashboard for this repo.";
3493
- readonly payload: {
3494
- readonly config: {
3495
- readonly repository: {
3496
- readonly owner: "iterate";
3497
- readonly repo: "iterate";
3498
- };
3499
- readonly issueTitle: "Flake dashboard";
3500
- readonly defaultBranch: "main";
3501
- };
3502
- };
3503
- }];
3504
- };
3505
- readonly "events.iterate.com/flakes/run-recorded": {
3506
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
3507
- readonly payloadSchema: z.ZodObject<{
3508
- runId: z.ZodString;
3509
- suite: z.ZodString;
3510
- branch: z.ZodString;
3511
- commit: z.ZodString;
3512
- records: z.ZodArray<z.ZodObject<{
3513
- name: z.ZodString;
3514
- kind: z.ZodDefault<z.ZodEnum<{
3515
- unknown: "unknown";
3516
- flake: "flake";
3517
- failing: "failing";
3518
- }>>;
3519
- outcome: z.ZodEnum<{
3520
- pass: "pass";
3521
- "flake-fail": "flake-fail";
3522
- "unexpected-error": "unexpected-error";
3523
- "pinned-fail": "pinned-fail";
3524
- "unexpected-pass": "unexpected-pass";
3525
- "retried-pass": "retried-pass";
3526
- }>;
3527
- pattern: z.ZodOptional<z.ZodString>;
3528
- durationMs: z.ZodNumber;
3529
- at: z.ZodString;
3530
- error: z.ZodOptional<z.ZodString>;
3531
- }, z.core.$strip>>;
3532
- summary: z.ZodOptional<z.ZodObject<{
3533
- headSha: z.ZodString;
3534
- branch: z.ZodString;
3535
- status: z.ZodEnum<{
3536
- incomplete: "incomplete";
3537
- complete: "complete";
3538
- }>;
3539
- startedAt: z.ZodISODateTime;
3540
- finishedAt: z.ZodISODateTime;
3541
- testCount: z.ZodNumber;
3542
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
3543
- name: z.ZodString;
3544
- outcome: z.ZodEnum<{
3545
- skip: "skip";
3546
- pass: "pass";
3547
- fail: "fail";
3548
- }>;
3549
- }, z.core.$strip>>>;
3550
- unknownFlakeCount: z.ZodNumber;
3551
- failedCount: z.ZodNumber;
3552
- diagnostics: z.ZodArray<z.ZodString>;
3553
- runUrl: z.ZodURL;
3554
- }, z.core.$strip>>;
3555
- }, z.core.$strip>;
3556
- };
3557
- readonly "events.iterate.com/flakes/transition-proposed": {
3558
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
3559
- readonly payloadSchema: z.ZodObject<{
3560
- testName: z.ZodString;
3561
- transition: z.ZodEnum<{
3562
- unwrap: "unwrap";
3563
- "switch-to-failing": "switch-to-failing";
3564
- "unwrap-failing": "unwrap-failing";
3565
- }>;
3566
- evidence: z.ZodObject<{
3567
- consecutiveRuns: z.ZodNumber;
3568
- firstAt: z.ZodString;
3569
- lastAt: z.ZodString;
3570
- }, z.core.$strip>;
3571
- }, z.core.$strip>;
3572
- };
3573
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
3574
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
3575
- readonly payloadSchema: z.ZodObject<{
3576
- throughOffset: z.ZodNumber;
3577
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
3578
- status: z.ZodLiteral<"succeeded">;
3579
- issueNumber: z.ZodNumber;
3580
- issueUrl: z.ZodString;
3581
- }, z.core.$strip>, z.ZodObject<{
3582
- status: z.ZodLiteral<"failed">;
3583
- error: z.ZodString;
3584
- }, z.core.$strip>], "status">;
3585
- }, z.core.$strip>;
3586
- };
3587
- }[T_4] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<{
3588
- type: string;
3589
- payload?: Record<string, unknown> | undefined;
3590
- metadata?: Record<string, unknown> | undefined;
3591
- source?: {
3592
- processor?: {
3593
- slug: string;
3594
- version: string;
3595
- stream: {
3596
- path: string;
3597
- projectId: string | null;
3598
- streamId: string;
3599
- };
3600
- whileProcessing?: {
3601
- offset: number;
3602
- type: string;
3603
- } | undefined;
3604
- } | undefined;
3605
- copiedFrom?: {
3606
- name: string;
3607
- streamId: string;
3608
- streamCreatedAt: string;
3609
- cursorChangedAtSourceOffset: number;
3610
- createdAt: string;
3611
- offset: number;
3612
- path: string;
3613
- projectId: string | null;
3614
- type: string;
3615
- }[] | undefined;
3616
- } | undefined;
3617
- idempotencyKey?: string | undefined;
3618
- ephemeral?: true | undefined;
3619
- }, "payload" | "type"> & {
3620
- type: T_4;
3621
- payload: PayloadOutput;
3622
- } & {
3623
- payload: PayloadOutput;
3624
- } & (import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T_4 extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
3625
- readonly "events.iterate.com/flakes/created": {
3626
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
3627
- readonly payloadSchema: z.ZodObject<{
3628
- config: z.ZodObject<{
3629
- repository: z.ZodObject<{
3630
- owner: z.ZodString;
3631
- repo: z.ZodString;
3632
- }, z.core.$strip>;
3633
- issueTitle: z.ZodString;
3634
- defaultBranch: z.ZodString;
3635
- }, z.core.$strip>;
3636
- }, z.core.$strip>;
3637
- readonly examples: readonly [{
3638
- readonly description: "The dogfood dashboard for this repo.";
3639
- readonly payload: {
3640
- readonly config: {
3641
- readonly repository: {
3642
- readonly owner: "iterate";
3643
- readonly repo: "iterate";
3644
- };
3645
- readonly issueTitle: "Flake dashboard";
3646
- readonly defaultBranch: "main";
3647
- };
3648
- };
3649
- }];
3650
- };
3651
- readonly "events.iterate.com/flakes/run-recorded": {
3652
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
3653
- readonly payloadSchema: z.ZodObject<{
3654
- runId: z.ZodString;
3655
- suite: z.ZodString;
3656
- branch: z.ZodString;
3657
- commit: z.ZodString;
3658
- records: z.ZodArray<z.ZodObject<{
3659
- name: z.ZodString;
3660
- kind: z.ZodDefault<z.ZodEnum<{
3661
- unknown: "unknown";
3662
- flake: "flake";
3663
- failing: "failing";
3664
- }>>;
3665
- outcome: z.ZodEnum<{
3666
- pass: "pass";
3667
- "flake-fail": "flake-fail";
3668
- "unexpected-error": "unexpected-error";
3669
- "pinned-fail": "pinned-fail";
3670
- "unexpected-pass": "unexpected-pass";
3671
- "retried-pass": "retried-pass";
3672
- }>;
3673
- pattern: z.ZodOptional<z.ZodString>;
3674
- durationMs: z.ZodNumber;
3675
- at: z.ZodString;
3676
- error: z.ZodOptional<z.ZodString>;
3677
- }, z.core.$strip>>;
3678
- summary: z.ZodOptional<z.ZodObject<{
3679
- headSha: z.ZodString;
3680
- branch: z.ZodString;
3681
- status: z.ZodEnum<{
3682
- incomplete: "incomplete";
3683
- complete: "complete";
3684
- }>;
3685
- startedAt: z.ZodISODateTime;
3686
- finishedAt: z.ZodISODateTime;
3687
- testCount: z.ZodNumber;
3688
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
3689
- name: z.ZodString;
3690
- outcome: z.ZodEnum<{
3691
- skip: "skip";
3692
- pass: "pass";
3693
- fail: "fail";
3694
- }>;
3695
- }, z.core.$strip>>>;
3696
- unknownFlakeCount: z.ZodNumber;
3697
- failedCount: z.ZodNumber;
3698
- diagnostics: z.ZodArray<z.ZodString>;
3699
- runUrl: z.ZodURL;
3700
- }, z.core.$strip>>;
3701
- }, z.core.$strip>;
3702
- };
3703
- readonly "events.iterate.com/flakes/transition-proposed": {
3704
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
3705
- readonly payloadSchema: z.ZodObject<{
3706
- testName: z.ZodString;
3707
- transition: z.ZodEnum<{
3708
- unwrap: "unwrap";
3709
- "switch-to-failing": "switch-to-failing";
3710
- "unwrap-failing": "unwrap-failing";
3711
- }>;
3712
- evidence: z.ZodObject<{
3713
- consecutiveRuns: z.ZodNumber;
3714
- firstAt: z.ZodString;
3715
- lastAt: z.ZodString;
3716
- }, z.core.$strip>;
3717
- }, z.core.$strip>;
3718
- };
3719
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
3720
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
3721
- readonly payloadSchema: z.ZodObject<{
3722
- throughOffset: z.ZodNumber;
3723
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
3724
- status: z.ZodLiteral<"succeeded">;
3725
- issueNumber: z.ZodNumber;
3726
- issueUrl: z.ZodString;
3727
- }, z.core.$strip>, z.ZodObject<{
3728
- status: z.ZodLiteral<"failed">;
3729
- error: z.ZodString;
3730
- }, z.core.$strip>], "status">;
3731
- }, z.core.$strip>;
3732
- };
3733
- }[T_4] : never) extends infer T_5 ? T_5 extends import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T_4 extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
3734
- readonly "events.iterate.com/flakes/created": {
3735
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
3736
- readonly payloadSchema: z.ZodObject<{
3737
- config: z.ZodObject<{
3738
- repository: z.ZodObject<{
3739
- owner: z.ZodString;
3740
- repo: z.ZodString;
3741
- }, z.core.$strip>;
3742
- issueTitle: z.ZodString;
3743
- defaultBranch: z.ZodString;
3744
- }, z.core.$strip>;
3745
- }, z.core.$strip>;
3746
- readonly examples: readonly [{
3747
- readonly description: "The dogfood dashboard for this repo.";
3748
- readonly payload: {
3749
- readonly config: {
3750
- readonly repository: {
3751
- readonly owner: "iterate";
3752
- readonly repo: "iterate";
3753
- };
3754
- readonly issueTitle: "Flake dashboard";
3755
- readonly defaultBranch: "main";
3756
- };
3757
- };
3758
- }];
3759
- };
3760
- readonly "events.iterate.com/flakes/run-recorded": {
3761
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
3762
- readonly payloadSchema: z.ZodObject<{
3763
- runId: z.ZodString;
3764
- suite: z.ZodString;
3765
- branch: z.ZodString;
3766
- commit: z.ZodString;
3767
- records: z.ZodArray<z.ZodObject<{
3768
- name: z.ZodString;
3769
- kind: z.ZodDefault<z.ZodEnum<{
3770
- unknown: "unknown";
3771
- flake: "flake";
3772
- failing: "failing";
3773
- }>>;
3774
- outcome: z.ZodEnum<{
3775
- pass: "pass";
3776
- "flake-fail": "flake-fail";
3777
- "unexpected-error": "unexpected-error";
3778
- "pinned-fail": "pinned-fail";
3779
- "unexpected-pass": "unexpected-pass";
3780
- "retried-pass": "retried-pass";
3781
- }>;
3782
- pattern: z.ZodOptional<z.ZodString>;
3783
- durationMs: z.ZodNumber;
3784
- at: z.ZodString;
3785
- error: z.ZodOptional<z.ZodString>;
3786
- }, z.core.$strip>>;
3787
- summary: z.ZodOptional<z.ZodObject<{
3788
- headSha: z.ZodString;
3789
- branch: z.ZodString;
3790
- status: z.ZodEnum<{
3791
- incomplete: "incomplete";
3792
- complete: "complete";
3793
- }>;
3794
- startedAt: z.ZodISODateTime;
3795
- finishedAt: z.ZodISODateTime;
3796
- testCount: z.ZodNumber;
3797
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
3798
- name: z.ZodString;
3799
- outcome: z.ZodEnum<{
3800
- skip: "skip";
3801
- pass: "pass";
3802
- fail: "fail";
3803
- }>;
3804
- }, z.core.$strip>>>;
3805
- unknownFlakeCount: z.ZodNumber;
3806
- failedCount: z.ZodNumber;
3807
- diagnostics: z.ZodArray<z.ZodString>;
3808
- runUrl: z.ZodURL;
3809
- }, z.core.$strip>>;
3810
- }, z.core.$strip>;
3811
- };
3812
- readonly "events.iterate.com/flakes/transition-proposed": {
3813
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
3814
- readonly payloadSchema: z.ZodObject<{
3815
- testName: z.ZodString;
3816
- transition: z.ZodEnum<{
3817
- unwrap: "unwrap";
3818
- "switch-to-failing": "switch-to-failing";
3819
- "unwrap-failing": "unwrap-failing";
3820
- }>;
3821
- evidence: z.ZodObject<{
3822
- consecutiveRuns: z.ZodNumber;
3823
- firstAt: z.ZodString;
3824
- lastAt: z.ZodString;
3825
- }, z.core.$strip>;
3826
- }, z.core.$strip>;
3827
- };
3828
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
3829
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
3830
- readonly payloadSchema: z.ZodObject<{
3831
- throughOffset: z.ZodNumber;
3832
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
3833
- status: z.ZodLiteral<"succeeded">;
3834
- issueNumber: z.ZodNumber;
3835
- issueUrl: z.ZodString;
3836
- }, z.core.$strip>, z.ZodObject<{
3837
- status: z.ZodLiteral<"failed">;
3838
- error: z.ZodString;
3839
- }, z.core.$strip>], "status">;
3840
- }, z.core.$strip>;
3841
- };
3842
- }[T_4] : never) ? T_5 extends {
3843
- ephemeral: true;
3844
- } ? {
3845
- ephemeral: true;
3846
- } : unknown : never : never) : never : never : never : never) | (Extract<"events.iterate.com/flakes/dashboard-render-settled", Event["type"]> extends infer T_6 ? T_6 extends Extract<"events.iterate.com/flakes/dashboard-render-settled", Event["type"]> ? T_6 extends unknown ? (T_6 extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
3847
- readonly "events.iterate.com/flakes/created": {
3848
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
3849
- readonly payloadSchema: z.ZodObject<{
3850
- config: z.ZodObject<{
3851
- repository: z.ZodObject<{
3852
- owner: z.ZodString;
3853
- repo: z.ZodString;
3854
- }, z.core.$strip>;
3855
- issueTitle: z.ZodString;
3856
- defaultBranch: z.ZodString;
3857
- }, z.core.$strip>;
3858
- }, z.core.$strip>;
3859
- readonly examples: readonly [{
3860
- readonly description: "The dogfood dashboard for this repo.";
3861
- readonly payload: {
3862
- readonly config: {
3863
- readonly repository: {
3864
- readonly owner: "iterate";
3865
- readonly repo: "iterate";
3866
- };
3867
- readonly issueTitle: "Flake dashboard";
3868
- readonly defaultBranch: "main";
3869
- };
3870
- };
3871
- }];
3872
- };
3873
- readonly "events.iterate.com/flakes/run-recorded": {
3874
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
3875
- readonly payloadSchema: z.ZodObject<{
3876
- runId: z.ZodString;
3877
- suite: z.ZodString;
3878
- branch: z.ZodString;
3879
- commit: z.ZodString;
3880
- records: z.ZodArray<z.ZodObject<{
3881
- name: z.ZodString;
3882
- kind: z.ZodDefault<z.ZodEnum<{
3883
- unknown: "unknown";
3884
- flake: "flake";
3885
- failing: "failing";
3886
- }>>;
3887
- outcome: z.ZodEnum<{
3888
- pass: "pass";
3889
- "flake-fail": "flake-fail";
3890
- "unexpected-error": "unexpected-error";
3891
- "pinned-fail": "pinned-fail";
3892
- "unexpected-pass": "unexpected-pass";
3893
- "retried-pass": "retried-pass";
3894
- }>;
3895
- pattern: z.ZodOptional<z.ZodString>;
3896
- durationMs: z.ZodNumber;
3897
- at: z.ZodString;
3898
- error: z.ZodOptional<z.ZodString>;
3899
- }, z.core.$strip>>;
3900
- summary: z.ZodOptional<z.ZodObject<{
3901
- headSha: z.ZodString;
3902
- branch: z.ZodString;
3903
- status: z.ZodEnum<{
3904
- incomplete: "incomplete";
3905
- complete: "complete";
3906
- }>;
3907
- startedAt: z.ZodISODateTime;
3908
- finishedAt: z.ZodISODateTime;
3909
- testCount: z.ZodNumber;
3910
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
3911
- name: z.ZodString;
3912
- outcome: z.ZodEnum<{
3913
- skip: "skip";
3914
- pass: "pass";
3915
- fail: "fail";
3916
- }>;
3917
- }, z.core.$strip>>>;
3918
- unknownFlakeCount: z.ZodNumber;
3919
- failedCount: z.ZodNumber;
3920
- diagnostics: z.ZodArray<z.ZodString>;
3921
- runUrl: z.ZodURL;
3922
- }, z.core.$strip>>;
3923
- }, z.core.$strip>;
3924
- };
3925
- readonly "events.iterate.com/flakes/transition-proposed": {
3926
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
3927
- readonly payloadSchema: z.ZodObject<{
3928
- testName: z.ZodString;
3929
- transition: z.ZodEnum<{
3930
- unwrap: "unwrap";
3931
- "switch-to-failing": "switch-to-failing";
3932
- "unwrap-failing": "unwrap-failing";
3933
- }>;
3934
- evidence: z.ZodObject<{
3935
- consecutiveRuns: z.ZodNumber;
3936
- firstAt: z.ZodString;
3937
- lastAt: z.ZodString;
3938
- }, z.core.$strip>;
3939
- }, z.core.$strip>;
3940
- };
3941
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
3942
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
3943
- readonly payloadSchema: z.ZodObject<{
3944
- throughOffset: z.ZodNumber;
3945
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
3946
- status: z.ZodLiteral<"succeeded">;
3947
- issueNumber: z.ZodNumber;
3948
- issueUrl: z.ZodString;
3949
- }, z.core.$strip>, z.ZodObject<{
3950
- status: z.ZodLiteral<"failed">;
3951
- error: z.ZodString;
3952
- }, z.core.$strip>], "status">;
3953
- }, z.core.$strip>;
3954
- };
3955
- }[T_6] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<{
3956
- type: string;
3957
- payload?: Record<string, unknown> | undefined;
3958
- metadata?: Record<string, unknown> | undefined;
3959
- source?: {
3960
- processor?: {
3961
- slug: string;
3962
- version: string;
3963
- stream: {
3964
- path: string;
3965
- projectId: string | null;
3966
- streamId: string;
3967
- };
3968
- whileProcessing?: {
3969
- offset: number;
3970
- type: string;
3971
- } | undefined;
3972
- } | undefined;
3973
- copiedFrom?: {
3974
- name: string;
3975
- streamId: string;
3976
- streamCreatedAt: string;
3977
- cursorChangedAtSourceOffset: number;
3978
- createdAt: string;
3979
- offset: number;
3980
- path: string;
3981
- projectId: string | null;
3982
- type: string;
3983
- }[] | undefined;
3984
- } | undefined;
3985
- idempotencyKey?: string | undefined;
3986
- ephemeral?: true | undefined;
3987
- }, "payload" | "type"> & {
3988
- type: T_6;
3989
- payload: PayloadOutput;
3990
- } & {
3991
- payload: PayloadOutput;
3992
- } & (import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T_6 extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
3993
- readonly "events.iterate.com/flakes/created": {
3994
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
3995
- readonly payloadSchema: z.ZodObject<{
3996
- config: z.ZodObject<{
3997
- repository: z.ZodObject<{
3998
- owner: z.ZodString;
3999
- repo: z.ZodString;
4000
- }, z.core.$strip>;
4001
- issueTitle: z.ZodString;
4002
- defaultBranch: z.ZodString;
4003
- }, z.core.$strip>;
4004
- }, z.core.$strip>;
4005
- readonly examples: readonly [{
4006
- readonly description: "The dogfood dashboard for this repo.";
4007
- readonly payload: {
4008
- readonly config: {
4009
- readonly repository: {
4010
- readonly owner: "iterate";
4011
- readonly repo: "iterate";
4012
- };
4013
- readonly issueTitle: "Flake dashboard";
4014
- readonly defaultBranch: "main";
4015
- };
4016
- };
4017
- }];
4018
- };
4019
- readonly "events.iterate.com/flakes/run-recorded": {
4020
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
4021
- readonly payloadSchema: z.ZodObject<{
4022
- runId: z.ZodString;
4023
- suite: z.ZodString;
4024
- branch: z.ZodString;
4025
- commit: z.ZodString;
4026
- records: z.ZodArray<z.ZodObject<{
4027
- name: z.ZodString;
4028
- kind: z.ZodDefault<z.ZodEnum<{
4029
- unknown: "unknown";
4030
- flake: "flake";
4031
- failing: "failing";
4032
- }>>;
4033
- outcome: z.ZodEnum<{
4034
- pass: "pass";
4035
- "flake-fail": "flake-fail";
4036
- "unexpected-error": "unexpected-error";
4037
- "pinned-fail": "pinned-fail";
4038
- "unexpected-pass": "unexpected-pass";
4039
- "retried-pass": "retried-pass";
4040
- }>;
4041
- pattern: z.ZodOptional<z.ZodString>;
4042
- durationMs: z.ZodNumber;
4043
- at: z.ZodString;
4044
- error: z.ZodOptional<z.ZodString>;
4045
- }, z.core.$strip>>;
4046
- summary: z.ZodOptional<z.ZodObject<{
4047
- headSha: z.ZodString;
4048
- branch: z.ZodString;
4049
- status: z.ZodEnum<{
4050
- incomplete: "incomplete";
4051
- complete: "complete";
4052
- }>;
4053
- startedAt: z.ZodISODateTime;
4054
- finishedAt: z.ZodISODateTime;
4055
- testCount: z.ZodNumber;
4056
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
4057
- name: z.ZodString;
4058
- outcome: z.ZodEnum<{
4059
- skip: "skip";
4060
- pass: "pass";
4061
- fail: "fail";
4062
- }>;
4063
- }, z.core.$strip>>>;
4064
- unknownFlakeCount: z.ZodNumber;
4065
- failedCount: z.ZodNumber;
4066
- diagnostics: z.ZodArray<z.ZodString>;
4067
- runUrl: z.ZodURL;
4068
- }, z.core.$strip>>;
4069
- }, z.core.$strip>;
4070
- };
4071
- readonly "events.iterate.com/flakes/transition-proposed": {
4072
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
4073
- readonly payloadSchema: z.ZodObject<{
4074
- testName: z.ZodString;
4075
- transition: z.ZodEnum<{
4076
- unwrap: "unwrap";
4077
- "switch-to-failing": "switch-to-failing";
4078
- "unwrap-failing": "unwrap-failing";
4079
- }>;
4080
- evidence: z.ZodObject<{
4081
- consecutiveRuns: z.ZodNumber;
4082
- firstAt: z.ZodString;
4083
- lastAt: z.ZodString;
4084
- }, z.core.$strip>;
4085
- }, z.core.$strip>;
4086
- };
4087
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
4088
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
4089
- readonly payloadSchema: z.ZodObject<{
4090
- throughOffset: z.ZodNumber;
4091
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
4092
- status: z.ZodLiteral<"succeeded">;
4093
- issueNumber: z.ZodNumber;
4094
- issueUrl: z.ZodString;
4095
- }, z.core.$strip>, z.ZodObject<{
4096
- status: z.ZodLiteral<"failed">;
4097
- error: z.ZodString;
4098
- }, z.core.$strip>], "status">;
4099
- }, z.core.$strip>;
4100
- };
4101
- }[T_6] : never) extends infer T_7 ? T_7 extends import("../../processors/processor-contracts.ts").EventDefinition<PayloadOutput, unknown> & (T_6 extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
4102
- readonly "events.iterate.com/flakes/created": {
4103
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
4104
- readonly payloadSchema: z.ZodObject<{
4105
- config: z.ZodObject<{
4106
- repository: z.ZodObject<{
4107
- owner: z.ZodString;
4108
- repo: z.ZodString;
4109
- }, z.core.$strip>;
4110
- issueTitle: z.ZodString;
4111
- defaultBranch: z.ZodString;
4112
- }, z.core.$strip>;
4113
- }, z.core.$strip>;
4114
- readonly examples: readonly [{
4115
- readonly description: "The dogfood dashboard for this repo.";
4116
- readonly payload: {
4117
- readonly config: {
4118
- readonly repository: {
4119
- readonly owner: "iterate";
4120
- readonly repo: "iterate";
4121
- };
4122
- readonly issueTitle: "Flake dashboard";
4123
- readonly defaultBranch: "main";
4124
- };
4125
- };
4126
- }];
4127
- };
4128
- readonly "events.iterate.com/flakes/run-recorded": {
4129
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
4130
- readonly payloadSchema: z.ZodObject<{
4131
- runId: z.ZodString;
4132
- suite: z.ZodString;
4133
- branch: z.ZodString;
4134
- commit: z.ZodString;
4135
- records: z.ZodArray<z.ZodObject<{
4136
- name: z.ZodString;
4137
- kind: z.ZodDefault<z.ZodEnum<{
4138
- unknown: "unknown";
4139
- flake: "flake";
4140
- failing: "failing";
4141
- }>>;
4142
- outcome: z.ZodEnum<{
4143
- pass: "pass";
4144
- "flake-fail": "flake-fail";
4145
- "unexpected-error": "unexpected-error";
4146
- "pinned-fail": "pinned-fail";
4147
- "unexpected-pass": "unexpected-pass";
4148
- "retried-pass": "retried-pass";
4149
- }>;
4150
- pattern: z.ZodOptional<z.ZodString>;
4151
- durationMs: z.ZodNumber;
4152
- at: z.ZodString;
4153
- error: z.ZodOptional<z.ZodString>;
4154
- }, z.core.$strip>>;
4155
- summary: z.ZodOptional<z.ZodObject<{
4156
- headSha: z.ZodString;
4157
- branch: z.ZodString;
4158
- status: z.ZodEnum<{
4159
- incomplete: "incomplete";
4160
- complete: "complete";
4161
- }>;
4162
- startedAt: z.ZodISODateTime;
4163
- finishedAt: z.ZodISODateTime;
4164
- testCount: z.ZodNumber;
4165
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
4166
- name: z.ZodString;
4167
- outcome: z.ZodEnum<{
4168
- skip: "skip";
4169
- pass: "pass";
4170
- fail: "fail";
4171
- }>;
4172
- }, z.core.$strip>>>;
4173
- unknownFlakeCount: z.ZodNumber;
4174
- failedCount: z.ZodNumber;
4175
- diagnostics: z.ZodArray<z.ZodString>;
4176
- runUrl: z.ZodURL;
4177
- }, z.core.$strip>>;
4178
- }, z.core.$strip>;
4179
- };
4180
- readonly "events.iterate.com/flakes/transition-proposed": {
4181
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
4182
- readonly payloadSchema: z.ZodObject<{
4183
- testName: z.ZodString;
4184
- transition: z.ZodEnum<{
4185
- unwrap: "unwrap";
4186
- "switch-to-failing": "switch-to-failing";
4187
- "unwrap-failing": "unwrap-failing";
4188
- }>;
4189
- evidence: z.ZodObject<{
4190
- consecutiveRuns: z.ZodNumber;
4191
- firstAt: z.ZodString;
4192
- lastAt: z.ZodString;
4193
- }, z.core.$strip>;
4194
- }, z.core.$strip>;
4195
- };
4196
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
4197
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
4198
- readonly payloadSchema: z.ZodObject<{
4199
- throughOffset: z.ZodNumber;
4200
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
4201
- status: z.ZodLiteral<"succeeded">;
4202
- issueNumber: z.ZodNumber;
4203
- issueUrl: z.ZodString;
4204
- }, z.core.$strip>, z.ZodObject<{
4205
- status: z.ZodLiteral<"failed">;
4206
- error: z.ZodString;
4207
- }, z.core.$strip>], "status">;
4208
- }, z.core.$strip>;
4209
- };
4210
- }[T_6] : never) ? T_7 extends {
4211
- ephemeral: true;
4212
- } ? {
4213
- ephemeral: true;
4214
- } : unknown : never : never) : never : never : never : never);
4215
- parseConsumedInput: <const Event extends (Omit<Omit<{
4216
- type: string;
4217
- payload?: Record<string, unknown> | undefined;
4218
- metadata?: Record<string, unknown> | undefined;
4219
- source?: {
4220
- processor?: {
4221
- slug: string;
4222
- version: string;
4223
- stream: {
4224
- path: string;
4225
- projectId: string | null;
4226
- streamId: string;
4227
- };
4228
- whileProcessing?: {
4229
- offset: number;
4230
- type: string;
4231
- } | undefined;
4232
- } | undefined;
4233
- copiedFrom?: {
4234
- name: string;
4235
- streamId: string;
4236
- streamCreatedAt: string;
4237
- cursorChangedAtSourceOffset: number;
4238
- createdAt: string;
4239
- offset: number;
4240
- path: string;
4241
- projectId: string | null;
4242
- type: string;
4243
- }[] | undefined;
4244
- } | undefined;
4245
- idempotencyKey?: string | undefined;
4246
- ephemeral?: true | undefined;
4247
- }, "payload" | "type"> & {
4248
- type: "events.iterate.com/flakes/created";
4249
- payload: {
4250
- config: {
4251
- repository: {
4252
- owner: string;
4253
- repo: string;
4254
- };
4255
- issueTitle: string;
4256
- defaultBranch: string;
4257
- };
4258
- };
4259
- }, "ephemeral"> & {
4260
- ephemeral?: never;
4261
- }) | (Omit<Omit<{
4262
- type: string;
4263
- payload?: Record<string, unknown> | undefined;
4264
- metadata?: Record<string, unknown> | undefined;
4265
- source?: {
4266
- processor?: {
4267
- slug: string;
4268
- version: string;
4269
- stream: {
4270
- path: string;
4271
- projectId: string | null;
4272
- streamId: string;
4273
- };
4274
- whileProcessing?: {
4275
- offset: number;
4276
- type: string;
4277
- } | undefined;
4278
- } | undefined;
4279
- copiedFrom?: {
4280
- name: string;
4281
- streamId: string;
4282
- streamCreatedAt: string;
4283
- cursorChangedAtSourceOffset: number;
4284
- createdAt: string;
4285
- offset: number;
4286
- path: string;
4287
- projectId: string | null;
4288
- type: string;
4289
- }[] | undefined;
4290
- } | undefined;
4291
- idempotencyKey?: string | undefined;
4292
- ephemeral?: true | undefined;
4293
- }, "payload" | "type"> & {
4294
- type: "events.iterate.com/flakes/run-recorded";
4295
- payload: {
4296
- runId: string;
4297
- suite: string;
4298
- branch: string;
4299
- commit: string;
4300
- records: {
4301
- name: string;
4302
- outcome: "pass" | "flake-fail" | "unexpected-error" | "pinned-fail" | "unexpected-pass" | "retried-pass";
4303
- durationMs: number;
4304
- at: string;
4305
- kind?: "unknown" | "flake" | "failing" | undefined;
4306
- pattern?: string | undefined;
4307
- error?: string | undefined;
4308
- }[];
4309
- summary?: {
4310
- headSha: string;
4311
- branch: string;
4312
- status: "incomplete" | "complete";
4313
- startedAt: string;
4314
- finishedAt: string;
4315
- testCount: number;
4316
- unknownFlakeCount: number;
4317
- failedCount: number;
4318
- diagnostics: string[];
4319
- runUrl: string;
4320
- tests?: {
4321
- name: string;
4322
- outcome: "skip" | "pass" | "fail";
4323
- }[] | undefined;
4324
- } | undefined;
4325
- };
4326
- }, "ephemeral"> & {
4327
- ephemeral?: never;
4328
- }) | (Omit<Omit<{
4329
- type: string;
4330
- payload?: Record<string, unknown> | undefined;
4331
- metadata?: Record<string, unknown> | undefined;
4332
- source?: {
4333
- processor?: {
4334
- slug: string;
4335
- version: string;
4336
- stream: {
4337
- path: string;
4338
- projectId: string | null;
4339
- streamId: string;
4340
- };
4341
- whileProcessing?: {
4342
- offset: number;
4343
- type: string;
4344
- } | undefined;
4345
- } | undefined;
4346
- copiedFrom?: {
4347
- name: string;
4348
- streamId: string;
4349
- streamCreatedAt: string;
4350
- cursorChangedAtSourceOffset: number;
4351
- createdAt: string;
4352
- offset: number;
4353
- path: string;
4354
- projectId: string | null;
4355
- type: string;
4356
- }[] | undefined;
4357
- } | undefined;
4358
- idempotencyKey?: string | undefined;
4359
- ephemeral?: true | undefined;
4360
- }, "payload" | "type"> & {
4361
- type: "events.iterate.com/flakes/transition-proposed";
4362
- payload: {
4363
- testName: string;
4364
- transition: "unwrap" | "switch-to-failing" | "unwrap-failing";
4365
- evidence: {
4366
- consecutiveRuns: number;
4367
- firstAt: string;
4368
- lastAt: string;
4369
- };
4370
- };
4371
- }, "ephemeral"> & {
4372
- ephemeral?: never;
4373
- }) | (Omit<Omit<{
4374
- type: string;
4375
- payload?: Record<string, unknown> | undefined;
4376
- metadata?: Record<string, unknown> | undefined;
4377
- source?: {
4378
- processor?: {
4379
- slug: string;
4380
- version: string;
4381
- stream: {
4382
- path: string;
4383
- projectId: string | null;
4384
- streamId: string;
4385
- };
4386
- whileProcessing?: {
4387
- offset: number;
4388
- type: string;
4389
- } | undefined;
4390
- } | undefined;
4391
- copiedFrom?: {
4392
- name: string;
4393
- streamId: string;
4394
- streamCreatedAt: string;
4395
- cursorChangedAtSourceOffset: number;
4396
- createdAt: string;
4397
- offset: number;
4398
- path: string;
4399
- projectId: string | null;
4400
- type: string;
4401
- }[] | undefined;
4402
- } | undefined;
4403
- idempotencyKey?: string | undefined;
4404
- ephemeral?: true | undefined;
4405
- }, "payload" | "type"> & {
4406
- type: "events.iterate.com/flakes/dashboard-render-settled";
4407
- payload: {
4408
- throughOffset: number;
4409
- result: {
4410
- status: "succeeded";
4411
- issueNumber: number;
4412
- issueUrl: string;
4413
- } | {
4414
- status: "failed";
4415
- error: string;
4416
- };
4417
- };
4418
- }, "ephemeral"> & {
4419
- ephemeral?: never;
4420
- })>(event: Event) => "*" extends Extract<"events.iterate.com/flakes/created", Event["type"]> | Extract<"events.iterate.com/flakes/run-recorded", Event["type"]> | Extract<"events.iterate.com/flakes/transition-proposed", Event["type"]> | Extract<"events.iterate.com/flakes/dashboard-render-settled", Event["type"]> ? Omit<{
4421
- type: string;
4422
- payload?: Record<string, unknown> | undefined;
4423
- metadata?: Record<string, unknown> | undefined;
4424
- source?: {
4425
- processor?: {
4426
- slug: string;
4427
- version: string;
4428
- stream: {
4429
- path: string;
4430
- projectId: string | null;
4431
- streamId: string;
4432
- };
4433
- whileProcessing?: {
4434
- offset: number;
4435
- type: string;
4436
- } | undefined;
4437
- } | undefined;
4438
- copiedFrom?: {
4439
- name: string;
4440
- streamId: string;
4441
- streamCreatedAt: string;
4442
- cursorChangedAtSourceOffset: number;
4443
- createdAt: string;
4444
- offset: number;
4445
- path: string;
4446
- projectId: string | null;
4447
- type: string;
4448
- }[] | undefined;
4449
- } | undefined;
4450
- idempotencyKey?: string | undefined;
4451
- ephemeral?: true | undefined;
4452
- }, "ephemeral"> & {
4453
- ephemeral?: never;
4454
- } : Extract<"events.iterate.com/flakes/created", Event["type"]> | Extract<"events.iterate.com/flakes/run-recorded", Event["type"]> | Extract<"events.iterate.com/flakes/transition-proposed", Event["type"]> | Extract<"events.iterate.com/flakes/dashboard-render-settled", Event["type"]> extends infer Type extends string ? (Type extends "events.iterate.com/flakes/created" | "events.iterate.com/flakes/run-recorded" | "events.iterate.com/flakes/transition-proposed" | "events.iterate.com/flakes/dashboard-render-settled" ? {
4455
- readonly "events.iterate.com/flakes/created": {
4456
- readonly description: "The flake dashboard exists: target repository, issue title, and which branch counts for transitions.";
4457
- readonly payloadSchema: z.ZodObject<{
4458
- config: z.ZodObject<{
4459
- repository: z.ZodObject<{
4460
- owner: z.ZodString;
4461
- repo: z.ZodString;
4462
- }, z.core.$strip>;
4463
- issueTitle: z.ZodString;
4464
- defaultBranch: z.ZodString;
4465
- }, z.core.$strip>;
4466
- }, z.core.$strip>;
4467
- readonly examples: readonly [{
4468
- readonly description: "The dogfood dashboard for this repo.";
4469
- readonly payload: {
4470
- readonly config: {
4471
- readonly repository: {
4472
- readonly owner: "iterate";
4473
- readonly repo: "iterate";
4474
- };
4475
- readonly issueTitle: "Flake dashboard";
4476
- readonly defaultBranch: "main";
4477
- };
4478
- };
4479
- }];
4480
- };
4481
- readonly "events.iterate.com/flakes/run-recorded": {
4482
- readonly description: "One CI run+suite's createFlake outcomes, appended by the CI reporter script (never by this processor). Idempotency-keyed on run+suite so CI retries cannot double-count.";
4483
- readonly payloadSchema: z.ZodObject<{
4484
- runId: z.ZodString;
4485
- suite: z.ZodString;
4486
- branch: z.ZodString;
4487
- commit: z.ZodString;
4488
- records: z.ZodArray<z.ZodObject<{
4489
- name: z.ZodString;
4490
- kind: z.ZodDefault<z.ZodEnum<{
4491
- unknown: "unknown";
4492
- flake: "flake";
4493
- failing: "failing";
4494
- }>>;
4495
- outcome: z.ZodEnum<{
4496
- pass: "pass";
4497
- "flake-fail": "flake-fail";
4498
- "unexpected-error": "unexpected-error";
4499
- "pinned-fail": "pinned-fail";
4500
- "unexpected-pass": "unexpected-pass";
4501
- "retried-pass": "retried-pass";
4502
- }>;
4503
- pattern: z.ZodOptional<z.ZodString>;
4504
- durationMs: z.ZodNumber;
4505
- at: z.ZodString;
4506
- error: z.ZodOptional<z.ZodString>;
4507
- }, z.core.$strip>>;
4508
- summary: z.ZodOptional<z.ZodObject<{
4509
- headSha: z.ZodString;
4510
- branch: z.ZodString;
4511
- status: z.ZodEnum<{
4512
- incomplete: "incomplete";
4513
- complete: "complete";
4514
- }>;
4515
- startedAt: z.ZodISODateTime;
4516
- finishedAt: z.ZodISODateTime;
4517
- testCount: z.ZodNumber;
4518
- tests: z.ZodOptional<z.ZodArray<z.ZodObject<{
4519
- name: z.ZodString;
4520
- outcome: z.ZodEnum<{
4521
- skip: "skip";
4522
- pass: "pass";
4523
- fail: "fail";
4524
- }>;
4525
- }, z.core.$strip>>>;
4526
- unknownFlakeCount: z.ZodNumber;
4527
- failedCount: z.ZodNumber;
4528
- diagnostics: z.ZodArray<z.ZodString>;
4529
- runUrl: z.ZodURL;
4530
- }, z.core.$strip>>;
4531
- }, z.core.$strip>;
4532
- };
4533
- readonly "events.iterate.com/flakes/transition-proposed": {
4534
- readonly description: "A test's default-branch streak crossed a lifecycle threshold; downstream automation (an agent) should open the unwrap / switch-to-failing PR. The file-edit guard (a streak is only trustworthy if the test file did not change during it) is applied by that agent, which can read git history — the fold cannot.";
4535
- readonly payloadSchema: z.ZodObject<{
4536
- testName: z.ZodString;
4537
- transition: z.ZodEnum<{
4538
- unwrap: "unwrap";
4539
- "switch-to-failing": "switch-to-failing";
4540
- "unwrap-failing": "unwrap-failing";
4541
- }>;
4542
- evidence: z.ZodObject<{
4543
- consecutiveRuns: z.ZodNumber;
4544
- firstAt: z.ZodString;
4545
- lastAt: z.ZodString;
4546
- }, z.core.$strip>;
4547
- }, z.core.$strip>;
4548
- };
4549
- readonly "events.iterate.com/flakes/dashboard-render-settled": {
4550
- readonly description: "Terminal fact for one dashboard render attempt: the GitHub issue reached (or the error), and the data offset it covered.";
4551
- readonly payloadSchema: z.ZodObject<{
4552
- throughOffset: z.ZodNumber;
4553
- result: z.ZodDiscriminatedUnion<[z.ZodObject<{
4554
- status: z.ZodLiteral<"succeeded">;
4555
- issueNumber: z.ZodNumber;
4556
- issueUrl: z.ZodString;
4557
- }, z.core.$strip>, z.ZodObject<{
4558
- status: z.ZodLiteral<"failed">;
4559
- error: z.ZodString;
4560
- }, z.core.$strip>], "status">;
4561
- }, z.core.$strip>;
4562
- };
4563
- }[Type] : never) extends import("../../processors/processor-contracts.ts").EventDefinition<infer PayloadOutput, unknown> ? Omit<Omit<{
4564
- type: string;
4565
- payload?: Record<string, unknown> | undefined;
4566
- metadata?: Record<string, unknown> | undefined;
4567
- source?: {
4568
- processor?: {
4569
- slug: string;
4570
- version: string;
4571
- stream: {
4572
- path: string;
4573
- projectId: string | null;
4574
- streamId: string;
4575
- };
4576
- whileProcessing?: {
4577
- offset: number;
4578
- type: string;
4579
- } | undefined;
4580
- } | undefined;
4581
- copiedFrom?: {
4582
- name: string;
4583
- streamId: string;
4584
- streamCreatedAt: string;
4585
- cursorChangedAtSourceOffset: number;
4586
- createdAt: string;
4587
- offset: number;
4588
- path: string;
4589
- projectId: string | null;
4590
- type: string;
4591
- }[] | undefined;
4592
- } | undefined;
4593
- idempotencyKey?: string | undefined;
4594
- ephemeral?: true | undefined;
4595
- }, "payload" | "type"> & {
4596
- type: Type;
4597
- payload: PayloadOutput;
4598
- }, "ephemeral"> & {
4599
- ephemeral?: never;
4600
- } : never : never;
4601
- };
4602
- protected reduce({ event, state, }: ReduceArgs<FlakeDashboardProcessorContract>): FlakeDashboardState;
4603
- protected processEvent(args: ProcessEventArgs<FlakeDashboardProcessorContract>): undefined;
4604
- }
4605
- /** Exported for tests: the table is a pure projection of folded state. */
4606
- export declare function renderBody(state: FlakeDashboardState): string;
4607
- export {};