deepline 0.3.483 → 0.3.485
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/client-core.ts +91 -30
- package/dist/bundling-sources/sdk/src/compat.ts +13 -0
- package/dist/bundling-sources/sdk/src/plays/client-core.ts +4 -1
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +143 -9
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +31 -4
- package/dist/bundling-sources/sdk/src/tool-calls.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +7 -1
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +100 -9
- package/dist/bundling-sources/shared_libs/play-data-plane/sheet-column-storage.ts +32 -3
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +126 -41
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +231 -25
- package/dist/bundling-sources/shared_libs/play-runtime/daytona-runtime-config.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machines.ts +130 -19
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-registry.ts +105 -0
- package/dist/bundling-sources/shared_libs/play-runtime/execute-server-timing.ts +4 -2
- package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +194 -56
- package/dist/bundling-sources/shared_libs/play-runtime/log-provenance.ts +11 -6
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/job.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/ports.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/sandbox-cleanup/postgres-adapter.ts +2 -1
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +30 -0
- package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +195 -2
- package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +20 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-contract.ts +15 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-snapshot-stream.ts +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +102 -23
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/progress-sidecar.ts +9 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-control-transport.ts +25 -5
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +133 -82
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +58 -16
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-sandbox-absence.ts +171 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +69 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +100 -40
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/types.ts +8 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +67 -9
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-incident-drills.ts +5 -5
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-store-adapter.ts +6 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-errors.ts +14 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-writer.ts +87 -31
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/contract.ts +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/index.ts +19 -0
- package/dist/bundling-sources/shared_libs/play-runtime/sandbox-runs/runner-backend-adapter.ts +14 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +204 -6
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +39 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/ambiguous-modal-create-state.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/compute-billing-job-state.ts +23 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-retirement-state.ts +25 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-retirement.ts +15 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/outbox-repair-operation-state.ts +30 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/play-run-recovery.ts +12 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +26 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-scope.ts +44 -15
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +60 -11
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +743 -70
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +6 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +34 -34
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/sandbox-cleanup-job-state.ts +23 -0
- package/dist/bundling-sources/shared_libs/play-runtime/suspension.ts +12 -0
- package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +21 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/source-authoring-edition.ts +1 -1
- package/dist/bundling-sources/shared_libs/product-notifications/destination-state.ts +93 -0
- package/dist/cli/auth-ABZBH55L.js +43 -0
- package/dist/cli/{auth-2NXF6Q3Q.mjs → auth-OWMUENCU.mjs} +5 -5
- package/dist/cli/{billing-5PW4L5WD.js → billing-2FMNQGOX.js} +80 -80
- package/dist/cli/{billing-W2Y4EOZP.mjs → billing-JX4H3VFF.mjs} +7 -7
- package/dist/cli/{chunk-UGBZ6MCR.js → chunk-2ILND7XX.js} +2 -2
- package/dist/cli/{chunk-25IGCYJP.mjs → chunk-2ZEQ43B7.mjs} +3 -3
- package/dist/cli/{chunk-J7S3DJB4.mjs → chunk-3DBW6C7M.mjs} +13 -4
- package/dist/cli/{chunk-7APXZ3CX.mjs → chunk-3DYU3JQN.mjs} +2 -2
- package/dist/cli/{chunk-VFEW53L5.js → chunk-3OF7NSGR.js} +322 -294
- package/dist/cli/{chunk-UDF2CY4D.mjs → chunk-3Z24NKW7.mjs} +62 -34
- package/dist/cli/{chunk-62XGOB2D.js → chunk-5DCQWQCP.js} +26 -26
- package/dist/cli/{chunk-4X23YY2E.mjs → chunk-62PJ6PK7.mjs} +5 -5
- package/dist/cli/{chunk-YL64JIQ7.mjs → chunk-676NZ7K4.mjs} +1 -1
- package/dist/cli/{chunk-T5GZZJ7O.js → chunk-775AZTO7.js} +323 -247
- package/dist/cli/{chunk-C3LJSOQ6.mjs → chunk-ACTUAZYP.mjs} +5 -5
- package/dist/cli/{chunk-R2OR4RHV.js → chunk-AFADYKFE.js} +8 -8
- package/dist/cli/{chunk-GVAENVIG.js → chunk-AUQQVDAB.js} +110 -21
- package/dist/cli/{chunk-GONUMUBM.js → chunk-BSKPQB2P.js} +7 -7
- package/dist/cli/chunk-C6QWRSMQ.js +42 -0
- package/dist/cli/{chunk-AK7UKQ5R.js → chunk-CSBMKHTV.js} +5 -5
- package/dist/cli/{chunk-PRL7EKJZ.mjs → chunk-CW6TAQBF.mjs} +15 -4
- package/dist/cli/{chunk-75IIHFN6.js → chunk-DMNVM34J.js} +5 -4
- package/dist/cli/{chunk-IEV5UWPN.mjs → chunk-E73JXJA3.mjs} +1 -1
- package/dist/cli/{chunk-DS455RPF.js → chunk-EC2CVPN5.js} +3 -3
- package/dist/cli/{chunk-B7HQL77V.js → chunk-ECIXZNSW.js} +87 -76
- package/dist/cli/{chunk-JJSLEMQQ.mjs → chunk-FJY6K3BG.mjs} +93 -17
- package/dist/cli/{chunk-FK47YUPC.mjs → chunk-G5PI3RNT.mjs} +1 -1
- package/dist/cli/{chunk-GRE3ID5E.mjs → chunk-GHHJWCMD.mjs} +2 -1
- package/dist/cli/{chunk-2JWG2H2N.js → chunk-HKGXGGIV.js} +1 -1
- package/dist/cli/{chunk-2MKX3HV3.js → chunk-IHMYIHF4.js} +5 -5
- package/dist/cli/{chunk-SD7QWZTV.mjs → chunk-INW22YP7.mjs} +1 -1
- package/dist/cli/{chunk-OWUZKXE7.mjs → chunk-J7EENGKJ.mjs} +1 -1
- package/dist/cli/{chunk-AWAFYRFV.mjs → chunk-JD6HKNKD.mjs} +1 -1
- package/dist/cli/{chunk-UY7OXFVU.js → chunk-JQXUWYWX.js} +13 -13
- package/dist/cli/{chunk-GGJQ4HJW.mjs → chunk-KZTNNLIL.mjs} +2 -2
- package/dist/cli/{chunk-NREZRYPU.mjs → chunk-L352NOE3.mjs} +2 -2
- package/dist/cli/{chunk-WI2HNYQX.js → chunk-L7IQ3DFH.js} +53 -53
- package/dist/cli/{chunk-4IOY2SCQ.js → chunk-LOX3BISD.js} +4 -4
- package/dist/cli/{chunk-XRIQN6EP.js → chunk-NKPTM7SK.js} +7 -7
- package/dist/cli/{chunk-5ICAG4RE.js → chunk-NLRTFJGH.js} +14 -14
- package/dist/cli/{chunk-WKB6Y43W.js → chunk-NRNWPWBW.js} +37 -37
- package/dist/cli/{chunk-HNRELVCS.mjs → chunk-ONONSV2Q.mjs} +96 -7
- package/dist/cli/{chunk-MYB6JVSD.js → chunk-OW4OTEFF.js} +16 -16
- package/dist/cli/{chunk-ISP7ZENV.mjs → chunk-RZE5I2XJ.mjs} +4 -4
- package/dist/cli/{chunk-5LHU7NUS.js → chunk-S3WQJ5VG.js} +3 -3
- package/dist/cli/{chunk-EDMCD7MX.mjs → chunk-SR6S4EYG.mjs} +5 -5
- package/dist/cli/{chunk-2T4OSJEH.js → chunk-T4G2T5DS.js} +21 -21
- package/dist/cli/{chunk-EGHYGTJM.mjs → chunk-TMCC7ORQ.mjs} +1 -1
- package/dist/cli/{chunk-SCPFOH5Z.mjs → chunk-TSCUWWTM.mjs} +1 -1
- package/dist/cli/{chunk-7TKLISLM.js → chunk-TVW6USSG.js} +3 -3
- package/dist/cli/{chunk-QSYA6VE4.js → chunk-U6WEGDD3.js} +2 -2
- package/dist/cli/{chunk-FGEC5SWP.mjs → chunk-UPHXGZCE.mjs} +4 -4
- package/dist/cli/{chunk-5JCXS4MP.js → chunk-UQ3LQ6IF.js} +5 -5
- package/dist/cli/{chunk-JYEZ6BWX.mjs → chunk-VZYTLWOM.mjs} +2 -2
- package/dist/cli/{chunk-FAZTLYJO.mjs → chunk-W33OL4F2.mjs} +2 -2
- package/dist/cli/{chunk-ZM2YPJQJ.js → chunk-XK5DMLZE.js} +5 -1
- package/dist/cli/{chunk-LJ5747UC.mjs → chunk-XRDXNAAY.mjs} +5 -1
- package/dist/cli/{chunk-S24CK3CJ.mjs → chunk-YDA3PMKK.mjs} +3 -3
- package/dist/cli/{csv-EKEFLUIW.js → csv-HFEQPGNY.js} +13 -13
- package/dist/cli/{csv-DIFVIR23.mjs → csv-OHF3Y5KB.mjs} +4 -4
- package/dist/cli/{db-DOW4EVEU.mjs → db-M456OUXD.mjs} +7 -7
- package/dist/cli/{db-S7DDRUHX.js → db-VLQKCYQS.js} +28 -28
- package/dist/cli/describe-CP35DZ5Z.js +49 -0
- package/dist/cli/{describe-KSZFOWKV.mjs → describe-M6VXFYVL.mjs} +21 -21
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-CAG7YC5K.mjs → executions-4FGRBPJF.mjs} +7 -7
- package/dist/cli/{executions-3DU5IXB6.js → executions-GKINJZI6.js} +9 -9
- package/dist/cli/{feedback-BQMPTE47.mjs → feedback-D2WMGK3V.mjs} +4 -4
- package/dist/cli/{feedback-I65JMCP2.js → feedback-ZH5K7WV7.js} +8 -8
- package/dist/cli/git-IDALMZDN.js +25 -0
- package/dist/cli/{git-UQUCD7XZ.mjs → git-OCIJ5ME4.mjs} +5 -5
- package/dist/cli/index.js +142 -139
- package/dist/cli/index.mjs +45 -42
- package/dist/cli/{legacy-noops-OLNT2BG5.js → legacy-noops-QNIVP7LO.js} +8 -8
- package/dist/cli/{legacy-noops-JXKLHUI3.mjs → legacy-noops-V6Q2X34P.mjs} +5 -5
- package/dist/cli/{monitors-DLTHHAFQ.mjs → monitors-2USHTG5G.mjs} +8 -8
- package/dist/cli/{monitors-Z5X56AZN.js → monitors-5DNK7W2K.js} +92 -92
- package/dist/cli/{org-XBHJLKUG.js → org-RPGM5AN4.js} +73 -73
- package/dist/cli/{org-6EZZHD3M.mjs → org-TL2YPYSE.mjs} +7 -7
- package/dist/cli/{pages-XVJ34SCN.js → pages-PNUKPFWV.js} +18 -18
- package/dist/cli/{pages-MYXROSVK.mjs → pages-XDEW6EE3.mjs} +7 -7
- package/dist/cli/{play-ACC4T2XQ.js → play-F5LHRKV5.js} +858 -632
- package/dist/cli/{play-5PV4LAHE.mjs → play-WINNQ4HZ.mjs} +372 -146
- package/dist/cli/{providers-JCI3KNE4.js → providers-BD4IS5U5.js} +10 -10
- package/dist/cli/{providers-2DLUGIFF.mjs → providers-PXGL3FRE.mjs} +7 -7
- package/dist/cli/{quickstart-PDSQEDLD.js → quickstart-7LVF6HZF.js} +6 -6
- package/dist/cli/{quickstart-NSL3C76K.mjs → quickstart-XTH3UQWZ.mjs} +4 -4
- package/dist/cli/{run-X5MXCM4P.mjs → run-MBMUENR7.mjs} +26 -26
- package/dist/cli/{run-UCFMHOQC.js → run-NH2BAWPA.js} +41 -41
- package/dist/cli/{search-RPEMXV6N.mjs → search-BMRWBV66.mjs} +8 -8
- package/dist/cli/search-R3MQJQMT.js +32 -0
- package/dist/cli/{search-output-MZH3HLVE.js → search-output-5NNT337U.js} +22 -16
- package/dist/cli/{search-output-6UO47B7G.mjs → search-output-QKKRD4MF.mjs} +14 -8
- package/dist/cli/{secrets-NLEQURD3.mjs → secrets-AWEXBTJV.mjs} +7 -7
- package/dist/cli/{secrets-UFBASYGY.js → secrets-KQSTOREN.js} +16 -16
- package/dist/cli/{sessions-JYH4DBEE.js → sessions-DSPLZYCJ.js} +6 -6
- package/dist/cli/{sessions-3ALFLWVU.mjs → sessions-RO25Q67X.mjs} +5 -5
- package/dist/cli/{settings-MQYKNAMB.js → settings-7JXIKNKI.js} +79 -79
- package/dist/cli/{settings-YPRILREA.mjs → settings-JMGXGK4Z.mjs} +12 -12
- package/dist/cli/{setup-5IGSHH4E.js → setup-5QFAQQRW.js} +47 -47
- package/dist/cli/{setup-DK4GM227.mjs → setup-ZQZ47FHB.mjs} +9 -9
- package/dist/cli/skills-EDZXY7DV.js +33 -0
- package/dist/cli/{skills-KYBZH3IT.mjs → skills-W3H2DL56.mjs} +7 -7
- package/dist/cli/{tools-4B2MHNBN.mjs → tools-2BZCVNBS.mjs} +19 -19
- package/dist/cli/tools-2EY2ETCZ.js +56 -0
- package/dist/cli/{update-S6VEO7NB.mjs → update-GAWYMGAW.mjs} +9 -9
- package/dist/cli/update-UKDQKNBY.js +33 -0
- package/dist/cli/{workflow-KXZZYFEF.mjs → workflow-M6LLHQ2I.mjs} +8 -8
- package/dist/cli/{workflow-FU2XVPUK.js → workflow-ZPTDFPKW.js} +18 -18
- package/dist/{client-DJ3r8VQJ.d.mts → client-BkbDHRIg.d.mts} +1 -1
- package/dist/{client-JPSNljtj.d.ts → client-D3hVHXjK.d.ts} +1 -1
- package/dist/{client-core-3SJlNsKU.d.mts → client-core-BZoSMKcY.d.mts} +30 -15
- package/dist/{client-core-rCoQ5Xz3.d.ts → client-core-DUdVqO_m.d.ts} +30 -15
- package/dist/{compiler-manifest-gkO9ZkVg.d.mts → compiler-manifest-BFTwq1HI.d.mts} +1 -1
- package/dist/{compiler-manifest-gkO9ZkVg.d.ts → compiler-manifest-BFTwq1HI.d.ts} +1 -1
- package/dist/{errors-Cc92LKH-.d.ts → errors-c3pMsylw.d.ts} +1 -1
- package/dist/{errors-CeCCOKSA.d.mts → errors-w31ybrQM.d.mts} +1 -1
- package/dist/{index-DJQKdV76.d.ts → index-CQ-15-QL.d.ts} +1 -1
- package/dist/{index-DsqWJL3Q.d.mts → index-DvNtxucX.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +10 -10
- package/dist/index.mjs +7 -7
- package/dist/install-integrity.json +123 -116
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +2 -2
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/plays/run-request.js +12 -2
- package/dist/plays/run-request.mjs +11 -1
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +6 -6
- package/dist/server.mjs +4 -4
- package/package.json +1 -1
- package/dist/cli/auth-JHQKM6QY.js +0 -43
- package/dist/cli/chunk-PHDEQ6W3.js +0 -33
- package/dist/cli/describe-RXYQCJRR.js +0 -49
- package/dist/cli/git-ADIABNMQ.js +0 -25
- package/dist/cli/search-YILJZD36.js +0 -32
- package/dist/cli/skills-I4IUZN3U.js +0 -33
- package/dist/cli/tools-NLZR7ABS.js +0 -56
- package/dist/cli/update-RVDEUJTE.js +0 -33
|
@@ -22,6 +22,72 @@ export type InboundPgClient = {
|
|
|
22
22
|
|
|
23
23
|
export type InboundFailureClass = 'transient' | 'permanent';
|
|
24
24
|
|
|
25
|
+
/** Persisted states for `dl_meta.signal_radar_inbound_dead_letter`. */
|
|
26
|
+
export const SIGNAL_RADAR_INBOUND_DEAD_LETTER_STATUS = {
|
|
27
|
+
open: 'open',
|
|
28
|
+
replaying: 'replaying',
|
|
29
|
+
replayed: 'replayed',
|
|
30
|
+
discarded: 'discarded',
|
|
31
|
+
} as const;
|
|
32
|
+
|
|
33
|
+
export type SignalRadarInboundDeadLetterStatus =
|
|
34
|
+
(typeof SIGNAL_RADAR_INBOUND_DEAD_LETTER_STATUS)[keyof typeof SIGNAL_RADAR_INBOUND_DEAD_LETTER_STATUS];
|
|
35
|
+
|
|
36
|
+
export type ClaimableSignalRadarInboundDeadLetterStatus = Extract<
|
|
37
|
+
SignalRadarInboundDeadLetterStatus,
|
|
38
|
+
'open' | 'replaying'
|
|
39
|
+
>;
|
|
40
|
+
|
|
41
|
+
/** Durable transition edges. Database predicates remain the atomic fences. */
|
|
42
|
+
export type SignalRadarInboundDeadLetterTransition =
|
|
43
|
+
| { event: 'claim'; from: 'open'; to: 'replaying' }
|
|
44
|
+
| { event: 'stale_claim_reclaimed'; from: 'replaying'; to: 'replaying' }
|
|
45
|
+
| { event: 'enqueue_failed'; from: 'replaying'; to: 'open' }
|
|
46
|
+
| { event: 'worker_unprocessed'; from: 'replaying'; to: 'open' }
|
|
47
|
+
| {
|
|
48
|
+
event: 'worker_processed';
|
|
49
|
+
from: 'open' | 'replaying';
|
|
50
|
+
to: 'replayed';
|
|
51
|
+
}
|
|
52
|
+
| { event: 'malformed_payload'; from: 'replaying'; to: 'discarded' }
|
|
53
|
+
| {
|
|
54
|
+
event: 'dead_letter_recorded';
|
|
55
|
+
from: 'open' | 'replaying' | 'replayed';
|
|
56
|
+
to: 'open';
|
|
57
|
+
}
|
|
58
|
+
| { event: 'dead_letter_recorded'; from: 'discarded'; to: 'discarded' };
|
|
59
|
+
|
|
60
|
+
/** Parse a value read from persisted storage; unknown future values fail closed. */
|
|
61
|
+
export function parseSignalRadarInboundDeadLetterStatus(
|
|
62
|
+
value: unknown,
|
|
63
|
+
): SignalRadarInboundDeadLetterStatus | null {
|
|
64
|
+
switch (value) {
|
|
65
|
+
case SIGNAL_RADAR_INBOUND_DEAD_LETTER_STATUS.open:
|
|
66
|
+
case SIGNAL_RADAR_INBOUND_DEAD_LETTER_STATUS.replaying:
|
|
67
|
+
case SIGNAL_RADAR_INBOUND_DEAD_LETTER_STATUS.replayed:
|
|
68
|
+
case SIGNAL_RADAR_INBOUND_DEAD_LETTER_STATUS.discarded:
|
|
69
|
+
return value;
|
|
70
|
+
default:
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** A failed redrive returns an in-flight/completed delivery to review. */
|
|
76
|
+
export function transitionSignalRadarInboundDeadLetterStatus(
|
|
77
|
+
value: unknown,
|
|
78
|
+
event: 'dead_letter_recorded',
|
|
79
|
+
): SignalRadarInboundDeadLetterStatus {
|
|
80
|
+
const current = parseSignalRadarInboundDeadLetterStatus(value);
|
|
81
|
+
if (!current) {
|
|
82
|
+
throw new Error(
|
|
83
|
+
`Unknown signal radar dead-letter status '${String(value)}'.`,
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
return current === SIGNAL_RADAR_INBOUND_DEAD_LETTER_STATUS.discarded
|
|
87
|
+
? SIGNAL_RADAR_INBOUND_DEAD_LETTER_STATUS.discarded
|
|
88
|
+
: SIGNAL_RADAR_INBOUND_DEAD_LETTER_STATUS.open;
|
|
89
|
+
}
|
|
90
|
+
|
|
25
91
|
function errorMessage(error: unknown): string {
|
|
26
92
|
if (error instanceof Error && error.message.trim()) return error.message;
|
|
27
93
|
if (typeof error === 'string' && error.trim()) return error;
|
|
@@ -211,17 +277,42 @@ export async function recordSignalRadarDeadLetter(input: {
|
|
|
211
277
|
};
|
|
212
278
|
|
|
213
279
|
if (message.deadLetterId) {
|
|
214
|
-
const
|
|
215
|
-
`
|
|
216
|
-
|
|
217
|
-
attempts = attempts + $2,
|
|
218
|
-
last_error = $3,
|
|
219
|
-
updated_at = now()
|
|
280
|
+
const prior = await client.query(
|
|
281
|
+
`SELECT status
|
|
282
|
+
FROM dl_meta.signal_radar_inbound_dead_letter
|
|
220
283
|
WHERE dead_letter_id = $1
|
|
221
|
-
|
|
222
|
-
[message.deadLetterId
|
|
284
|
+
FOR UPDATE`,
|
|
285
|
+
[message.deadLetterId],
|
|
223
286
|
);
|
|
224
|
-
|
|
287
|
+
const existing = (prior.rows ?? [])[0] as
|
|
288
|
+
| { status?: unknown }
|
|
289
|
+
| undefined;
|
|
290
|
+
if (existing) {
|
|
291
|
+
const nextStatus = transitionSignalRadarInboundDeadLetterStatus(
|
|
292
|
+
existing.status,
|
|
293
|
+
'dead_letter_recorded',
|
|
294
|
+
);
|
|
295
|
+
const reopened = await client.query(
|
|
296
|
+
`UPDATE dl_meta.signal_radar_inbound_dead_letter
|
|
297
|
+
SET status = $2,
|
|
298
|
+
attempts = attempts + $3,
|
|
299
|
+
last_error = $4,
|
|
300
|
+
updated_at = now()
|
|
301
|
+
WHERE dead_letter_id = $1 AND status = $5
|
|
302
|
+
RETURNING dead_letter_id`,
|
|
303
|
+
[
|
|
304
|
+
message.deadLetterId,
|
|
305
|
+
nextStatus,
|
|
306
|
+
input.attempts,
|
|
307
|
+
lastError.slice(0, 8000),
|
|
308
|
+
existing.status,
|
|
309
|
+
],
|
|
310
|
+
);
|
|
311
|
+
if ((reopened.rows ?? []).length === 0) {
|
|
312
|
+
throw new Error(
|
|
313
|
+
'Signal radar dead-letter status changed while recording a failure.',
|
|
314
|
+
);
|
|
315
|
+
}
|
|
225
316
|
if (eventIdempotencyKey) {
|
|
226
317
|
await markCapturedRawWriteFailed(
|
|
227
318
|
client,
|
|
@@ -174,18 +174,35 @@ export const RuntimeSheetColumns = {
|
|
|
174
174
|
input: SheetIdentity & {
|
|
175
175
|
rows:
|
|
176
176
|
| readonly Record<string, unknown>[]
|
|
177
|
-
| ((
|
|
177
|
+
| ((
|
|
178
|
+
inferableFields: readonly string[],
|
|
179
|
+
) => Promise<readonly Record<string, unknown>[]>);
|
|
178
180
|
columns: readonly PhysicalSheetColumnProjection[];
|
|
179
181
|
/** Opt in only when the caller can roll back and restart the whole transaction. */
|
|
180
182
|
lockMode?: WriteLockMode;
|
|
181
183
|
},
|
|
182
184
|
): Promise<RuntimeSheetColumnTypes> {
|
|
183
185
|
await lock(client, input, input.lockMode);
|
|
184
|
-
const rows =
|
|
185
|
-
typeof input.rows === 'function' ? await input.rows() : input.rows;
|
|
186
186
|
const columns = new Map(
|
|
187
187
|
(await inspect(client, input)).map((column) => [column.name, column]),
|
|
188
188
|
);
|
|
189
|
+
const inferableFields = [
|
|
190
|
+
...new Set(
|
|
191
|
+
input.columns.flatMap((projection) => {
|
|
192
|
+
const column = columns.get(projection.sqlName);
|
|
193
|
+
return column?.marker === UNDECIDED || column?.marker === NATIVE
|
|
194
|
+
? [projection.fieldName]
|
|
195
|
+
: [];
|
|
196
|
+
}),
|
|
197
|
+
),
|
|
198
|
+
];
|
|
199
|
+
// Always evaluate accepted rows, including when no fields need inference.
|
|
200
|
+
// The Adapter owns the acceptance predicate and may lock those rows; its
|
|
201
|
+
// row count also determines whether missing columns must fail loudly.
|
|
202
|
+
const rows =
|
|
203
|
+
typeof input.rows === 'function'
|
|
204
|
+
? await input.rows(inferableFields)
|
|
205
|
+
: input.rows;
|
|
189
206
|
for (const projection of rows.length > 0 ? input.columns : []) {
|
|
190
207
|
const column = columns.get(projection.sqlName);
|
|
191
208
|
if (!column)
|
|
@@ -262,6 +279,18 @@ export const RuntimeSheetColumns = {
|
|
|
262
279
|
);
|
|
263
280
|
},
|
|
264
281
|
|
|
282
|
+
/** Project inference inputs without changing accepted-row cardinality. */
|
|
283
|
+
jsonTypeEvidenceSql(input: {
|
|
284
|
+
jsonExpression: string;
|
|
285
|
+
fieldsExpression: string;
|
|
286
|
+
}): string {
|
|
287
|
+
return `COALESCE((
|
|
288
|
+
SELECT jsonb_object_agg(column_type_fields.field, (${input.jsonExpression}) -> column_type_fields.field)
|
|
289
|
+
FROM unnest(${input.fieldsExpression}) AS column_type_fields(field)
|
|
290
|
+
WHERE (${input.jsonExpression}) ? column_type_fields.field
|
|
291
|
+
), '{}'::jsonb)`;
|
|
292
|
+
},
|
|
293
|
+
|
|
265
294
|
jsonValueSql(
|
|
266
295
|
jsonExpression: string,
|
|
267
296
|
tableReference: string,
|
|
@@ -107,6 +107,12 @@ export type StoredPlayArtifactPayload = {
|
|
|
107
107
|
export type RuntimeStatusUpdate = {
|
|
108
108
|
playId: string;
|
|
109
109
|
status: string;
|
|
110
|
+
/**
|
|
111
|
+
* Set by a progress reporter's live flush only. Run Ledger intake then
|
|
112
|
+
* fences the batch on `liveLogProducerAttempt`; any runner-result finalize
|
|
113
|
+
* leaves it unset because it is designed to land after the terminal.
|
|
114
|
+
*/
|
|
115
|
+
liveProgress?: boolean;
|
|
110
116
|
error?: string;
|
|
111
117
|
runtimeBackend?: string | null;
|
|
112
118
|
artifactHash?: string | null;
|
|
@@ -206,6 +212,8 @@ type RuntimeApiRequest =
|
|
|
206
212
|
action: 'append_run_events' | 'project_run_events';
|
|
207
213
|
playId: string;
|
|
208
214
|
events: PlayRunLedgerIngressEvent[];
|
|
215
|
+
/** Live progress only: intake commits while this attempt is current. */
|
|
216
|
+
progressAttempt?: number;
|
|
209
217
|
idempotencyKey?: string;
|
|
210
218
|
deliveryIdempotencyKey?: string;
|
|
211
219
|
deliveryLeaseOwner?: string;
|
|
@@ -374,6 +382,10 @@ export type WorkerRuntimeApiContext = {
|
|
|
374
382
|
executorToken: string;
|
|
375
383
|
/** Exact ingress-prefix verifier advertised by the immutable launch receiver. */
|
|
376
384
|
runLedgerIngressPrefixBatching?: true;
|
|
385
|
+
/** The launch receiver advertised that it stores retained pipeline graphs. */
|
|
386
|
+
retainedPipelineGraphs?: true;
|
|
387
|
+
/** `fetch` invokes the receiver in-process, so no ingress body limit applies. */
|
|
388
|
+
bypassesIngressLimit?: true;
|
|
377
389
|
boundary?: 'app_runtime' | 'receipt_gateway';
|
|
378
390
|
integrationMode?: 'live' | 'eval_stub' | 'fixture' | null;
|
|
379
391
|
vercelProtectionBypassToken?: string | null;
|
|
@@ -449,6 +461,12 @@ export type RuntimeApiResponseMeta = {
|
|
|
449
461
|
requestId: string | null;
|
|
450
462
|
/** Client-measured wall of the responding attempt: request send to response. */
|
|
451
463
|
roundTripMs?: number | null;
|
|
464
|
+
/** Final successful physical send to parsed JSON; excludes bypass handshakes. */
|
|
465
|
+
responseFlightMs?: number | null;
|
|
466
|
+
/** Final successful physical send to response headers. */
|
|
467
|
+
responseHeadersMs?: number | null;
|
|
468
|
+
/** Headers to parsed JSON, including body delivery and local decoding. */
|
|
469
|
+
responseBodyDecodeMs?: number | null;
|
|
452
470
|
/** Absent when the gateway sent no `Server-Timing` header. */
|
|
453
471
|
serverTiming?: RuntimeGatewayServerTiming | null;
|
|
454
472
|
/**
|
|
@@ -578,10 +596,13 @@ export function parseRuntimeGatewayServerTiming(
|
|
|
578
596
|
}
|
|
579
597
|
|
|
580
598
|
const APP_RUNTIME_API_RETRY_DELAYS_MS = [100, 250, 500, 1_000] as const;
|
|
581
|
-
// Vercel Function ingress rejects request bodies above 4.5 MB.
|
|
582
|
-
|
|
599
|
+
// Vercel Function ingress rejects request bodies above 4.5 MB.
|
|
600
|
+
export const APP_RUNTIME_REQUEST_BODY_MAX_BYTES = 4_450_000;
|
|
601
|
+
// Keep normal map update requests well below it and leave room for a single
|
|
602
|
+
// large row.
|
|
583
603
|
const APP_RUNTIME_ROW_UPDATE_BATCH_TARGET_BYTES = 3 * 1024 * 1024;
|
|
584
|
-
const APP_RUNTIME_ROW_UPDATE_REQUEST_MAX_BYTES =
|
|
604
|
+
const APP_RUNTIME_ROW_UPDATE_REQUEST_MAX_BYTES =
|
|
605
|
+
APP_RUNTIME_REQUEST_BODY_MAX_BYTES;
|
|
585
606
|
const APP_RUNTIME_JSON_ENCODER = new TextEncoder();
|
|
586
607
|
const APP_RUNTIME_API_RECEIPT_RETRY_DELAYS_MS = [
|
|
587
608
|
250, 500, 1_000, 2_000, 4_000, 8_000, 12_000,
|
|
@@ -712,12 +733,19 @@ async function suppressBulkClaimResponseUntilTimeout(
|
|
|
712
733
|
|
|
713
734
|
async function appendRunEventBatchesViaAppRuntime(
|
|
714
735
|
context: WorkerRuntimeApiContext,
|
|
715
|
-
input: {
|
|
736
|
+
input: {
|
|
737
|
+
playId: string;
|
|
738
|
+
events: readonly PlayRunLedgerEvent[];
|
|
739
|
+
progressAttempt?: number;
|
|
740
|
+
},
|
|
716
741
|
): Promise<void> {
|
|
717
742
|
for (const events of partitionRunEventsForAppRuntime(input.events)) {
|
|
718
743
|
await appendRunEventsViaAppRuntimeRaw(context, {
|
|
719
744
|
playId: input.playId,
|
|
720
745
|
events,
|
|
746
|
+
...(input.progressAttempt === undefined
|
|
747
|
+
? {}
|
|
748
|
+
: { progressAttempt: input.progressAttempt }),
|
|
721
749
|
});
|
|
722
750
|
}
|
|
723
751
|
}
|
|
@@ -1367,6 +1395,7 @@ async function retryAppRuntimeBodyTimeoutOrThrow(input: {
|
|
|
1367
1395
|
attempts: input.attempt,
|
|
1368
1396
|
transportAttemptId: input.transportAttemptId,
|
|
1369
1397
|
cause: input.error,
|
|
1398
|
+
responseReceived: true,
|
|
1370
1399
|
boundaryLabel: input.boundaryLabel,
|
|
1371
1400
|
});
|
|
1372
1401
|
}
|
|
@@ -1383,12 +1412,15 @@ export class AppRuntimeApiTransportError extends Error {
|
|
|
1383
1412
|
readonly action: RuntimeApiRequest['action'];
|
|
1384
1413
|
readonly attempts: number;
|
|
1385
1414
|
readonly transportAttemptId: string | null;
|
|
1415
|
+
/** True when headers arrived before transport exhaustion; old callers omit it. */
|
|
1416
|
+
readonly responseReceived?: boolean;
|
|
1386
1417
|
|
|
1387
1418
|
constructor(input: {
|
|
1388
1419
|
action: RuntimeApiRequest['action'];
|
|
1389
1420
|
attempts: number;
|
|
1390
1421
|
transportAttemptId?: string | null;
|
|
1391
1422
|
cause: unknown;
|
|
1423
|
+
responseReceived?: boolean;
|
|
1392
1424
|
boundaryLabel?: string;
|
|
1393
1425
|
}) {
|
|
1394
1426
|
const causeMessage =
|
|
@@ -1404,6 +1436,7 @@ export class AppRuntimeApiTransportError extends Error {
|
|
|
1404
1436
|
this.action = input.action;
|
|
1405
1437
|
this.attempts = input.attempts;
|
|
1406
1438
|
this.transportAttemptId = input.transportAttemptId ?? null;
|
|
1439
|
+
this.responseReceived = input.responseReceived;
|
|
1407
1440
|
}
|
|
1408
1441
|
}
|
|
1409
1442
|
|
|
@@ -1413,6 +1446,17 @@ export class AppRuntimeApiTransportError extends Error {
|
|
|
1413
1446
|
* Keep the response contract structured here so durable callers can decide
|
|
1414
1447
|
* whether to retry or block a delivery without parsing an error message.
|
|
1415
1448
|
*/
|
|
1449
|
+
/** Run Ledger intake refused a live progress batch whose attempt ended. */
|
|
1450
|
+
export function isRunnerProgressAttemptSupersededResponse(
|
|
1451
|
+
error: unknown,
|
|
1452
|
+
): boolean {
|
|
1453
|
+
return (
|
|
1454
|
+
error instanceof AppRuntimeApiResponseError &&
|
|
1455
|
+
error.status === 409 &&
|
|
1456
|
+
error.code === 'RUNNER_PROGRESS_ATTEMPT_SUPERSEDED'
|
|
1457
|
+
);
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1416
1460
|
export class AppRuntimeApiResponseError extends Error {
|
|
1417
1461
|
readonly action: RuntimeApiRequest['action'];
|
|
1418
1462
|
readonly status: number;
|
|
@@ -1723,49 +1767,58 @@ async function postAppRuntimeApiAttempts<TResponse>(
|
|
|
1723
1767
|
? AbortSignal.any([context.signal, AbortSignal.timeout(requestTimeoutMs)])
|
|
1724
1768
|
: AbortSignal.timeout(requestTimeoutMs);
|
|
1725
1769
|
let response: Response;
|
|
1770
|
+
let responseHeadersAtMs: number | undefined;
|
|
1771
|
+
let responseSendStartedAtMs: number | undefined;
|
|
1726
1772
|
const runtimeTestFaultHeader = runtimeTestFaultHeaderForRequest({
|
|
1727
1773
|
body,
|
|
1728
1774
|
runtimeTestFaultHeader: context.runtimeTestFaultHeader,
|
|
1729
1775
|
});
|
|
1730
1776
|
try {
|
|
1731
|
-
const sendRequest = (protectionHeaders: Record<string, string>) =>
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
:
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1777
|
+
const sendRequest = async (protectionHeaders: Record<string, string>) => {
|
|
1778
|
+
responseSendStartedAtMs = Date.now();
|
|
1779
|
+
const sentResponse = await runtimeFetch(
|
|
1780
|
+
resolveAppRuntimeApiUrl(context),
|
|
1781
|
+
{
|
|
1782
|
+
method: 'POST',
|
|
1783
|
+
headers: {
|
|
1784
|
+
// The payload is JSON either way; `content-encoding` describes only
|
|
1785
|
+
// how those JSON bytes were packed for the wire.
|
|
1786
|
+
'content-type': 'application/json',
|
|
1787
|
+
...(wireBody.contentEncoding
|
|
1788
|
+
? { 'content-encoding': wireBody.contentEncoding }
|
|
1789
|
+
: {}),
|
|
1790
|
+
authorization: `Bearer ${token}`,
|
|
1791
|
+
[LEGACY_RUNTIME_RECEIPT_WIRE_HEADER]: String(
|
|
1792
|
+
LEGACY_RUNTIME_RECEIPT_WIRE_FORMAT,
|
|
1793
|
+
),
|
|
1794
|
+
[PLAY_RUNTIME_TRANSPORT_ATTEMPT_HEADER]: transportAttemptId,
|
|
1795
|
+
...protectionHeaders,
|
|
1796
|
+
...(context.preferredReceiptGatewayMachineId?.trim()
|
|
1797
|
+
? {
|
|
1798
|
+
'fly-force-instance-id':
|
|
1799
|
+
context.preferredReceiptGatewayMachineId.trim(),
|
|
1800
|
+
}
|
|
1801
|
+
: {}),
|
|
1802
|
+
...(runtimeTestFaultHeader
|
|
1803
|
+
? {
|
|
1804
|
+
[PLAY_RUNTIME_TEST_FAULT_HEADER]: runtimeTestFaultHeader,
|
|
1805
|
+
}
|
|
1806
|
+
: {}),
|
|
1807
|
+
},
|
|
1808
|
+
// DOM fetch accepts ArrayBuffer, while Node 24 deliberately rejects a
|
|
1809
|
+
// Uint8Array backed by an arbitrary ArrayBufferLike. Copy only the
|
|
1810
|
+
// compressed branch into an exact ArrayBuffer; its wire bytes remain
|
|
1811
|
+
// identical and the plain JSON fast path stays allocation-free.
|
|
1812
|
+
body:
|
|
1813
|
+
typeof wireBody.body === 'string'
|
|
1814
|
+
? wireBody.body
|
|
1815
|
+
: Uint8Array.from(wireBody.body).buffer,
|
|
1816
|
+
signal: requestSignal,
|
|
1758
1817
|
},
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
body:
|
|
1764
|
-
typeof wireBody.body === 'string'
|
|
1765
|
-
? wireBody.body
|
|
1766
|
-
: Uint8Array.from(wireBody.body).buffer,
|
|
1767
|
-
signal: requestSignal,
|
|
1768
|
-
});
|
|
1818
|
+
);
|
|
1819
|
+
responseHeadersAtMs = Date.now();
|
|
1820
|
+
return sentResponse;
|
|
1821
|
+
};
|
|
1769
1822
|
response = fastRunLedgerBypass
|
|
1770
1823
|
? await fetchWithVercelProtectionBypass({
|
|
1771
1824
|
baseUrl,
|
|
@@ -1858,6 +1911,7 @@ async function postAppRuntimeApiAttempts<TResponse>(
|
|
|
1858
1911
|
if (response.ok) {
|
|
1859
1912
|
try {
|
|
1860
1913
|
const parsed = (await response.json()) as TResponse;
|
|
1914
|
+
const responseDecodedAtMs = Date.now();
|
|
1861
1915
|
if (
|
|
1862
1916
|
shouldSuppressBulkClaimResponse({
|
|
1863
1917
|
body,
|
|
@@ -1884,6 +1938,19 @@ async function postAppRuntimeApiAttempts<TResponse>(
|
|
|
1884
1938
|
// gateway's own timings are subtracted from this to leave the
|
|
1885
1939
|
// network and TLS cost of the hop.
|
|
1886
1940
|
roundTripMs: Date.now() - attemptStartedAt,
|
|
1941
|
+
responseFlightMs:
|
|
1942
|
+
responseSendStartedAtMs === undefined
|
|
1943
|
+
? null
|
|
1944
|
+
: responseDecodedAtMs - responseSendStartedAtMs,
|
|
1945
|
+
responseHeadersMs:
|
|
1946
|
+
responseHeadersAtMs === undefined ||
|
|
1947
|
+
responseSendStartedAtMs === undefined
|
|
1948
|
+
? null
|
|
1949
|
+
: responseHeadersAtMs - responseSendStartedAtMs,
|
|
1950
|
+
responseBodyDecodeMs:
|
|
1951
|
+
responseHeadersAtMs === undefined
|
|
1952
|
+
? null
|
|
1953
|
+
: responseDecodedAtMs - responseHeadersAtMs,
|
|
1887
1954
|
serverTiming: parseRuntimeGatewayServerTiming(
|
|
1888
1955
|
response.headers.get('server-timing'),
|
|
1889
1956
|
),
|
|
@@ -2721,11 +2788,23 @@ async function updateRunStatusViaAppRuntimeUnlocked(
|
|
|
2721
2788
|
return;
|
|
2722
2789
|
}
|
|
2723
2790
|
const combinedEvents = [...events, ...terminalLogEvents];
|
|
2791
|
+
// Only a patch the producer marks as live progress asks intake to fence on
|
|
2792
|
+
// its attempt. A runner-result finalize can arrive as `running` with no
|
|
2793
|
+
// replay lines, so status and log shape cannot identify it; it is designed
|
|
2794
|
+
// to land after the terminal and stays unfenced.
|
|
2795
|
+
const progressAttempt =
|
|
2796
|
+
update.liveProgress === true &&
|
|
2797
|
+
update.status === 'running' &&
|
|
2798
|
+
terminalLogEvents.length === 0 &&
|
|
2799
|
+
typeof update.liveLogProducerAttempt === 'number'
|
|
2800
|
+
? update.liveLogProducerAttempt
|
|
2801
|
+
: undefined;
|
|
2724
2802
|
if (partitionRunEventsForAppRuntime(combinedEvents).length === 1) {
|
|
2725
2803
|
// Preserve the single-mutation fast path for ordinary bounded updates.
|
|
2726
2804
|
await appendRunEventsViaAppRuntime(context, {
|
|
2727
2805
|
playId: update.playId,
|
|
2728
2806
|
events: combinedEvents,
|
|
2807
|
+
...(progressAttempt === undefined ? {} : { progressAttempt }),
|
|
2729
2808
|
});
|
|
2730
2809
|
} else {
|
|
2731
2810
|
// Persist terminal lifecycle first so an oversized or interrupted
|
|
@@ -2735,6 +2814,7 @@ async function updateRunStatusViaAppRuntimeUnlocked(
|
|
|
2735
2814
|
await appendRunEventBatchesViaAppRuntime(context, {
|
|
2736
2815
|
playId: update.playId,
|
|
2737
2816
|
events,
|
|
2817
|
+
...(progressAttempt === undefined ? {} : { progressAttempt }),
|
|
2738
2818
|
});
|
|
2739
2819
|
await appendRunEventBatchesViaAppRuntime(context, {
|
|
2740
2820
|
playId: update.playId,
|
|
@@ -2761,6 +2841,7 @@ async function appendRunEventsViaAppRuntimeRaw(
|
|
|
2761
2841
|
input: {
|
|
2762
2842
|
playId: string;
|
|
2763
2843
|
events: PlayRunLedgerIngressEvent[];
|
|
2844
|
+
progressAttempt?: number;
|
|
2764
2845
|
idempotencyKey?: string;
|
|
2765
2846
|
},
|
|
2766
2847
|
): Promise<void> {
|
|
@@ -2891,6 +2972,7 @@ export async function appendRunEventsViaAppRuntime(
|
|
|
2891
2972
|
input: {
|
|
2892
2973
|
playId: string;
|
|
2893
2974
|
events: PlayRunLedgerIngressEvent[];
|
|
2975
|
+
progressAttempt?: number;
|
|
2894
2976
|
idempotencyKey?: string;
|
|
2895
2977
|
},
|
|
2896
2978
|
): Promise<void> {
|
|
@@ -2926,6 +3008,9 @@ export async function appendRunEventsViaAppRuntime(
|
|
|
2926
3008
|
await appendRunEventsViaAppRuntimeRaw(context, {
|
|
2927
3009
|
playId: input.playId,
|
|
2928
3010
|
events: batches[index]!,
|
|
3011
|
+
...(input.progressAttempt === undefined
|
|
3012
|
+
? {}
|
|
3013
|
+
: { progressAttempt: input.progressAttempt }),
|
|
2929
3014
|
...(input.idempotencyKey && index === idempotencyBatchIndex
|
|
2930
3015
|
? { idempotencyKey: input.idempotencyKey }
|
|
2931
3016
|
: {}),
|