mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-11 04:00:38 +00:00
test(code-runtime-python): exempt the mid-drain settle branch from coverage
The drain loop's `if (settled) break` needs the run to settle in the window between two queued frames. A file probe on the concurrent-replies case shows the queue does reach depth 11, but the wall clock never lands inside that window, so the branch is not schedulable from a test; a case written to force it passed without ever executing the line, so it is removed rather than left as coverage it does not provide. The branch carries a v8 ignore naming what is unreachable.
This commit is contained in:
@@ -1402,6 +1402,9 @@ export class PythonCodeRuntime extends CodeRuntime {
|
||||
draining = true
|
||||
try {
|
||||
while (replyQueue.length > 0) {
|
||||
// Needs the run to settle between two queued frames. Measured queue
|
||||
// depths reach 11 without the wall clock landing inside that window.
|
||||
/* v8 ignore next -- see above; not schedulable from a test. */
|
||||
if (settled) break
|
||||
const payload = replyQueue.shift() as ReplyMessage
|
||||
// Encode inside the loop, not up front: a queued reply the run no
|
||||
|
||||
@@ -3892,6 +3892,7 @@ 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