fix(code-runtime): reject a maxWallMs above Node's maximum timer delay
`config.maxWallMs` is only checked for positivity, and it is handed to `setTimeout`, which clamps any delay above 2^31-1 ms to 1 ms. A deployment configuring a 25-day wall ceiling therefore gets the opposite of what it asked for: every run times out on the first tick. The runtime now range-checks the field at load against MAX_TIMER_DELAY_MS from dsh-timeout and throws, so the misconfiguration fails loud where it is self-contained instead of silently inverting the budget. `computeMs` needs no matching bound: it is compared against measured event-loop utilization rather than fed to a timer. The test asserts both the rejection and that the boundary value itself loads.
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
"@deepseek-ai/dsh-code-runtime": "^0.0.1",
|
||||
"@deepseek-ai/dsh-invariants": "^0.0.1",
|
||||
"@deepseek-ai/dsh-session": "^0.0.1",
|
||||
"@deepseek-ai/dsh-timeout": "^0.0.1",
|
||||
"cordis": "^4.0.0-rc.7"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -43,6 +44,7 @@
|
||||
"@deepseek-ai/dsh-code-runtime": "workspace:^",
|
||||
"@deepseek-ai/dsh-invariants": "workspace:^",
|
||||
"@deepseek-ai/dsh-session": "workspace:^",
|
||||
"@deepseek-ai/dsh-timeout": "workspace:^",
|
||||
"cordis": "^4.0.0-rc.7"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user