fix(provision-kit): enforce source-install transfer deadlines

Merged
TH
9d ago
+1662-129

Summary

Apply one 600-second standalone budget to install-source materialization, including download and extraction. Keep separate connect, response-header, and accepted-byte inactivity limits across redirects, including HTTP CONNECT proxies. Preserve typed failures and clean up temporary files when work fails or finishes after the cutoff.

This PR stacks on #4727. Daemon URL materialization uses the earliest registered request deadline minus the deploy reserve. The local-path flow uses the existing request signal. Refs #4441.

Validation

Stack base 8b3511b (#4727). Head 286bd95aaf.

  • pnpm check:affected --run --head 286bd95aaf passed with an exact-head receipt (exactCommit: true, exit 0).
  • The materialization cutoff travels as materializationDeadlineMs data; the materializer arms its own timer and every timer-driven abort reports source_materialization_deadline_exceeded with the armed timeoutMs. Router tests on both daemon transports assert error.details.reason and timeoutMs.
  • The install ledger is split into a 150 s readiness share and a 320 s deploy-only reserve. The ledger test proves readiness + cutoff + reserve + 30 s margin covers the 600 s envelope and that a worst-case cold boot keeps a positive cutoff. The cold-boot regression was shown red on ceedf82 (commit 0986defa) before the fix.
  • Loopback CONNECT tests cover header arrival after more than 30 seconds of combined connect and header time, plus a stall classified as response-headers. Typecheck passed.

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.