chore(comments): drop epic, sprint and review-round ids from the code

The code cited its plan instead of saying why: `E28 review J4`, `(R6 S3b)`, `S1 justified…`,
`deep-review round 5`. That plan lives in the private ops repo, so for every reader of this one the
citation was noise, and a sentence whose subject was the plan step ("round 2 showed…") hid its
lesson behind an id. Each one is gone and the "why" kept: a bare citation is deleted, a sentence
carrying a lesson is reworded around it ("a later attempt showed…").

Measured (`scripts/audit_metrics.py`, product code): 652 lines in 270 files carried an epic code by
the definition the next commit holds (507 / 241 by the old, two-digit-only one) -> 0. Across all
code, tests, scripts and configs: ~1100 epic-code lines plus ~320 sprint/round ids.

Behaviour unchanged, checked mechanically: every changed .py file has the same AST once docstrings
are blanked; css/sh/toml/yml/json files are identical once comments are stripped; the only
non-comment changes in TS/JS are test titles, one description string in a contract table, and five
ESLint messages, whose text is all the gates snapshot diff holds. Not touched: Markdown (docs and
the changelog keep their history), Alembic migrations, TV episode notation (`S2 · E5`), DESIGN.md
ids (`C1`, `B4`, `S3h`), tracker ids (`SEC-16`, `DX-17`).

One stale claim fixed on the way: test_hls_reaper's docstring said the player checkpoints "every
10 s whether or not it is playing", which plex/stream.py calls wrong; it now says what the code does.
This commit is contained in:
2026-10-05 00:19:39 +02:00
parent c73d8be094
commit 4aaaaa7860
669 changed files with 1831 additions and 1904 deletions
@@ -1,6 +1,6 @@
// @vitest-environment jsdom
//
// Modal: focus management (FE-9). This was DEFERRED from the E4 deep-review because it's
// Modal: focus management (FE-9). This was DEFERRED from a code review because it's
// jsdom-untestable as written — `focusablesIn` filters on `el.offsetParent !== null`, and jsdom
// returns null for EVERY element (it never lays out), so the trap would see zero focusables and do
// nothing. We stub `HTMLElement.prototype.offsetParent` to report "visible" (non-null) for any
@@ -225,7 +225,7 @@ describe("Modal focus trap (offsetParent stubbed 'visible')", () => {
// The Tab trap deliberately spans the dialog ROOT so a toast's Undo/✕ is reachable; ownership
// was tracked over the PANEL, so touching that ✕ read as "the user left the dialog" and the
// restore was skipped — and removing the toast fires no focusin to re-arm it. Measured landing
// on <body> (deep-review round 6).
// on <body>.
const trigger = document.createElement("button");
document.body.appendChild(trigger);
trigger.focus();
@@ -281,7 +281,7 @@ describe("Modal focus trap (offsetParent stubbed 'visible')", () => {
// layer is above me" (measured). So a dialog that closes on its own — an in-flight mutation's
// `onSuccess`, not a click, since a scrim covers it — under a modal raised above it yanked the
// focus out of that standing dialog onto its own trigger, behind the scrim, where Enter still
// activated it (deep-review round 7). Sibling dialogs, not nested: that is the arrangement
// activated it. Sibling dialogs, not nested: that is the arrangement
// `ConfirmProvider` and the app-wide `ErrorDialog` actually use.
const trigger = document.createElement("button");
document.body.appendChild(trigger);
@@ -366,7 +366,7 @@ describe("Modal — toasts raised while it is open", () => {
});
});
// E28: one Escape in a dialog's open list closed the list AND the dialog (the share dialog's user
// One Escape in a dialog's open list closed the list AND the dialog (the share dialog's user
// picker). The list's `document` listener closes it with a synchronous flush, which pops its layer
// before the dialog's `window` listener runs — so "am I topmost?" reads yes. The dialog must honour
// the list's stamp, as the players already do (UX-8).