Skip to content

Commit f24c7c8

Browse files
authored
fix(storage): bound storage helper probes by the carrier's remaining budget (#437)
## Root cause Every Docker probe and command inside a native storage carrier had a fixed timeout in `src/lib/native-compose-storage-witness-docker.ts`: 15 s for reads, target observation, volume create and helper create/start, and 10 s for helper removal and cleanup reads. This held even though #375 gave each carrier a 90 s `HACK_NATIVE_STORAGE_TIMEOUT_MS` budget. On loaded hosted runners, a slow `docker start -ai` of the helper hit the 15 s cap. It refused as `E_COMPOSE_FAILED` with stage `storage-helper-start` and reason `probe-timeout`, while most of the carrier budget was still unused. That failed `hack exec`/`up` in the native-config-compose and native-config-networks e2e scenarios. For `exec`, this could happen after the guest command had already printed its result, because the failing step was the closing storage proof. ## Fix A new function, `nativeComposeStorageProbeTimeoutMs({ kind, deadline })`, now sets every probe and command timeout in the carrier: - `command` (volume create, helper create/start): gets the carrier's whole remaining budget. A hung command still times out exactly when the carrier's budget ends. - `read` (reads, target observation, saved-recovery reads): gets the remaining budget, capped at 60 s. 60 s is the most `createNativeComposeProbe` accepts. - `cleanup` (post-exit reads, helper `rm`): has its own budget, the remaining budget clamped to 10–60 s. It is never clipped to the carrier's deadline, so cleanup still runs after the carrier expires, and a hung engine still cannot stall cleanup forever. Every timeout is finite and named. A timeout that ends before the carrier's deadline still reports `probe-timeout`. One that ends at the deadline reports `storage-budget`, as before. No check, retention or recovery rule changed. Diagnostics code (`compose-startup-budget` resolution, effect diagnostics) is untouched; the only change in `compose-startup-budget.ts` is one doc-comment sentence that described the old fixed cap (to stay out of the way of G50/HACK-1361 and G51/HACK-1365). **Exec decision (documented).** The closing storage proof after a saved `exec` stays fail- closed. If it refuses (including a probe timeout), `exec` fails with that refusal even though the guest command already ran, and the command's exit code is not reported. Ownership and saved state are unchanged, and the next admission proves storage again. This is now spelled out in `docs/reference/native-compose-commands.md` and in the `runNativeComposeStorageVerifiedExec` doc comment. Docs updated: `docs/reference/native-compose-storage-xattr-carrier.md` (budget layering), `docs/cli.md` (storage budget section), `docs/reference/native-compose-commands.md` (exec contract). ## Tests New file: `tests/native-compose-storage-probe-budget.test.ts`. It runs the real `createNativeComposeDockerStorageXattrCarrier` through a full readonly root proof (target, helper create, policy, start, response, cleanup, closing observation) against a stub engine: - Engine reads go through a spied `createNativeComposeProbe` that answers in-process. - Daemon commands go through a spied `shell.run` that rewrites them into local `/bin/sh` children, so the real capture, process-group and settlement paths still run. - Elapsed engine time is a virtual clock (`Date.now` spy). There is no real 15 s wait. - The tests use a private HOME, HACK_HOME and DOCKER_CONFIG, plus `HACK_SECRETS_DISABLE_KEYCHAIN_FALLBACK=1`. `DOCKER_HOST=tcp://…` and `DOCKER_API_VERSION` stop the engine-ID fence from ever choosing a direct Unix socket. A tripwire `docker` on PATH must never run. What the tests cover: 1. A helper start that takes 20 s, longer than the old 15 s cap, completes within the default 90 s budget. Create and start are granted more than 20 s and at most the budget; `rm` gets 10–60 s; every probe gets 1–60 s. 2. A start that outlasts a 12 s budget still refuses at the budget's end, with `storage-helper-start` / `storage-budget`. 3. Policy unit checks for the three timeout kinds, including the cleanup floor after the deadline. 4. A closing storage proof refusal fails saved exec after its command ran, in the order opening, command, closing. Mutation proofs: - Restoring `timeoutMs: 15_000` on the helper start makes test 1 fail with exactly the CI symptom `{ stage: "storage-helper-start", reason: "probe-timeout" }`. - Restoring all former fixed caps fails tests 1 and 3. - Removing the cleanup floor fails test 3. - Making `runNativeComposeStorageVerifiedExec` swallow the closing refusal fails test 4. ## Evidence - Bun 1.4.2 (`mise x bun@1.4.2`). `bun install --frozen-lockfile`; no lockfile changes. - Local (this Mac): new tests 4/4 pass. Neighbouring suites pass: `native-compose-storage- witness-docker`, `-command-record`, `-witness-docker-io`, `-witness-dependency`, `-witness- xattr-owner`, `native-compose-effect-diagnostics`, `compose-startup-budget`, `agent- instruction-source` (295 tests total). - `bun run --cwd packages/cli typecheck`: 0 errors. Root `bun run check` (includes privacy:check): 0 errors (existing complexity warnings only). - gitleaks 8.30.1 over `origin/next..HEAD`: no leaks. - Full suite on the M3 at the pushed commit: NOT RUN. My job queued on the shared M3 CI lock for about 90 minutes behind another unit's multi-hour loaded benchmark (G52) and three other queued suites. I cancelled it before it took the lock, so no M3 worktree was created. The full suite at 4e37716 is still outstanding. ## Gaps - The new test proves the storage-carrier step that both `exec` and `up` run, using a stub engine. It does not drive the `hack exec`/`hack up` CLI end to end: that needs a real Docker engine, and these tests may not use one. The hosted native-config-compose and native-config- networks e2e scenarios are still the end-to-end check, and only hosted CI on this PR shows whether those flakes are gone. - A hung non-cleanup read now waits up to 60 s, or the remaining budget, instead of 15 s before refusing. The carrier as a whole is still bounded by `HACK_NATIVE_STORAGE_TIMEOUT_MS`. - The `compose-startup-budget.ts` doc-comment edit may textually conflict with G50/G51 if they edit the same lines. The conflict would be trivial. ## Round 2: recorded exec/up path (review follow-up) The verifier found that the tests above missed the path `exec` and `up` actually take. `prepareNativeComposeCommandStorage` creates every carrier with `originalCommandRecords: true`, so their readonly `verify` proofs run each helper command through the recorded original-command branch of `runNativeComposeStorageDockerCommand` (publication handshake, `boundaryDeadline`, settlement). The first test used an unrecorded `root` request, so capping only the recorded child at 15 s (`Math.min(15_000, boundaryDeadline - performance.now())`) left every test green. The code fix already reached this branch, because both branches use the same computed timeout. But no test proved it. Changes in this round (test and docs only, no product code change): - Merged `next` (5208ee5) into the branch. The merge was clean. - New test, "a recorded exec/up verify proof completes a helper start slower than the former 15 s cap". It builds the carrier the way `exec`/`up` do (`originalCommandRecords: true`, default 90 s budget from `resolveNativeStorageTimeoutMs`) and sends a readonly `verify` request. The helper start takes 20 s of virtual time. The test checks that the proof completes, that create and start were each granted more than 20 s and at most the budget, and that the carrier's `commands.json` record holds `create`, `start` and `remove`, each with a published child and a clean settlement. That last check proves the recorded branch really ran. The test journals the carrier intent the way the witness owner does (`initializeNativeComposeStorageCarrierJournal` and `beginNativeComposeStorageCarrierIntent`). The journal's `recordCreated` is the invocation's callback. After the proof, the test calls `journal.complete()` and passes the completion to `finish()`, which retires the invocation files and closes their held directories. The test asserts that the invocation directory is gone. - The file's `afterEach` now calls `Bun.gc(true)`. If this file ever leaks a held directory again, the leak is reported against this file instead of a later, unrelated one. The first push of this round, 16782e3, failed hosted `test` (run 40058406790) with 1 fail and 3 errors out of 8256 tests. My recorded case called `finish()` with a synthetic completion. The finalizer consumes the completion before its `try`/`finally` block, so the refusal left the three held invocation directories (the instance, `storage-carriers` and invocation directories) open. Garbage collection later closed them during `native-compose-inputs.test.ts` and raised `ERR_INVALID_STATE`, which Bun counted against the test that was running ("omitted native compiler context preserves Compose routing probing and branch omission"). 8d3d1f3 fixes this with the real journal completion. With the `Bun.gc` guard in place, removing the `finish()` call makes this file fail with exactly those three FileHandle errors, so the guard catches the leak. - Test engine fix: the daemon-side state change of create, start and rm now happens when the child exits, not when the command is issued. A recorded command checks admission again after its child is spawned, while the helper must still be `created`. Each recorded command's host identity reads (`/bin/ps`, plus `sysctl` on macOS) pass through to the host. They are read- only. - `docs/reference/native-compose-storage-xattr-carrier.md` now says that recorded original commands (the `verify` proofs that `exec` and `up` run) also share the remaining-budget bound, together with their publication handshake and identity reads. Not done: driving `prepareNativeComposeCommandStorage` end to end through `ports.carrier` with the real Docker carrier. That path also needs an enrolled witness and the carrier journal. The new case uses the same carrier constructor and options that `prepareNativeComposeCommandStorage` passes, and the same request kind. Mutation results on the new test file (run at 16782e3; the first two were run again at 8d3d1f3 with the same result): - Recorded child capped at 15 s (the verifier's surviving mutation): 1 test fails (the new recorded test). Before this round it survived. - Helper start call site restored to `Math.min(15_000, remaining)`: 3 tests fail. - Command branch capped at 15 s (`Math.min(15_000, opts.timeoutMs, …)`): 3 tests fail. - Still surviving, as the verifier reported: volume-create, read and target-observation call sites restored to 15 s/10 s, and `rm` fixed at 10 s. These steps are not slow in the CI failure, and no test pins their exact bound. Evidence for this round: - Bun 1.4.2, `bun install --frozen-lockfile`, with no `bun.lock` change. - New test file at 8d3d1f3: 6/6 pass in 3 consecutive runs (20–39 s each, while the host's load average was about 30). Locally the recorded case takes about 8 s, against its 30 s timeout; in hosted CI it took 0.7 s. At 16782e3 the file also passed once while the shared host's load average was about 250. - Focused set at 8d3d1f3: 167/167 pass across `probe-budget`, `witness-docker`, `witness- docker-io`, `command-record`, `carrier-journal-completion`, `effect-diagnostics` and `compose- startup-budget`. - `bun run --cwd packages/cli typecheck`: 0 errors. - Root `bun run check`: exit 0, `privacy-check: ok`, the same 34 existing warnings. Biome on the changed test file: clean. - gitleaks 8.30.1 `dir` on the `git log -p origin/next..HEAD` export: no leaks. - Safety: the test sets a private HOME, HACK_HOME and DOCKER_CONFIG, `HACK_SECRETS_DISABLE_KEYCHAIN_FALLBACK=1` and `DOCKER_HOST=tcp://127.0.0.1:9`. The tripwire `docker` never ran. - Local caveat: `native-compose-storage-witness-xattr-owner.test.ts` had several of its 5 s-default tests time out locally while the shared host's load average was 75–280. One example is "command storage carriers use the unset named storage budget". Run alone with `--timeout 120000`, that test passed in 16 s, so it is slow on this host, not hung. That file uses a fake carrier transport and never reaches the Docker carrier this PR changes, and the file itself is unchanged from `next`. It passed in hosted CI at d15116e. Hosted CI at this head is the full- suite evidence. Hosted CI at 8d3d1f3 (pull_request run 40062046367): every check passed. See the next section. ## Round 3: independent recheck at 8d3d1f3 No code change in this round. The PR head is still 8d3d1f3, which already contains `next` (5208ee5). This round rechecked the Round 2 fix from a fresh worktree: - The new test file passes 6/6 (Bun 1.4.2, `bun install --frozen-lockfile`, private HACK_HOME and DOCKER_CONFIG, `HACK_SECRETS_DISABLE_KEYCHAIN_FALLBACK=1`, `DOCKER_HOST=tcp://127.0.0.1:9`). - The verifier's surviving mutation is now killed. With the recorded child capped at 15 s (`timeoutMs: record ? Math.min(15_000, boundaryDeadline - performance.now()) : timeoutMs`), 1 test fails: "a recorded exec/up verify proof completes a helper start slower than the former 15 s cap". After the source was restored, the tree was clean. - `bun run --cwd packages/cli typecheck`: 0 errors. Root `bun run check`: exit 0, `privacy- check: ok`, the same 34 existing warnings. gitleaks 8.30.1 `dir` on the `git log -p next..HEAD` export: no leaks. - Hosted CI at 8d3d1f3 (run 40062046367): every check passed. This includes the `test` job (38m12s), docker-e2e shards 1–4, Candidate core on macOS and Ubuntu, Config compiler ×4, runtime state models, linux-process-lifetime, runtime-images and secret-scan. In the e2e shards, native-config-networks passed (1901.4s) and native-config-compose passed (514.9s). The remaining gaps are unchanged from Round 2. No test pins the exact bound of the volume- create, read, target-observation and `rm` call sites. Nothing drives `prepareNativeComposeCommandStorage` end to end with the real Docker carrier. Refs HACK-1369 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent b54f38d commit f24c7c8

