Skip to content

📦🔧:recognize comments in generator syntax - #111

Closed
DerekNonGeneric wants to merge 1 commit into
claude/project-thread-hho3c3-base-108from
claude/project-thread-hho3c3-review-108
Closed

DerekNonGeneric wants to merge 1 commit into
claude/project-thread-hho3c3-base-108from
claude/project-thread-hho3c3-review-108

Conversation

@DerekNonGeneric

@DerekNonGeneric DerekNonGeneric commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Requested by DerekNonGeneric · project thread

Review only. Do not merge. This replays the already-merged #108 (commit b554adf against its parent) so CodeRabbit can review it, because it hit its rate limit when #108 was open and it refuses to review closed PRs. Findings will be fixed in a separate PR against main, and this PR will be closed.


Generated by Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Generator and async-generator functions are now correctly recognized when their source includes a retained line comment between function and *.

Treat line comments and their terminators as source gaps when checking
generator and async-generator function shapes. This matches valid source
preserved by Function.prototype.toString.

Add regressions for both generator kinds.

Signed-off-by: Derek Lewis <DerekNonGeneric@inf.is>
Assisted-by: Codex:gpt-6-astra
PR-URL: #108
Fixes: #107
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: cb196522-8b8b-47d8-a4b9-7c211fe1ff26

📥 Commits

Reviewing files that changed from the base of the PR and between 8177c45 and b554adf.

📒 Files selected for processing (4)
  • .changeset/generators-retain-line-comments.md
  • packages/util-core/src/_internal/_matches-brand-shape.ts
  • packages/util-types/test/guards/is-async-generator-function.ts
  • packages/util-types/test/guards/is-generator-function.ts

Included review availability: This review used your included allowance. 1 included review remains after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.


📝 Walkthrough

Walkthrough

The comment matcher now recognizes line comments as well as block comments. Tests cover generator and async-generator functions with a line comment between function and *. A changeset requests patch releases for both packages.

Changes

Generator guards

Layer / File(s) Summary
Comment-aware generator matching
packages/util-core/src/_internal/_matches-brand-shape.ts, packages/util-types/test/guards/is-generator-function.ts, packages/util-types/test/guards/is-async-generator-function.ts, .changeset/generators-retain-line-comments.md
The comment pattern now recognizes line comments terminated by CR, LF, CRLF, U+2028, or U+2029. Tests check both generator guards with retained line comments. The changeset requests patch releases for both packages.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to b554a

No code-level merge blocker is established for the comment-recognition change. The PR is described as a review-only replay that should be closed rather than merged.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: recognizing comments in generator syntax. The emojis add noise, but the title remains specific and clear.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
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.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Member Author

@coderabbitai review


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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