Files
box/fleet/tasks/done/171-subhelp-test-speedup.md.muse--runtime--roles
T

14 lines
1.3 KiB
Plaintext

# 171-subhelp-test-speedup: Subhelp test speedup
Goal: trim runtime subcommand_help test cost
Steps:
1. Read 168 result notes in done/168-slowest-resweep.md.* for the runtime subcommand_help target (~1s). 2. On a feature branch: reduce spawns/sleeps (inproc pattern where proven) keeping all assertions identical (never weaken tests); run the file until green. Done criteria: result notes list before/after seconds + pass count, or exact blocking failure.
Done criteria: result notes appended below; file moved to done/.
Result notes (append below before moving to done/):
Completed 2026-10-09T00:56:50Z via box tasks done:
DONE on branch builder/subhelp-test-speedup (uncommitted, test-only, zero production change). ROOT CAUSE: 5x super-cli.py respawns (~0.2s each: interpreter + 7607-line module exec) just for --help text; no sleeps. FIX (tests/test_box_runtime.py): import super-cli once, dispatch real main() in-process per sub with sys.argv patched + stdio captured (fresh argparse parser per call; --help exits 0). Equivalence: 5/5 subs rc 0 + byte-identical help stdout vs subprocess. Asserted contract unchanged (rc==0 per sub). BEFORE/AFTER: target 1.03s->~0.02s in-file; file 2.77s->1.93s with SAME 2 pre-existing failures (stale peer-rewrite assertions, untouched) + 44 passed under both pytest and unittest.