mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-09 04:02:35 +00:00
dispatch's call_failure and its except clause resolved the module globals at call time, so a program rebinding __main__._BindingRejection = ValueError let the internal marker type leak into model code. Bind _RuntimeError_cls and _BindingRejection_cls into _run locals before the program runs (names distinct from the module globals so the assignment RHS resolves the global, not an unbound local); dispatch now uses the locals. A regression test rebinds _BindingRejection and asserts a host rejection still surfaces as RuntimeError. The sys.__stdout__ flush test now reconfigures the streams back to block buffering (write_through=False) so the settlement drain path is what the case pins — verified fail-before: binding the stream objects instead of their flush methods turns the test red.