fix: use configured timeoutSeconds in DockerSandboxProvider.executeCode#3201
fix: use configured timeoutSeconds in DockerSandboxProvider.executeCode#3201jlaportebot wants to merge 1 commit into
Conversation
The executeCode method was using a hardcoded 60_000ms timeout instead of respecting the timeoutSeconds value from SandboxConfig. This caused custom timeouts to be ignored, potentially allowing unbounded execution. Fix: Store the SandboxConfig with the containerId and use config.timeoutSeconds when executing code.
🤖 AI Agent: breaking-change-detector — API Compatibility
API Compatibility
|
🤖 AI Agent: security-scanner — Security Review
Security Review
|
🤖 AI Agent: docs-sync-checker — Docs Sync
Docs Sync
|
🤖 AI Agent: test-generator — `agent-governance-typescript/src/sandbox.ts`
|
🤖 AI Agent: code-reviewer — View details
TL;DR: 0 blockers, 1 warning. The PR improves timeout handling but lacks test coverage for the new behavior.
Action items:
Warnings:
|
PR Review Summary
Verdict: AI review comments are untrusted advisory output. The summary reports workflow-generated completion status only, not model-authored pass/fail claims. |
|
🔴 Contributor Check: HIGH
Automated check by AGT Contributor Check. |
Summary
The
executeCodemethod inDockerSandboxProviderwas using a hardcoded 60,000ms timeout instead of respecting thetimeoutSecondsvalue fromSandboxConfig. This caused custom timeouts to be ignored, potentially allowing unbounded execution.Changes
SandboxConfigalongside thecontainerIdin the containers mapconfig.timeoutSeconds * 1000as the timeout forexecFilecalls inexecuteCodedestroySessionto destructurecontainerIdfrom the new map valueTest Plan
Fixes #3118