Skip to content

improvement(lint): strip comment noise and add check:comment-hygiene - #8551

Merged
waleedlatif1 merged 4 commits into
stagingfrom
improvement/comment-density
Oct 2, 2026
Merged

waleedlatif1 merged 4 commits into
stagingfrom
improvement/comment-density

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Comment-only sweep of the 60 noisiest files: removed ~2,900 lines of section labels, comments that restate the next line, change-history narration, and scratch math; promoted ~100 genuine contract notes (units, enums, invariants) to TSDoc. Kept every non-obvious why, spec/math note, quirk, biome-ignore, and // <tag>: annotation
  • Converted or removed 236 banner separators across 37 files; deleted 9 commented-out code blocks
  • Deleting the commented-out greptile_search access entry fixed generated docs that advertised a disabled Greptile Search operation (regenerated greptile.mdx and integrations.json)
  • New check:comment-hygiene audit: fails on banner separators and on runs of // comments that parse as TypeScript (commented-out code). Comments come from the Babel token stream so strings are never inspected; escape hatch is // comment-hygiene-allow: <reason>. Zero false positives across the tree before the sweep; no baseline since every hit was fixed
  • Change-history phrasing ("previously", "no longer") was not made a check — too often describes live runtime state

Type of Change

  • Improvement (code hygiene / guardrails)

Testing

  • Every changed source file compared to staging with comments stripped from the Babel token stream: identical tokens in all files (comment-only sweep)
  • bun run check:audits, bun run test:scripts (incl. 8 new detector tests, each guard mutation-checked to go red), bun run lint, bunx turbo run type-check
  • Vitest beside changed files (apps/sim, realtime, sim-cli)

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

🤖 Generated with Claude Code

Removes dead sub-block configs from the Human in the Loop and Greptile
blocks and an unused commented-out DisplayMode type. The docs generator
read the commented-out greptile_search entry in tools.access, so the
generated Greptile docs advertised a disabled operation; regenerated.
Fails on banner separator comments and on line comments whose text
parses as TypeScript (commented-out code). Comments come from the Babel
token stream so strings are never inspected; prose lines split comment
groups, and labels, literals and one-off glosses are rejected, giving
zero false positives across the tree. Change-history phrasing was
measured and left out because most hits describe live state.
Converts decorated section banners to plain comments or drops them, and
sweeps the noisiest files for comments that restate the code or name
what follows. Field-level notes that carry units, enums or invariants
move to TSDoc. Comment-only: the non-comment token stream of every
changed file is identical.
@waleedlatif1
waleedlatif1 requested a review from a team as a code owner October 2, 2026 00:21
@vercel

vercel Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Oct 2, 2026 12:36am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 94 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/lib/pptx-renderer/shapes/presets.ts Outdated
@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low risk] Removes redundant comments from code and docs.

The PR appears safe to merge based on the reviewed changes.

Summary

The PR removes comment noise across source files, removes documentation for a disabled Greptile Search operation, and adds a comment-hygiene audit. Since the previous review, it has made throwing parse failures fail the audit and increased the tracked-file listing buffer.

Reviews (2) · Last reviewed commit: "fix(audits): fail comment-hygiene on unp..."

Comment thread scripts/check-comment-hygiene.ts Outdated
Comment thread scripts/check-comment-hygiene.ts
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 94 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 3f29a16 into staging Oct 2, 2026
32 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/comment-density branch October 2, 2026 00:37

This branch was successfully deployed

1 active deployment
Preview — e145b10c Deployed Oct 2, 2026 by vercel[bot]
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