test harnesses exist and half the suites don't use them (dedup sweep, server + tui)
open by a73x
The 2026-09-01 duplicate-code probe found the test scaffolding heavily copy-pasted where a harness helper already exists or nearly does:
server suite: the QUIC drive-loop body x4 in quic_server.zig (the two inline copies silently drop owner.flush()); the manifest hand-off block x4 in server_test_upgrade.zig; the agent-channel preamble x6 in server_test_agent.zig (openAndAsk consolidated only the second half); the two-fd poll/dispatch loop x2+1 in server_test_modes.zig; getsockname readback x5 (Listener.boundAddr is the documented owner); marks.sh written inline x3 and the gap-shell fixture x2 (harness owns writeDyingGapShell); IntegratedSession re-implements TestDaemon (whose Opts already carry shell_integration and extra_env); awaitGridText vs awaitGridIn differ by one parameter; ~8 raw TmpDir+Server.init sites bypass TestDaemon.
tui suite: the two-tile bench x10 in wall_test_layout.zig; the drag preamble x16 in interact.zig (dragFixture folded only the Core half); replyBytes and drainPipe/readAvail duplicated byte-identical between interact.zig and wall_test_harness.zig (export from interact — the harness already imports it, never the reverse); the {h0#a,h0#b,h1#a} alias table x3; seededScreen duplicated between paint.zig and interact.zig tests.
All sites verified with quotes in the probe run; line numbers are as of 81d2ce6b and will drift. Mechanical work, best done a file at a time with make check between.