Skip to content

fix(reducers): support requiring array receiver evidence - #51

Open
xiehuanyi wants to merge 1 commit into
dmmulroy:mainfrom
xiehuanyi:fix/reducer-array-evidence
Open

xiehuanyi wants to merge 1 commit into
dmmulroy:mainfrom
xiehuanyi:fix/reducer-array-evidence

Conversation

@xiehuanyi

Copy link
Copy Markdown

The accumulator-copy rule now supports requireArrayReceiver: true, using the existing local array evidence helper before classifying a reduce/ reduceRight callback. A custom one-call API can avoid the growing-array warning, while known array literals, aliases and typed array chains remain covered. The default method-name heuristic stays compatible and is now documented.

Fixes #50, using the report's suggested documented heuristic plus an option requiring recognized array evidence.

Validation: the custom-receiver regression fails before the behavior change; seven new regression/control cases and all existing rule suites pass. pnpm check (lint, full tests, typecheck, synchronized skill asset check) and git diff --check pass. Independent review passed. The vendored skill payload was regenerated with pnpm sync:skill-assets.

AI-assisted implementation and wording.

Copilot AI balanced review requested due to automatic review settings October 6, 2026 07:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@xiehuanyi

Copy link
Copy Markdown
Author

Following up on #50: requireArrayReceiver: true avoids the warning on custom one-call reducers while retaining coverage for recognized arrays. The default heuristic remains compatible and is documented. The original regression checks and pnpm check passed, including the synchronized skill assets. CI still shows action_required. Could you review the option and approve the CI run when convenient?

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.

no-reduce-accumulator-copy flags one-call custom reduce methods

2 participants