deepline 0.3.501 → 0.3.503
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 +26 -0
- package/dist/bundling-sources/sdk/src/index.ts +1 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +9 -0
- package/dist/bundling-sources/shared_libs/monitors/starter-templates.ts +0 -8
- package/dist/bundling-sources/shared_libs/observability/dlq.ts +174 -0
- package/dist/bundling-sources/shared_libs/observability/queue-health.ts +9 -0
- package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +20 -2
- package/dist/bundling-sources/shared_libs/play-runtime/activity-observation.ts +20 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +62 -2
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +667 -62
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +55 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/vercel-fly-rollback-alignment.ts +29 -14
- package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +20 -2
- package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +46 -0
- package/dist/bundling-sources/shared_libs/play-runtime/execution-gateway-invocation-fence.ts +80 -4
- package/dist/bundling-sources/shared_libs/play-runtime/fixture-egress-fetch.ts +95 -0
- package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +292 -45
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +15 -0
- package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +7 -3
- package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +31 -1
- package/dist/bundling-sources/shared_libs/play-runtime/post-code-recovery-policy.ts +231 -0
- package/dist/bundling-sources/shared_libs/play-runtime/prebuilt-result-quality.ts +264 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-ending-event.ts +55 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +126 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +70 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +2 -9
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +51 -19
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/local-process.ts +9 -4
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/runtime-sandbox-reconciliation.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-actions.ts +12 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-oidc.ts +30 -8
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-incident-drills.ts +42 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +7 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-store-adapter.ts +26 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +13 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-deadline-reconciliation.ts +53 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +631 -19
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/durable-run-inventory.ts +719 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/durable-run-sql.ts +206 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/latest-cache-result.ts +83 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +1453 -160
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/receipt-gateway.ts +61 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +29 -8
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-queue-health.ts +27 -2
- package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +45 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +129 -14
- package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +2 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +10 -1
- package/dist/bundling-sources/shared_libs/product-notifications/slack-delivery.ts +2 -0
- package/dist/cli/{auth-6ECHXOI4.mjs → auth-IC4WLSE3.mjs} +5 -5
- package/dist/cli/auth-ZCMSXZO4.js +43 -0
- package/dist/cli/{billing-75NZYRXA.mjs → billing-2VOV64SD.mjs} +6 -6
- package/dist/cli/{billing-QRR7O6BD.js → billing-LWQOII22.js} +79 -79
- package/dist/cli/{chunk-N2TJJNCW.js → chunk-2626LTU3.js} +291 -273
- package/dist/cli/{chunk-VL72UKNW.js → chunk-26RSSTCF.js} +26 -26
- package/dist/cli/{chunk-HDKXSHGA.js → chunk-2K2QBLYO.js} +53 -53
- package/dist/cli/{chunk-463ZOO2L.js → chunk-33JUK73X.js} +7 -7
- package/dist/cli/{chunk-KTOAJP4N.js → chunk-3CXHK4TW.js} +10 -10
- package/dist/cli/{chunk-YPTZJ7LO.js → chunk-4IIYSBEP.js} +70 -13
- package/dist/cli/{chunk-VTDAJZIJ.mjs → chunk-5GI6NKOE.mjs} +20 -1
- package/dist/cli/{chunk-TFFJ2PRN.mjs → chunk-5M5WSFRZ.mjs} +70 -13
- package/dist/cli/{chunk-5S7MLAI7.mjs → chunk-6XTE6C3W.mjs} +41 -23
- package/dist/cli/{chunk-7L6QNHUL.mjs → chunk-7HEDCIR3.mjs} +1 -1
- package/dist/cli/{chunk-C5R3UH5V.mjs → chunk-7MJYZ33I.mjs} +2 -6
- package/dist/cli/{chunk-TOE7LHEA.js → chunk-A2C6ONWA.js} +6 -6
- package/dist/cli/{chunk-QQ3JJYE2.js → chunk-AARF4SOW.js} +17 -13
- package/dist/cli/{chunk-APAHMCGR.js → chunk-B3X4YWQ6.js} +53 -53
- package/dist/cli/{chunk-J74N375S.mjs → chunk-BI2Q45SY.mjs} +4 -4
- package/dist/cli/{chunk-GBICEYUA.js → chunk-BN5VKY4X.js} +141 -20
- package/dist/cli/{chunk-UR7JOSLT.js → chunk-C5RQTTLP.js} +26 -7
- package/dist/cli/{chunk-ZUOKIBLJ.mjs → chunk-D27HP3HS.mjs} +2 -2
- package/dist/cli/{chunk-UJRN6YP6.mjs → chunk-DPI5OYVU.mjs} +10 -6
- package/dist/cli/{chunk-MSLXAVVK.mjs → chunk-EDMV4JT5.mjs} +2 -2
- package/dist/cli/{chunk-ZUQHQGC5.mjs → chunk-EQ3WMKFY.mjs} +5 -5
- package/dist/cli/{chunk-5X4AUFYW.js → chunk-F73PD2XD.js} +7 -7
- package/dist/cli/{chunk-O3DDVP7Z.mjs → chunk-FHJ54BHH.mjs} +2 -2
- package/dist/cli/{chunk-SV2TEZ2M.js → chunk-FIUTDSJX.js} +5 -4
- package/dist/cli/{chunk-W6JTHVPF.js → chunk-FVDTERO2.js} +21 -21
- package/dist/cli/{chunk-CJJ7JBM2.js → chunk-FZHOWPSN.js} +23 -21
- package/dist/cli/{chunk-WJUDAHIQ.mjs → chunk-GIHNEYBG.mjs} +1 -1
- package/dist/cli/{chunk-V5NHEYU7.mjs → chunk-GLZBFBJS.mjs} +5 -5
- package/dist/cli/{chunk-VVEMPC2I.js → chunk-HRTDCXHI.js} +2 -2
- package/dist/cli/{chunk-BOFCF4L7.js → chunk-HS63YBT5.js} +3 -3
- package/dist/cli/{chunk-4OXHLTCP.js → chunk-IIP46RVC.js} +1 -1
- package/dist/cli/{chunk-SAW3FBCA.mjs → chunk-ITJ7NB2D.mjs} +6 -0
- package/dist/cli/{chunk-NA3J3F2Z.mjs → chunk-J6RBOLK7.mjs} +1 -1
- package/dist/cli/{chunk-PXIF74UJ.mjs → chunk-JJVN7OIX.mjs} +4 -4
- package/dist/cli/{chunk-T7E3XEPG.mjs → chunk-JPDD4Y53.mjs} +10 -8
- package/dist/cli/{chunk-OKOXB3LY.mjs → chunk-K7NFFQFU.mjs} +2 -2
- package/dist/cli/{chunk-66XDYH5T.mjs → chunk-KGLVATEB.mjs} +2 -2
- package/dist/cli/{chunk-EHVFBD36.mjs → chunk-KPBBT6OS.mjs} +2 -1
- package/dist/cli/{chunk-MADTHS56.mjs → chunk-L3TZV625.mjs} +1 -1
- package/dist/cli/{chunk-FS7XYDOF.js → chunk-MJQOG4TZ.js} +16 -16
- package/dist/cli/{chunk-JO5FFSR7.js → chunk-NTLBZUHD.js} +6 -0
- package/dist/cli/{chunk-EKZQ5LQO.js → chunk-PVA3MWCO.js} +3 -3
- package/dist/cli/{chunk-PNF2ZU4R.js → chunk-QIEYEY6Z.js} +8 -8
- package/dist/cli/{chunk-KSHAFYYG.mjs → chunk-R2VZVHJP.mjs} +127 -6
- package/dist/cli/{chunk-XEBFJ2PH.js → chunk-RVOBFO7C.js} +41 -41
- package/dist/cli/{chunk-RU5ROUFO.js → chunk-TCQYWZFS.js} +5 -5
- package/dist/cli/{chunk-I42EOZKQ.js → chunk-TMQUMILM.js} +19 -23
- package/dist/cli/{chunk-EOO7OSS4.mjs → chunk-URZNSJE2.mjs} +4 -4
- package/dist/cli/{chunk-Z6AUOV7D.mjs → chunk-VC5B462T.mjs} +2 -2
- package/dist/cli/{chunk-EKF4DKUA.js → chunk-WHP3FJ7T.js} +5 -5
- package/dist/cli/{chunk-VD2374K7.mjs → chunk-WS274KID.mjs} +1 -1
- package/dist/cli/{chunk-T4U245E4.mjs → chunk-XYZZZLN6.mjs} +2 -2
- package/dist/cli/{chunk-J6SVNKRP.js → chunk-YXGPMTAK.js} +2 -2
- package/dist/cli/{chunk-RFV7PPLS.mjs → chunk-ZEQPCEV4.mjs} +3 -3
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-RZJ4SOIL.mjs → csv-2TXOI3UE.mjs} +4 -4
- package/dist/cli/{csv-JXX2LXK5.js → csv-NEWCNOSZ.js} +13 -13
- package/dist/cli/{db-T2KJNONM.js → db-J3IJS4OG.js} +27 -27
- package/dist/cli/{db-MUTT2NWI.mjs → db-PX7EQEIG.mjs} +6 -6
- package/dist/cli/{describe-K3UMAAVO.mjs → describe-GQHGTZSL.mjs} +20 -21
- package/dist/cli/describe-LE7EZCL4.js +49 -0
- package/dist/cli/describe-core.d.mts +8 -4
- package/dist/cli/describe-core.d.ts +8 -4
- package/dist/cli/describe-core.js +4 -5
- package/dist/cli/describe-core.mjs +3 -4
- package/dist/cli/{executions-PHS4R2OX.mjs → executions-FFKK24RY.mjs} +6 -6
- package/dist/cli/{executions-7HSLDRHR.js → executions-RO3TJUXL.js} +8 -8
- package/dist/cli/{feedback-BJZRM637.js → feedback-XRR4HIS6.js} +8 -8
- package/dist/cli/{feedback-RWMDCIDF.mjs → feedback-ZTO56SRL.mjs} +4 -4
- package/dist/cli/git-26AH4XIO.js +25 -0
- package/dist/cli/{git-YW6VHYZG.mjs → git-FIPBVFYZ.mjs} +5 -5
- package/dist/cli/index.js +142 -142
- package/dist/cli/index.mjs +42 -42
- package/dist/cli/{legacy-noops-5UBSUPGG.mjs → legacy-noops-AMD2NWHF.mjs} +5 -5
- package/dist/cli/{legacy-noops-2WUV2XD7.js → legacy-noops-MTBBGM27.js} +8 -8
- package/dist/cli/{monitors-HWOQO3OK.mjs → monitors-24LDKDJX.mjs} +7 -7
- package/dist/cli/{monitors-YZZRKSTG.js → monitors-42PIGLBF.js} +95 -95
- package/dist/cli/{org-NCXT6RB4.mjs → org-4B7SCFRL.mjs} +6 -6
- package/dist/cli/{org-JY7HLHBA.js → org-GQMCA3MN.js} +72 -72
- package/dist/cli/{pages-QJO53QAT.mjs → pages-PD5EGL2R.mjs} +6 -6
- package/dist/cli/{pages-6ZOHXL6X.js → pages-RL2M62GJ.js} +18 -18
- package/dist/cli/{play-SQRS7JN3.mjs → play-5V54VTUR.mjs} +132 -26
- package/dist/cli/{play-TAYGSR35.js → play-FST6ZAHW.js} +447 -341
- package/dist/cli/{providers-4Q5LOIQ5.js → providers-HBUUPN7J.js} +9 -9
- package/dist/cli/{providers-3IR3N5DT.mjs → providers-N5YVCKPL.mjs} +6 -6
- package/dist/cli/{quickstart-ITNUZENY.js → quickstart-4QIQNSHG.js} +6 -6
- package/dist/cli/{quickstart-KCZCYO6B.mjs → quickstart-NJDDVTQR.mjs} +4 -4
- package/dist/cli/{run-YQ57LMKN.js → run-FGOKCG4J.js} +44 -45
- package/dist/cli/{run-JCWRWDSK.mjs → run-JHI5MTHD.mjs} +25 -26
- package/dist/cli/search-CTKSEVSO.js +32 -0
- package/dist/cli/{search-FUM27HQP.mjs → search-EWIZBIY2.mjs} +7 -7
- package/dist/cli/{search-output-EWEYT34M.mjs → search-output-NAK3MWBH.mjs} +53 -75
- package/dist/cli/{search-output-XAMWKRJH.js → search-output-TMQTRC2W.js} +58 -80
- package/dist/cli/{secrets-2IRRRZBL.js → secrets-5TSUEOJB.js} +15 -15
- package/dist/cli/{secrets-YTI4IAKR.mjs → secrets-ONQVW5SR.mjs} +6 -6
- package/dist/cli/{sessions-EFS4KUPF.mjs → sessions-B7F5O3ZR.mjs} +5 -5
- package/dist/cli/{sessions-HWTRDXBQ.js → sessions-BSGE5EET.js} +6 -6
- package/dist/cli/{settings-FRVEIOKR.js → settings-47LARBRU.js} +78 -78
- package/dist/cli/{settings-NTOO42DY.mjs → settings-SGGFQV5R.mjs} +11 -11
- package/dist/cli/{setup-PAVQPALX.mjs → setup-ATGNXQUK.mjs} +9 -9
- package/dist/cli/{setup-6ZIOAE2V.js → setup-BNFZFXO6.js} +49 -49
- package/dist/cli/skills-6RD25MVM.js +36 -0
- package/dist/cli/{skills-3O3XTPUM.mjs → skills-CIMBRM5R.mjs} +7 -7
- package/dist/cli/{tools-7QSB65UL.mjs → tools-DTDXAULX.mjs} +18 -19
- package/dist/cli/tools-TDZH4XHS.js +56 -0
- package/dist/cli/{update-T6CYS5ZT.mjs → update-EOIJBJCO.mjs} +9 -9
- package/dist/cli/update-Y32VT4VL.js +34 -0
- package/dist/cli/{workflow-OMSXZ73T.mjs → workflow-IWXUJPWY.mjs} +7 -7
- package/dist/cli/{workflow-4KMJBMGX.js → workflow-V5VKPICQ.js} +17 -17
- package/dist/{client-Bn8FwKGO.d.ts → client-CIwenMFS.d.ts} +1 -1
- package/dist/{client-CfNRmjLK.d.mts → client-DYAfJpaN.d.mts} +1 -1
- package/dist/{client-core-B91EV0WS.d.ts → client-core-CRjtyMAI.d.ts} +25 -2
- package/dist/{client-core-BG8Cgrmk.d.mts → client-core-DlzP8vEs.d.mts} +25 -2
- package/dist/{compiler-manifest-DlXDyndN.d.ts → compiler-manifest-DaJrA2KV.d.mts} +1 -1
- package/dist/{compiler-manifest-DlXDyndN.d.mts → compiler-manifest-DaJrA2KV.d.ts} +1 -1
- package/dist/{errors-BtriA2ld.d.mts → errors-BKnSYueU.d.mts} +1 -1
- package/dist/{errors-DmcLykM7.d.ts → errors-KLga4bLr.d.ts} +1 -1
- package/dist/{index-DI0sR_fX.d.mts → index-C-8AFpWy.d.mts} +1 -1
- package/dist/{index--Jw-slHY.d.ts → index-C5nAZ-VS.d.ts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +124 -118
- 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 +8 -1
- 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/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 +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-VP7PMXKQ.js +0 -43
- package/dist/cli/chunk-XK5DMLZE.js +0 -111
- package/dist/cli/chunk-XRDXNAAY.mjs +0 -111
- package/dist/cli/describe-SEXUJLE4.js +0 -50
- package/dist/cli/git-VNS7UQWN.js +0 -25
- package/dist/cli/search-I425FRTK.js +0 -32
- package/dist/cli/skills-6ZNMO2PR.js +0 -36
- package/dist/cli/tools-DPV2JES6.js +0 -57
- package/dist/cli/update-Q5GUDEAW.js +0 -34
|
@@ -20,6 +20,8 @@ export const RUNTIME_TEST_FAULT_IDS = [
|
|
|
20
20
|
'modal_sandbox_create_resource_exhausted',
|
|
21
21
|
'runtime_sheet_page_tail_hold_ms',
|
|
22
22
|
'runner_heartbeat_silence_ms',
|
|
23
|
+
'runner_sandbox_delete_ms',
|
|
24
|
+
'fence_commit_abandon_ms',
|
|
23
25
|
] as const;
|
|
24
26
|
|
|
25
27
|
export type RuntimeTestFaultName = (typeof RUNTIME_TEST_FAULT_IDS)[number];
|
|
@@ -385,6 +387,46 @@ export const RUNTIME_INCIDENT_DRILL_CATALOG: readonly RuntimeIncidentDrill[] = [
|
|
|
385
387
|
target: 'silent-runner-liveness-e2e',
|
|
386
388
|
},
|
|
387
389
|
},
|
|
390
|
+
{
|
|
391
|
+
id: 'runner_sandbox_delete_ms',
|
|
392
|
+
description:
|
|
393
|
+
"Delete a parked detached runner's sandbox a bounded time after it parks, as a provider outage would, once per run.",
|
|
394
|
+
topologies: LOCAL_AND_PREVIEW_TOPOLOGIES,
|
|
395
|
+
control: {
|
|
396
|
+
kind: 'runtime_test_fault',
|
|
397
|
+
defaultValue: 30_000,
|
|
398
|
+
valueMeaning: 'milliseconds',
|
|
399
|
+
},
|
|
400
|
+
expected: {
|
|
401
|
+
outcome:
|
|
402
|
+
'The worker proves the runner lost, retries the same run from its checkpoint, and every call the run recorded returns from its history.',
|
|
403
|
+
safetyFacts: ['same_logical_run', 'bounded_provider_execution'],
|
|
404
|
+
},
|
|
405
|
+
verification: {
|
|
406
|
+
kind: 'preview_black_box',
|
|
407
|
+
target: 'durable-crash-recovery-e2e',
|
|
408
|
+
},
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
id: 'fence_commit_abandon_ms',
|
|
412
|
+
description:
|
|
413
|
+
"On a run's first attempt, abandon a fenced call after the provider ran and before the gateway commits it, as a gateway crash would; the run's abandoned calls go stale after the given time.",
|
|
414
|
+
topologies: ['preview_fly'],
|
|
415
|
+
control: {
|
|
416
|
+
kind: 'runtime_test_fault',
|
|
417
|
+
defaultValue: 60_000,
|
|
418
|
+
valueMeaning: 'milliseconds',
|
|
419
|
+
},
|
|
420
|
+
expected: {
|
|
421
|
+
outcome:
|
|
422
|
+
'A newer attempt of the same run finds the call stale and unknown, takes it over, and sends it once more with the same key; the run completes.',
|
|
423
|
+
safetyFacts: ['same_logical_run', 'bounded_provider_execution'],
|
|
424
|
+
},
|
|
425
|
+
verification: {
|
|
426
|
+
kind: 'preview_black_box',
|
|
427
|
+
target: 'durable-gateway-crash-recovery-e2e',
|
|
428
|
+
},
|
|
429
|
+
},
|
|
388
430
|
];
|
|
389
431
|
|
|
390
432
|
export type RuntimeTestFaultDrill = Omit<
|
|
@@ -75,6 +75,7 @@ export const RUNTIME_OPERATION_CAPABILITIES = {
|
|
|
75
75
|
fail_runtime_step_receipts: 'receipt.write',
|
|
76
76
|
heartbeat_runtime_step_receipts: 'receipt.write',
|
|
77
77
|
skip_runtime_step_receipt: 'receipt.write',
|
|
78
|
+
publish_latest_cache_result: 'receipt.write',
|
|
78
79
|
ensure_sheet: 'sheet.write',
|
|
79
80
|
apply_row_updates: 'sheet.write',
|
|
80
81
|
create_db_session: 'db.session',
|
|
@@ -114,6 +115,12 @@ export const RUNTIME_OPERATION_CONTRACT: DeployedOperationContract =
|
|
|
114
115
|
kind: 'feature-unavailable',
|
|
115
116
|
code: 'PAGES_UNAVAILABLE',
|
|
116
117
|
},
|
|
118
|
+
// The shared read cache is only an optimization: an older receiver
|
|
119
|
+
// writes nothing and the runner treats the publish as a no-op.
|
|
120
|
+
publish_latest_cache_result: {
|
|
121
|
+
kind: 'feature-unavailable',
|
|
122
|
+
code: 'SHARED_READ_CACHE_UNAVAILABLE',
|
|
123
|
+
},
|
|
117
124
|
project_run_events: {
|
|
118
125
|
kind: 'equivalent-fallback',
|
|
119
126
|
action: 'append_run_events',
|
|
@@ -5,6 +5,8 @@ import type {
|
|
|
5
5
|
CompleteRuntimeStepReceiptsByReferenceInput,
|
|
6
6
|
ContextOptions,
|
|
7
7
|
FailRuntimeStepReceiptInput,
|
|
8
|
+
PublishLatestCacheResultInput,
|
|
9
|
+
PublishLatestCacheResultOutcome,
|
|
8
10
|
ReleaseRuntimeReceiptExecutionLockInput,
|
|
9
11
|
ReleaseRuntimeStepReceiptInput,
|
|
10
12
|
RuntimeStepReceipt,
|
|
@@ -25,6 +27,7 @@ import {
|
|
|
25
27
|
getRuntimeStepReceiptsViaAppRuntime,
|
|
26
28
|
heartbeatRuntimeStepReceiptsViaAppRuntime,
|
|
27
29
|
isAppRuntimeApiCapacityError,
|
|
30
|
+
publishLatestCacheResultViaAppRuntime,
|
|
28
31
|
releaseRuntimeReceiptExecutionLockViaAppRuntime,
|
|
29
32
|
releaseRuntimeStepReceiptViaAppRuntime,
|
|
30
33
|
skipRuntimeStepReceiptViaAppRuntime,
|
|
@@ -41,7 +44,8 @@ type ReceiptOutput =
|
|
|
41
44
|
| RuntimeStepReceipt
|
|
42
45
|
| null
|
|
43
46
|
| boolean
|
|
44
|
-
| { ownerExecutionId: string; expiresAt: string }
|
|
47
|
+
| { ownerExecutionId: string; expiresAt: string }
|
|
48
|
+
| PublishLatestCacheResultOutcome;
|
|
45
49
|
|
|
46
50
|
type ReceiptCommand =
|
|
47
51
|
| {
|
|
@@ -97,6 +101,11 @@ type ReceiptCommand =
|
|
|
97
101
|
kind: 'release_execution_lock';
|
|
98
102
|
input: ReleaseRuntimeReceiptExecutionLockInput;
|
|
99
103
|
serial: number;
|
|
104
|
+
}
|
|
105
|
+
| {
|
|
106
|
+
kind: 'publish_latest_cache_result';
|
|
107
|
+
input: PublishLatestCacheResultInput;
|
|
108
|
+
serial: number;
|
|
100
109
|
};
|
|
101
110
|
|
|
102
111
|
type ReceiptHandlerName =
|
|
@@ -109,6 +118,7 @@ type ReceiptHandlerName =
|
|
|
109
118
|
| 'completeRuntimeStepReceipt'
|
|
110
119
|
| 'completeRuntimeStepReceipts'
|
|
111
120
|
| 'completeRuntimeStepReceiptsByReference'
|
|
121
|
+
| 'publishLatestCacheResult'
|
|
112
122
|
| 'releaseRuntimeStepReceipt'
|
|
113
123
|
| 'failRuntimeStepReceipt'
|
|
114
124
|
| 'failRuntimeStepReceipts'
|
|
@@ -327,6 +337,12 @@ export class RuntimeReceiptStoreAdapter {
|
|
|
327
337
|
input,
|
|
328
338
|
})),
|
|
329
339
|
),
|
|
340
|
+
publishLatestCacheResult: (input) =>
|
|
341
|
+
write({
|
|
342
|
+
kind: 'publish_latest_cache_result',
|
|
343
|
+
input,
|
|
344
|
+
serial: this.#nextSerial(),
|
|
345
|
+
}),
|
|
330
346
|
releaseRuntimeStepReceipt: (input) =>
|
|
331
347
|
write({
|
|
332
348
|
kind: 'settle',
|
|
@@ -506,6 +522,7 @@ function receiptCommandBatchKey(command: ReceiptCommand): string {
|
|
|
506
522
|
]);
|
|
507
523
|
case 'acquire_execution_lock':
|
|
508
524
|
case 'release_execution_lock':
|
|
525
|
+
case 'publish_latest_cache_result':
|
|
509
526
|
return `${command.kind}:${command.serial}`;
|
|
510
527
|
}
|
|
511
528
|
}
|
|
@@ -535,6 +552,7 @@ function receiptCommandOrderingKeys(
|
|
|
535
552
|
case 'heartbeat':
|
|
536
553
|
case 'acquire_execution_lock':
|
|
537
554
|
case 'release_execution_lock':
|
|
555
|
+
case 'publish_latest_cache_result':
|
|
538
556
|
return [command.input.key];
|
|
539
557
|
case 'settle':
|
|
540
558
|
return [command.input.key];
|
|
@@ -722,5 +740,12 @@ async function sendReceiptCommands(input: {
|
|
|
722
740
|
...first.input,
|
|
723
741
|
}),
|
|
724
742
|
];
|
|
743
|
+
case 'publish_latest_cache_result':
|
|
744
|
+
return [
|
|
745
|
+
await publishLatestCacheResultViaAppRuntime(input.context, {
|
|
746
|
+
playName: input.playName,
|
|
747
|
+
...first.input,
|
|
748
|
+
}),
|
|
749
|
+
];
|
|
725
750
|
}
|
|
726
751
|
}
|
|
@@ -101,6 +101,19 @@ export type PlaySchedulerSubmitInput = RetainedPipelineCarrier & {
|
|
|
101
101
|
inputBytes?: number;
|
|
102
102
|
inputSha256?: string;
|
|
103
103
|
replayedFromRunId?: string | null;
|
|
104
|
+
/**
|
|
105
|
+
* Server-derived launch fact: derive run-scoped history, SQL and provider
|
|
106
|
+
* idempotency keys from the executing run instead of an inline child's
|
|
107
|
+
* composition namespace. Absent on older launches, which keep their keys.
|
|
108
|
+
*/
|
|
109
|
+
runScopedKeys?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* How many times `runs resume` has continued this run (absent means 0).
|
|
112
|
+
* Written only by the resume statement; orders the run's endings.
|
|
113
|
+
*/
|
|
114
|
+
resumeEpoch?: number;
|
|
115
|
+
/** First attempt of the current resume epoch; absent at epoch 0. */
|
|
116
|
+
resumeEpochFirstAttempt?: number;
|
|
104
117
|
/** Start a fresh run graph and recompute runtime-sheet rows. */
|
|
105
118
|
force?: boolean;
|
|
106
119
|
/** Explicit cache bypass for completed ctx.tools.execute receipts. */
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { CANCELLATION_CLEANUP_ACTIVITY_ID } from '../activity-observation';
|
|
2
|
+
import { normalizeResumeEpoch } from '../run-ending-event';
|
|
1
3
|
import {
|
|
2
4
|
abandonUnstartedModalCancellationReservations,
|
|
5
|
+
appendPostgresRunLedgerEvents,
|
|
3
6
|
cancelPostgresSchedulerRun,
|
|
4
7
|
enqueuePostgresSchedulerSandboxCleanupForRun,
|
|
5
8
|
hasPendingPostgresSchedulerSandboxCleanupForRun,
|
|
@@ -73,6 +76,56 @@ async function finalizeCancelledRunAfterCleanup(input: {
|
|
|
73
76
|
input.schedulerOptions,
|
|
74
77
|
)
|
|
75
78
|
) {
|
|
79
|
+
const facts = await input.client.query<{
|
|
80
|
+
org_id: string;
|
|
81
|
+
resume_epoch: unknown;
|
|
82
|
+
requested_at: string | null;
|
|
83
|
+
}>(
|
|
84
|
+
`SELECT run.org_id, run.launch_json->'resumeEpoch' AS resume_epoch,
|
|
85
|
+
request.value->>'requestedAt' AS requested_at
|
|
86
|
+
FROM ${input.schedulerSchema}.runs AS run
|
|
87
|
+
JOIN ${input.schedulerSchema}.control AS request ON request.key = $2
|
|
88
|
+
WHERE run.run_id = $1`,
|
|
89
|
+
[input.runId, input.controlKey],
|
|
90
|
+
);
|
|
91
|
+
const fact = facts.rows[0];
|
|
92
|
+
if (!fact)
|
|
93
|
+
throw new Error(
|
|
94
|
+
'Pending cancellation lost its durable run/request identity.',
|
|
95
|
+
);
|
|
96
|
+
// All current request writers retain this clock. Historical requests
|
|
97
|
+
// lacking it keep their existing cleanup behavior; never invent a fresh
|
|
98
|
+
// event each poll or reinterpret their saved request.
|
|
99
|
+
const requestedAt = Date.parse(fact.requested_at ?? '');
|
|
100
|
+
if (Number.isFinite(requestedAt)) {
|
|
101
|
+
await appendPostgresRunLedgerEvents(
|
|
102
|
+
input.client,
|
|
103
|
+
{
|
|
104
|
+
orgId: fact.org_id,
|
|
105
|
+
runId: input.runId,
|
|
106
|
+
events: [
|
|
107
|
+
{
|
|
108
|
+
type: 'activity.observed',
|
|
109
|
+
runId: input.runId,
|
|
110
|
+
source: 'system',
|
|
111
|
+
occurredAt: requestedAt,
|
|
112
|
+
resumeEpoch: normalizeResumeEpoch(fact.resume_epoch),
|
|
113
|
+
observation: {
|
|
114
|
+
activityId: CANCELLATION_CLEANUP_ACTIVITY_ID,
|
|
115
|
+
target: {
|
|
116
|
+
kind: 'capacity',
|
|
117
|
+
pool: 'runner',
|
|
118
|
+
label: 'Play cancellation cleanup',
|
|
119
|
+
},
|
|
120
|
+
state: { kind: 'active' },
|
|
121
|
+
observedAt: requestedAt,
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
},
|
|
126
|
+
input.schedulerOptions,
|
|
127
|
+
);
|
|
128
|
+
}
|
|
76
129
|
await input.client.query('COMMIT');
|
|
77
130
|
return 'pending';
|
|
78
131
|
}
|