7 files changed

Lines changed: 958 additions & 20 deletions

‎docs/cli.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,9 @@ carriers follow only `HACK_NATIVE_STORAGE_TIMEOUT_MS`. Storage
351351
proofs that run while a native `up` or `restart` builds and starts workloads do not
352352
consume the start budget: their elapsed time extends the start deadline, and each
353353
proof stays bounded by its own carrier budget. Each Docker command inside a carrier
354-
keeps its fixed 10–15 second cap.
354+
is bounded by that carrier's remaining budget (reads at most 60 seconds), so a slow
355+
helper start on a loaded host can use the budget rather than a fixed 15-second cap.
356+
Helper cleanup keeps its own 10–60 second bound.
355357

356358
The two variables bound different things:
357359

‎docs/reference/native-compose-commands.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,21 @@ Hack does not kill a guessed guest PID or automatically stop the application on
287287
client cancellation. Explicit owned `down` stops the containing instance while
288288
retaining persistent data.
289289

290+
When the instance has enrolled persistent storage, saved `exec` proves that
291+
storage before and after the guest command. The opening proof may reuse the
292+
proof that command storage preparation just made under the same lease; the
293+
closing proof after the command always runs fresh. Each proof has its own
294+
`HACK_NATIVE_STORAGE_TIMEOUT_MS` carrier budget. The closing proof is
295+
fail-closed: if it refuses (including a storage probe timeout, reported as
296+
`E_COMPOSE_FAILED` with a `storage-*` stage), `exec` fails with that refusal even
297+
though the guest command already ran and printed its output, and the command's
298+
exit code is not reported. A storage result that cannot be proven after the
299+
command must not look like a clean exec. The refusal keeps ownership and saved
300+
state unchanged, and the next admission proves storage again. Retrying `exec`
301+
runs the guest command again, so check its effects first when it is not
302+
idempotent. A cancelled `exec` keeps its known exit code and starts no closing
303+
proof.
304+
290305
`ps.pending` describes journaled engine mutations, not guest exec sessions. A
291306
cancelled `exec` can therefore have no pending engine operation even when its guest
292307
completion is unknown. An interrupted `run` retains its exact one-off and pending

‎docs/reference/native-compose-storage-xattr-carrier.md‎

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -415,11 +415,27 @@ Budgets are layered and all finite:
415415
the start deadline but capped in total at 16 × the storage budget or 1 hour,
416416
whichever is smaller. A guard proof that would start after the cap is spent is
417417
refused before it runs, and one that ends past it refuses as `storage-budget`.
418-
- Inside a carrier every Docker probe and command keeps a fixed cap, clipped to
419-
the carrier's remaining budget: 15 seconds for reads, target observation and
420-
helper create/start, and 10 seconds for helper removal and cleanup reads, which
421-
are not clipped. A recorded command's 15-second settlement budget follows its
422-
exit.
418+
- Inside a carrier every Docker probe and command is bounded by the carrier's
419+
remaining budget (`nativeComposeStorageProbeTimeoutMs`), not by a fixed cap:
420+
- Volume create and helper create/start get the whole remaining budget, so a
421+
slow but healthy helper start on a loaded host completes while budget
422+
remains, and a hung one times out exactly at the carrier's end. This holds
423+
for recorded original commands too (the readonly `verify` proofs that
424+
`exec` and `up` run): the child, its publication handshake and its identity
425+
reads share that one bound.
426+
- Reads and target observation get the remaining budget, at most 60 seconds
427+
(the ownership probe's own ceiling).
428+
- Helper removal and cleanup reads run even after the carrier's deadline, so
429+
they are never clipped to it. Each has its own bound: the remaining budget
430+
clamped to 10–60 seconds. A hung engine therefore cannot stall cleanup.
431+
432+
Earlier fixed caps (15 seconds for reads, target observation and helper
433+
create/start; 10 seconds for cleanup) refused healthy `docker start -ai`
434+
helpers on loaded hosted runners as `storage-helper-start`/`probe-timeout`
435+
while most of the 90-second budget remained (HACK-1369). A timeout that ends
436+
before the carrier's deadline still reports `probe-timeout`; one that reaches
437+
it reports `storage-budget`. A recorded command's 15-second settlement budget
438+
follows its exit.
423439
- An unrecorded command (an identity read or a legacy root/seed command) waits
424440
at most three seconds for its process group to become absent after exit. Like
425441
the handshake and settlement budgets, this deadline is monotonic

‎src/lib/compose-startup-budget.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,11 @@ export function resolveComposeImageTimeoutMs(
7979
* Budget of one native storage carrier (one fresh helper proof session), from
8080
* `HACK_NATIVE_STORAGE_TIMEOUT_MS`. It is separate from the start budget:
8181
* storage preparation, enrollment and every storage proof use it, never
82-
* `HACK_COMPOSE_STARTUP_TIMEOUT_MS`. Each Docker probe inside a carrier keeps its
83-
* own fixed 10-15 s cap, and an exhausted carrier refuses with the closed
84-
* `storage-budget` effect reason. It grants nothing and relaxes no check.
82+
* `HACK_COMPOSE_STARTUP_TIMEOUT_MS`. Each Docker probe inside a carrier is
83+
* bounded by the carrier's remaining budget (cleanup keeps its own 10-60 s
84+
* bound; see `nativeComposeStorageProbeTimeoutMs`), and an exhausted carrier
85+
* refuses with the closed `storage-budget` effect reason. It grants nothing and
86+
* relaxes no check.
8587
*/
8688
export function resolveNativeStorageTimeoutMs(
8789
opts: {

‎src/lib/native-compose-command-storage.ts‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,11 @@ export type NativeComposeCommandStorage = Awaited<
357357
/** Saved exec does not publish a ready receipt. The opening check directly
358358
* follows command storage preparation under the same lease, with only read-only
359359
* source and ownership checks between, so it may reuse that adjacent proof. The
360-
* closing check after the process always performs a fresh proof. Cancellation
361-
* preserves its known exit and starts no late helper; every future admission
362-
* re-verifies content. */
360+
* closing check after the process always performs a fresh proof and is
361+
* fail-closed: its refusal fails exec although the command already ran, and the
362+
* command's exit code is not returned (docs/reference/native-compose-commands.md).
363+
* Cancellation preserves its known exit and starts no late helper; every future
364+
* admission re-verifies content. */
363365
export async function runNativeComposeStorageVerifiedExec(opts: {
364366
readonly signal: AbortSignal;
365367
readonly assertSaved: (

‎src/lib/native-compose-storage-witness-docker.ts‎

Lines changed: 68 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,50 @@ const CAPTURE_LIMIT = 4096;
116116
* uncertainty (HACK-1281). It stays finite and grants nothing.
117117
*/
118118
const SETTLEMENT_BUDGET_MS = 15_000;
119+
/**
120+
* Floor of every cleanup step of one carrier: cleanup reads after the helper
121+
* exits and helper removal. Cleanup runs even after the carrier's own deadline
122+
* has passed (it is never clipped to it), so this floor keeps a just-expired
123+
* carrier able to remove its helper.
124+
*/
125+
export const NATIVE_STORAGE_CLEANUP_FLOOR_MS = 10_000;
126+
/**
127+
* Ceiling of one Docker read probe (`createNativeComposeProbe` accepts at most
128+
* 60 s) and of every cleanup step, so a hung engine can stall neither a read
129+
* nor cleanup beyond it.
130+
*/
131+
export const NATIVE_STORAGE_PROBE_CEILING_MS = 60_000;
132+
/**
133+
* Timeout of one Docker probe or command inside a storage carrier, from the
134+
* carrier's remaining `HACK_NATIVE_STORAGE_TIMEOUT_MS` budget (HACK-1369).
135+
* Earlier fixed 15 s/10 s caps refused a healthy but slow helper start on
136+
* loaded hosts as `probe-timeout` while most of the 90 s budget remained.
137+
* - `command` (volume create, helper create/start): the remaining budget, so a
138+
* timeout still fires exactly at the carrier's end.
139+
* - `read` (reads and target observation): the remaining budget, at most
140+
* {@link NATIVE_STORAGE_PROBE_CEILING_MS}.
141+
* - `cleanup` (post-exit reads and helper removal): its own bound, the remaining
142+
* budget clamped to [{@link NATIVE_STORAGE_CLEANUP_FLOOR_MS},
143+
* {@link NATIVE_STORAGE_PROBE_CEILING_MS}], never clipped to the deadline.
144+
* Every value is finite. A non-cleanup value at or below zero is refused by the
145+
* probe or command before it spawns; it grants nothing and relaxes no check.
146+
*/
147+
export function nativeComposeStorageProbeTimeoutMs(opts: {
148+
readonly kind: "read" | "command" | "cleanup";
149+
readonly deadline: number;
150+
readonly now?: number;
151+
}): number {
152+
const remaining = opts.deadline - (opts.now ?? Date.now());
153+
if (opts.kind === "cleanup") {
154+
return Math.min(
155+
NATIVE_STORAGE_PROBE_CEILING_MS,
156+
Math.max(NATIVE_STORAGE_CLEANUP_FLOOR_MS, remaining)
157+
);
158+
}
159+
return opts.kind === "read"
160+
? Math.min(NATIVE_STORAGE_PROBE_CEILING_MS, remaining)
161+
: remaining;
162+
}
119163
// A late/unconfirmed publication cannot release its original held directory FDs.
120164
const unsettledCommandFiles = new Set<readonly HeldDirectory[]>();
121165
type Selection = { readonly name: string; readonly storage: string };
@@ -599,7 +643,10 @@ async function savedCarrierRecovery(opts: {
599643
await guard();
600644
const result = await createNativeComposeProbe({
601645
signal: context.signal,
602-
timeoutMs: Math.min(15_000, context.deadline - Date.now()),
646+
timeoutMs: nativeComposeStorageProbeTimeoutMs({
647+
kind: "read",
648+
deadline: context.deadline,
649+
}),
603650
})(args);
604651
await guard();
605652
return result;
@@ -1462,9 +1509,10 @@ export async function createNativeComposeDockerStorageXattrCarrier(
14621509
lifetime(context);
14631510
}
14641511
const signal = cleanup ? undefined : context.signal;
1465-
const timeoutMs = cleanup
1466-
? 10_000
1467-
: Math.min(15_000, context.deadline - Date.now());
1512+
const timeoutMs = nativeComposeStorageProbeTimeoutMs({
1513+
kind: cleanup ? "cleanup" : "read",
1514+
deadline: context.deadline,
1515+
});
14681516
return nativeComposeStorageIdentityProbe({
14691517
probe: createNativeComposeProbe({ signal, timeoutMs }),
14701518
signal,
@@ -1687,7 +1735,10 @@ export async function createNativeComposeDockerStorageXattrCarrier(
16871735
`io.hack.native-config.storage-provision=${nonce}`,
16881736
selection.name,
16891737
],
1690-
timeoutMs: 15_000,
1738+
timeoutMs: nativeComposeStorageProbeTimeoutMs({
1739+
kind: "command",
1740+
deadline: context.deadline,
1741+
}),
16911742
beforeSpawn: () => {
16921743
tool();
16931744
lifetime(context);
@@ -1825,7 +1876,10 @@ export async function createNativeComposeDockerStorageXattrCarrier(
18251876
program: files.program,
18261877
}),
18271878
],
1828-
timeoutMs: 15_000,
1879+
timeoutMs: nativeComposeStorageProbeTimeoutMs({
1880+
kind: "command",
1881+
deadline: context.deadline,
1882+
}),
18291883
beforeSpawn: () => {
18301884
tool();
18311885
lifetime(context);
@@ -1947,7 +2001,10 @@ export async function createNativeComposeDockerStorageXattrCarrier(
19472001
}
19482002
: undefined,
19492003
args: [docker, "start", "-ai", id],
1950-
timeoutMs: 15_000,
2004+
timeoutMs: nativeComposeStorageProbeTimeoutMs({
2005+
kind: "command",
2006+
deadline: context.deadline,
2007+
}),
19512008
beforeSpawn: () => {
19522009
tool();
19532010
lifetime(context);
@@ -2037,7 +2094,10 @@ export async function createNativeComposeDockerStorageXattrCarrier(
20372094
: undefined,
20382095
cleanup: true,
20392096
args: [docker, "rm", id],
2040-
timeoutMs: 10_000,
2097+
timeoutMs: nativeComposeStorageProbeTimeoutMs({
2098+
kind: "cleanup",
2099+
deadline: context.deadline,
2100+
}),
20412101
beforeSpawn: tool,
20422102
assertAdmitted: async () => {
20432103
const finalCarrier = await inspectCarrier(true);

0 commit comments

Comments
 (0)