mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-09 04:02:35 +00:00
fix(code-runtime-python): capture the error-class constructor and dispatch primitives
The review's remaining items: - _make_error_class captures Exception and setattr as def-time defaults, so a rebind of __main__.Exception/__main__.setattr cannot break the rejection constructor. - dispatch binds _lossless_json_violation, asyncio.get_event_loop, and the channel's send method into _run locals before the program runs, so a rebind cannot turn a legitimate binding call into an exception or a wall-clock timeout. - The note (en + zh) corrects the stdin coverage phrasing: d3f9f57f5's direct EOF-observing case is the in-tree pin, not an approximation. - Collapse two stray double blank lines in the test file. Pairing re-recorded.
This commit is contained in:
@@ -750,7 +750,6 @@ describe('PythonCodeRuntime — programs and bindings', () => {
|
||||
expect(result.value).toBe('nope')
|
||||
}, 15_000)
|
||||
|
||||
|
||||
it('still answers the call when the rejection value cannot be converted to a string', async () => {
|
||||
// `messageOf` calls `String(error)`, which runs the value's own conversion,
|
||||
// and this call site is a DETACHED async reply callback. A rejection whose
|
||||
@@ -4297,7 +4296,6 @@ describe('PythonCodeRuntime — hostile peer', () => {
|
||||
expect(result.value).toBe(8 * chunk.length)
|
||||
}, 90_000)
|
||||
|
||||
|
||||
it('bounds a flood of zero-byte log lines through the per-entry separator charge', async () => {
|
||||
// Blank print() lines carry zero content bytes; without the +1 separator
|
||||
// charge they would bypass maxLogBytes entirely and grow the retained
|
||||
|
||||
Reference in New Issue
Block a user