Skip to content

R17 (#103): comment cleanup — delete restatement, keep rationale - #124

Merged
nicpozent merged 1 commit into
mainfrom
claude/code-examination-qx719b
Aug 5, 2026
Merged

R17 (#103): comment cleanup — delete restatement, keep rationale#124
nicpozent merged 1 commit into
mainfrom
claude/code-examination-qx719b

Conversation

@nicpozent

Copy link
Copy Markdown
Owner

What & why

Part of the code-review remediation epic (#106). Addresses R17 / #103. A comment that restates the line below is a defect — two statements of one fact, nothing keeping them in sync — and here it once concealed a real authorization bug (the R2 case). Judgement per site, no bulk delete, no behaviour change.

Group (a) — worked site by site

Deleted (14 pure restatements): EmptyBlock, LiveDot, yearOf, sceneToSvg, download, startWire, armShape, ShapeGlyph, shortDate, setStatus, pointsAttr (frontend); MapOpsType, MapOpsStatus, OpsImpactRowDto (backend).

Trimmed to their non-obvious contract (3): monthOfIso (→ "0..11; null if empty/invalid"), translateNode (→ "freehand nodes also shift their polyline points"), initialsOf (→ the algorithm).

Kept — the heuristic mis-flagged these (they carry real information, not restatement): MapAdoPriority ("1 highest…4 lowest"), MapSprintState / MapPriority (input/output vocabulary), LastSegment / DatePart (format + empty-string contract with a worked example), MonthOf, ObjNameArray, EpicKeyOf (fallback algorithm), and the two MapDelete endpoint comments in Whiteboards.cs — there MapDelete is the ASP.NET HTTP-verb helper, so the comment documents the cascade delete, not an identifier. Each keep is a deliberate group-(c) call.

Not touched / notes

  • Group (b) --- SECTION --- banners and group (c) false-positives: left alone per the issue.
  • src/api.ts:100-102 (stale commented example): already removed in R11.
  • Contradicting-comment sweep: none found in this pass — the R2-style Jira.cs gate comment is already fixed.
  • Added the why-not-what rule to CLAUDE.md §9 (Do), phrased for humans and assistants, including "treat a comment that contradicts its code as a suspected bug".

Acceptance

npm run build && npm test              # 145 pass ✓
dotnet test Atlas.sln -c Release        # 507 pass ✓ (verified locally, Debug)

No renames were needed (the deleted-comment identifiers are self-explanatory), so there are no call-site changes.

🤖 Generated with Claude Code


Generated by Claude Code

Judgement per site (no bulk delete, no behaviour change). Deleted 14 comments
that only restated a self-explanatory identifier: EmptyBlock, LiveDot, yearOf,
sceneToSvg, download, startWire, armShape, ShapeGlyph, shortDate, setStatus,
pointsAttr (frontend) and MapOpsType, MapOpsStatus, OpsImpactRowDto (backend).
Trimmed 3 to just their non-obvious contract: monthOfIso (0..11/null),
translateNode (freehand points move too), initialsOf (the algorithm).

Kept the ones the heuristic mis-flagged — they carry real information, not
restatement: MapAdoPriority ("1 highest…4 lowest"), MapSprintState/MapPriority
(input/output vocab), LastSegment/DatePart (format + empty-string contract with
a worked example), MonthOf, ObjNameArray, EpicKeyOf (fallback algorithm), and the
two Whiteboards MapDelete comments (there "MapDelete" is the HTTP-verb helper —
the comment documents the cascade, not the identifier).

api.ts:100-102 (the stale example) was already removed in R11. No comment found
contradicting its code in this pass (the R2-style Jira gate case is already
fixed). Added the why-not-what rule to CLAUDE.md §9.

Frontend build + 145 tests green; backend build + 507 tests green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F1g44VLAeYdf3FAoXsXRu7
@nicpozent
nicpozent merged commit d897584 into main Aug 5, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants