mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-09 04:02:35 +00:00
test(code-runtime-python): pin send_done against rebinding write_encoded and _encode_json_plain
The rebinds-every-name fixture previously only rebound ProtocolChannel.send_sync, which a bound method object ignores and the shipped send_done no longer calls — so it did not actually guard the call-time-lookup shape. Rebind write_encoded and _encode_json_plain too (the names send_done would resolve late if it looked them up at call time) and state that in the settlement note's Testing section (en + zh), re-recording the pairing.
This commit is contained in:
@@ -1412,7 +1412,12 @@ describe('PythonCodeRuntime — programs and bindings', () => {
|
||||
'__main__._model_traceback = boom',
|
||||
'__main__._UNRENDERABLE_DIAGNOSTIC = boom',
|
||||
'__main__._LogStream.flush_line = boom',
|
||||
// `send_done` writes via LOCALLY-BOUND `_encode_json_plain` +
|
||||
// `ProtocolChannel.write_encoded`; rebinding these at call time must not
|
||||
// redirect the done frame (a late lookup would be `boom` -> worker-exit).
|
||||
'__main__.ProtocolChannel.send_sync = boom',
|
||||
'__main__.ProtocolChannel.write_encoded = boom',
|
||||
'__main__._encode_json_plain = boom',
|
||||
'raise ValueError("real failure")',
|
||||
].join('\n'),
|
||||
bindings: [],
|
||||
|
||||
Reference in New Issue
Block a user