a73x

standalone rigs re-implement e2e_lib's wait/counter helpers, drifted and unscaled

open   by a73x

agent.sh, xversion.sh, throughput.sh, bench.sh, soak.sh and wan.sh do not source e2e_lib.sh; each carries its own wait_for/wait_sock/pass-fail-skip copies with different budgets and ticks, none scaled by TIME_SCALE (agent.sh's wait_for comment even claims to be 'e2e.sh's convention' while disagreeing with it). wait_sock exists six times across the tree. The isolated-XDG_STATE_HOME preamble CLAUDE.md mandates is also re-spelled by hand in four of them.

Fix shape from the probe: split a small test/sh_lib.sh out of e2e_lib.sh (XDG/tmp preamble, wait_for, wait_sock, pass/fail/skip, TIME_SCALE parsing) sourced by every rig, leaving the e2e-specific registry/convergence half where it is. Do NOT merge the three start_daemon variants — they are genuinely different (backgrounded+registered / detached -d / container).

Smaller, same theme: build.zig spells the e2e fixture artifact-arg list twice (e2e and soak steps) with the coupling stated in three comments and enforced nowhere — one local addFixtureArgs(step) retires all three.

Found in the 2026-09-01 duplicate-code probe; the in-tree e2e group files' unscaled loops were already fixed (ff60cc02).