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:
@@ -22,7 +22,7 @@ import { SURFACE } from "./surfaces";
|
||||
// "Opened last", not "host mounted last": a host can remount while its overlay stays open —
|
||||
// PlayerModal's moves into the fullscreen stage and back — and ranked by mount time it came back on
|
||||
// top of a dialog opened over the player (the download dialog after leaving true fullscreen), so the
|
||||
// toasts were drawn under that dialog's scrim again (deep-review round 4). So the OVERLAY takes its
|
||||
// toasts were drawn under that dialog's scrim again. So the OVERLAY takes its
|
||||
// rank once, when it opens (`useOverlayOrder`, in overlayOrder.ts), and hands it to every host it renders.
|
||||
type Host = { id: string; order: number };
|
||||
const overlayHosts = createStore<readonly Host[]>([]);
|
||||
@@ -70,16 +70,16 @@ export default function Toaster({
|
||||
// the takeover render. Reading the store live also silenced a toast RAISED in the same commit as
|
||||
// the takeover: a dialog that notifies and closes in one handler (UploadDialog) put its success
|
||||
// toast up in the very batch that handed the app host the top spot, so it was classified as
|
||||
// inherited and announced by neither path (deep-review round 5). The top host records its screen
|
||||
// inherited and announced by neither path. The top host records its screen
|
||||
// after each commit (the layout effect below); a host taking over reads it in a LATER render, after
|
||||
// that commit, so it always sees the outgoing host's last committed screen. (It was written during
|
||||
// render, which made the React Compiler skip the Toaster — E32 — and let a discarded render
|
||||
// render, which made the React Compiler skip the Toaster and let a discarded render
|
||||
// overwrite it.)
|
||||
//
|
||||
// Snapshotted into state when `isTop` flips, adjusted DURING render — not a `useMemo`, which React
|
||||
// may recompute (and the compiler is free to): a recompute while top would re-read this host's OWN
|
||||
// screen and silence its next toast. Under StrictMode the double invocation reads the same,
|
||||
// unchanged global, so both passes agree (the round-6 failure was a render-phase WRITE racing it).
|
||||
// unchanged global, so both passes agree (an earlier failure was a render-phase WRITE racing it).
|
||||
const [handover, setHandover] = useState<{ top: boolean; ids: ReadonlySet<number> }>({
|
||||
top: false,
|
||||
ids: EMPTY_IDS,
|
||||
|
||||
Reference in New Issue
Block a user