Files
Project-SDE-WP-Suite/tests
Matt Mabrey 4f3a94bd06 T11.6 follow-up: fix autosave_check.py regression from the retired tracker
Found running the full tests/*_check.py suite as part of a deployability
check on feat/waves-11-13: autosave_check.py's "section 7" asserted that
calling trackStepDwell() still wrote an event into wp-usage.js's
localStorage log (wp_suite_analytics_v1). That assertion predates CR-019
and was checking that the autosave guard hadn't accidentally clobbered
the pre-existing analytics dwell listener - a real concern at the time.

T11.6 (previous commit b2a083a) retired that listener on purpose: track()
is now a documented no-op and wp-usage.js is gone, so the localStorage key
is never written to any more. The test was still asserting the old
behavior, so it now correctly failed (0 -> 0) - this was a gap in T11.6's
own verification (only tests/baseline_shots.py was run for it at the
time; the full suite wasn't).

Fix: rewrote section 7 to check what's actually still true - autosave's
own registration (WPAutosave / sopDraftId), and that the retired
trackStepDwell() is a harmless no-op (exists, doesn't throw) rather than
missing or broken - instead of asserting it still records anywhere.

Verified: tests/autosave_check.py now passes 33/33 (was 33/34, exit 1).
Also ran the complete tests/*_check.py suite (39 scripts) as a
deployability check for the whole feat/waves-11-13 branch:
  - 38/39 exit 0 after this fix
  - token_check.py exits 2 when run with no arguments by design (it needs
    --out or --compare) - a harness-invocation detail, not a test failure;
    already confirmed non-regression in wave 10
  - generalinfo_check.py has one known pre-existing failure (a raw colour
    literal check against html/wp-creation-styles.css, a file untouched by
    any wave 11/13 work) - already diagnosed as pre-existing in wave 10,
    unrelated to CR-019/D18
Also re-verified the usage_events migration (T11.1) round-trips cleanly
on SQLite (upgrade/downgrade/upgrade) and renders clean, valid DDL for
Postgres via `alembic upgrade ... --sql` (TIMESTAMP WITH TIME ZONE / JSON,
no SQLite-only syntax) - no BL-027-class defect.
Backend smoke test (27/27) and seed_demo.py still pass.
2026-09-24 16:38:55 -07:00
..