@outerlayer/cli 0.38.0-next.20261112002049 → 0.38.0-next.20261112031950
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/README.md +7 -0
- package/dist/{build-SD44TP2B.js → build-FNUOBMFG.js} +1 -1
- package/dist/build-info.json +1 -1
- package/dist/{check-JNQVYVHI.js → check-QKTZCHTH.js} +8 -8
- package/dist/{chunk-Q7J4T2VP.js → chunk-5AVYYNGU.js} +21 -1
- package/dist/{chunk-VRDHLSR2.js → chunk-5UVZANCN.js} +4 -4
- package/dist/{chunk-ZU6LNR3G.js → chunk-BHVOEE6K.js} +1 -1
- package/dist/{chunk-5OSY3LK3.js → chunk-DNXYI22V.js} +1 -1
- package/dist/{chunk-OTWTUHWY.js → chunk-E6XXWCOV.js} +115 -18
- package/dist/{chunk-VV445Q2R.js → chunk-FKHOZQGJ.js} +1 -1
- package/dist/{chunk-T4FSZ7LA.js → chunk-HPZWRS7Y.js} +2 -2
- package/dist/{chunk-3VWX5BYV.js → chunk-KLB7FZHW.js} +2 -2
- package/dist/{chunk-OYRAQXRQ.js → chunk-LSU3LXDM.js} +1 -1
- package/dist/{chunk-ZUUA6ZGD.js → chunk-PSV7IEH7.js} +60 -9
- package/dist/{chunk-VBSKVGWP.js → chunk-SFN7K33S.js} +1 -1
- package/dist/{chunk-C4R6LMPQ.js → chunk-ZJCE7JLT.js} +2 -2
- package/dist/{cli-2FFCAE62.js → cli-DSX6UY26.js} +59 -59
- package/dist/{command-ASXZLHXU.js → command-UDRCQY6T.js} +5 -5
- package/dist/{container-start-6FHPPHMU.js → container-start-LRXMZ7Q2.js} +6 -6
- package/dist/{doctor-FATFZWEA.js → doctor-BO57MWS3.js} +6 -6
- package/dist/{governing-source-C7MY7KB2.js → governing-source-R64FW4CP.js} +2 -2
- package/dist/{host-checks-CZGNR4VC.js → host-checks-IHBEPDZD.js} +4 -4
- package/dist/index.js +1 -1
- package/dist/{init-WDYDTJW2.js → init-FARHFILK.js} +4 -4
- package/dist/{init-5S6A2SYN.js → init-P4YCFNYS.js} +4 -4
- package/dist/{init-agent-PJFH7OFD.js → init-agent-5AX7Z5HT.js} +4 -4
- package/dist/{init-cmd-5SCU7AVL.js → init-cmd-PQNHAYTZ.js} +2 -2
- package/dist/{init-update-6EJKXKFH.js → init-update-G5MKJ7RO.js} +4 -3
- package/dist/{loop-Q76PDO7L.js → loop-TXSXFPOL.js} +8 -8
- package/dist/{machine-GI6SZMEK.js → machine-2BVZ7ODY.js} +4 -4
- package/dist/{run-cmd-M5THCWDD.js → run-cmd-U3MPDIT5.js} +1 -1
- package/dist/{runner-key-ZXNXWBSP.js → runner-key-HIU5DEO3.js} +4 -4
- package/dist/{spec-cmd-4EB45ELL.js → spec-cmd-DHCZHM2L.js} +1 -1
- package/dist/{status-R4JD34DO.js → status-6KEIF6SP.js} +4 -4
- package/dist/{update-steps-CGWJJ2IA.js → update-steps-Q44PC2KG.js} +5 -5
- package/dist/{work-claim-cmd-4KQYRNRC.js → work-claim-cmd-QDNRGX2N.js} +2 -2
- package/dist/{work-cmd-GNYWSA2O.js → work-cmd-3BDBBKGG.js} +1 -1
- package/dist/{work-comment-cmd-7D3DHQ3O.js → work-comment-cmd-2HI4FP5R.js} +2 -2
- package/dist/{work-demo-cmd-PDILNMRF.js → work-demo-cmd-RXV5DRM3.js} +1 -1
- package/dist/{work-logs-cmd-ER3AYV62.js → work-logs-cmd-Q7YA3AHY.js} +1 -1
- package/dist/{work-needs-attention-cmd-MAFPEANV.js → work-needs-attention-cmd-WAWSJIHS.js} +1 -1
- package/dist/{work-no-change-cmd-GDN5EE6N.js → work-no-change-cmd-NTXYEPEW.js} +1 -1
- package/dist/{work-open-pr-cmd-56TRIE5I.js → work-open-pr-cmd-GFIMFDAR.js} +1 -1
- package/dist/{work-proofs-cmd-Y2OMM37N.js → work-proofs-cmd-GQM2NMNM.js} +2 -2
- package/dist/{work-proofs-record-I2VLOMRD.js → work-proofs-record-FFUD3Q36.js} +3 -3
- package/dist/{work-stop-cmd-PREZOSNY.js → work-stop-cmd-UGFPCTRT.js} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -378,6 +378,13 @@ content:
|
|
|
378
378
|
request closes, or after `runner.housekeeping.workspaceKeepDays`, which is
|
|
379
379
|
one day on a runner with these hooks. It never ends a sandbox that a job
|
|
380
380
|
runs in.
|
|
381
|
+
Before a build, the runner fetches the devcontainer file of the control
|
|
382
|
+
plane that governs it, or of the repository itself, into its own
|
|
383
|
+
directory, with the claim's read token. It builds no image from the file.
|
|
384
|
+
A runner that starts again after a crash adopts each build whose sandbox
|
|
385
|
+
still runs. It asks the provider for the sandbox again, reads the join
|
|
386
|
+
secret back from the sandbox through the data plane, starts a new tunnel
|
|
387
|
+
and opens a new WebSocket to the relay.
|
|
381
388
|
When a build ends, the runner reads the build's agent session out of the
|
|
382
389
|
sandbox through the data plane, as base64 text, and keeps it on its own
|
|
383
390
|
host. It puts the kept session into the sandbox of the work item's next
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
export { KEY_PREFIX, SHARED_NAME, SHARED_OWNER, SHARED_REPOSITORY, TAG_HOST, UNIVERSAL_SOURCE_LABEL, baseLines, buildRepositoryImage, metadataFromLabels, prepareImageBuild, universalBase, writeRecord } from './chunk-
|
|
3
|
+
export { KEY_PREFIX, SHARED_NAME, SHARED_OWNER, SHARED_REPOSITORY, TAG_HOST, UNIVERSAL_SOURCE_LABEL, baseLines, buildRepositoryImage, metadataFromLabels, prepareImageBuild, readRepositoryRecipe, universalBase, writeRecord } from './chunk-5AVYYNGU.js';
|
|
4
4
|
import './chunk-NO4N4D32.js';
|
|
5
5
|
import './chunk-NDQC2WUJ.js';
|
|
6
6
|
import './chunk-JBJTC3UU.js';
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"2026-11-
|
|
1
|
+
{"id":"2026-11-12T03:26:29.096Z","root":"/home/runner/work/outerlayer/outerlayer","pkg":"outerlayer"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { probeCredentials } from './chunk-
|
|
3
|
+
import { probeCredentials } from './chunk-PSV7IEH7.js';
|
|
4
4
|
import './chunk-3JVYMD4G.js';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-HPZWRS7Y.js';
|
|
6
6
|
import './chunk-E7R2GIAW.js';
|
|
7
7
|
import './chunk-6X2BSMRM.js';
|
|
8
8
|
import './chunk-WFYKTAXZ.js';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-FKHOZQGJ.js';
|
|
10
10
|
import './chunk-2UCTMANO.js';
|
|
11
|
-
import { fleetConfigProblem, managedProblems, managedFactsOf, askFleetMachine } from './chunk-
|
|
11
|
+
import { fleetConfigProblem, managedProblems, managedFactsOf, askFleetMachine } from './chunk-ZJCE7JLT.js';
|
|
12
12
|
import './chunk-POBH5YCG.js';
|
|
13
13
|
import { findServiceUnit } from './chunk-OAPWDSBW.js';
|
|
14
|
-
import { placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, HELPER_ENV, helperSocketPath, probeHelper, needsAgentCredential, agentCredentialCheck, claimPermissionProblem, formerSkillQueues, modellessQueues, formerSkillProblem, modellessProblem } from './chunk-
|
|
14
|
+
import { placeholderQueues, placeholderProblem, permissionModeProblems, permissionModeProblem, HELPER_ENV, helperSocketPath, probeHelper, needsAgentCredential, agentCredentialCheck, claimPermissionProblem, formerSkillQueues, modellessQueues, formerSkillProblem, modellessProblem } from './chunk-E6XXWCOV.js';
|
|
15
15
|
import './chunk-722KABMV.js';
|
|
16
16
|
import './chunk-KVWFAAAQ.js';
|
|
17
17
|
import './chunk-2PGI6RDE.js';
|
|
@@ -30,15 +30,15 @@ import './chunk-UXARYJQ4.js';
|
|
|
30
30
|
import './chunk-TQMI335S.js';
|
|
31
31
|
import './chunk-RCK2MJRG.js';
|
|
32
32
|
import './chunk-NN33FYXG.js';
|
|
33
|
-
import './chunk-
|
|
33
|
+
import './chunk-5AVYYNGU.js';
|
|
34
34
|
import './chunk-NO4N4D32.js';
|
|
35
35
|
import './chunk-NDQC2WUJ.js';
|
|
36
36
|
import './chunk-JBJTC3UU.js';
|
|
37
37
|
import './chunk-OGFGZQA3.js';
|
|
38
38
|
import './chunk-BBRXFXBB.js';
|
|
39
39
|
import './chunk-NRDFBOKE.js';
|
|
40
|
-
import './chunk-
|
|
41
|
-
import './chunk-
|
|
40
|
+
import './chunk-SFN7K33S.js';
|
|
41
|
+
import './chunk-DNXYI22V.js';
|
|
42
42
|
import './chunk-2VJVPP5Y.js';
|
|
43
43
|
import './chunk-5UFAWMET.js';
|
|
44
44
|
import { loadRunnerConfig, RunnerConfigError, checkHooks, keyRunnerFactory } from './chunk-EUHUIIGT.js';
|
|
@@ -370,6 +370,26 @@ async function prepareImageBuild(opts) {
|
|
|
370
370
|
throw err;
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
+
var recipeReads = /* @__PURE__ */ new Map();
|
|
374
|
+
async function readRepositoryRecipe(opts) {
|
|
375
|
+
const { full: repository, owner, name } = splitRepository(opts.repository);
|
|
376
|
+
const cacheDir = repoCacheDir(opts.configPath, owner, name, opts.organizationId);
|
|
377
|
+
const read = async () => {
|
|
378
|
+
const remote = opts.remote ?? `https://github.com/${owner}/${name}.git`;
|
|
379
|
+
const checkout = opts.pinned === void 0 ? await fetchDefaultBranch({ remote, dir: cacheDir, token: opts.readToken, repository }) : await fetchPinnedCommit({ remote, dir: cacheDir, token: opts.readToken, repository, ...opts.pinned });
|
|
380
|
+
const location = locateRecipe(checkout.dir);
|
|
381
|
+
const recipe = readRecipe(checkout.dir, location);
|
|
382
|
+
return {
|
|
383
|
+
sourceCommit: checkout.commit,
|
|
384
|
+
path: location.kind === "default" ? "default" : location.path,
|
|
385
|
+
key: recipeKey(checkout.dir, location, UNIVERSAL_IMAGE),
|
|
386
|
+
classification: classifyProperties(recipe, [])
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
const next = (recipeReads.get(cacheDir) ?? Promise.resolve()).catch(() => void 0).then(read);
|
|
390
|
+
recipeReads.set(cacheDir, next);
|
|
391
|
+
return next;
|
|
392
|
+
}
|
|
373
393
|
async function buildRepositoryImage(opts, ports) {
|
|
374
394
|
const { host } = ports;
|
|
375
395
|
const now = opts.now ?? (() => /* @__PURE__ */ new Date());
|
|
@@ -525,4 +545,4 @@ async function prune(host, repository, repoRecords, keep, runnerDirPath, runnerL
|
|
|
525
545
|
return removed;
|
|
526
546
|
}
|
|
527
547
|
|
|
528
|
-
export { KEY_PREFIX, SHARED_NAME, SHARED_OWNER, SHARED_REPOSITORY, TAG_HOST, UNIVERSAL_SOURCE_LABEL, baseLines, buildRepositoryImage, diffBetween, fetchCommit, metadataFromLabels, prepareImageBuild, readBranchHead, readDefaultBranchFiles, readDefaultBranchHead, universalBase, writeRecord };
|
|
548
|
+
export { KEY_PREFIX, SHARED_NAME, SHARED_OWNER, SHARED_REPOSITORY, TAG_HOST, UNIVERSAL_SOURCE_LABEL, baseLines, buildRepositoryImage, diffBetween, fetchCommit, metadataFromLabels, prepareImageBuild, readBranchHead, readDefaultBranchFiles, readDefaultBranchHead, readRepositoryRecipe, universalBase, writeRecord };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { criteriaOf, loadCitationFinder, testFileMatcher, hostItemsOf, runnerMatcher, NO_VERDICT_REASON } from './chunk-722KABMV.js';
|
|
4
|
-
import { WorkCommandError, resolveCredentials, getJson } from './chunk-
|
|
4
|
+
import { WorkCommandError, resolveCredentials, getJson } from './chunk-DNXYI22V.js';
|
|
5
5
|
import { sanitizeTerminal } from './chunk-26BFN6DH.js';
|
|
6
6
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
7
7
|
import { defaultFetch } from './chunk-PCGU6T7J.js';
|
|
@@ -129,14 +129,14 @@ function governingDir(cwd) {
|
|
|
129
129
|
async function testProofMode(cwd) {
|
|
130
130
|
const dir = governingDir(cwd);
|
|
131
131
|
if (dir === void 0) return "any";
|
|
132
|
-
const { testProofIn } = await import('./host-checks-
|
|
132
|
+
const { testProofIn } = await import('./host-checks-IHBEPDZD.js');
|
|
133
133
|
return testProofIn(dir);
|
|
134
134
|
}
|
|
135
135
|
async function judgeCheckName(cwd) {
|
|
136
136
|
const dir = governingDir(cwd);
|
|
137
137
|
if (dir === void 0) return {};
|
|
138
138
|
if (!existsSync(dir)) return { note: `the governed context at ${dir} is not readable` };
|
|
139
|
-
const { checksIn, isJudgeCheck } = await import('./host-checks-
|
|
139
|
+
const { checksIn, isJudgeCheck } = await import('./host-checks-IHBEPDZD.js');
|
|
140
140
|
const quiet = { line: () => void 0, error: () => void 0 };
|
|
141
141
|
const check = checksIn(dir, quiet, "").checks.find((c) => isJudgeCheck(c) && c.judge.subjects === "criteria");
|
|
142
142
|
return check === void 0 ? {} : { name: check.name };
|
|
@@ -372,7 +372,7 @@ async function runWorkProofs(opts) {
|
|
|
372
372
|
async function runWorkProofsCommand(opts) {
|
|
373
373
|
try {
|
|
374
374
|
if (opts.record || opts.check) {
|
|
375
|
-
const { runWorkProofsRecord } = await import('./work-proofs-record-
|
|
375
|
+
const { runWorkProofsRecord } = await import('./work-proofs-record-FFUD3Q36.js');
|
|
376
376
|
const result2 = await runWorkProofsRecord(opts);
|
|
377
377
|
process.exitCode = result2.exitCode;
|
|
378
378
|
return;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { helperSocketPath } from './chunk-
|
|
3
|
+
import { helperSocketPath } from './chunk-E6XXWCOV.js';
|
|
4
4
|
import { UNIT_MARKER } from './chunk-WG5OBUIZ.js';
|
|
5
5
|
import { runnerDir } from './chunk-JIANCWJ3.js';
|
|
6
6
|
import { createHash } from 'crypto';
|
|
@@ -294,7 +294,7 @@ async function getJson(url, path, apiKey, appId, fetchImpl, signer, limits) {
|
|
|
294
294
|
...ends.length === 0 ? {} : { signal: AbortSignal.any(ends) }
|
|
295
295
|
});
|
|
296
296
|
} catch (err) {
|
|
297
|
-
throw new WorkCommandError(`network error reaching ${endpoint}: ${String(err)}
|
|
297
|
+
throw new WorkCommandError(`network error reaching ${endpoint}: ${String(err)}`, true);
|
|
298
298
|
}
|
|
299
299
|
if (response.status === 401) {
|
|
300
300
|
throw await signatureRefusalOf(response) ?? new WorkCommandError(
|
|
@@ -14,25 +14,25 @@ import { readsJobState, READ_JOB_STATE_FORMATS, jobStateFormatOf } from './chunk
|
|
|
14
14
|
import { runnerImageVersion } from './chunk-UXARYJQ4.js';
|
|
15
15
|
import { claimCalls, spoolHomeFor, itemCalls, claimItem, leftByRunnerKey, configForJob } from './chunk-RCK2MJRG.js';
|
|
16
16
|
import { receiveFiles } from './chunk-NN33FYXG.js';
|
|
17
|
-
import { readDefaultBranchFiles, readDefaultBranchHead, buildRepositoryImage, fetchCommit, readBranchHead, diffBetween, prepareImageBuild, KEY_PREFIX, TAG_HOST, SHARED_OWNER, SHARED_NAME, universalBase, metadataFromLabels, writeRecord } from './chunk-
|
|
17
|
+
import { readDefaultBranchFiles, readDefaultBranchHead, buildRepositoryImage, readRepositoryRecipe, fetchCommit, readBranchHead, diffBetween, prepareImageBuild, KEY_PREFIX, TAG_HOST, SHARED_OWNER, SHARED_NAME, universalBase, metadataFromLabels, writeRecord } from './chunk-5AVYYNGU.js';
|
|
18
18
|
import { FETCHED_DIR, toolsDockerfile, FETCHED_FFMPEG, FETCHED_GH, FETCHED_TINI, FETCHED_HEADLESS_SHELL, FETCHED_PLAYWRIGHT_FFMPEG, FETCHED_VOICE_DIR } from './chunk-NO4N4D32.js';
|
|
19
19
|
import { isSameProcess, startTimeOf } from './chunk-JBJTC3UU.js';
|
|
20
20
|
import { currentCliBuild } from './chunk-OGFGZQA3.js';
|
|
21
21
|
import { vmExecArgs, runExec, execCapture, waitForAgent } from './chunk-BBRXFXBB.js';
|
|
22
22
|
import { socketPathProblem, vsockLinks, linkVsockSockets, GUEST_CID, LEASE_LINK } from './chunk-NRDFBOKE.js';
|
|
23
|
-
import { describeCallFailure, shortClaim, retrySend, commandWithShim, logStamp, createRunnerLog, formatDuration, removeKeptContext, formatClock, stageGovernedContext, keptContextTree, removeStagedContext, WORKFLOW_PERMISSION_REASON, refusalCode, SELF_GOVERNED, resolveGoverningSource, prefetchGovernedContext, controlPlaneTokenFailure, keepStagedContext, pinnedSourceOf, shimScript } from './chunk-
|
|
24
|
-
import { postJson, WorkCommandError, isSignatureRefusal, getJson } from './chunk-
|
|
25
|
-
import { isBuiltinContainer, isBuiltinVm, isBuiltinSandbox, keyRunnerFactory, runnerCredentialProblem, builtinKind, optionalEgress, egressSummary, DEFAULT_WORKSPACE_KEEP_DAYS, readOnlyRemoteOf, DEFAULT_CHECK_TIME_LIMIT_MINUTES, DEFAULT_SETUP_MINUTES, allowHostProblem, systemClock, emptyEgressCounts, hostAllowed, sandboxSizeOf,
|
|
23
|
+
import { describeCallFailure, shortClaim, retrySend, commandWithShim, logStamp, createRunnerLog, formatDuration, removeKeptContext, formatClock, stageGovernedContext, keptContextTree, removeStagedContext, WORKFLOW_PERMISSION_REASON, refusalCode, SELF_GOVERNED, resolveGoverningSource, prefetchGovernedContext, controlPlaneTokenFailure, keepStagedContext, pinnedSourceOf, shimScript } from './chunk-SFN7K33S.js';
|
|
24
|
+
import { postJson, WorkCommandError, isSignatureRefusal, getJson } from './chunk-DNXYI22V.js';
|
|
25
|
+
import { isBuiltinContainer, isBuiltinVm, isBuiltinSandbox, keyRunnerFactory, runnerCredentialProblem, builtinKind, readOnlyOption, optionalEgress, egressSummary, DEFAULT_WORKSPACE_KEEP_DAYS, readOnlyRemoteOf, DEFAULT_CHECK_TIME_LIMIT_MINUTES, DEFAULT_SETUP_MINUTES, allowHostProblem, systemClock, emptyEgressCounts, hostAllowed, sandboxSizeOf, sandboxTimeLimitMinutes, networkOf, imageBuildOf, DEFAULT_SAVED_STATE_MAX_BYTES } from './chunk-EUHUIIGT.js';
|
|
26
26
|
import { formatBytes, volumeBytes, allocatedBytes, DEFAULT_BUILD_DISK, DEFAULT_CACHE_DISK, freeBytes } from './chunk-3C23ZPWR.js';
|
|
27
|
-
import { firstLine, writeJobFile, readJobFile, spawnRun, RUNNER_LABEL, BUILD_LABEL,
|
|
27
|
+
import { said, firstLine, writeJobFile, readJobFile, spawnRun, RUNNER_LABEL, BUILD_LABEL, NETWORK_HELPER_MEMORY, createDockerHost, builderSpec, childEnvironment, containerExecArgs, readDu, withAnswerProtocol, JUDGE_TREE, MAX_REPORT_BYTES, runnerLabelValue, parseSize, readJobFileChecked, NETWORK_READY_FILE, networkHelperName, prepareRunArgs, containerRunArgs, judgeCommand, JUDGE_DIR, WORKSPACE_LABEL, homeCopyRunArgs, networkHelperRunArgs, JUDGE_MAX_TURNS, JUDGE_ITEMS, answerFileName, hashJudgeProgram, identityScript, identityArgs, parseIdentity, mountableHome, homeCopyScript, homeCopyArgs, COMMAND_DIR, judgeProgramRecord, MAX_ITEMS_BYTES, JUDGE_REPORT, identityRunArgs, SAVED_STATE_LABEL } from './chunk-ERG3WCEC.js';
|
|
28
28
|
import { universalImagePending, RecipeError, writeSanitizedRecipe, classifyProperties, DOCKER_FEATURE } from './chunk-FUZEOWF4.js';
|
|
29
29
|
import { sanitizeTerminal, planArtifactUpload } from './chunk-26BFN6DH.js';
|
|
30
30
|
import { sharedSkillNames, skillConflictMessage } from './chunk-I62FX622.js';
|
|
31
31
|
import { readCloudConfig } from './chunk-HWVMRETT.js';
|
|
32
32
|
import { signerFor } from './chunk-I5U6CFH4.js';
|
|
33
33
|
import { vmAssetsDir, RUNNER_DIR_MODE, RUNNER_FILE_MODE, runnerDir, workspacesDir, jobsDir, storeScopes, spoolDir, orgStoreIn, rootfsDir, imagesDir, sessionsDir, builderCacheDiskPath, buildsDir, buildDir, ghConfigDir, runnerDirOfBuild, mirrorDir, orgHomeDir, jobConsolePath, vsockPath, builderConsolePath, rootfsPathFor, diskTemplatesDir, deliveryDir, SHIM_DIR } from './chunk-JIANCWJ3.js';
|
|
34
|
-
import { BUILD_HOME, SandboxError, JOB_MOUNT, heldBuildAuthority, IMAGE_BUNDLES, writeTrustFiles, buildEnvironment, trustEnvironment, CHECKOUT_DIR, parseIsolation, containerLocalAddress, destinationEnvironment, withHooksPath, startBuildServices, headerVariables, authorEnvironment, sharedUserEnvironment, withTunnelRecord, commitIdentityRecord,
|
|
35
|
-
import { agentCredential, RUNNER_WORDED_REASONS, UNKNOWN_TRACKING_REASON, UNKNOWN_TRANSPORT_REASON, RELAY_USER, currentAgentCredential, removedAgentCredentialValues, managedAgentCredential, realFdStorePort,
|
|
34
|
+
import { BUILD_HOME, repositoriesOf, SandboxError, JOB_MOUNT, heldBuildAuthority, IMAGE_BUNDLES, writeTrustFiles, buildEnvironment, trustEnvironment, CHECKOUT_DIR, parseIsolation, containerLocalAddress, destinationEnvironment, withHooksPath, startBuildServices, headerVariables, authorEnvironment, sharedUserEnvironment, withTunnelRecord, commitIdentityRecord, RELAY_PORT, repositoryPath, lifecycleWorkdir, CHECK_ITEMS_FILE, parseProxied, readBundleScript, applyTrust, STAND_IN, proxyEnvironment, describeSandboxError, dropBuildAuthority, sandboxSettingsFrom, createSandboxClient, hostKeyOf, buildAuthorityFor, checkEnvironment, withMiseVariables, checkoutPath, primaryOf, variablesFor, carried6to4, classifyAddress, EVAL_INPUT_DIR, isMiseVariableAllowed, variableForPath, droppedRequestHeaders, hasDotDotSegment, routeNameOf, toolProxyEnvironment } from './chunk-4FHDVWKO.js';
|
|
35
|
+
import { agentCredential, RUNNER_WORDED_REASONS, UNKNOWN_TRACKING_REASON, UNKNOWN_TRANSPORT_REASON, RELAY_USER, builtInNames, currentAgentCredential, removedAgentCredentialValues, managedAgentCredential, realFdStorePort, MAX_MALFORMED_SESSIONS, MALFORMED_REASON, JOIN_WAIT_MS, MAX_OPEN_STREAMS, STREAM_RESET_RATE, STREAM_RESET_BURST, STREAM_WINDOW, SESSION_WINDOW, targetOfPath, AGENT_CREDENTIAL_MISSING, fdName, RELAY_ID, DOCKER_DESKTOP_REASON } from './chunk-EJ7ZXBXS.js';
|
|
36
36
|
import { versionAtLeast } from './chunk-SF2TBJBP.js';
|
|
37
37
|
import { jobAgent, firecrackerArch, MICROVM_ARCHES, FIRECRACKER_VERSION, hostHelperPinned, builderDiskPinned, guestAssetsPinned, runnerAgentNamed, credentialForms, orList, credentialShapes, agentCommands, defaultCommandLine, credentialAgent, GUEST_HELPER_SHA256, GUEST_ASSETS_BASE_URL, GUEST_KERNEL_SHA256, JAILER_BINARY_SHA256, FIRECRACKER_BINARY_SHA256, FIRECRACKER_SHA256, GUEST_ASSETS_VERSION, BUILDER_DISK_VERSION, credentialHandOffKey, strippedVariables, runnerAgents, judgeAgent, networkHelperPinned, NETWORK_HELPER_SHA256, universalImagePinned, UNIVERSAL_IMAGE, FFMPEG_STATIC, FFMPEG_BUILD_TAG, GH_SHA256, GH_VERSION, TINI_SHA256, TINI_VERSION, HEADLESS_SHELL, HEADLESS_SHELL_BASE_URL, PLAYWRIGHT_FFMPEG, PLAYWRIGHT_FFMPEG_BASE_URL, VOICE_PACK_FILES, BUILDER_DISK_SHA256, BUILDER_DISK_BASE_URL, DEFAULT_BASE_IMAGE, agentVersionOf } from './chunk-J6KKJGR7.js';
|
|
38
38
|
import { sessionFolderIn, legacyAgent, defaultAgents, parsePolicy, AGENTS_SKILLS_BASE, OUTERLAYER_SKILLS_BASE, orderSessions, extractFacts, sessionsToTimeline, resolvePackRoot } from './chunk-QYLBGMTA.js';
|
|
@@ -44,7 +44,7 @@ import { CheckItemsSchema, CODE_REVIEW_NAME, JUDGE_NOT_RUN_ITEM_ID, REVIEWED_COM
|
|
|
44
44
|
import { randomUUID, randomBytes, createHash } from 'crypto';
|
|
45
45
|
import { rmSync, mkdirSync, existsSync, readFileSync, mkdtempSync, statSync, appendFileSync, writeFileSync, readdirSync, accessSync, constants, openSync, closeSync, renameSync, rmdirSync, createReadStream, lstatSync, unlinkSync, chmodSync, realpathSync, writeSync, truncateSync, cpSync, fstatSync, readSync, createWriteStream, copyFileSync, linkSync } from 'fs';
|
|
46
46
|
import { join, dirname, isAbsolute, delimiter, basename, sep, relative, resolve } from 'path';
|
|
47
|
-
import { Readable, PassThrough, Duplex, Transform
|
|
47
|
+
import { Readable, PassThrough, Writable, Duplex, Transform } from 'stream';
|
|
48
48
|
import { spawn, spawnSync } from 'child_process';
|
|
49
49
|
import { createServer, createConnection, connect, isIP } from 'net';
|
|
50
50
|
import { availableParallelism, networkInterfaces, tmpdir } from 'os';
|
|
@@ -4310,6 +4310,37 @@ async function cleanupSandbox(runtime, state, keepDisk) {
|
|
|
4310
4310
|
if (failures.length > 0) throw new Error(failures.join("; "));
|
|
4311
4311
|
return kept;
|
|
4312
4312
|
}
|
|
4313
|
+
var UNAPPLIED_IN_SANDBOX = ["image", "build", "features"];
|
|
4314
|
+
function ignoredInSandbox(recipe, docker2) {
|
|
4315
|
+
const { classification } = recipe;
|
|
4316
|
+
const ignored = classification.ignored.map(({ property, source }) => ({ property, source }));
|
|
4317
|
+
for (const property of UNAPPLIED_IN_SANDBOX) if (classification.honoured.includes(property)) ignored.push({ property, source: "file" });
|
|
4318
|
+
if (classification.docker && !docker2) ignored.push({ property: "docker daemon", source: `feature ${DOCKER_FEATURE}` });
|
|
4319
|
+
return ignored;
|
|
4320
|
+
}
|
|
4321
|
+
async function readSandboxRecipe(input) {
|
|
4322
|
+
const { tokens, repository } = input;
|
|
4323
|
+
const governed = input.governingSource.kind === "governed" ? input.governingSource : void 0;
|
|
4324
|
+
const recipeRepository = governed?.repository ?? repository;
|
|
4325
|
+
let readToken;
|
|
4326
|
+
try {
|
|
4327
|
+
readToken = governed === void 0 ? await tokens.token("read") : await controlPlaneReadToken(tokens, recipeRepository);
|
|
4328
|
+
} catch (err) {
|
|
4329
|
+
return { ok: false, reason: governed === void 0 ? `the build's read token could not be had: ${refusalCode(err)}` : controlPlaneTokenFailure(err, repository) };
|
|
4330
|
+
}
|
|
4331
|
+
try {
|
|
4332
|
+
const recipe = await input.runtime.readRecipe({
|
|
4333
|
+
repository: recipeRepository,
|
|
4334
|
+
configPath: input.config.configPath,
|
|
4335
|
+
...input.organizationId === void 0 ? {} : { organizationId: input.organizationId },
|
|
4336
|
+
readToken,
|
|
4337
|
+
...governed === void 0 ? {} : { pinned: { commit: governed.sha, ref: governed.ref } }
|
|
4338
|
+
});
|
|
4339
|
+
return { ok: true, recipe, repository: recipeRepository };
|
|
4340
|
+
} catch (err) {
|
|
4341
|
+
return { ok: false, reason: err instanceof RecipeError ? err.message : `the devcontainer file of ${recipeRepository} could not be read: ${describeCallFailure(err)}` };
|
|
4342
|
+
}
|
|
4343
|
+
}
|
|
4313
4344
|
async function provisionSandbox(input) {
|
|
4314
4345
|
const tag = itemTag({ item: input.item.number, organizationId: input.organizationId, claimId: input.claimId });
|
|
4315
4346
|
return provisionWithFreshFallback({
|
|
@@ -4352,6 +4383,15 @@ async function provisionSandboxOnce(input, itemDiskFailed) {
|
|
|
4352
4383
|
});
|
|
4353
4384
|
if (unfetched !== void 0) return fail(unfetched);
|
|
4354
4385
|
}
|
|
4386
|
+
const read = await readSandboxRecipe({ runtime, config, tokens, repository, governingSource, organizationId: input.organizationId });
|
|
4387
|
+
if (!read.ok) return fail(read.reason);
|
|
4388
|
+
const recipe = read.recipe;
|
|
4389
|
+
const recipeRepository = read.repository;
|
|
4390
|
+
const apply = recipe.classification.apply;
|
|
4391
|
+
const ignoredProperties = ignoredInSandbox(recipe, own.docker === true);
|
|
4392
|
+
if (ignoredProperties.length > 0) {
|
|
4393
|
+
log.line(`${tag} not applied from ${recipe.path} of ${recipeRepository}: ${ignoredProperties.map(({ property }) => property).join(", ")} \xB7 a sandbox build runs the image runner.sandbox.image names`);
|
|
4394
|
+
}
|
|
4355
4395
|
const diskKey = { imageId: diskImageOf(own, sized.size), diskBytes: sized.size.diskGib * GIB2 };
|
|
4356
4396
|
const itemDisk = input.workItemId === void 0 ? { state: void 0 } : itemDiskFailed !== void 0 ? { state: { restored: false, reason: itemDiskFailed } } : itemDiskDecision({ fresh: input.fresh, heldElsewhere: input.diskHeldElsewhere, builtin: true, backend: "sandbox", configPath: config.configPath, organizationId: input.organizationId, workItemId: input.workItemId, repository, ...diskKey });
|
|
4357
4397
|
const keptDisk = itemDisk.kept;
|
|
@@ -4370,7 +4410,9 @@ async function provisionSandboxOnce(input, itemDiskFailed) {
|
|
|
4370
4410
|
buildDir: buildDir2,
|
|
4371
4411
|
repository,
|
|
4372
4412
|
imageId: image,
|
|
4413
|
+
containerEnv: apply.containerEnv,
|
|
4373
4414
|
builtIns: true,
|
|
4415
|
+
lifecycle: apply.lifecycle,
|
|
4374
4416
|
...governingSource.kind === "governed" ? { governing: { repository: governingSource.repository, ref: governingSource.ref, commit: governingSource.sha } } : {},
|
|
4375
4417
|
transport: "exec",
|
|
4376
4418
|
jobFiles: "copied"
|
|
@@ -4387,7 +4429,7 @@ async function provisionSandboxOnce(input, itemDiskFailed) {
|
|
|
4387
4429
|
hostEnv: runtime.hostEnv,
|
|
4388
4430
|
agents: runtime.agents,
|
|
4389
4431
|
...input.job === void 0 ? {} : { job: input.job },
|
|
4390
|
-
containerEnv:
|
|
4432
|
+
containerEnv: apply.containerEnv,
|
|
4391
4433
|
builtIns: true
|
|
4392
4434
|
});
|
|
4393
4435
|
if (env.skippedTokenVariables.length > 0) {
|
|
@@ -4395,7 +4437,9 @@ async function provisionSandboxOnce(input, itemDiskFailed) {
|
|
|
4395
4437
|
}
|
|
4396
4438
|
const environment = {
|
|
4397
4439
|
isolation: "vm",
|
|
4440
|
+
recipe: { sourceCommit: recipe.sourceCommit, key: recipe.key, path: recipe.path },
|
|
4398
4441
|
imageId: image,
|
|
4442
|
+
ignoredProperties,
|
|
4399
4443
|
variables: env.variables,
|
|
4400
4444
|
cliVersion: input.cliVersion
|
|
4401
4445
|
};
|
|
@@ -4532,7 +4576,7 @@ async function provisionSandboxOnce(input, itemDiskFailed) {
|
|
|
4532
4576
|
if (group.exitCode !== 0 || !/^\d+$/.test(dockerGroup)) return bail(`reading the group of the Docker socket in the sandbox failed (exit ${group.exitCode ?? "none"})${said(group.stderr)}`);
|
|
4533
4577
|
}
|
|
4534
4578
|
const imageConfig = await host.imageConfig(image);
|
|
4535
|
-
const resolved = await resolveBuildUser(sandboxed, runInput, { imageUser: imageConfig.user }, logPath);
|
|
4579
|
+
const resolved = await resolveBuildUser(sandboxed, runInput, { remoteUser: apply.remoteUser, imageUser: imageConfig.user }, logPath);
|
|
4536
4580
|
if (!resolved.ok) return bail(resolved.reason);
|
|
4537
4581
|
containerState.agentUser = resolved.user;
|
|
4538
4582
|
if (resolved.home !== void 0) containerState.home = resolved.home;
|
|
@@ -4572,7 +4616,7 @@ async function provisionSandboxOnce(input, itemDiskFailed) {
|
|
|
4572
4616
|
agentVersion,
|
|
4573
4617
|
agents: runtime.agents,
|
|
4574
4618
|
...input.job === void 0 ? {} : { job: input.job },
|
|
4575
|
-
lifecycle:
|
|
4619
|
+
lifecycle: apply.lifecycle,
|
|
4576
4620
|
exec: stepExec,
|
|
4577
4621
|
log,
|
|
4578
4622
|
tag,
|
|
@@ -4612,6 +4656,39 @@ async function provisionSandboxOnce(input, itemDiskFailed) {
|
|
|
4612
4656
|
function asContainerJob(job) {
|
|
4613
4657
|
return { ...job, container: job.sandbox.container };
|
|
4614
4658
|
}
|
|
4659
|
+
var READ_SECRET_LINE = `sudo cat ${SECRET_FILE} | base64 | tr -d '\\n'`;
|
|
4660
|
+
async function rejoinSandboxBuild(input) {
|
|
4661
|
+
const { runtime, own, log } = input;
|
|
4662
|
+
const state = own.container;
|
|
4663
|
+
const sandbox = await sandboxOfBuild(runtime, own);
|
|
4664
|
+
if (sandbox === void 0) return "gone";
|
|
4665
|
+
const sandboxed = runtimeInSandbox(runtime, sandbox);
|
|
4666
|
+
const where = await sandboxed.host.state(state.container);
|
|
4667
|
+
if (where === "stopped" || where === "missing") return where;
|
|
4668
|
+
if (runtime.tunnels.has(state.buildId)) return "joined";
|
|
4669
|
+
const read = await client(runtime).command(sandbox, READ_SECRET_LINE);
|
|
4670
|
+
const joinSecret = Buffer.from(read.stdout, "base64");
|
|
4671
|
+
if (read.exitCode !== 0 || joinSecret.length === 0) throw new Error(`the build's join secret could not be read from its sandbox (exit ${read.exitCode ?? "none"})${said(read.stderr)}`);
|
|
4672
|
+
const repositories = repositoriesOf({ repositories: input.repositories, repository: state.repository, branch: input.branch });
|
|
4673
|
+
const gitRemote = gitRemoteFor(runtime, { repositories, tokens: input.tokens, buildDir: state.buildDir, log, ...readOnlyOption(input.queue) });
|
|
4674
|
+
const lease = leaseFor(runtime, state.buildId, input.leaseExpiryMs);
|
|
4675
|
+
const services = await startServicesFor(runtime, input.config, state.buildDir, input.jobDir, input.itemKey, true, gitRemote, "stream", lease, void 0, log);
|
|
4676
|
+
runtime.tunnels.set(state.buildId, services);
|
|
4677
|
+
runtime.sandbox.joinSecrets.set(state.buildId, joinSecret);
|
|
4678
|
+
joinRelay(runtime, sandbox, { buildId: state.buildId, container: state.container }, services.streams, joinSecret, log);
|
|
4679
|
+
try {
|
|
4680
|
+
await input.tokens.token("read");
|
|
4681
|
+
keepGhConfigCurrent(input.tokens, state.buildDir, (err) => input.warn(`the read token could not be written for gh: ${describeCallFailure(err)}`), {
|
|
4682
|
+
runtime: sandboxed,
|
|
4683
|
+
state,
|
|
4684
|
+
secrets: secretsOf(runtime, input.jobDir),
|
|
4685
|
+
onFailure: (reason) => input.warn(reason)
|
|
4686
|
+
});
|
|
4687
|
+
} catch (err) {
|
|
4688
|
+
input.warn(`could not give the adopted build a read token: ${describeCallFailure(err)}`);
|
|
4689
|
+
}
|
|
4690
|
+
return "joined";
|
|
4691
|
+
}
|
|
4615
4692
|
async function leaveRelay(runtime, buildId) {
|
|
4616
4693
|
runtime.leases.get(buildId)?.stop();
|
|
4617
4694
|
const relay = runtime.relays.get(buildId);
|
|
@@ -8567,8 +8644,24 @@ async function runJudge(input) {
|
|
|
8567
8644
|
if (repository === void 0) return;
|
|
8568
8645
|
const repo = repository;
|
|
8569
8646
|
const remoteOf = () => runtime.remoteFor?.(repo) ?? `${runtime.github.gitUrl}/${repo}.git`;
|
|
8647
|
+
const readItemWithRetry = async () => {
|
|
8648
|
+
let lastError;
|
|
8649
|
+
const read = await retrySend(
|
|
8650
|
+
async () => {
|
|
8651
|
+
try {
|
|
8652
|
+
return await readWorkItem(itemCalls(config, job), job.item, deps.fetchImpl);
|
|
8653
|
+
} catch (err) {
|
|
8654
|
+
lastError = err;
|
|
8655
|
+
throw err;
|
|
8656
|
+
}
|
|
8657
|
+
},
|
|
8658
|
+
{ now: deps.now }
|
|
8659
|
+
);
|
|
8660
|
+
if (read.ok) return read.value;
|
|
8661
|
+
throw lastError;
|
|
8662
|
+
};
|
|
8570
8663
|
let itemRead;
|
|
8571
|
-
const readItem = () => itemRead ??=
|
|
8664
|
+
const readItem = () => itemRead ??= readItemWithRetry().catch((err) => {
|
|
8572
8665
|
itemRead = void 0;
|
|
8573
8666
|
throw err;
|
|
8574
8667
|
});
|
|
@@ -10134,7 +10227,10 @@ function isIsolatedJob(job) {
|
|
|
10134
10227
|
return job.container !== void 0 || job.microvm !== void 0 || job.sandbox !== void 0;
|
|
10135
10228
|
}
|
|
10136
10229
|
function trackingOf(job) {
|
|
10137
|
-
return job.container?.tracking ?? job.microvm?.tracking;
|
|
10230
|
+
return job.container?.tracking ?? job.microvm?.tracking ?? job.sandbox?.tracking;
|
|
10231
|
+
}
|
|
10232
|
+
function isAdoptedTracking(tracking) {
|
|
10233
|
+
return tracking === "container" || tracking === "microvm" || tracking === "sandbox";
|
|
10138
10234
|
}
|
|
10139
10235
|
function isReadable(job) {
|
|
10140
10236
|
return readsJobState(job, READ_JOB_STATE_FORMATS);
|
|
@@ -10147,8 +10243,8 @@ function listTrackedJobs(jobsDirPath) {
|
|
|
10147
10243
|
if (!isReadable(job)) return [];
|
|
10148
10244
|
const tracking = trackingOf(job);
|
|
10149
10245
|
if (tracking === void 0) return [];
|
|
10150
|
-
if ((tracking
|
|
10151
|
-
return [{ dirPath, job, known: tracking
|
|
10246
|
+
if (isAdoptedTracking(tracking) && inTeardown(job)) return [];
|
|
10247
|
+
return [{ dirPath, job, known: isAdoptedTracking(tracking) }];
|
|
10152
10248
|
});
|
|
10153
10249
|
}
|
|
10154
10250
|
function listAdoptableJobs(jobsDirPath) {
|
|
@@ -10172,11 +10268,11 @@ async function recoverLostJobs(jobsDirPath, config, deps) {
|
|
|
10172
10268
|
continue;
|
|
10173
10269
|
}
|
|
10174
10270
|
const tracking = trackingOf(job);
|
|
10175
|
-
if (tracking !== void 0 && tracking
|
|
10271
|
+
if (tracking !== void 0 && !isAdoptedTracking(tracking)) {
|
|
10176
10272
|
recovered.push(await finishJob(job, dirPath, "interrupted", config, deps, { reason: UNKNOWN_TRACKING_REASON }));
|
|
10177
10273
|
continue;
|
|
10178
10274
|
}
|
|
10179
|
-
if ((tracking
|
|
10275
|
+
if (isAdoptedTracking(tracking) && !inTeardown(job)) continue;
|
|
10180
10276
|
const alive = job.pid !== void 0 && job.start !== void 0 && isSameProcess(job.pid, job.start);
|
|
10181
10277
|
if (alive) continue;
|
|
10182
10278
|
const recorded = outcomeFromExitCode(dirPath);
|
|
@@ -12134,6 +12230,7 @@ function createContainerRuntime(opts = {}) {
|
|
|
12134
12230
|
relays: opts.relays ?? /* @__PURE__ */ new Map(),
|
|
12135
12231
|
relayFatal: opts.relayFatal ?? /* @__PURE__ */ new Map(),
|
|
12136
12232
|
leases: opts.leases ?? /* @__PURE__ */ new Map(),
|
|
12233
|
+
readRecipe: opts.readRecipe ?? ((read) => readRepositoryRecipe({ ...read, remote: remoteFor?.(read.repository) })),
|
|
12137
12234
|
buildImage: opts.buildImage ?? ((build) => buildRepositoryImage(
|
|
12138
12235
|
{
|
|
12139
12236
|
repository: build.repository,
|
|
@@ -13713,4 +13810,4 @@ async function runHostChecks(input) {
|
|
|
13713
13810
|
}
|
|
13714
13811
|
}
|
|
13715
13812
|
|
|
13716
|
-
export { ADOPTED_FETCH_RETRY_WINDOW_MS, ALREADY_RELEASED, AttemptLogBook, CRITERIA_CHECK, EXIT_CODE_FILE, GUEST_USAGE_INTERVAL_MS, HELPER_ENV, KIND_LABEL, LEASE_SECONDS, MAX_CHECK_ITEMS_BYTES, MICROVM_COMMAND_DIR, MIN_ENGINE_MAJOR, PLACEHOLDER_MARKER, RENEW_INTERVAL_SECONDS, RunnerInitError, SandboxGoneError, agentCredentialCheck, appendCommandLog, attemptNote, builtOf, checksIn, claimPermissionProblem, claimRun, commandItems, commandLogOffset, containerCommandExec, createContainerRuntime, createHousekeepingDocker, createLeaseChannel, currentSkillCommand, decideHostBuildSkill, deliverCommitHooks, deliverContainerHooks, deliverExecMaven, deliverJobFiles, deliverSandboxHooks, describeHookEnd, describeMachineDocker, detectMachine, ensureFirecrackerAndJailer, ensureNetworkReady, ensureTunnel, execArgv, execCommandLine, fetchManagedBuildSettings, fetchManagedClaudeKey, filesAreCopied, finishJob, foldSample, formerSkillProblem, formerSkillQueues, freeItemDisksUntil, gitRemoteFor, helperFirecrackerNote, helperSocketPath, holdManagedBuildSettings, holdManagedClaudeKey, hookLimitsFor, hostCommandEnvironment, hostEnvironment, housekeepingDockerIfReachable, inSandbox, inTeardown, installTrust, isContainerTracked, isGroupAlive, isIdle, isIsolatedJob, isJudgeCheck, isMicroVmTracked, isPlaceholderCommand, isReadable, isSandboxTracked, isTimedOut, isTracked, isUnfinished, itemScope, itemTag, jobEnv, jobRecordsClaim, judgeProbe, keepGhConfigCurrent, keptCommitsLine, keptSandboxIds, leaseExpiresAtMs, leaseTimeLeftMs, lifecycleFailureReason, lifecycleSteps, listAdoptableJobs, listItemDisks, listTrackedJobs, listUnreadableJobs, listenOnBroker, makeRecorder, managedBuildSettingsFor, measureDisk, microVmArchSupported, microVmAssetsPinned, microVmCommandLine, microVmOomKills, missingPermissionFix, missingPermissionOf, modellessProblem, modellessQueues, needsAgentCredential, needsBuildSkill, needsRenew, outcomeFromExitCode, parseCpuList, permissionModeProblem, permissionModeProblems, placeholderProblem, placeholderQueues, prepareBranch, prepareResume, prepareRunnerInit, probeCommand, probeHelper, probeMicroVmCommand, probeSandboxCommand, provisionContainer, provisionEnvironment, provisionMicroVm, provisionSandbox, reachDockerStep, readConfigObject, readCpuUsec, readDefinitions, readProvisionOut, readRecords, recordsProofsOnly, recoverLostJobs, releaseLease, removeOldestUntil, renewLease, renewRun, resolveHostBuild, restartSender, restoreSessionIntoContainer, restoreSessionIntoMicroVm, restoreSessionIntoSandbox, retryFailedReleases, runCommand, runCommandOf, runHook, runHostChecks, runHousekeeping, runIsolation, runRunnerInit, runWithSpawn, sampleGuest, savedStatesDir, scrubReason, serveLease, setStage, setUpRunnerCgroup, shellQuote, startHostServices, startMicroVmCommand, startSandboxCommand, startSender, startServicesFor, stopOrphanedMicroVms, stoppedHelperReason, stripTerminalControls, supportsContainerBuilds, supportsMicroVmBuilds, sweepImageBuilders, sweepSandboxes, testProofIn, timeoutAfter, unfinishedJobs, usableCpus, vmAlive, withTunnelLog, workdirProblem, writeGuestGhConfig, writeRunnerInit };
|
|
13813
|
+
export { ADOPTED_FETCH_RETRY_WINDOW_MS, ALREADY_RELEASED, AttemptLogBook, CRITERIA_CHECK, EXIT_CODE_FILE, GUEST_USAGE_INTERVAL_MS, HELPER_ENV, KIND_LABEL, LEASE_SECONDS, MAX_CHECK_ITEMS_BYTES, MICROVM_COMMAND_DIR, MIN_ENGINE_MAJOR, PLACEHOLDER_MARKER, RENEW_INTERVAL_SECONDS, RunnerInitError, SandboxGoneError, agentCredentialCheck, appendCommandLog, attemptNote, builtOf, checksIn, claimPermissionProblem, claimRun, commandItems, commandLogOffset, containerCommandExec, createContainerRuntime, createHousekeepingDocker, createLeaseChannel, currentSkillCommand, decideHostBuildSkill, deliverCommitHooks, deliverContainerHooks, deliverExecMaven, deliverJobFiles, deliverSandboxHooks, describeHookEnd, describeMachineDocker, detectMachine, ensureFirecrackerAndJailer, ensureNetworkReady, ensureTunnel, execArgv, execCommandLine, fetchManagedBuildSettings, fetchManagedClaudeKey, filesAreCopied, finishJob, foldSample, formerSkillProblem, formerSkillQueues, freeItemDisksUntil, gitRemoteFor, helperFirecrackerNote, helperSocketPath, holdManagedBuildSettings, holdManagedClaudeKey, hookLimitsFor, hostCommandEnvironment, hostEnvironment, housekeepingDockerIfReachable, inSandbox, inTeardown, installTrust, isContainerTracked, isGroupAlive, isIdle, isIsolatedJob, isJudgeCheck, isMicroVmTracked, isPlaceholderCommand, isReadable, isSandboxTracked, isTimedOut, isTracked, isUnfinished, itemScope, itemTag, jobEnv, jobRecordsClaim, judgeProbe, keepGhConfigCurrent, keptCommitsLine, keptSandboxIds, leaseExpiresAtMs, leaseTimeLeftMs, lifecycleFailureReason, lifecycleSteps, listAdoptableJobs, listItemDisks, listTrackedJobs, listUnreadableJobs, listenOnBroker, makeRecorder, managedBuildSettingsFor, measureDisk, microVmArchSupported, microVmAssetsPinned, microVmCommandLine, microVmOomKills, missingPermissionFix, missingPermissionOf, modellessProblem, modellessQueues, needsAgentCredential, needsBuildSkill, needsRenew, outcomeFromExitCode, parseCpuList, permissionModeProblem, permissionModeProblems, placeholderProblem, placeholderQueues, prepareBranch, prepareResume, prepareRunnerInit, probeCommand, probeHelper, probeMicroVmCommand, probeSandboxCommand, provisionContainer, provisionEnvironment, provisionMicroVm, provisionSandbox, reachDockerStep, readConfigObject, readCpuUsec, readDefinitions, readProvisionOut, readRecords, recordsProofsOnly, recoverLostJobs, rejoinSandboxBuild, releaseLease, removeOldestUntil, renewLease, renewRun, resolveHostBuild, restartSender, restoreSessionIntoContainer, restoreSessionIntoMicroVm, restoreSessionIntoSandbox, retryFailedReleases, runCommand, runCommandOf, runHook, runHostChecks, runHousekeeping, runIsolation, runRunnerInit, runWithSpawn, sampleGuest, savedStatesDir, scrubReason, serveLease, setStage, setUpRunnerCgroup, shellQuote, startHostServices, startMicroVmCommand, startSandboxCommand, startSender, startServicesFor, stopOrphanedMicroVms, stoppedHelperReason, stripTerminalControls, supportsContainerBuilds, supportsMicroVmBuilds, sweepImageBuilders, sweepSandboxes, testProofIn, timeoutAfter, unfinishedJobs, usableCpus, vmAlive, withTunnelLog, workdirProblem, writeGuestGhConfig, writeRunnerInit };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { stripTerminalControls } from './chunk-
|
|
3
|
+
import { stripTerminalControls } from './chunk-E6XXWCOV.js';
|
|
4
4
|
import { tagToPull, imageTag, pullInstruction, readUpdateStatus, runnerImageVersion } from './chunk-UXARYJQ4.js';
|
|
5
5
|
import { readFileSync } from 'fs';
|
|
6
6
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { scrubReason, stripTerminalControls } from './chunk-
|
|
3
|
+
import { scrubReason, stripTerminalControls } from './chunk-E6XXWCOV.js';
|
|
4
4
|
import { checkFit, RUNNER_RESERVE_BYTES } from './chunk-WG5OBUIZ.js';
|
|
5
5
|
import { RunnerAlreadyRunningError, readPidFile } from './chunk-NDQC2WUJ.js';
|
|
6
6
|
import { isSameProcess } from './chunk-JBJTC3UU.js';
|
|
7
|
-
import { isSignatureRefusal, postJson } from './chunk-
|
|
7
|
+
import { isSignatureRefusal, postJson } from './chunk-DNXYI22V.js';
|
|
8
8
|
import { keyRunnerFactory } from './chunk-EUHUIIGT.js';
|
|
9
9
|
import { signerFor } from './chunk-I5U6CFH4.js';
|
|
10
10
|
import { pidFilePath } from './chunk-JIANCWJ3.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { checkStarterFiles, contextIsGoverned } from './chunk-4T2NBVC4.js';
|
|
4
|
-
import { resolveCredentials, getJson, WorkCommandError } from './chunk-
|
|
4
|
+
import { resolveCredentials, getJson, WorkCommandError } from './chunk-DNXYI22V.js';
|
|
5
5
|
import { fleetCheck, checkBuildSkill, checkSpecSkill, checkMachineSkills, checkCommittedMaintainedSkills, checkMaintainedReferences, checkIgnoredSkillFolders } from './chunk-SFSE6YDX.js';
|
|
6
6
|
import { withInjectedPrograms } from './chunk-RUX4M4AX.js';
|
|
7
7
|
import { isLinkedRepository } from './chunk-Z42UKOZ6.js';
|
|
@@ -1081,7 +1081,7 @@ async function gatherDoctorChecks(options = {}) {
|
|
|
1081
1081
|
const { runnerVmCheck } = await import('./doctor-53F2PYY7.js');
|
|
1082
1082
|
checks.push(runnerVmCheck(configPath, { lima: realLima(), home: homeFromEnv(), instance: runnerVm.instance }));
|
|
1083
1083
|
} else if (hasRunnerBlock(configPath)) {
|
|
1084
|
-
const { runnerHostChecks } = await import('./doctor-
|
|
1084
|
+
const { runnerHostChecks } = await import('./doctor-BO57MWS3.js');
|
|
1085
1085
|
const gateway = (() => {
|
|
1086
1086
|
try {
|
|
1087
1087
|
const loaded = loadRunnerConfig(configPath);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
|
-
import { resolveCredentials, postBytes, RateLimitedError, postJson, getJson, getBytes } from './chunk-
|
|
3
|
+
import { resolveCredentials, postBytes, RateLimitedError, postJson, getJson, getBytes } from './chunk-DNXYI22V.js';
|
|
4
4
|
import { detectActiveSession } from './chunk-2VJVPP5Y.js';
|
|
5
5
|
import { sanitizeTerminal } from './chunk-26BFN6DH.js';
|
|
6
6
|
import { C } from './chunk-2AM6Z5BP.js';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { decideInstalledSwitch } from './chunk-3JVYMD4G.js';
|
|
4
|
-
import { reportFailedStart, fitImageBuildMemory } from './chunk-
|
|
4
|
+
import { reportFailedStart, fitImageBuildMemory } from './chunk-HPZWRS7Y.js';
|
|
5
5
|
import { fetchVersionMeta, npmVersion, npmSupportsProvenance, fetchTarballDigest, fetchProvenance, installVersion, auditSignatures } from './chunk-E7R2GIAW.js';
|
|
6
6
|
import { writeFleetState } from './chunk-6X2BSMRM.js';
|
|
7
7
|
import { writePendingUpdate } from './chunk-WFYKTAXZ.js';
|
|
8
|
-
import { renderUpdateSteps } from './chunk-
|
|
8
|
+
import { renderUpdateSteps } from './chunk-FKHOZQGJ.js';
|
|
9
9
|
import { readHousekeepingRecord, writeHousekeepingRecord } from './chunk-2UCTMANO.js';
|
|
10
|
-
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-
|
|
10
|
+
import { fleetConfigProblem, realBlockedProbes, sliceMemoryOf, checkBlockedWithSlots, largeBuildMemoryBytes, LARGE_BUILD_DISK_BYTES, checkManagedRoom, askFleetMachine } from './chunk-ZJCE7JLT.js';
|
|
11
11
|
import { writeMarker, readMarker, currentVersion, removeMarker, isInLayout, startedThroughCurrent, entryIn, versionDir, switchCurrent, cleanVersions, stagingDir } from './chunk-POBH5YCG.js';
|
|
12
|
-
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, itemTag, releaseLease, runIsolation, runCommandOf, claimRun, LEASE_SECONDS, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, restoreSessionIntoSandbox, recordsProofsOnly, itemScope, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, setStage, jobEnv, runHook, describeHookEnd, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionSandbox, deliverSandboxHooks, provisionMicroVm, deliverCommitHooks, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, keptCommitsLine, currentSkillCommand, formerSkillProblem, commandLogOffset, startSandboxCommand, MICROVM_COMMAND_DIR, startMicroVmCommand, microVmCommandLine, runCommand, containerCommandExec, execCommandLine, startSender, startHostServices, finishJob, sampleGuest, foldSample, isSandboxTracked, isContainerTracked, isMicroVmTracked, probeSandboxCommand, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, SandboxGoneError, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isIsolatedJob, isTimedOut, readCpuUsec, isIdle, HELPER_ENV, setUpRunnerCgroup, stopOrphanedMicroVms, unfinishedJobs, sweepImageBuilders, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, vmAlive, filesAreCopied, inSandbox, listItemDisks, usableCpus, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewRun, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, sweepSandboxes, keptSandboxIds, parseCpuList, ensureTunnel, keepGhConfigCurrent, restartSender, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, shellQuote, jobRecordsClaim, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady, managedBuildSettingsFor, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, installTrust, createLeaseChannel, serveLease, writeGuestGhConfig, deliverJobFiles, inTeardown } from './chunk-
|
|
12
|
+
import { leaseTimeLeftMs, createContainerRuntime, withTunnelLog, itemTag, releaseLease, runIsolation, runCommandOf, claimRun, LEASE_SECONDS, isUnfinished, prepareResume, restoreSessionIntoMicroVm, restoreSessionIntoContainer, restoreSessionIntoSandbox, recordsProofsOnly, itemScope, attemptNote, fetchManagedClaudeKey, holdManagedClaudeKey, fetchManagedBuildSettings, holdManagedBuildSettings, setStage, jobEnv, runHook, describeHookEnd, needsBuildSkill, provisionContainer, leaseExpiresAtMs, deliverContainerHooks, provisionSandbox, deliverSandboxHooks, provisionMicroVm, deliverCommitHooks, provisionEnvironment, readProvisionOut, resolveHostBuild, workdirProblem, listenOnBroker, hostEnvironment, deliverExecMaven, runWithSpawn, hostCommandEnvironment, lifecycleSteps, execArgv, lifecycleFailureReason, decideHostBuildSkill, prepareBranch, keptCommitsLine, currentSkillCommand, formerSkillProblem, commandLogOffset, startSandboxCommand, MICROVM_COMMAND_DIR, startMicroVmCommand, microVmCommandLine, runCommand, containerCommandExec, execCommandLine, startSender, startHostServices, finishJob, sampleGuest, foldSample, isSandboxTracked, isContainerTracked, isMicroVmTracked, probeSandboxCommand, probeMicroVmCommand, probeCommand, appendCommandLog, judgeProbe, SandboxGoneError, EXIT_CODE_FILE, isTracked, isGroupAlive, outcomeFromExitCode, isIsolatedJob, isTimedOut, readCpuUsec, isIdle, HELPER_ENV, setUpRunnerCgroup, stopOrphanedMicroVms, unfinishedJobs, sweepImageBuilders, listUnreadableJobs, listAdoptableJobs, retryFailedReleases, recoverLostJobs, GUEST_USAGE_INTERVAL_MS, vmAlive, filesAreCopied, inSandbox, listItemDisks, usableCpus, hookLimitsFor, AttemptLogBook, microVmOomKills, needsRenew, renewRun, renewLease, RENEW_INTERVAL_SECONDS, stoppedHelperReason, measureDisk, listTrackedJobs, sweepSandboxes, keptSandboxIds, parseCpuList, ensureTunnel, keepGhConfigCurrent, restartSender, rejoinSandboxBuild, createHousekeepingDocker, housekeepingDockerIfReachable, runHousekeeping, shellQuote, jobRecordsClaim, freeItemDisksUntil, savedStatesDir, readRecords, removeOldestUntil, ensureNetworkReady, managedBuildSettingsFor, ADOPTED_FETCH_RETRY_WINDOW_MS, gitRemoteFor, startServicesFor, installTrust, createLeaseChannel, serveLease, writeGuestGhConfig, deliverJobFiles, inTeardown } from './chunk-E6XXWCOV.js';
|
|
13
13
|
import { RUNNER_PROTOCOL } from './chunk-KVWFAAAQ.js';
|
|
14
14
|
import { RUNNER_RESERVE_BYTES } from './chunk-WG5OBUIZ.js';
|
|
15
15
|
import { RepoFilter } from './chunk-3T7PXUHN.js';
|
|
@@ -19,8 +19,8 @@ import { isVersion, compareVersions, satisfiesRange } from './chunk-TQMI335S.js'
|
|
|
19
19
|
import { claimCalls, claimItem, spoolHomeFor, leftByRunnerKey, runnerCalls, configForJob } from './chunk-RCK2MJRG.js';
|
|
20
20
|
import { claimPidFile, releasePidFile, writePidFile, readPidFile } from './chunk-NDQC2WUJ.js';
|
|
21
21
|
import { startTimeOf, isSameProcess } from './chunk-JBJTC3UU.js';
|
|
22
|
-
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-
|
|
23
|
-
import { WorkCommandError, isSignatureRefusal, getJson, postJson, getBytes } from './chunk-
|
|
22
|
+
import { describeCallFailure, retrySend, shortClaim, relativeToRunner, formatDuration, resolveGoverningSource, BuildTokens, classifyRefusal, refusalCode, createRunnerLog, formatClock } from './chunk-SFN7K33S.js';
|
|
23
|
+
import { WorkCommandError, isSignatureRefusal, getJson, postJson, getBytes } from './chunk-DNXYI22V.js';
|
|
24
24
|
import { keyRunnerFactory, isBuiltinSandbox, isBuiltinContainer, isBuiltinVm, loadRunnerConfig, checkHooks, builtinKind, keepsHostBuilder, runnerDeliversComments, readOnlyRemoteOf, DEFAULT_SAVED_STATE_MAX_BYTES, DEFAULT_UPDATE_MAX_WAIT_HOURS, readOnlyOption } from './chunk-EUHUIIGT.js';
|
|
25
25
|
import { allocatedBytes, freeBytes, formatBytes } from './chunk-3C23ZPWR.js';
|
|
26
26
|
import { writeJobFile, ensureRunnerIdentity, identityDockerFor, readJobFile, exceedsDisk, runnerLabelValue, builderName, ensureFailureCount, builderSpec, ensureBuilder, spawnRun } from './chunk-ERG3WCEC.js';
|
|
@@ -745,7 +745,7 @@ function stageReason(job) {
|
|
|
745
745
|
}
|
|
746
746
|
function ownReason({ job, ending }) {
|
|
747
747
|
if (job.sandbox !== void 0) {
|
|
748
|
-
return "is a sandbox build
|
|
748
|
+
return "is a sandbox build, which the runner does not hand to another version";
|
|
749
749
|
} else if (job.microvm !== void 0) {
|
|
750
750
|
if (!isMicroVmTracked(job)) return "is a microVM build that a restarted runner cannot adopt";
|
|
751
751
|
} else if (!isContainerTracked(job)) {
|
|
@@ -2573,7 +2573,7 @@ var CLAIM_REFUSAL_CODES = new Set(
|
|
|
2573
2573
|
"pull_request_from_fork pull_request_on_default_branch pull_request_ambiguous pull_request_repository_not_connected repository_not_reachable branch_claimed_elsewhere".split(" ")
|
|
2574
2574
|
);
|
|
2575
2575
|
async function tryClaimAndStart(state, item, queue) {
|
|
2576
|
-
const { postJson: postJson2 } = await import('./work-cmd-
|
|
2576
|
+
const { postJson: postJson2 } = await import('./work-cmd-3BDBBKGG.js');
|
|
2577
2577
|
const log = logOf(state);
|
|
2578
2578
|
const hostKey = await loadHostKey(state.config.configPath);
|
|
2579
2579
|
const claim = await retrySend(
|
|
@@ -3809,6 +3809,56 @@ async function adoptTrackedBuilds(state, jobsDirPath) {
|
|
|
3809
3809
|
void probeBuild(state, adopted);
|
|
3810
3810
|
}
|
|
3811
3811
|
}
|
|
3812
|
+
function sandboxAwayReason(found, sandboxId) {
|
|
3813
|
+
return found === "gone" ? new SandboxGoneError(sandboxId).message : CONTAINER_STOPPED_REASON;
|
|
3814
|
+
}
|
|
3815
|
+
async function adoptTrackedSandboxes(state, jobsDirPath) {
|
|
3816
|
+
const log = logOf(state);
|
|
3817
|
+
const attemptLogs = attemptLogsOf(state);
|
|
3818
|
+
const runtime = runtimeOf(state);
|
|
3819
|
+
for (const { dirPath, job, known } of listTrackedJobs(jobsDirPath)) {
|
|
3820
|
+
if (!known || job.sandbox === void 0) continue;
|
|
3821
|
+
if (leftByRunnerKey(state.config, job)) continue;
|
|
3822
|
+
const own = job.sandbox;
|
|
3823
|
+
const tag = itemTag(job);
|
|
3824
|
+
const adopted = { job, dirPath, lastRenewAtMs: 0, cmd: null, cpuSample: null, ending: false };
|
|
3825
|
+
const tokens = buildTokensFor(state, adopted);
|
|
3826
|
+
runtime.credentials.set(dirPath, tokens);
|
|
3827
|
+
let found;
|
|
3828
|
+
try {
|
|
3829
|
+
found = await rejoinSandboxBuild({
|
|
3830
|
+
runtime,
|
|
3831
|
+
config: configForJob(state.config, job),
|
|
3832
|
+
own,
|
|
3833
|
+
jobDir: dirPath,
|
|
3834
|
+
itemKey: job.itemKey,
|
|
3835
|
+
tokens,
|
|
3836
|
+
branch: job.branch,
|
|
3837
|
+
repositories: job.repositories,
|
|
3838
|
+
queue: job.queue,
|
|
3839
|
+
log: (line2) => log.line(`${tag} ${line2}`),
|
|
3840
|
+
warn: (line2) => log.error(`${tag} ${line2}`),
|
|
3841
|
+
leaseExpiryMs: () => leaseExpiresAtMs(adopted.job)
|
|
3842
|
+
});
|
|
3843
|
+
} catch (err) {
|
|
3844
|
+
log.error(`${tag} the relay of the build an earlier runner left could not be joined again: ${describeCallFailure(err)} \xB7 the build goes on without its network until its limit`);
|
|
3845
|
+
}
|
|
3846
|
+
if (found !== void 0 && found !== "joined") {
|
|
3847
|
+
const reason = sandboxAwayReason(found, own.sandboxId);
|
|
3848
|
+
const finished = await finishJob(job, dirPath, "interrupted", state.config, finishDepsOf(state), { reason });
|
|
3849
|
+
log.line(`recovered job ${finished.queue} ${itemTag(finished)} (claim ${shortClaim(finished.claimId)}) as interrupted: ${reason}`);
|
|
3850
|
+
continue;
|
|
3851
|
+
}
|
|
3852
|
+
state.jobs.set(dirPath, adopted);
|
|
3853
|
+
attemptLogs.open(job.item, dirPath, itemScope(job));
|
|
3854
|
+
if (!await renewLeaseIfDue(state, adopted, nowOf(state).getTime())) continue;
|
|
3855
|
+
await restartSender({ config: state.config, job: adopted.job, jobDir: dirPath, deps: { spawnFn: state.deps.spawnFn, runtime, log, sleep: state.deps.sleep } });
|
|
3856
|
+
const line = `adopted job ${job.queue} ${tag} (claim ${shortClaim(job.claimId)}) \xB7 command tracked in sandbox ${own.sandboxId}`;
|
|
3857
|
+
log.line(line);
|
|
3858
|
+
attemptLogs.note(job.item, line, itemScope(job));
|
|
3859
|
+
void probeBuild(state, adopted);
|
|
3860
|
+
}
|
|
3861
|
+
}
|
|
3812
3862
|
async function planMicroVmAdoption(state, jobsDirPath) {
|
|
3813
3863
|
const plan = { adopt: [], away: [], unservable: [], unasked: [] };
|
|
3814
3864
|
for (const { dirPath, job, known } of listTrackedJobs(jobsDirPath)) {
|
|
@@ -4064,7 +4114,7 @@ async function startRunner(configPath, deps, startup) {
|
|
|
4064
4114
|
check: update.check ? () => update.check(configPath) : async () => {
|
|
4065
4115
|
const held = runnerAgents(deps.agents).flatMap((agent) => heldAgentCredential(agent.descriptor.id) ?? []);
|
|
4066
4116
|
const env = { ...process.env, ...Object.fromEntries(held.map((credential) => [credential.variable, credential.value])) };
|
|
4067
|
-
return (await import('./check-
|
|
4117
|
+
return (await import('./check-QKTZCHTH.js')).runRunnerCheck(configPath, { fetchImpl: deps.fetchImpl, env });
|
|
4068
4118
|
},
|
|
4069
4119
|
now: () => (deps.now ?? (() => /* @__PURE__ */ new Date()))().getTime(),
|
|
4070
4120
|
log
|
|
@@ -4188,6 +4238,7 @@ async function startRunner(configPath, deps, startup) {
|
|
|
4188
4238
|
attemptLogs.note(job.item, adoptedLine, itemScope(job));
|
|
4189
4239
|
}
|
|
4190
4240
|
await adoptTrackedBuilds(state, jobsDir(configPath));
|
|
4241
|
+
await adoptTrackedSandboxes(state, jobsDir(configPath));
|
|
4191
4242
|
await adoptTrackedMicroVms(state, microVmPlan);
|
|
4192
4243
|
for (const retried of await retryFailedReleases(jobsDir(configPath), config, {
|
|
4193
4244
|
fetchImpl: deps.fetchImpl,
|