Repository navigation
chore(server): remove the reader report form and its table - #80
Conversation
Reports (GET/POST /report/:draftId, the draft_reports table, the wrapper footer) were PatchPage's free-service safety valve; nothing builds on them and they were the one reader-facing surface that would otherwise leak into packages/serving. Removed the routes, the form and footer, the report rate limit and its env var, migration 0006, the db rows on both drivers, the draft.reported analytics event, and every test and doc that mentioned them. Moderation stays. No page-level rate limit survives: every remaining limiter is on /api/*. Made with Claude Fable 5 in Claude Code. Co-Authored-By: Claude Fable 5 <[email protected]>
The ui-consistency review spec still described the report form and the wrapper footer, a Postgres test title still said it recorded a report, and renderDraftWrapper took a homeUrl it never rendered. Made with Claude Fable 5 in Claude Code. Co-Authored-By: Claude Fable 5 <[email protected]>
Code review (PR 80 × issue 69)Two-axis Standards
Deleting
Markup itself matches the UI spec: first-party pages still compose Baseline smells (judgement)Mysterious Name — Shotgun Surgery — suppressed: one-concern feature deletion across the layers that owned reports; repo standard wins. No Duplicated Code, Speculative Generality, or Feature Envy in the change. SpecOrdinary English “report” (analytics capture, CLI status, SECURITY.md, triage “reporter”) is not in scope. Findings below are the reader-report domain. (a) Missing or partial“Done when: No route, table, type, test or doc mentions reports” Three leftovers:
Otherwise the Do list holds: (b) Scope creepNone that changes behaviour. mint-token/ui-consistency/effect-service-conventions, (c) Implemented wrongNone. Drivers already iterate shipped IDs only, so a leftover Intent (#69 vs what landed)The ticket is port-prep, not a drive-by delete: strip the one reader-facing surface that would otherwise leak into That is what landed. The serving contract is now “sandboxed frame and nothing else.” The product gap is the one the ticket accepted: there is no longer a stored feed of flags. Verdict: mostly matched. Drift is leftover vocabulary ( MethodElegant. Deleting The Fastify plugin (urlencoded parser scoped so it could not leak onto Tests: deleting the report cases instead of converting them to “ Leaving ADR-0001 dated is the right method for an ADR. Rewriting it to satisfy “no doc mentions reports” would falsify the trust-model history. The PR body names that exception. YAGNI / leftover complexityThe leftover serving surface is the small model. Trim, don’t rewrite:
23 files / 1243 deletions is the feature’s real surface, not shotgun. The Effect-skill one-liner dropping Summary
|
…rt wording The ui-consistency spec asks for a focused render.test.ts case when rendered structure changes; the wrapper lost its footer without one. Also renames the last test fixtures still named for reports and fixes the analytics docs that still counted seven events. Made with Claude Fable 5 in Claude Code. Co-Authored-By: Claude Fable 5 <[email protected]>
|
Went through the review against the source. Every concrete finding was real; addressed in 752e403. Fixed
Left as-is, on purpose
Gate on HEAD: lint, typecheck, 1812 tests, prettier — all green locally; CI running on 752e403. |
Closes #69.
Readers could flag a served page through a footer link, a
/report/:draftIdform, and adraft_reportstable. That was PatchPage's free-service safety valve; nothing builds on it, and it was the one reader-facing surface that would otherwise leak intopackages/servingduring the Effect port (#56).This removes the whole entry point: the routes and their scoped form parser, the form and acknowledgement pages, the wrapper footer (a served page is now the sandboxed frame and nothing else), the report rate limit and
PATCHY_REPORT_RATE_LIMIT_PER_MINUTE, migration0006_draft_reports, the report rows on both db drivers, thedraft.reportedanalytics event, and every test and doc that described them. Moderation (GET /api/drafts/:id, principal listing, disable/delete/revoke) is untouched.No page-level rate limit survives. Every remaining limiter (
protectedApi,authenticatedUpload,selfServiceMint,draftCreate) is on/api/*, soservingdoes not importlimits.Notes for the ticket:
docs/API.mddoes not exist;skills/patchy/SKILL.mdandREADME.mdonly use "report" as an ordinary word, so needed no change.docs/adr/ADR-0001still says "report-driven takedown" and is left as a dated record. Both drivers skip ledger IDs they no longer know, so a dev store that already ran0006still boots.Made with Claude Fable 5 in Claude Code.