mirror of
https://gh-proxy.org/https://github.com/klinsmaya/deepseek-harness.git
synced 2026-11-09 09:47:05 +08: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.