tests/social-velocity-seed-health.test.mjs |
The relay writes error seed-meta on Reddit failures, and writes healthy meta only after the canonical write succeeds |
Runtime test. tests/social-velocity-boundary.test.mts:91-110 already runs seedSocialVelocity through a vm harness. |
tests/save-to-storage-quota-guard.test.mjs |
saveToStorage still writes after the quota flag is set; the persistent cache stays behind the flag |
Runtime test. It is small and needs a storage stub that fails on quota. |
tests/rss-mobile-yielding.test.mts |
Mobile feed parses are queued and yield, desktop parses stay concurrent, and no-store relay responses are never cached |
Runtime test through src/services/rss. Its L14 regex requires an exact comment line. |
tests/notifications-settings-ui-invariants.test.mjs |
Realtime disables all/high and snaps to critical; atomic setNotificationConfig save; the gate is hasTier(1), not isProUser |
DOM test. tests/dom/notifications-settings-web-push.test.mts already mounts the panel. |
tests/energy-variant-renewable-guard.test.mts |
The energy variant mounts and loads the renewable panel outside the happy-only branch |
Runtime test. Its regexes currently depend on comment text. |
tests/app-destroy-lifecycle.test.mjs |
App.destroy teardown order, the vessel runtime epoch gate, and listener pairing |
DOM test. tests/dom/app-followed-countries-cap-drop-toast.test.mts (#8686) now runs the real init/destroy, so the same approach may fit. |
tests/a11y-issue-7382-welcome-invariants.test.mjs |
/pro welcome a11y: no opacity fade, a single logo anchor, a Launch CTA aria-label that matches its text |
Test against the built public/pro output, as tests/pro-welcome-prerender.test.mjs does. |
tests/digest-cache-key-sensitivity.test.mjs |
The digestFor memo key includes cand.rule.sensitivity ?? 'high', which guards a cross-user data leak |
Extract the key builder into scripts/lib/digest-orchestration-helpers.mjs, as #8686 did for the score floor. |
tests/relay-tanker-shipstatic.test.mjs |
The AISStream subscription includes ShipStaticData, plus the tanker classification fallback, TTL and size cap |
The relay starts a server on import, so export or extract the pure pieces first. If that is too invasive, keep this as a text check and document why (section 2). |
tests/cloud-prefs-panel-sync-guard.test.mjs (partly) |
App reapplies cloud prefs live (tier clamp, map mode, tab heal) |
The dirty-key half already runs in tests/cloud-prefs-sync-concurrency.test.mts:849. Convert or drop the App wiring half. |
tests/map-renderer-deferral.test.mjs (partly) |
Readiness and viewport queues |
Keep the import-graph and dist checks (roughly L191-333). The regex method-body checks (roughly L335-614) are partly covered by tests/map-viewport-runtime.test.mts; drop or convert the rest. |
Follow-up to #8683 (closed). #8685 deleted 23 of the source-text suites, and #8686 replaced 13 more with runtime tests. This issue covers what #8683 left open: step 4 for about 10 kept suites, and step 3 for the suites where the text is the contract.
1. Suites that still check behaviour only by matching source text
The #8683 review kept each of these because it is the only guard on something real. But the behaviour it claims can break while the matched text stays, so none of them is a real test yet.
tests/social-velocity-seed-health.test.mjstests/social-velocity-boundary.test.mts:91-110already runsseedSocialVelocitythrough a vm harness.tests/save-to-storage-quota-guard.test.mjssaveToStoragestill writes after the quota flag is set; the persistent cache stays behind the flagtests/rss-mobile-yielding.test.mtssrc/services/rss. Its L14 regex requires an exact comment line.tests/notifications-settings-ui-invariants.test.mjsall/highand snaps tocritical; atomicsetNotificationConfigsave; the gate ishasTier(1), notisProUsertests/dom/notifications-settings-web-push.test.mtsalready mounts the panel.tests/energy-variant-renewable-guard.test.mtstests/app-destroy-lifecycle.test.mjsApp.destroyteardown order, the vessel runtime epoch gate, and listener pairingtests/dom/app-followed-countries-cap-drop-toast.test.mts(#8686) now runs the realinit/destroy, so the same approach may fit.tests/a11y-issue-7382-welcome-invariants.test.mjspublic/prooutput, astests/pro-welcome-prerender.test.mjsdoes.tests/digest-cache-key-sensitivity.test.mjsdigestFormemo key includescand.rule.sensitivity ?? 'high', which guards a cross-user data leakscripts/lib/digest-orchestration-helpers.mjs, as #8686 did for the score floor.tests/relay-tanker-shipstatic.test.mjstests/cloud-prefs-panel-sync-guard.test.mjs(partly)tests/cloud-prefs-sync-concurrency.test.mts:849. Convert or drop the App wiring half.tests/map-renderer-deferral.test.mjs(partly)tests/map-viewport-runtime.test.mts; drop or convert the rest.2. Text checks that stay: say why in the header
#8683 step 3 asked every text check that stays to explain in its file header why the source text is the contract. Examples include CSP, committed HTML, cross-file health-key parity, and code that cannot be imported. The kept suites that lack such a header are the contract and wiring guards listed in the #8683 review (#8683 comments and the #8685 description). Add one or two sentences to each, stating what is pinned and why a runtime test cannot do the job.
Acceptance
scripts/shared/data-test-durations.json.npm run test:data, andtest:dom/test:convexwhere touched, pass.Out of scope
scripts/shared/data-test-durations.jsonthat were already on main before test(coverage): delete 23 source-text suites that execute no production code (#8683) #8685 (checkout-overlay-lifecycle,deckgl-layer-state-aliasing,entitlement-watchdog,national-debt-ticker). Remove them in whichever PR touches that file first.