test(code-runtime-python): assert the inherited-RLIMIT_AS boot re-check reports exception
The boot re-check raises inside bootstrap's setrlimit-phase handler, which classifies every resource-limit-application failure as kind 'exception'. The test asserted 'worker-exit'; align it to the actual class and keep the message assertion so the case still discriminates a config rejection from a generic setrlimit error. The Agent Note's two references to the reported kind are corrected on both language sides and the pair re-recorded.
This commit is contained in:
parent
436a97a12d
commit
ce91c70f9a
4 changed files with 13 additions and 8 deletions
|
|
@ -2,5 +2,5 @@
|
|||
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
||||
# after editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write .agents/notes/implemented/bug-fix/2026-07-31-code-runtime-python-settlement-fixes.md
|
||||
2026-07-31-code-runtime-python-settlement-fixes.md: 9e0938e1869a71c6432dad48e225c8c73968e688
|
||||
2026-07-31-code-runtime-python-settlement-fixes.zh.md: 75b1addc1dc7e5f13a2cac504ffcbbaed27cae66
|
||||
2026-07-31-code-runtime-python-settlement-fixes.md: 8dc9a1e991f89efe0607f858dbbcc77929f582ce
|
||||
2026-07-31-code-runtime-python-settlement-fixes.zh.md: beb6e1bf4381f542ae33ed36a301ae31e3eabc10
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -420,7 +420,9 @@ describe('PythonCodeRuntime — inherited resource limits', () => {
|
|||
// clamped limit and fails loud at boot instead. A 128 MiB inherited limit
|
||||
// leaves 64 MiB budgetable (8 MiB admissible), under which a 32 MiB
|
||||
// maxLogBytes — admitted by the 512 MiB configured default — is rejected. The
|
||||
// repro is Linux-only (macOS ignores `ulimit -v`); there the run proceeds.
|
||||
// rejection surfaces as an 'exception' (bootstrap's setrlimit-phase failure
|
||||
// class), not a mid-run OOM. The repro is Linux-only (macOS ignores
|
||||
// `ulimit -v`); there the run proceeds.
|
||||
const dir = await mkdtemp(join(tmpdir(), 'dsh-rlimit-'))
|
||||
const wrapper = join(dir, 'python3-tight')
|
||||
await writeFile(wrapper, '#!/bin/sh\nulimit -v 131072\nexec python3 "$@"\n', { mode: 0o755 })
|
||||
|
|
@ -429,7 +431,10 @@ describe('PythonCodeRuntime — inherited resource limits', () => {
|
|||
if (process.platform === 'darwin') {
|
||||
expect(result.error).toBeUndefined()
|
||||
} else {
|
||||
expect(result.error?.kind).toBe('worker-exit')
|
||||
// The re-check raises inside bootstrap's resource-limit block, which
|
||||
// reports every setrlimit-phase failure as kind 'exception'; the message
|
||||
// discriminates this config rejection from a generic setrlimit error.
|
||||
expect(result.error?.kind).toBe('exception')
|
||||
expect(result.error?.message).toContain('too large for the inherited RLIMIT_AS')
|
||||
}
|
||||
}, 15_000)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue