From b55743badad4bb3d9579a2abcacda68fd10f636c Mon Sep 17 00:00:00 2001 From: leetcrypt Date: Sat, 27 Jun 2026 10:16:30 -0700 Subject: [PATCH] =?UTF-8?q?fix(ai):=20repair=20native-harness=20bench=20?= =?UTF-8?q?=E2=80=94=203-tuple=20preflight=20+=20PTY-mirror=20stub?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First functional bench run crashed 0/3 on two latent bench-only bugs: (1) the Phase-4 token-count change made complete_with_tools return (text, calls, usage), but the bench preflight still unpacked 2 values; (2) make_bridge never stubbed _send_sbx_input, so the PTY-mirror visibility feature hit ws=None and raised AttributeError on every tool call. Stub it to capture mirrored lines for --verbose. After the fix: 2/3 pass (write+read, script+run). mkdir+list still fails — local-backend run_shell CWD divergence + 3B model churn, not a working-memory regression. Sprint: native-harness-working-memory (bench) — see also 46e5620, dc6317f, c83abbe Co-Authored-By: Claude Opus 4.6 --- hh/scripts/bench-native-harness.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hh/scripts/bench-native-harness.py b/hh/scripts/bench-native-harness.py index 2686b01..c20e35d 100644 --- a/hh/scripts/bench-native-harness.py +++ b/hh/scripts/bench-native-harness.py @@ -97,6 +97,11 @@ def make_bridge(provider, workdir: str): b._chat.append("[inject] " + " ; ".join(cmds)) b._inject = cap_inject + + async def cap_sbx_input(ws, data): # PTY-mirror frames — broker-only in prod + b._chat.append("[pty] " + data.decode(errors="replace").rstrip("\n")) + + b._send_sbx_input = cap_sbx_input return b @@ -157,7 +162,7 @@ async def main() -> int: print("[preflight] probing tool support…", flush=True) t0 = time.monotonic() try: - text, calls = await asyncio.to_thread( + text, calls, _usage = await asyncio.to_thread( provider.complete_with_tools, "You are a test.", [{"role": "user", "content": "Call run_shell to echo hi."}],