Problem
test_heapstat_is_emitted_and_truthful and peak_gfx_total (tests/e2e/test_cdogs_memory.py, ~lines 200 and 336) both implement essentially the same driver sequence: launch the app, wait for the first report line, send enter / sleep / enter, then settle-poll, plus a near-verbatim navigation-sanity guard (~line 394 explicitly says it "mirrors" the other test's drive sequence). That's roughly 40 duplicated lines.
The two settle loops also differ in style for no clear reason — one breaks out early on success, the other always burns its full 12s window regardless of whether it already succeeded.
Separately, test_gfxstat_reports_resident_graphics (~line 419) is now largely redundant with the newer Task 4 test (test_sd_payload_excludes_non_runtime_sources, ~line 446) but still costs a full simulator boot plus a ~22MB copytree for a fairly thin assertion — worth folding into the newer test or dropping.
Impact
Low priority — this is test-code maintainability, not a functional bug. Nothing here affects correctness of the suite today, but it's the kind of duplication that will drift (already has, given the settle-loop style difference) as the tests get touched again.
Suggested direction
- Extract a shared
drive_quickplay(sim, marker) helper used by both tests, with one consistent settle-loop style (early-exit-on-success, matching the better of the two current implementations).
- Consider folding or deleting
test_gfxstat_reports_resident_graphics given the overlap with test_sd_payload_excludes_non_runtime_sources.
Context
Surfaced while implementing Stage 0/1 of the C-Dogs asset-memory redesign (local specs, not tracked in this repo). Parent commits e9b1622e..21a9b389.
Problem
test_heapstat_is_emitted_and_truthfulandpeak_gfx_total(tests/e2e/test_cdogs_memory.py, ~lines 200 and 336) both implement essentially the same driver sequence: launch the app, wait for the first report line, sendenter/ sleep /enter, then settle-poll, plus a near-verbatim navigation-sanity guard (~line 394 explicitly says it "mirrors" the other test's drive sequence). That's roughly 40 duplicated lines.The two settle loops also differ in style for no clear reason — one breaks out early on success, the other always burns its full 12s window regardless of whether it already succeeded.
Separately,
test_gfxstat_reports_resident_graphics(~line 419) is now largely redundant with the newer Task 4 test (test_sd_payload_excludes_non_runtime_sources, ~line 446) but still costs a full simulator boot plus a ~22MBcopytreefor a fairly thin assertion — worth folding into the newer test or dropping.Impact
Low priority — this is test-code maintainability, not a functional bug. Nothing here affects correctness of the suite today, but it's the kind of duplication that will drift (already has, given the settle-loop style difference) as the tests get touched again.
Suggested direction
drive_quickplay(sim, marker)helper used by both tests, with one consistent settle-loop style (early-exit-on-success, matching the better of the two current implementations).test_gfxstat_reports_resident_graphicsgiven the overlap withtest_sd_payload_excludes_non_runtime_sources.Context
Surfaced while implementing Stage 0/1 of the C-Dogs asset-memory redesign (local specs, not tracked in this repo). Parent commits
e9b1622e..21a9b389.