Skip to content

Remove redundant and stale comments from the MCP package - #363

Merged
JustasMonkev merged 2 commits into
mainfrom
cleanup/comment-ratchet
Nov 21, 2026
Merged

JustasMonkev merged 2 commits into
mainfrom
cleanup/comment-ratchet

Conversation

@JustasMonkev

@JustasMonkev JustasMonkev commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

Remove 116 comments from the scanner source, published configuration declarations and Vitest configuration. Preserve the existing license notices, visibility annotations and public configuration guidance. Removing the comment from one single-statement conditional also lets it use the brace style required by the existing linter.

The cleanup removes 133 lines net across 15 existing files. npm run check and npm run build pass.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T06:36:48.318714Z 9bbb214 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

This change adds a comment inventory and lint check, integrates the check into local and CI workflows, and removes explanatory comments from source files. It also adds decision records and changes debugger-detach handling so the tab remains in _knownTabs.

Changes: Comment policy and source updates

Layer / File(s) Summary
Comment lint workflow
.agents/skills/delete-comment/SKILL.md, .claude/commands/delete-comment.md, .gitignore, .github/workflows/ci.yml, package.json, scripts/lint-comments*, README.md, docs/decisions/008-test-discovery.md, vitest.config.ts
Adds comment inventory and base-revision comparison, tests the linter, and adds it to lint and CI checks. The workflow sets COMMENT_BASE_REF; documentation and the delete-comment skill describe its use. Vitest no longer excludes scripts/** from test discovery.
Audit measurement comment cleanup
src/tools/auditTextSpacing.ts, src/tools/textSpacingMeasurement.ts, src/tools/formValidationMeasurement.ts, docs/decisions/005-audit-measurement-and-evidence.md
Removes explanatory comments from audit and measurement code. The baseline candidate-owner condition remains unchanged. ADR-005 records measurement, cleanup, and evidence rules.
Adapter and evaluation comment cleanup
config.d.ts, src/config.ts, src/extension/browserModel.ts, src/inputRecorder.ts, src/tools/auditSite.ts, src/tools/evaluate.ts, docs/decisions/006-playwright-adapter-contracts.md
Removes explanatory comments from configuration, adapter, recording, audit, and evaluation code. The debugger-detach handler no longer removes the tab from _knownTabs. ADR-006 records adapter decisions.
Utility comment and coverage-note cleanup
src/utils/*, vitest.config.ts, docs/decisions/007-bounded-output-and-selection.md
Removes explanatory comments from utility code and coverage exclusions. ADR-007 records bounded-output and selection constraints.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant CI
  participant NpmCheck
  participant CommentLinter
  participant Git
  participant BabelParser
  CI->>NpmCheck: Set COMMENT_BASE_REF and run checks
  NpmCheck->>CommentLinter: Run lint-comments.mjs
  CommentLinter->>Git: Verify base and identify changed files
  CommentLinter->>BabelParser: Parse JavaScript and TypeScript comments
  BabelParser->>CommentLinter: Return comment records
  CommentLinter->>Git: Read base versions for comparison
Loading

Possibly related PRs

Suggested reviewers: claude

Merge Risk: Minimal · up to c26b6

This change removes prose comments, adds a lint check that blocks new ones, and records decisions in ADRs. No concrete runtime risk was established, so it looks safe to merge after the normal checks pass.

Pre-merge checks: Passed 4

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Remove redundant and stale comments from the MCP package" matches the main change. The changeset removes comments across the package, including config.d.ts, config.ts, browserModel.ts, seve…
Full details: Title check

Explanation

The title "Remove redundant and stale comments from the MCP package" matches the main change. The changeset removes comments across the package, including config.d.ts, config.ts, browserModel.ts, several tools, utils, and vitest.config.ts. The objectives describe the same removal of 116 runtime and configuration comments. The title is specific, concise, and accurate. One caveat: the changes cover more than the MCP package's runtime files, and the PR also adds a lint rule, skills, and ADRs. The title does not mention those parts, but it does not need to cover every detail.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d7906be6-b346-4046-a903-cedc4dc99183
Commits

Reviewing files that changed from the base of the PR and between f772333 and c26b6bb.

Files ignored due to path filters: 1

  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 27

  • .agents/skills/delete-comment/SKILL.md
  • .claude/commands/delete-comment.md
  • .github/workflows/ci.yml
  • .gitignore
  • README.md
  • config.d.ts
  • docs/decisions/005-audit-measurement-and-evidence.md
  • docs/decisions/006-playwright-adapter-contracts.md
  • docs/decisions/007-bounded-output-and-selection.md
  • docs/decisions/008-test-discovery.md
  • package.json
  • scripts/lint-comments.mjs
  • scripts/lint-comments.test.mjs
  • src/config.ts
  • src/extension/browserModel.ts
  • src/inputRecorder.ts
  • src/tools/auditSite.ts
  • src/tools/auditTextSpacing.ts
  • src/tools/evaluate.ts
  • src/tools/formValidationMeasurement.ts
  • src/tools/textSpacingMeasurement.ts
  • src/utils/ariaCompression.ts
  • src/utils/dataUrl.ts
  • src/utils/fileUtils.ts
  • src/utils/guid.ts
  • src/utils/representativeUrls.ts
  • vitest.config.ts
Files with no reviewable changes: 13

  • config.d.ts
  • src/config.ts
  • src/extension/browserModel.ts
  • src/inputRecorder.ts
  • src/tools/auditSite.ts
  • src/tools/auditTextSpacing.ts
  • src/tools/evaluate.ts
  • src/tools/textSpacingMeasurement.ts
  • src/utils/ariaCompression.ts
  • src/utils/dataUrl.ts
  • src/utils/fileUtils.ts
  • src/utils/guid.ts
  • src/utils/representativeUrls.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@JustasMonkev JustasMonkev changed the title Remove runtime prose comments and ratchet new comments in lint Remove redundant and stale comments from the MCP package Nov 21, 2026
@JustasMonkev
JustasMonkev merged commit c40095a into main Nov 21, 2026
13 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.

1 participant