deepline 0.3.519 → 0.3.521
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/plays/client-core.ts +16 -45
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +0 -18
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +0 -155
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +160 -2
- package/dist/bundling-sources/shared_libs/play-runtime/execute-server-timing.ts +22 -0
- package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +24 -0
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +1 -54
- package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +2 -7
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +0 -13
- package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +0 -56
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +10 -21
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-heartbeat.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-progress-push.ts +2 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/runtime-terminal-push.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +2 -37
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +3 -74
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-runtime-watchdog.ts +2 -226
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +3 -36
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-paths.ts +0 -26
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +1 -9
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +0 -5
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-environment.ts +9 -49
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-oidc.ts +11 -447
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +5 -4
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +12 -207
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-shared.ts +3 -17
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/gateway-progress-registry.ts +0 -9
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +2 -18
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +15 -175
- package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +0 -4
- package/dist/cli/{artifacts-YRKH7KNC.js → artifacts-JGH464N2.js} +20 -20
- package/dist/cli/{artifacts-ZZULJ6X5.mjs → artifacts-TYPU37IU.mjs} +8 -8
- package/dist/cli/auth-JWR3VSNT.js +43 -0
- package/dist/cli/{auth-WU2BDO3T.mjs → auth-XPQT6NUB.mjs} +5 -5
- package/dist/cli/{billing-DG62VVXW.mjs → billing-47AMHOMP.mjs} +8 -8
- package/dist/cli/{billing-MUMMBMQK.js → billing-6D4KXBFJ.js} +81 -81
- package/dist/cli/{chunk-R3OAKFHJ.mjs → chunk-2DQPB5HT.mjs} +5 -5
- package/dist/cli/{chunk-6Y3DDRRN.js → chunk-2KHUFWTK.js} +3 -3
- package/dist/cli/{chunk-XUCAH3LN.js → chunk-3Q7HEEH2.js} +10 -10
- package/dist/cli/{chunk-MI5DKOBD.mjs → chunk-4DB6JV7X.mjs} +2 -2
- package/dist/cli/{chunk-J4X4RNSP.mjs → chunk-4GGXAYKI.mjs} +3 -3
- package/dist/cli/{chunk-AXA5DFY5.mjs → chunk-4I7I5CGB.mjs} +1 -1
- package/dist/cli/{chunk-I3ICKVYH.js → chunk-4MN65FRF.js} +53 -53
- package/dist/cli/{chunk-Y7D6L4M7.mjs → chunk-4MONKWYE.mjs} +5 -5
- package/dist/cli/{chunk-3CUIIVGR.mjs → chunk-5T7QKHQL.mjs} +1 -1
- package/dist/cli/{chunk-UMPHUAGZ.js → chunk-6DCBTJZP.js} +3 -3
- package/dist/cli/{chunk-LKYLIZ5X.js → chunk-6N72GHAV.js} +2 -2
- package/dist/cli/{chunk-RHQKDHCX.mjs → chunk-6UHYXNCP.mjs} +2 -2
- package/dist/cli/{chunk-RU5JRQKJ.mjs → chunk-6V2RI3AL.mjs} +3 -3
- package/dist/cli/{chunk-NIJE62ZD.mjs → chunk-7AUXX6M5.mjs} +1 -1
- package/dist/cli/{chunk-NH22WUUG.mjs → chunk-7IYDCHTG.mjs} +2 -2
- package/dist/cli/{chunk-FEJKDR67.mjs → chunk-7LRALARF.mjs} +1 -1
- package/dist/cli/{chunk-N3LUYBOB.mjs → chunk-A2B5AAU3.mjs} +11 -11
- package/dist/cli/{chunk-CRE3OGHH.mjs → chunk-A6USUS4L.mjs} +2 -2
- package/dist/cli/{chunk-ZQ23WQP3.js → chunk-AMVKLEPH.js} +2 -2
- package/dist/cli/{chunk-RQ2BHYUM.mjs → chunk-CBBCUYIN.mjs} +2 -2
- package/dist/cli/{chunk-CBMTBMIJ.mjs → chunk-DQURY3WH.mjs} +1 -1
- package/dist/cli/{chunk-EMV6EHK2.js → chunk-DY6634MN.js} +14 -14
- package/dist/cli/{chunk-5A2SIIPH.mjs → chunk-E4ZS2B2J.mjs} +1 -1
- package/dist/cli/{chunk-BQYXIAJM.js → chunk-EILHJRPW.js} +3 -3
- package/dist/cli/{chunk-RQDD2VV3.js → chunk-EW3EAEWZ.js} +5 -5
- package/dist/cli/{chunk-A7W3CCU5.mjs → chunk-EZNZDOAG.mjs} +5 -5
- package/dist/cli/{chunk-HT675XNR.mjs → chunk-FKD3KL5Q.mjs} +1 -1
- package/dist/cli/{chunk-FJAGGBDR.mjs → chunk-FQJFONFT.mjs} +59 -90
- package/dist/cli/{chunk-C7ZD4LXZ.js → chunk-FTZX4QZN.js} +2 -2
- package/dist/cli/{chunk-F6XD4CRW.js → chunk-GNYSODBR.js} +1 -1
- package/dist/cli/{chunk-4PWBHYH4.js → chunk-HD3KYCDC.js} +7 -7
- package/dist/cli/{chunk-IMIHYCJ5.mjs → chunk-HHBJJYKL.mjs} +5 -5
- package/dist/cli/{chunk-YRU46P7H.mjs → chunk-HRWVEIAX.mjs} +1 -1
- package/dist/cli/{chunk-TT2XB433.js → chunk-HSFLMTED.js} +4 -4
- package/dist/cli/{chunk-E6YWCXII.js → chunk-JFQJNYTB.js} +16 -16
- package/dist/cli/{chunk-XBS4RDKU.js → chunk-LGU2NIOT.js} +98 -98
- package/dist/cli/{chunk-SBF4K3QF.mjs → chunk-LNBMEFOI.mjs} +4 -4
- package/dist/cli/{chunk-G2QD575P.js → chunk-MD43YAL6.js} +6 -6
- package/dist/cli/{chunk-S7R4O62I.js → chunk-MRU4N33M.js} +6 -6
- package/dist/cli/{chunk-UB2REJPL.mjs → chunk-NNDAVVBG.mjs} +2 -2
- package/dist/cli/{chunk-ORNLTNBN.js → chunk-PUKWFJXW.js} +44 -44
- package/dist/cli/{chunk-O655PVT4.js → chunk-QGTWGHYD.js} +88 -119
- package/dist/cli/{chunk-AL7FDMD6.mjs → chunk-TBIWR7M2.mjs} +1 -1
- package/dist/cli/{chunk-PK6VYYEY.js → chunk-UAZKOH3J.js} +5 -5
- package/dist/cli/{chunk-BMCRTI6Z.mjs → chunk-UBKA33KY.mjs} +1 -22
- package/dist/cli/{chunk-4ECU5DI3.js → chunk-ULW2KBKL.js} +26 -26
- package/dist/cli/{chunk-52DFTRVC.js → chunk-VSH3AE5E.js} +16 -16
- package/dist/cli/{chunk-P62S3ZMS.js → chunk-VYY5V4M5.js} +11 -11
- package/dist/cli/{chunk-HXPHRSNM.js → chunk-WL6WPW6X.js} +14 -14
- package/dist/cli/{chunk-WSGXBROE.js → chunk-XDVT3GOM.js} +1 -22
- package/dist/cli/{chunk-GO467AXG.js → chunk-Y23TOHNV.js} +41 -41
- package/dist/cli/{chunk-FTJ2D3XD.mjs → chunk-Y7IR4LBU.mjs} +3 -3
- package/dist/cli/{chunk-25WXWSFS.js → chunk-YROP3H6T.js} +22 -22
- package/dist/cli/{chunk-HKKC7J6K.mjs → chunk-ZO2XJVFH.mjs} +6 -6
- package/dist/cli/{csv-BKWIYPMK.js → csv-5TM2OSYP.js} +13 -13
- package/dist/cli/{csv-3TUJHAOW.mjs → csv-PM3WDXDF.mjs} +4 -4
- package/dist/cli/{db-EJMJDKDA.js → db-3LJ32FZM.js} +29 -29
- package/dist/cli/{db-I75IQ7XI.mjs → db-5P72NPRL.mjs} +8 -8
- package/dist/cli/describe-GRS3IRSX.js +50 -0
- package/dist/cli/{describe-RUFLLRIN.mjs → describe-ZLCMBGHG.mjs} +20 -20
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-TQJCMUUG.js → executions-4AJ5TQVY.js} +10 -10
- package/dist/cli/{executions-VW3MYJEE.mjs → executions-JMFL6AV7.mjs} +8 -8
- package/dist/cli/{feedback-76342G7E.mjs → feedback-DKMG2QB7.mjs} +5 -5
- package/dist/cli/{feedback-UFAEXH5B.js → feedback-I2BLXMGH.js} +10 -10
- package/dist/cli/git-2LNT43A2.js +25 -0
- package/dist/cli/{git-L5XKAODI.mjs → git-ARG223MY.mjs} +5 -5
- package/dist/cli/index.js +141 -141
- package/dist/cli/index.mjs +43 -43
- package/dist/cli/{legacy-noops-DKAZ7JG3.mjs → legacy-noops-24LOAOZN.mjs} +6 -6
- package/dist/cli/{legacy-noops-DM66YISP.js → legacy-noops-N7SVA7PL.js} +9 -9
- package/dist/cli/{monitors-QXEJI54B.mjs → monitors-RYQFWM2T.mjs} +9 -9
- package/dist/cli/{monitors-NKDIH4TY.js → monitors-XNCYLOJM.js} +102 -102
- package/dist/cli/{org-NKIIBUNO.js → org-I33TKZXF.js} +74 -74
- package/dist/cli/{org-KZQCVREB.mjs → org-ORIH56E5.mjs} +8 -8
- package/dist/cli/{pages-UJUFCJEL.js → pages-2UXXGIMF.js} +20 -20
- package/dist/cli/{pages-E7IT5SWT.mjs → pages-ME43HSBL.mjs} +8 -8
- package/dist/cli/{play-SPI5MO67.js → play-F4QOFU37.js} +338 -338
- package/dist/cli/{play-AKL5E2DF.mjs → play-XEKNY46M.mjs} +21 -21
- package/dist/cli/{providers-4NVQ3FSC.js → providers-E7DPCBNX.js} +11 -11
- package/dist/cli/{providers-6HSSVI74.mjs → providers-XKU44G74.mjs} +8 -8
- package/dist/cli/{quickstart-FEQD7S4Z.js → quickstart-ICLF2F6A.js} +6 -6
- package/dist/cli/{quickstart-EHLEHSMI.mjs → quickstart-J7NVEXV5.mjs} +4 -4
- package/dist/cli/{run-GH6ECTJF.js → run-HJMHUQBN.js} +43 -43
- package/dist/cli/{run-IWVM7BD6.mjs → run-MQ5ZONGL.mjs} +25 -25
- package/dist/cli/run-identity-G257GQED.js +25 -0
- package/dist/cli/{run-identity-MNRZS2N3.mjs → run-identity-MRNCEGV2.mjs} +3 -9
- package/dist/cli/{search-X4CDMN7J.mjs → search-GGRC77CV.mjs} +10 -10
- package/dist/cli/search-V6IBJ4TX.js +33 -0
- package/dist/cli/{search-output-IIYMGZTQ.js → search-output-MXZTZI2P.js} +6 -6
- package/dist/cli/{search-output-PJ7N5WUQ.mjs → search-output-NY4GDBRU.mjs} +4 -4
- package/dist/cli/{secrets-4YPMC7XZ.mjs → secrets-FA37G4Q2.mjs} +8 -8
- package/dist/cli/{secrets-QPP2FXID.js → secrets-PFESG72B.js} +17 -17
- package/dist/cli/{sessions-BEOI47VZ.mjs → sessions-BLLXPETU.mjs} +6 -6
- package/dist/cli/sessions-DNFTQOQH.js +18 -0
- package/dist/cli/{settings-FZDONKPW.js → settings-32VPG4Z2.js} +88 -88
- package/dist/cli/{settings-VHULXNY3.mjs → settings-U26S7MPH.mjs} +15 -15
- package/dist/cli/{setup-5IV3NHGD.mjs → setup-4AXBCX7C.mjs} +10 -10
- package/dist/cli/{setup-LZ6IN5JS.js → setup-R6NSENH7.js} +50 -50
- package/dist/cli/skills-G4ZE3OS5.js +37 -0
- package/dist/cli/{skills-FZAFBW5J.mjs → skills-JUH7AVUL.mjs} +8 -8
- package/dist/cli/tools-27LHZFJD.js +57 -0
- package/dist/cli/{tools-TLBH3RFK.mjs → tools-FOYLU3FH.mjs} +19 -19
- package/dist/cli/{update-KPLIZYOV.mjs → update-FUVX22VM.mjs} +10 -10
- package/dist/cli/update-KNZ7N242.js +35 -0
- package/dist/cli/{workflow-ACHPT3DD.js → workflow-JACZW4GJ.js} +19 -19
- package/dist/cli/{workflow-GYJOYYWK.mjs → workflow-QLT22BLT.mjs} +9 -9
- package/dist/{client-CswZYCGj.d.ts → client-B-2Am2y6.d.ts} +1 -1
- package/dist/{client-CpSiHSti.d.mts → client-DA71-2_u.d.mts} +1 -1
- package/dist/{client-core-C1xVOg8Y.d.mts → client-core-BXbds1cb.d.mts} +1 -20
- package/dist/{client-core-D2pLt36Q.d.ts → client-core-C0IzDKMJ.d.ts} +1 -20
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +19 -19
- package/dist/index.mjs +8 -8
- package/dist/install-integrity.json +114 -122
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- package/dist/plays/run-request.js +3 -3
- package/dist/plays/run-request.mjs +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 +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +7 -7
- package/dist/server.mjs +5 -5
- package/package.json +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-app-transport.ts +0 -374
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-egress.ts +0 -55
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-profile.ts +0 -329
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-sandbox-credential.ts +0 -338
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-staging.ts +0 -417
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-gateway-attempt.ts +0 -81
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-gateway-staging-journal.ts +0 -708
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-gateway-staging-teardown.ts +0 -160
- package/dist/cli/auth-DF6WJLN2.js +0 -43
- package/dist/cli/describe-EAK3MPTG.js +0 -50
- package/dist/cli/git-OOCPCIGZ.js +0 -25
- package/dist/cli/run-identity-HFYABUJS.js +0 -31
- package/dist/cli/search-NIRYA3VL.js +0 -33
- package/dist/cli/sessions-5I2IFTW7.js +0 -18
- package/dist/cli/skills-WJWLFSHI.js +0 -37
- package/dist/cli/tools-SH35NRGU.js +0 -57
- package/dist/cli/update-MA46YSGR.js +0 -35
package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts
CHANGED
|
@@ -30,23 +30,6 @@ import {
|
|
|
30
30
|
import { hostname } from 'node:os';
|
|
31
31
|
import { randomUUID } from 'node:crypto';
|
|
32
32
|
import { setTimeout as sleep } from 'node:timers/promises';
|
|
33
|
-
import {
|
|
34
|
-
isRuntimeGatewayLaunchError,
|
|
35
|
-
readRuntimeGatewayLaunchPin,
|
|
36
|
-
RUNTIME_GATEWAY_PROFILE_READER_FIELD,
|
|
37
|
-
RUNTIME_GATEWAY_PROFILE_READER_REQUIRED_ERROR,
|
|
38
|
-
RUNTIME_GATEWAY_PROFILE_READER_FLAG,
|
|
39
|
-
RuntimeGatewayLaunchError,
|
|
40
|
-
} from '../runtime-gateway-profile';
|
|
41
|
-
import {
|
|
42
|
-
resolveRuntimeGatewayOidcSigningKey,
|
|
43
|
-
type RuntimeGatewayOidcSigningKey,
|
|
44
|
-
} from '../runtime-gateway-oidc';
|
|
45
|
-
import {
|
|
46
|
-
assertExecutorTokenCarriesRuntimeGatewayPin,
|
|
47
|
-
assertRuntimeGatewayAttemptStartable,
|
|
48
|
-
withRuntimeGatewayAttemptCredential,
|
|
49
|
-
} from './runtime-gateway-attempt';
|
|
50
33
|
import { createRateLimitedRuntimeLogger } from '../../observability/runtime-console';
|
|
51
34
|
import {
|
|
52
35
|
ABSURD_WAKE_CHANNEL,
|
|
@@ -346,11 +329,7 @@ import {
|
|
|
346
329
|
} from './absurd-shared';
|
|
347
330
|
import { DIRECT_COMPLETED_TERMINAL_CONTRACT } from './terminal-contract';
|
|
348
331
|
import { runnerReadiness } from './runner-push';
|
|
349
|
-
import {
|
|
350
|
-
resolveRuntimeAppTransport,
|
|
351
|
-
RuntimeAppTransportError,
|
|
352
|
-
type RuntimeAppTransport,
|
|
353
|
-
} from '../runtime-app-transport';
|
|
332
|
+
import { runtimeApiBaseUrlFromLaunch } from './runtime-api-origin';
|
|
354
333
|
import { shouldTerminalizeSandboxCapacityRejection } from '../launch-source-policy';
|
|
355
334
|
import {
|
|
356
335
|
ABSURD_CANCELLED_DEADLINE_RECONCILE_LIMIT,
|
|
@@ -875,13 +854,6 @@ export type AbsurdRuntimeWorkerDeps = {
|
|
|
875
854
|
onComputeSessionInitialized?: () => void;
|
|
876
855
|
onRuntimeTrafficPolicy?: (policy: RuntimeTrafficPolicy) => void;
|
|
877
856
|
}) => Promise<string>;
|
|
878
|
-
/**
|
|
879
|
-
* Signing key for pinned runs' sandbox OIDC credential. The production Host
|
|
880
|
-
* reads the secret env once; absent means this worker refuses pinned runs.
|
|
881
|
-
*/
|
|
882
|
-
runtimeGatewayOidcSigningKey?: () => RuntimeGatewayOidcSigningKey | null;
|
|
883
|
-
/** Wall clock for Runtime gateway pin age and credential issue time. */
|
|
884
|
-
runtimeGatewayNowMs?: () => number;
|
|
885
857
|
/** This worker's release lane id. Seam so tests can drive the belt-and-
|
|
886
858
|
* suspenders lane-mismatch guard without mutating process env. Defaults to
|
|
887
859
|
* `currentAbsurdReleaseId()`. */
|
|
@@ -988,10 +960,6 @@ function buildDefaultDeps(absurd: Absurd): AbsurdRuntimeWorkerDeps {
|
|
|
988
960
|
const configuredRuntimeBackend = normalizePlayRuntimeBackend(
|
|
989
961
|
process.env.DEEPLINE_PLAY_RUNNER_BACKEND || 'daytona',
|
|
990
962
|
);
|
|
991
|
-
const resolvedRuntimeGatewayOidcSigningKey =
|
|
992
|
-
resolveRuntimeGatewayOidcSigningKey(process.env);
|
|
993
|
-
const runtimeGatewayOidcSigningKey = () =>
|
|
994
|
-
resolvedRuntimeGatewayOidcSigningKey;
|
|
995
963
|
return {
|
|
996
964
|
...createAbsurdRuntimeTerminalProjectionDeps({
|
|
997
965
|
runWithClient: (fn, trace) =>
|
|
@@ -1005,31 +973,8 @@ function buildDefaultDeps(absurd: Absurd): AbsurdRuntimeWorkerDeps {
|
|
|
1005
973
|
runtimeSandboxPlacementPolicyId
|
|
1006
974
|
? resolveRuntimeSandboxPlacementBackend(runtimeSandboxPlacementPolicyId)
|
|
1007
975
|
: resolvePlayRunnerBackend(backendId),
|
|
1008
|
-
|
|
1009
|
-
// gateway, so this worker's own app calls for that attempt go through the
|
|
1010
|
-
// pinned receipt gateway. Unpinned launches keep the direct transport.
|
|
1011
|
-
createProgressReporter: (launch, producerAttempt) =>
|
|
1012
|
-
createPostgresSchedulerProgressReporter({
|
|
1013
|
-
launch,
|
|
1014
|
-
durableLogMode: 'direct_worker',
|
|
1015
|
-
producerAttempt,
|
|
1016
|
-
transport: resolveRuntimeAppTransport({
|
|
1017
|
-
caller: 'worker',
|
|
1018
|
-
launch,
|
|
1019
|
-
signingKey: runtimeGatewayOidcSigningKey,
|
|
1020
|
-
}),
|
|
1021
|
-
}),
|
|
1022
|
-
runtimeApiFromLaunch: (launch) =>
|
|
1023
|
-
absurdRuntimeApiFromLaunch(
|
|
1024
|
-
launch,
|
|
1025
|
-
resolveRuntimeAppTransport({
|
|
1026
|
-
caller: 'worker',
|
|
1027
|
-
launch,
|
|
1028
|
-
signingKey: runtimeGatewayOidcSigningKey,
|
|
1029
|
-
}),
|
|
1030
|
-
),
|
|
976
|
+
runtimeApiFromLaunch: absurdRuntimeApiFromLaunch,
|
|
1031
977
|
mintAttemptExecutorToken: requestAttemptExecutorToken,
|
|
1032
|
-
runtimeGatewayOidcSigningKey,
|
|
1033
978
|
deleteRuntimeSandbox: (sandboxId) =>
|
|
1034
979
|
deleteDaytonaSandboxById({
|
|
1035
980
|
sandboxId,
|
|
@@ -1170,15 +1115,7 @@ export async function requestAttemptExecutorToken(input: {
|
|
|
1170
1115
|
'DEEPLINE_INTERNAL_TOKEN is required to mint an attempt executor token.',
|
|
1171
1116
|
);
|
|
1172
1117
|
}
|
|
1173
|
-
|
|
1174
|
-
const appTransport = resolveRuntimeAppTransport({
|
|
1175
|
-
caller: 'direct',
|
|
1176
|
-
launch: input.launch,
|
|
1177
|
-
executorToken: internalToken,
|
|
1178
|
-
});
|
|
1179
|
-
const url = `${appTransport.baseUrl.replace(/\/$/, '')}${PLAY_RUNTIME_ATTEMPT_EXECUTOR_TOKEN_PATH}`;
|
|
1180
|
-
// Throws for a partial or unknown pin before any request is made.
|
|
1181
|
-
const gatewayPin = readRuntimeGatewayLaunchPin(input.launch);
|
|
1118
|
+
const url = `${runtimeApiBaseUrlFromLaunch(input.launch).replace(/\/$/, '')}${PLAY_RUNTIME_ATTEMPT_EXECUTOR_TOKEN_PATH}`;
|
|
1182
1119
|
const traceId = randomUUID();
|
|
1183
1120
|
const startedAt = performance.now();
|
|
1184
1121
|
console.info('[runtime-attempt-token.request_started]', {
|
|
@@ -1192,7 +1129,7 @@ export async function requestAttemptExecutorToken(input: {
|
|
|
1192
1129
|
let response: Response;
|
|
1193
1130
|
try {
|
|
1194
1131
|
response = await fetchWithVercelProtectionBypass({
|
|
1195
|
-
baseUrl:
|
|
1132
|
+
baseUrl: runtimeApiBaseUrlFromLaunch(input.launch),
|
|
1196
1133
|
token:
|
|
1197
1134
|
input.launch.vercelProtectionBypassToken ??
|
|
1198
1135
|
process.env.VERCEL_PROTECTION_BYPASS_TOKEN ??
|
|
@@ -1216,15 +1153,6 @@ export async function requestAttemptExecutorToken(input: {
|
|
|
1216
1153
|
...(input.initializeComputeSession
|
|
1217
1154
|
? { initializeComputeSession: true }
|
|
1218
1155
|
: {}),
|
|
1219
|
-
// Pinned launches only: this worker reads the gateway pin. The app
|
|
1220
|
-
// refuses a pinned launch without it (409), so an older worker
|
|
1221
|
-
// fails loudly instead of running on its configured gateways.
|
|
1222
|
-
...(gatewayPin
|
|
1223
|
-
? {
|
|
1224
|
-
[RUNTIME_GATEWAY_PROFILE_READER_FIELD]:
|
|
1225
|
-
RUNTIME_GATEWAY_PROFILE_READER_FLAG,
|
|
1226
|
-
}
|
|
1227
|
-
: {}),
|
|
1228
1156
|
// Expand-before-enable rollout fence. An old worker never sends this,
|
|
1229
1157
|
// so a newly deployed app cannot activate direct terminal reduction
|
|
1230
1158
|
// before the owning Fly lane has the cleanup controller.
|
|
@@ -1291,15 +1219,6 @@ export async function requestAttemptExecutorToken(input: {
|
|
|
1291
1219
|
response.headers.get('x-request-id') ??
|
|
1292
1220
|
null,
|
|
1293
1221
|
});
|
|
1294
|
-
if (
|
|
1295
|
-
response.status === 409 &&
|
|
1296
|
-
body?.error === RUNTIME_GATEWAY_PROFILE_READER_REQUIRED_ERROR
|
|
1297
|
-
) {
|
|
1298
|
-
throw new RuntimeGatewayLaunchError(
|
|
1299
|
-
RUNTIME_GATEWAY_PROFILE_READER_REQUIRED_ERROR,
|
|
1300
|
-
`The app refused an executor token for pinned run ${input.launch.runId}: the request did not advertise Runtime gateway profile support.`,
|
|
1301
|
-
);
|
|
1302
|
-
}
|
|
1303
1222
|
if (code === 'RUNTIME_SCHEDULER_CAPACITY') {
|
|
1304
1223
|
throw new AttemptExecutorTokenCapacityError(
|
|
1305
1224
|
capacitySource,
|
|
@@ -1323,9 +1242,6 @@ export async function requestAttemptExecutorToken(input: {
|
|
|
1323
1242
|
response.headers.get('x-request-id') ??
|
|
1324
1243
|
null,
|
|
1325
1244
|
});
|
|
1326
|
-
if (gatewayPin) {
|
|
1327
|
-
assertExecutorTokenCarriesRuntimeGatewayPin(body.executorToken, gatewayPin);
|
|
1328
|
-
}
|
|
1329
1245
|
if (
|
|
1330
1246
|
input.initializeComputeSession === true &&
|
|
1331
1247
|
body.computeSessionInitialized?.sessionId ===
|
|
@@ -3672,14 +3588,6 @@ async function executeAbsurdAttemptAdapter(
|
|
|
3672
3588
|
);
|
|
3673
3589
|
}
|
|
3674
3590
|
}
|
|
3675
|
-
// A pinned run starts or resumes only on a fresh pin. A live detached
|
|
3676
|
-
// runner adopted here keeps its sandbox and existing pin.
|
|
3677
|
-
if (!isDetachedRecovery) {
|
|
3678
|
-
assertRuntimeGatewayAttemptStartable(
|
|
3679
|
-
launch,
|
|
3680
|
-
deps.runtimeGatewayNowMs?.() ?? Date.now(),
|
|
3681
|
-
);
|
|
3682
|
-
}
|
|
3683
3591
|
return deps.mintAttemptExecutorToken({
|
|
3684
3592
|
launch,
|
|
3685
3593
|
attempt: generation,
|
|
@@ -3837,13 +3745,6 @@ async function executeAbsurdAttemptAdapter(
|
|
|
3837
3745
|
throw error;
|
|
3838
3746
|
}
|
|
3839
3747
|
let forceTerminalSalvage = false;
|
|
3840
|
-
let forcedTerminalReason: string | undefined;
|
|
3841
|
-
if (isRuntimeGatewayLaunchError(error)) {
|
|
3842
|
-
// Deterministic: a retry cannot repair the pin, and falling back to the
|
|
3843
|
-
// configured gateways would silently drop it.
|
|
3844
|
-
forceTerminalSalvage = true;
|
|
3845
|
-
forcedTerminalReason = error.code;
|
|
3846
|
-
}
|
|
3847
3748
|
if (error instanceof AttemptExecutorTokenUnavailableError) {
|
|
3848
3749
|
// Throws DeferTask while inside the wall-clock bound; returns only when
|
|
3849
3750
|
// the bound is exhausted and this attempt must write the terminal.
|
|
@@ -3914,7 +3815,6 @@ async function executeAbsurdAttemptAdapter(
|
|
|
3914
3815
|
error,
|
|
3915
3816
|
detachedRecovery: isDetachedRecovery,
|
|
3916
3817
|
force: forceTerminalSalvage,
|
|
3917
|
-
...(forcedTerminalReason ? { forcedTerminalReason } : {}),
|
|
3918
3818
|
});
|
|
3919
3819
|
throw error;
|
|
3920
3820
|
} finally {
|
|
@@ -4699,7 +4599,6 @@ async function executeAssignedAbsurdAttempt(input: {
|
|
|
4699
4599
|
const heartbeatSilenceMs = resolveRunnerHeartbeatSilenceMs(
|
|
4700
4600
|
launch.runtimeTestFaultHeader,
|
|
4701
4601
|
);
|
|
4702
|
-
|
|
4703
4602
|
return {
|
|
4704
4603
|
runnerConfig: {
|
|
4705
4604
|
...baseRunnerConfig,
|
|
@@ -4854,18 +4753,8 @@ async function executeAssignedAbsurdAttempt(input: {
|
|
|
4854
4753
|
});
|
|
4855
4754
|
}
|
|
4856
4755
|
}
|
|
4857
|
-
const cleanupExecutorToken = runnerConfig.context.executorToken;
|
|
4858
4756
|
const runtimeStateCleanup = releaseAbsurdAttemptRuntimeState({
|
|
4859
4757
|
config: runnerConfig,
|
|
4860
|
-
// Without an attempt token there is nothing to authenticate; a pinned
|
|
4861
|
-
// run then fails loudly in cleanupRuntimeApiContext instead.
|
|
4862
|
-
transport: cleanupExecutorToken
|
|
4863
|
-
? resolveRuntimeAppTransport({
|
|
4864
|
-
caller: 'worker',
|
|
4865
|
-
launch: { ...launch, executorToken: cleanupExecutorToken },
|
|
4866
|
-
signingKey: () => deps.runtimeGatewayOidcSigningKey?.() ?? null,
|
|
4867
|
-
})
|
|
4868
|
-
: undefined,
|
|
4869
4758
|
runId,
|
|
4870
4759
|
runAttempt: generation,
|
|
4871
4760
|
resources: attemptResources,
|
|
@@ -5053,17 +4942,6 @@ async function executeAssignedAbsurdAttempt(input: {
|
|
|
5053
4942
|
);
|
|
5054
4943
|
}
|
|
5055
4944
|
backendExecutions += 1;
|
|
5056
|
-
// Each sandbox launch of a pinned run re-checks the pin's age and gets
|
|
5057
|
-
// its own short-lived edge credential; the watchdog renews it from
|
|
5058
|
-
// there. Unpinned launches use runnerConfig unchanged.
|
|
5059
|
-
const sandboxLaunchConfig = withRuntimeGatewayAttemptCredential({
|
|
5060
|
-
config: runnerConfig,
|
|
5061
|
-
launch,
|
|
5062
|
-
runId,
|
|
5063
|
-
attempt: generation,
|
|
5064
|
-
nowMs: deps.runtimeGatewayNowMs?.() ?? Date.now(),
|
|
5065
|
-
signingKey: () => deps.runtimeGatewayOidcSigningKey?.() ?? null,
|
|
5066
|
-
});
|
|
5067
4945
|
// Read the policy while preparing durable billing state, then enforce
|
|
5068
4946
|
// it at the existing pre-create barrier. Observe both outcomes now so
|
|
5069
4947
|
// a failed read cannot become an unhandled rejection during setup.
|
|
@@ -5694,7 +5572,7 @@ async function executeAssignedAbsurdAttempt(input: {
|
|
|
5694
5572
|
const outcome = await sandboxRuns.execute({
|
|
5695
5573
|
attempt: { runId, number: generation },
|
|
5696
5574
|
authority: { fenceId: leaseToken },
|
|
5697
|
-
launch:
|
|
5575
|
+
launch: runnerConfig,
|
|
5698
5576
|
mode:
|
|
5699
5577
|
runnerConfig.checkpoint === null ||
|
|
5700
5578
|
runnerConfig.checkpoint === undefined
|
|
@@ -6004,13 +5882,6 @@ async function releaseFailedTerminalAttempt(
|
|
|
6004
5882
|
input.generation,
|
|
6005
5883
|
),
|
|
6006
5884
|
},
|
|
6007
|
-
// The primary launch token is never pinned: the owner sends a pinned
|
|
6008
|
-
// run's release to the app directly, not to a gateway that refuses it.
|
|
6009
|
-
transport: resolveRuntimeAppTransport({
|
|
6010
|
-
caller: 'worker',
|
|
6011
|
-
launch: input.launch,
|
|
6012
|
-
signingKey: () => null,
|
|
6013
|
-
}),
|
|
6014
5885
|
runId: input.runId,
|
|
6015
5886
|
runAttempt: input.generation,
|
|
6016
5887
|
resources,
|
|
@@ -6683,37 +6554,7 @@ type RuntimeCleanupApiContext = Parameters<
|
|
|
6683
6554
|
|
|
6684
6555
|
function cleanupRuntimeApiContext(
|
|
6685
6556
|
config: Pick<PlayRunnerExecutionConfig, 'context'>,
|
|
6686
|
-
transport?: RuntimeAppTransport,
|
|
6687
6557
|
): RuntimeCleanupApiContext {
|
|
6688
|
-
// A pinned run's gateway accepts only a credentialed, pinned attempt
|
|
6689
|
-
// token; the owner decides (pinned gateway with a minted credential, or the
|
|
6690
|
-
// app directly for an unpinned primary token). Unpinned runs are unchanged.
|
|
6691
|
-
if (config.context.runtimeGatewayCredentialScope) {
|
|
6692
|
-
if (!transport) {
|
|
6693
|
-
throw new RuntimeAppTransportError(
|
|
6694
|
-
`cleanup for pinned run ${config.context.runId} has no resolved app transport.`,
|
|
6695
|
-
);
|
|
6696
|
-
}
|
|
6697
|
-
const viaGateway = transport.kind === 'pinned_gateway';
|
|
6698
|
-
return {
|
|
6699
|
-
executorToken: config.context.executorToken,
|
|
6700
|
-
baseUrl: transport.baseUrl,
|
|
6701
|
-
vercelProtectionBypassToken: transport.vercelProtectionBypassToken,
|
|
6702
|
-
...(transport.fetch ? { fetch: transport.fetch } : {}),
|
|
6703
|
-
orgId: config.context.orgId,
|
|
6704
|
-
playName: config.context.playName,
|
|
6705
|
-
runId: config.context.runId,
|
|
6706
|
-
userEmail: config.context.userEmail,
|
|
6707
|
-
dbSessionStrategy: viaGateway
|
|
6708
|
-
? 'gateway_only'
|
|
6709
|
-
: config.context.dbSessionStrategy,
|
|
6710
|
-
preloadedDbSessions: viaGateway
|
|
6711
|
-
? undefined
|
|
6712
|
-
: config.context.preloadedDbSessions,
|
|
6713
|
-
postgresSessionUnwrapKey:
|
|
6714
|
-
config.context.postgresSessionUnwrapKey ?? config.context.executorToken,
|
|
6715
|
-
};
|
|
6716
|
-
}
|
|
6717
6558
|
const gatewayBaseUrl = config.context.receiptGatewayBaseUrl?.trim();
|
|
6718
6559
|
return {
|
|
6719
6560
|
executorToken: config.context.executorToken,
|
|
@@ -6757,8 +6598,6 @@ type RuntimeSheetAttemptResource = {
|
|
|
6757
6598
|
*/
|
|
6758
6599
|
async function releaseRuntimeSheetAttemptResources(input: {
|
|
6759
6600
|
config: Pick<PlayRunnerExecutionConfig, 'context'>;
|
|
6760
|
-
/** Required for a pinned run (`cleanupRuntimeApiContext`). */
|
|
6761
|
-
transport?: RuntimeAppTransport;
|
|
6762
6601
|
runId: string;
|
|
6763
6602
|
runAttempt: number;
|
|
6764
6603
|
resources: readonly unknown[];
|
|
@@ -6766,7 +6605,7 @@ async function releaseRuntimeSheetAttemptResources(input: {
|
|
|
6766
6605
|
const orgId = input.config.context.orgId;
|
|
6767
6606
|
const playName = input.config.context.playName;
|
|
6768
6607
|
if (!orgId || !playName) return 0;
|
|
6769
|
-
const context = cleanupRuntimeApiContext(input.config
|
|
6608
|
+
const context = cleanupRuntimeApiContext(input.config);
|
|
6770
6609
|
const sheetResults = await Promise.allSettled(
|
|
6771
6610
|
runtimeSheetAttemptResources(input.resources).map(
|
|
6772
6611
|
async (resource) =>
|
|
@@ -6866,8 +6705,6 @@ function runtimeSheetAttemptResources(
|
|
|
6866
6705
|
|
|
6867
6706
|
async function releaseAbsurdAttemptRuntimeState(input: {
|
|
6868
6707
|
config: PlayRunnerExecutionConfig;
|
|
6869
|
-
/** Required for a pinned run (`cleanupRuntimeApiContext`). */
|
|
6870
|
-
transport?: RuntimeAppTransport;
|
|
6871
6708
|
runId: string;
|
|
6872
6709
|
runAttempt: number;
|
|
6873
6710
|
/** THIS generation's recorded resources — sheet/receipt lease release stays
|
|
@@ -6934,7 +6771,7 @@ async function releaseAbsurdAttemptRuntimeState(input: {
|
|
|
6934
6771
|
const orgId = input.config.context.orgId;
|
|
6935
6772
|
const playName = input.config.context.playName;
|
|
6936
6773
|
if (!orgId || !playName) return;
|
|
6937
|
-
const context = cleanupRuntimeApiContext(input.config
|
|
6774
|
+
const context = cleanupRuntimeApiContext(input.config);
|
|
6938
6775
|
try {
|
|
6939
6776
|
const [receiptRelease, sheetRelease] = await Promise.allSettled([
|
|
6940
6777
|
releaseRuntimeWorkReceipts(context, {
|
|
@@ -7075,28 +6912,6 @@ async function deferAbsurdAttemptForExecutorTokenOutage(input: {
|
|
|
7075
6912
|
);
|
|
7076
6913
|
}
|
|
7077
6914
|
|
|
7078
|
-
/**
|
|
7079
|
-
* The terminal message a customer sees. A worker that cannot sign the gateway
|
|
7080
|
-
* credential names its secret and the pinned deployment; those stay in the
|
|
7081
|
-
* worker log and the customer reads only that the profile is unavailable.
|
|
7082
|
-
*/
|
|
7083
|
-
export function customerSafeSalvageMessage(
|
|
7084
|
-
runId: string,
|
|
7085
|
-
error: unknown,
|
|
7086
|
-
): string {
|
|
7087
|
-
if (
|
|
7088
|
-
isRuntimeGatewayLaunchError(error) &&
|
|
7089
|
-
error.code === 'runtime_gateway_oidc_unavailable'
|
|
7090
|
-
) {
|
|
7091
|
-
console.error('[absurd-runtime.worker] runtime_gateway_oidc_unavailable', {
|
|
7092
|
-
runId,
|
|
7093
|
-
error: error.message,
|
|
7094
|
-
});
|
|
7095
|
-
return 'The requested Runtime gateway profile is unavailable, so this run cannot start. Run without a gateway profile or retry later.';
|
|
7096
|
-
}
|
|
7097
|
-
return runErrorMessage(error);
|
|
7098
|
-
}
|
|
7099
|
-
|
|
7100
6915
|
/**
|
|
7101
6916
|
* Final-attempt terminal salvage. When the LAST engine attempt of a play-run
|
|
7102
6917
|
* task dies with an unexpected error (Daytona/app-runtime/DB throw — NOT a park
|
|
@@ -7127,9 +6942,6 @@ async function salvageAbsurdFinalAttemptTerminal(input: {
|
|
|
7127
6942
|
/** A wall-clock bound, not the engine attempt count, requires the terminal
|
|
7128
6943
|
* now (executor-token outage past its bound). */
|
|
7129
6944
|
force?: boolean;
|
|
7130
|
-
/** Named deterministic failure that forces the terminal (e.g. an expired
|
|
7131
|
-
* Runtime gateway pin). Absent keeps the executor-token outage wording. */
|
|
7132
|
-
forcedTerminalReason?: string;
|
|
7133
6945
|
}): Promise<void> {
|
|
7134
6946
|
const attempt = input.ctx.attempt;
|
|
7135
6947
|
const maxAttempts = input.ctx.maxAttempts;
|
|
@@ -7148,15 +6960,13 @@ async function salvageAbsurdFinalAttemptTerminal(input: {
|
|
|
7148
6960
|
);
|
|
7149
6961
|
}
|
|
7150
6962
|
if (!input.force && attempt < maxAttempts) return;
|
|
7151
|
-
const message =
|
|
6963
|
+
const message = runErrorMessage(input.error);
|
|
7152
6964
|
const failedResult: PlayRunnerResult = {
|
|
7153
6965
|
status: 'failed',
|
|
7154
6966
|
error:
|
|
7155
|
-
input.force &&
|
|
7156
|
-
? `absurd play-run task
|
|
7157
|
-
:
|
|
7158
|
-
? `absurd play-run task exhausted its executor-token outage bound on engine attempt ${attempt}/${maxAttempts}: ${message}`
|
|
7159
|
-
: `absurd play-run task failed on its final engine attempt (${attempt}/${maxAttempts}): ${message}`,
|
|
6967
|
+
input.force && attempt < maxAttempts
|
|
6968
|
+
? `absurd play-run task exhausted its executor-token outage bound on engine attempt ${attempt}/${maxAttempts}: ${message}`
|
|
6969
|
+
: `absurd play-run task failed on its final engine attempt (${attempt}/${maxAttempts}): ${message}`,
|
|
7160
6970
|
logs: [],
|
|
7161
6971
|
stats: {},
|
|
7162
6972
|
steps: [],
|
|
@@ -9246,13 +9056,8 @@ async function processPostgresSchedulerComputeBillingJob(input: {
|
|
|
9246
9056
|
schedulerSchema: input.schedulerOptions.schema ?? null,
|
|
9247
9057
|
tokenIssuerOrigin: input.tokenIssuerOrigin,
|
|
9248
9058
|
});
|
|
9249
|
-
// A compute-billing dispatch token is never pinned to a gateway.
|
|
9250
9059
|
const runtimeApi = {
|
|
9251
|
-
baseUrl:
|
|
9252
|
-
caller: 'direct',
|
|
9253
|
-
launch,
|
|
9254
|
-
executorToken,
|
|
9255
|
-
}).baseUrl,
|
|
9060
|
+
baseUrl: runtimeApiBaseUrlFromLaunch(launch),
|
|
9256
9061
|
executorToken,
|
|
9257
9062
|
vercelProtectionBypassToken: launch.vercelProtectionBypassToken ?? null,
|
|
9258
9063
|
};
|
|
@@ -34,11 +34,7 @@ import {
|
|
|
34
34
|
withRuntimeSchedulerClient,
|
|
35
35
|
type RuntimeSchedulerPoolOptions,
|
|
36
36
|
} from './postgres-pool';
|
|
37
|
-
import {
|
|
38
|
-
resolveRuntimeAppTransport,
|
|
39
|
-
runtimeAppTransportContextFields,
|
|
40
|
-
type RuntimeAppTransport,
|
|
41
|
-
} from '../runtime-app-transport';
|
|
37
|
+
import { runtimeApiBaseUrlFromLaunch } from './runtime-api-origin';
|
|
42
38
|
import {
|
|
43
39
|
ABSURD_DEV_RELEASE_PREFIX,
|
|
44
40
|
ABSURD_PROD_DEFAULT_SCHEMA,
|
|
@@ -662,26 +658,16 @@ export function absurdRunnerTerminalEventName(
|
|
|
662
658
|
return `runner-terminal:${runId}:${runnerAttempt}`;
|
|
663
659
|
}
|
|
664
660
|
|
|
665
|
-
/**
|
|
666
|
-
* Build the worker→app runtime API context (ledger + billing callbacks) on
|
|
667
|
-
* a transport from `resolveRuntimeAppTransport`. Absent, the launch's direct
|
|
668
|
-
* transport, which refuses a gateway-pinned token loudly.
|
|
669
|
-
*/
|
|
661
|
+
/** Build the worker→app runtime API context (ledger + billing callbacks). */
|
|
670
662
|
export function absurdRuntimeApiFromLaunch(
|
|
671
663
|
launch: PlaySchedulerSubmitInput,
|
|
672
|
-
transport: RuntimeAppTransport = resolveRuntimeAppTransport({
|
|
673
|
-
caller: 'direct',
|
|
674
|
-
launch,
|
|
675
|
-
executorToken: launch.executorToken,
|
|
676
|
-
}),
|
|
677
664
|
): WorkerRuntimeApiContext {
|
|
678
665
|
return {
|
|
679
|
-
baseUrl:
|
|
666
|
+
baseUrl: runtimeApiBaseUrlFromLaunch(launch),
|
|
680
667
|
executorToken: launch.executorToken,
|
|
681
668
|
integrationMode: launch.integrationMode ?? null,
|
|
682
669
|
vercelProtectionBypassToken: launch.vercelProtectionBypassToken ?? null,
|
|
683
670
|
runtimeTestFaultHeader: launch.runtimeTestFaultHeader ?? null,
|
|
684
|
-
...runtimeAppTransportContextFields(transport),
|
|
685
671
|
};
|
|
686
672
|
}
|
|
687
673
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { RuntimeAppTransport } from '../runtime-app-transport';
|
|
2
1
|
import type { PlaySchedulerSubmitInput } from '../scheduler-backend';
|
|
3
2
|
import type { PlayRunnerResult } from '../protocol';
|
|
4
3
|
import {
|
|
@@ -111,11 +110,6 @@ export async function projectGatewayRunnerTerminalProgress(input: {
|
|
|
111
110
|
}
|
|
112
111
|
|
|
113
112
|
export function createGatewayProgressRegistry(options?: {
|
|
114
|
-
/** The gateway's app transport for a launch (`resolveRuntimeAppTransport`,
|
|
115
|
-
* caller `in_gateway`); absent is the launch's direct transport. */
|
|
116
|
-
appTransportForLaunch?: (
|
|
117
|
-
launch: PlaySchedulerSubmitInput,
|
|
118
|
-
) => RuntimeAppTransport;
|
|
119
113
|
createReporter?: (
|
|
120
114
|
launch: PlaySchedulerSubmitInput,
|
|
121
115
|
attempt: number,
|
|
@@ -139,9 +133,6 @@ export function createGatewayProgressRegistry(options?: {
|
|
|
139
133
|
isCurrentAttempt,
|
|
140
134
|
attemptAlreadyVerified,
|
|
141
135
|
initialLiveLogTotalCount,
|
|
142
|
-
...(options?.appTransportForLaunch
|
|
143
|
-
? { transport: options.appTransportForLaunch(launch) }
|
|
144
|
-
: {}),
|
|
145
136
|
}));
|
|
146
137
|
|
|
147
138
|
return {
|
package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts
CHANGED
|
@@ -55,11 +55,7 @@ import {
|
|
|
55
55
|
} from '../step-progress';
|
|
56
56
|
import type { PlayConditionCounts } from '../cell-provenance';
|
|
57
57
|
import { readRuntimeSheetRowOutcomeCounts } from '../runtime-api';
|
|
58
|
-
import {
|
|
59
|
-
resolveRuntimeAppTransport,
|
|
60
|
-
runtimeAppTransportContextFields,
|
|
61
|
-
type RuntimeAppTransport,
|
|
62
|
-
} from '../runtime-app-transport';
|
|
58
|
+
import { runtimeApiBaseUrlFromLaunch } from './runtime-api-origin';
|
|
63
59
|
|
|
64
60
|
// Patterns mirrored from runner events — they parse
|
|
65
61
|
// the same Node play-runner log stream.
|
|
@@ -442,9 +438,6 @@ export function createPostgresSchedulerProgressReporter(input: {
|
|
|
442
438
|
* folded terminal patch for a durable scheduler outbox instead of posting
|
|
443
439
|
* it synchronously. */
|
|
444
440
|
publishStatusUpdate?: (update: RuntimeStatusUpdate) => Promise<void>;
|
|
445
|
-
/** The caller's app transport (`resolveRuntimeAppTransport`); absent is
|
|
446
|
-
* the direct transport of the launch, refused for a pinned token. */
|
|
447
|
-
transport?: RuntimeAppTransport;
|
|
448
441
|
}): PostgresSchedulerProgressReporter {
|
|
449
442
|
const launch = input.launch;
|
|
450
443
|
const durableLogMode = input.durableLogMode ?? 'progress_reporter';
|
|
@@ -460,18 +453,10 @@ export function createPostgresSchedulerProgressReporter(input: {
|
|
|
460
453
|
};
|
|
461
454
|
const orderedNodes = buildOrderedNodeList(launch.contractSnapshot);
|
|
462
455
|
const mapNodeLookup = buildMapNodeLookup(launch.contractSnapshot);
|
|
463
|
-
const transport =
|
|
464
|
-
input.transport ??
|
|
465
|
-
resolveRuntimeAppTransport({
|
|
466
|
-
caller: 'direct',
|
|
467
|
-
launch,
|
|
468
|
-
executorToken: launch.executorToken,
|
|
469
|
-
});
|
|
470
456
|
const runtimeApi = {
|
|
471
|
-
baseUrl:
|
|
457
|
+
baseUrl: runtimeApiBaseUrlFromLaunch(launch),
|
|
472
458
|
executorToken: launch.executorToken,
|
|
473
459
|
vercelProtectionBypassToken: launch.vercelProtectionBypassToken ?? null,
|
|
474
|
-
...runtimeAppTransportContextFields(transport),
|
|
475
460
|
};
|
|
476
461
|
const publishStatusUpdate =
|
|
477
462
|
input.publishStatusUpdate ??
|
|
@@ -1925,7 +1910,6 @@ export const createDirectWorkerProgressReporter = (input: {
|
|
|
1925
1910
|
attemptAlreadyVerified?: boolean;
|
|
1926
1911
|
initialLiveLogTotalCount?: number;
|
|
1927
1912
|
publishStatusUpdate?: (update: RuntimeStatusUpdate) => Promise<void>;
|
|
1928
|
-
runtimeApiFetch?: typeof fetch;
|
|
1929
1913
|
}) =>
|
|
1930
1914
|
createPostgresSchedulerProgressReporter({
|
|
1931
1915
|
...input,
|