docs(tests): the dropped report coverage is LOST, not relocated — a do-not-restore comment had a false reason (#4183)

Comment-only. Corrects a claim #4179 put into the merged code, where it is more
dangerous than it was in a PR body.

`tests/preview-moderation.spec.ts` asserted in two places that the dropped
report-actioning coverage "belongs to `apps/moderator`'s own suite". There is no such
suite:

    apps/moderator   *.test.ts / *.spec.ts files : 0
    positive control — packages/                 : 81

The coverage is LOST, NOT RELOCATED, and the loss originates in #3573's deletion of
`report.getAll` / `report.setStatus` — not in the change that stopped asserting them.

🔴 Why this warranted a PR rather than a note on the issue: the second instance is
attached to a DO-NOT-RESTORE instruction. That is the shape where a false rationale
actively misleads — a maintainer who does the right thing and checks the stated reason
before obeying finds no suite, reasonably concludes the comment is stale, and may try
to restore legs calling procedures that no longer exist in this app.

The load-bearing half of that comment is correct and kept verbatim: the procedures were
deleted, so asserting them from a preview of this app is not possible. Only the clause
about where the coverage went was wrong. The do-not-restore reason is now "the
procedures do not exist, so it cannot be made to work", which holds independently, plus
an explicit note that the old rationale was refuted and why the distinction matters at
that specific site.

Verified comment-only by stripping comments from base and head and diffing the result,
not by a line-prefix grep — which cannot tell a block comment from code. prettier clean.
No behaviour, assertions or test names touched.

Refs: #4182, #4179, #4171, #3573
This commit is contained in:
Zachary Lowden
2026-08-20 01:26:06 -05:00
committed by GitHub
parent 1891ce76aa
commit 9c373dfb4e
+16 -3
View File
@@ -28,7 +28,9 @@ import { trpcMutation, uniqueToken } from './preview-trpc';
* 3. The report-CREATION leg of the old end-to-end action test. `report.create`
* is still a main-app guardedProcedure; `report.getAll` / `report.setStatus`
* are not (they were deleted in #3573), so the ACTIONING half of that
* coverage now belongs to the moderator app's own suite, not here.
* coverage cannot be asserted from here. 🔴 It is LOST, NOT RELOCATED —
* `apps/moderator` has ZERO test files (measured; positive control: 81 under
* `packages/`). Tracked as #4182.
*
* Only runs under playwright.preview.config.ts (needs PREVIEW_URL + minted states).
*
@@ -195,7 +197,18 @@ test.describe('moderation surface (mod)', () => {
// 🔴 The ACTIONING legs (report.getAll → report.setStatus → re-read as
// 'Actioned') used to live here. #3573 deleted both procedures from this app's
// report.router.ts — that queue is the moderator app's now, and asserting it
// from a preview of THIS app is not possible. Do not "restore" them here; the
// coverage belongs to apps/moderator's own suite.
// from a preview of THIS app is not possible. Do not "restore" them here: the
// procedures do not exist, so it cannot be made to work.
//
// 🔴 AND DO NOT READ THAT AS "the coverage moved". An earlier version of this
// comment said it "belongs to apps/moderator's own suite" — there is no such
// suite. `apps/moderator` has ZERO test files (measured; positive control: 81
// under `packages/`). This coverage is LOST, and the loss originates in #3573,
// not in the change that stopped asserting it. Tracked as #4182.
//
// The distinction matters here specifically: this is a do-not-restore
// instruction, so a maintainer who checks its stated reason, finds no suite and
// concludes the comment is stale could try to restore procedures that no longer
// exist. The reason above — they were deleted — is the one that holds.
});
});