test(readline): expand granular Node parity coverage - #6880
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughExpands Node.js v26.5.0 ChangesReadline parity suite
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (1)
test-parity/node-suite/readline/promises/question-after-close.ts (1)
7-12: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winDo not gate question behavior on the unrelated
rl.onAPI.Both fixtures can emit
missingwithout exercising the question contract, reducing the granularity of the parity results. Keep listener registration conditional where needed, but always execute the targeted question flow.
test-parity/node-suite/readline/promises/question-after-close.ts#L7-L12: Remove the outerrl.onguard and always await/catchrl.question()after close.test-parity/node-suite/readline/promises/question-abort-recovery.ts#L13-L25: Make only the'line'listener conditional; always create, abort, and await the pending question.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test-parity/node-suite/readline/promises/question-after-close.ts` around lines 7 - 12, Remove the outer rl.on guard in test-parity/node-suite/readline/promises/question-after-close.ts lines 7-12 and always await/catch rl.question() after closing. In test-parity/node-suite/readline/promises/question-abort-recovery.ts lines 13-25, condition only 'line' listener registration while always creating, aborting, and awaiting the pending question.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test-parity/node_suite_baseline.json`:
- Around line 141-142: Update scripts/node_suite_regression_check.py to validate
the fixture-count floor as well as the passing-count floor: reject current
results when cur["total"] is below floor["total"], using the existing regression
failure path and preserving the current pass-count check.
In `@test-parity/node-suite/readline/async-iterator/values.ts`:
- Around line 6-9: In the async-iteration block guarded by
rl[Symbol.asyncIterator], create or obtain the readline async iterator before
calling input.end("\nalpha\nlast"). Then consume that initialized iterator in
the existing for-await loop, preserving the current line collection behavior.
In `@test-parity/node-suite/readline/completer/classic-callback.ts`:
- Line 26: Replace the completion input from input tab to In tab in the readline
completer fixtures so case-sensitive matching produces the expected Input
completion. Apply this change in
test-parity/node-suite/readline/completer/classic-callback.ts:26,
classic-sync.ts:22, promises-async.ts:22, and promises-sync.ts:22.
In `@test-parity/node-suite/readline/completer/classic-error.ts`:
- Line 22: Update the output assertions in
test-parity/node-suite/readline/completer/classic-error.ts:22-22 and
test-parity/node-suite/readline/completer/promises-error.ts:22-22 to use
includes instead of startsWith, so they match the leading newline before the
completion-error message.
In `@test-parity/node-suite/readline/lifecycle/pause-resume-order.ts`:
- Around line 11-12: Update the pause/resume checks in the readline lifecycle
fixture to call each method once, store its return value, and log only whether
it is identical to rl. Preserve the existing identity validation while
preventing the full readline interface object from appearing in oracle output.
In `@test-parity/node-suite/readline/question/abort-recovery.ts`:
- Around line 13-15: Move the rl.on("line", ...) registration into the typeof
(rl as any).on === "function" guard before invoking rl.question. Keep the
missing-capability fallback reachable when rl.on is unavailable, and preserve
the existing event collection behavior when it is supported.
---
Nitpick comments:
In `@test-parity/node-suite/readline/promises/question-after-close.ts`:
- Around line 7-12: Remove the outer rl.on guard in
test-parity/node-suite/readline/promises/question-after-close.ts lines 7-12 and
always await/catch rl.question() after closing. In
test-parity/node-suite/readline/promises/question-abort-recovery.ts lines 13-25,
condition only 'line' listener registration while always creating, aborting, and
awaiting the pending question.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 70c41071-5759-4fe4-b1ae-98aca093e4aa
📒 Files selected for processing (100)
test-parity/node-suite/readline/README.mdtest-parity/node-suite/readline/async-iterator/break-closes.tstest-parity/node-suite/readline/async-iterator/done.tstest-parity/node-suite/readline/async-iterator/input-error.tstest-parity/node-suite/readline/async-iterator/nested.tstest-parity/node-suite/readline/async-iterator/values.tstest-parity/node-suite/readline/completer/classic-callback.tstest-parity/node-suite/readline/completer/classic-error.tstest-parity/node-suite/readline/completer/classic-sync.tstest-parity/node-suite/readline/completer/promises-async.tstest-parity/node-suite/readline/completer/promises-error.tstest-parity/node-suite/readline/completer/promises-sync.tstest-parity/node-suite/readline/completer/undefined-columns.tstest-parity/node-suite/readline/create-interface/crlf-delay.tstest-parity/node-suite/readline/create-interface/defaults.tstest-parity/node-suite/readline/create-interface/positional-overload.tstest-parity/node-suite/readline/create-interface/pre-aborted-signal.tstest-parity/node-suite/readline/create-interface/terminal-inference.tstest-parity/node-suite/readline/exports/classic-surface.tstest-parity/node-suite/readline/exports/interface-callable.tstest-parity/node-suite/readline/exports/interface-class-name.tstest-parity/node-suite/readline/exports/interface-constructor-descriptor.tstest-parity/node-suite/readline/exports/interface-instance-constructor.tstest-parity/node-suite/readline/exports/interface-legacy-aliases.tstest-parity/node-suite/readline/exports/interface-prototype-identity.tstest-parity/node-suite/readline/exports/interface-symbols.tstest-parity/node-suite/readline/exports/promises-alias.tstest-parity/node-suite/readline/exports/promises-surface.tstest-parity/node-suite/readline/helpers/clear-line-callback-validation.tstest-parity/node-suite/readline/helpers/clear-line-directions.tstest-parity/node-suite/readline/helpers/clear-line-null-output.tstest-parity/node-suite/readline/helpers/clear-screen-callback-validation.tstest-parity/node-suite/readline/helpers/clear-screen-down.tstest-parity/node-suite/readline/helpers/clear-screen-null-output.tstest-parity/node-suite/readline/helpers/cursor-to-null-output.tstest-parity/node-suite/readline/helpers/cursor-to-overloads.tstest-parity/node-suite/readline/helpers/cursor-to-validation.tstest-parity/node-suite/readline/helpers/emit-keypress-events.tstest-parity/node-suite/readline/helpers/move-cursor-callback-validation.tstest-parity/node-suite/readline/helpers/move-cursor-directions.tstest-parity/node-suite/readline/helpers/move-cursor-null-output.tstest-parity/node-suite/readline/helpers/terminal-helpers.tstest-parity/node-suite/readline/history/event-newest-first.tstest-parity/node-suite/readline/history/history-size.tstest-parity/node-suite/readline/history/listener-mutation.tstest-parity/node-suite/readline/history/remove-duplicates.tstest-parity/node-suite/readline/interface/child-stdout-async-iteration.tstest-parity/node-suite/readline/interface/control-methods.tstest-parity/node-suite/readline/interface/stream-line-close-events.tstest-parity/node-suite/readline/interface/stream-question-output.tstest-parity/node-suite/readline/keypress/csi-chunk-boundary.tstest-parity/node-suite/readline/keypress/fixed-csi.tstest-parity/node-suite/readline/keypress/fixed-modifiers.tstest-parity/node-suite/readline/keypress/listener-reactivation.tstest-parity/node-suite/readline/lifecycle/close-idempotent.tstest-parity/node-suite/readline/lifecycle/cursor-position-width.tstest-parity/node-suite/readline/lifecycle/cursor-position.tstest-parity/node-suite/readline/lifecycle/pause-resume-after-close.tstest-parity/node-suite/readline/lifecycle/pause-resume-order.tstest-parity/node-suite/readline/lifecycle/prompt-output.tstest-parity/node-suite/readline/lifecycle/recursive-write.tstest-parity/node-suite/readline/lifecycle/write-after-close.tstest-parity/node-suite/readline/lifecycle/write-undefined.tstest-parity/node-suite/readline/lifecycle/write-while-paused.tstest-parity/node-suite/readline/promises/get-builtin-module.tstest-parity/node-suite/readline/promises/question-abort-cause.tstest-parity/node-suite/readline/promises/question-abort-recovery.tstest-parity/node-suite/readline/promises/question-abort.tstest-parity/node-suite/readline/promises/question-after-close.tstest-parity/node-suite/readline/promises/question-resolution.tstest-parity/node-suite/readline/promises/readline-action-validation.tstest-parity/node-suite/readline/promises/readline-actions.tstest-parity/node-suite/readline/promises/readline-auto-commit.tstest-parity/node-suite/readline/promises/readline-commit-error.tstest-parity/node-suite/readline/promises/readline-commit-queue.tstest-parity/node-suite/readline/promises/readline-constructor-validation.tstest-parity/node-suite/readline/promises/readline-rollback.tstest-parity/node-suite/readline/question/abort-recovery.tstest-parity/node-suite/readline/question/after-close.tstest-parity/node-suite/readline/question/callback-answer.tstest-parity/node-suite/readline/question/callback-receiver.tstest-parity/node-suite/readline/question/concurrent.tstest-parity/node-suite/readline/question/pre-aborted.tstest-parity/node-suite/readline/question/prompt-output.tstest-parity/node-suite/readline/streams/carriage-return.tstest-parity/node-suite/readline/streams/crlf-chunk-boundary.tstest-parity/node-suite/readline/streams/empty-lines.tstest-parity/node-suite/readline/streams/input-error-event.tstest-parity/node-suite/readline/streams/reopen-utf8-boundary.tstest-parity/node-suite/readline/streams/trailing-newline.tstest-parity/node-suite/readline/streams/unicode-separators.tstest-parity/node-suite/readline/streams/unterminated-final-line.tstest-parity/node-suite/readline/streams/utf8-chunks.tstest-parity/node-suite/readline/validation/completer.tstest-parity/node-suite/readline/validation/escape-code-timeout.tstest-parity/node-suite/readline/validation/history-size.tstest-parity/node-suite/readline/validation/history.tstest-parity/node-suite/readline/validation/signal.tstest-parity/node-suite/readline/validation/tab-size.tstest-parity/node_suite_baseline.json
💤 Files with no reviewable changes (5)
- test-parity/node-suite/readline/promises/readline-actions.ts
- test-parity/node-suite/readline/interface/stream-question-output.ts
- test-parity/node-suite/readline/interface/control-methods.ts
- test-parity/node-suite/readline/interface/child-stdout-async-iteration.ts
- test-parity/node-suite/readline/helpers/terminal-helpers.ts
14e5c1d to
2a08e6a
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/node_suite_regression_check.py`:
- Around line 75-79: Update the improvement-reporting logic near the regression
check so fixture-count increases are added to improvements, not only pass-count
increases. Treat a module as an improvement when either cur["pass"] exceeds
floor["pass"] or cur["total"] exceeds floor["total"], and include both pass and
fixture deltas in the reported ratchet candidate while preserving regression
handling.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: fcb1c948-2421-4244-be7e-1e14d410899a
📒 Files selected for processing (101)
scripts/node_suite_regression_check.pytest-parity/node-suite/readline/README.mdtest-parity/node-suite/readline/async-iterator/break-closes.tstest-parity/node-suite/readline/async-iterator/done.tstest-parity/node-suite/readline/async-iterator/input-error.tstest-parity/node-suite/readline/async-iterator/nested.tstest-parity/node-suite/readline/async-iterator/values.tstest-parity/node-suite/readline/completer/classic-callback.tstest-parity/node-suite/readline/completer/classic-error.tstest-parity/node-suite/readline/completer/classic-sync.tstest-parity/node-suite/readline/completer/promises-async.tstest-parity/node-suite/readline/completer/promises-error.tstest-parity/node-suite/readline/completer/promises-sync.tstest-parity/node-suite/readline/completer/undefined-columns.tstest-parity/node-suite/readline/create-interface/crlf-delay.tstest-parity/node-suite/readline/create-interface/defaults.tstest-parity/node-suite/readline/create-interface/positional-overload.tstest-parity/node-suite/readline/create-interface/pre-aborted-signal.tstest-parity/node-suite/readline/create-interface/terminal-inference.tstest-parity/node-suite/readline/exports/classic-surface.tstest-parity/node-suite/readline/exports/interface-callable.tstest-parity/node-suite/readline/exports/interface-class-name.tstest-parity/node-suite/readline/exports/interface-constructor-descriptor.tstest-parity/node-suite/readline/exports/interface-instance-constructor.tstest-parity/node-suite/readline/exports/interface-legacy-aliases.tstest-parity/node-suite/readline/exports/interface-prototype-identity.tstest-parity/node-suite/readline/exports/interface-symbols.tstest-parity/node-suite/readline/exports/promises-alias.tstest-parity/node-suite/readline/exports/promises-surface.tstest-parity/node-suite/readline/helpers/clear-line-callback-validation.tstest-parity/node-suite/readline/helpers/clear-line-directions.tstest-parity/node-suite/readline/helpers/clear-line-null-output.tstest-parity/node-suite/readline/helpers/clear-screen-callback-validation.tstest-parity/node-suite/readline/helpers/clear-screen-down.tstest-parity/node-suite/readline/helpers/clear-screen-null-output.tstest-parity/node-suite/readline/helpers/cursor-to-null-output.tstest-parity/node-suite/readline/helpers/cursor-to-overloads.tstest-parity/node-suite/readline/helpers/cursor-to-validation.tstest-parity/node-suite/readline/helpers/emit-keypress-events.tstest-parity/node-suite/readline/helpers/move-cursor-callback-validation.tstest-parity/node-suite/readline/helpers/move-cursor-directions.tstest-parity/node-suite/readline/helpers/move-cursor-null-output.tstest-parity/node-suite/readline/helpers/terminal-helpers.tstest-parity/node-suite/readline/history/event-newest-first.tstest-parity/node-suite/readline/history/history-size.tstest-parity/node-suite/readline/history/listener-mutation.tstest-parity/node-suite/readline/history/remove-duplicates.tstest-parity/node-suite/readline/interface/child-stdout-async-iteration.tstest-parity/node-suite/readline/interface/control-methods.tstest-parity/node-suite/readline/interface/stream-line-close-events.tstest-parity/node-suite/readline/interface/stream-question-output.tstest-parity/node-suite/readline/keypress/csi-chunk-boundary.tstest-parity/node-suite/readline/keypress/fixed-csi.tstest-parity/node-suite/readline/keypress/fixed-modifiers.tstest-parity/node-suite/readline/keypress/listener-reactivation.tstest-parity/node-suite/readline/lifecycle/close-idempotent.tstest-parity/node-suite/readline/lifecycle/cursor-position-width.tstest-parity/node-suite/readline/lifecycle/cursor-position.tstest-parity/node-suite/readline/lifecycle/pause-resume-after-close.tstest-parity/node-suite/readline/lifecycle/pause-resume-order.tstest-parity/node-suite/readline/lifecycle/prompt-output.tstest-parity/node-suite/readline/lifecycle/recursive-write.tstest-parity/node-suite/readline/lifecycle/write-after-close.tstest-parity/node-suite/readline/lifecycle/write-undefined.tstest-parity/node-suite/readline/lifecycle/write-while-paused.tstest-parity/node-suite/readline/promises/get-builtin-module.tstest-parity/node-suite/readline/promises/question-abort-cause.tstest-parity/node-suite/readline/promises/question-abort-recovery.tstest-parity/node-suite/readline/promises/question-abort.tstest-parity/node-suite/readline/promises/question-after-close.tstest-parity/node-suite/readline/promises/question-resolution.tstest-parity/node-suite/readline/promises/readline-action-validation.tstest-parity/node-suite/readline/promises/readline-actions.tstest-parity/node-suite/readline/promises/readline-auto-commit.tstest-parity/node-suite/readline/promises/readline-commit-error.tstest-parity/node-suite/readline/promises/readline-commit-queue.tstest-parity/node-suite/readline/promises/readline-constructor-validation.tstest-parity/node-suite/readline/promises/readline-rollback.tstest-parity/node-suite/readline/question/abort-recovery.tstest-parity/node-suite/readline/question/after-close.tstest-parity/node-suite/readline/question/callback-answer.tstest-parity/node-suite/readline/question/callback-receiver.tstest-parity/node-suite/readline/question/concurrent.tstest-parity/node-suite/readline/question/pre-aborted.tstest-parity/node-suite/readline/question/prompt-output.tstest-parity/node-suite/readline/streams/carriage-return.tstest-parity/node-suite/readline/streams/crlf-chunk-boundary.tstest-parity/node-suite/readline/streams/empty-lines.tstest-parity/node-suite/readline/streams/input-error-event.tstest-parity/node-suite/readline/streams/reopen-utf8-boundary.tstest-parity/node-suite/readline/streams/trailing-newline.tstest-parity/node-suite/readline/streams/unicode-separators.tstest-parity/node-suite/readline/streams/unterminated-final-line.tstest-parity/node-suite/readline/streams/utf8-chunks.tstest-parity/node-suite/readline/validation/completer.tstest-parity/node-suite/readline/validation/escape-code-timeout.tstest-parity/node-suite/readline/validation/history-size.tstest-parity/node-suite/readline/validation/history.tstest-parity/node-suite/readline/validation/signal.tstest-parity/node-suite/readline/validation/tab-size.tstest-parity/node_suite_baseline.json
💤 Files with no reviewable changes (5)
- test-parity/node-suite/readline/interface/control-methods.ts
- test-parity/node-suite/readline/helpers/terminal-helpers.ts
- test-parity/node-suite/readline/interface/stream-question-output.ts
- test-parity/node-suite/readline/interface/child-stdout-async-iteration.ts
- test-parity/node-suite/readline/promises/readline-actions.ts
🚧 Files skipped from review as they are similar to previous changes (77)
- test-parity/node-suite/readline/exports/interface-class-name.ts
- test-parity/node-suite/readline/exports/interface-symbols.ts
- test-parity/node-suite/readline/helpers/clear-line-callback-validation.ts
- test-parity/node-suite/readline/streams/unterminated-final-line.ts
- test-parity/node-suite/readline/exports/interface-constructor-descriptor.ts
- test-parity/node-suite/readline/streams/crlf-chunk-boundary.ts
- test-parity/node-suite/readline/question/after-close.ts
- test-parity/node-suite/readline/create-interface/crlf-delay.ts
- test-parity/node-suite/readline/completer/promises-sync.ts
- test-parity/node-suite/readline/streams/carriage-return.ts
- test-parity/node-suite/readline/streams/empty-lines.ts
- test-parity/node-suite/readline/create-interface/defaults.ts
- test-parity/node-suite/readline/validation/escape-code-timeout.ts
- test-parity/node-suite/readline/keypress/listener-reactivation.ts
- test-parity/node-suite/readline/create-interface/pre-aborted-signal.ts
- test-parity/node-suite/readline/promises/readline-commit-queue.ts
- test-parity/node_suite_baseline.json
- test-parity/node-suite/readline/question/callback-answer.ts
- test-parity/node-suite/readline/streams/input-error-event.ts
- test-parity/node-suite/readline/async-iterator/break-closes.ts
- test-parity/node-suite/readline/validation/history.ts
- test-parity/node-suite/readline/validation/signal.ts
- test-parity/node-suite/readline/lifecycle/cursor-position.ts
- test-parity/node-suite/readline/interface/stream-line-close-events.ts
- test-parity/node-suite/readline/helpers/clear-line-directions.ts
- test-parity/node-suite/readline/question/abort-recovery.ts
- test-parity/node-suite/readline/promises/question-resolution.ts
- test-parity/node-suite/readline/helpers/cursor-to-validation.ts
- test-parity/node-suite/readline/create-interface/terminal-inference.ts
- test-parity/node-suite/readline/streams/utf8-chunks.ts
- test-parity/node-suite/readline/completer/classic-sync.ts
- test-parity/node-suite/readline/completer/undefined-columns.ts
- test-parity/node-suite/readline/validation/history-size.ts
- test-parity/node-suite/readline/lifecycle/write-after-close.ts
- test-parity/node-suite/readline/completer/promises-error.ts
- test-parity/node-suite/readline/lifecycle/write-while-paused.ts
- test-parity/node-suite/readline/helpers/clear-screen-null-output.ts
- test-parity/node-suite/readline/completer/classic-error.ts
- test-parity/node-suite/readline/exports/interface-prototype-identity.ts
- test-parity/node-suite/readline/lifecycle/write-undefined.ts
- test-parity/node-suite/readline/helpers/move-cursor-directions.ts
- test-parity/node-suite/readline/lifecycle/pause-resume-after-close.ts
- test-parity/node-suite/readline/promises/question-abort-cause.ts
- test-parity/node-suite/readline/exports/interface-legacy-aliases.ts
- test-parity/node-suite/readline/helpers/emit-keypress-events.ts
- test-parity/node-suite/readline/streams/reopen-utf8-boundary.ts
- test-parity/node-suite/readline/promises/question-abort-recovery.ts
- test-parity/node-suite/readline/history/listener-mutation.ts
- test-parity/node-suite/readline/promises/readline-auto-commit.ts
- test-parity/node-suite/readline/helpers/clear-line-null-output.ts
- test-parity/node-suite/readline/question/concurrent.ts
- test-parity/node-suite/readline/question/prompt-output.ts
- test-parity/node-suite/readline/helpers/move-cursor-null-output.ts
- test-parity/node-suite/readline/history/event-newest-first.ts
- test-parity/node-suite/readline/completer/classic-callback.ts
- test-parity/node-suite/readline/promises/readline-rollback.ts
- test-parity/node-suite/readline/question/callback-receiver.ts
- test-parity/node-suite/readline/helpers/cursor-to-overloads.ts
- test-parity/node-suite/readline/exports/promises-surface.ts
- test-parity/node-suite/readline/promises/question-abort.ts
- test-parity/node-suite/readline/helpers/clear-screen-down.ts
- test-parity/node-suite/readline/helpers/move-cursor-callback-validation.ts
- test-parity/node-suite/readline/completer/promises-async.ts
- test-parity/node-suite/readline/streams/unicode-separators.ts
- test-parity/node-suite/readline/validation/completer.ts
- test-parity/node-suite/readline/promises/readline-action-validation.ts
- test-parity/node-suite/readline/keypress/csi-chunk-boundary.ts
- test-parity/node-suite/readline/helpers/cursor-to-null-output.ts
- test-parity/node-suite/readline/promises/get-builtin-module.ts
- test-parity/node-suite/readline/async-iterator/done.ts
- test-parity/node-suite/readline/lifecycle/recursive-write.ts
- test-parity/node-suite/readline/lifecycle/close-idempotent.ts
- test-parity/node-suite/readline/async-iterator/input-error.ts
- test-parity/node-suite/readline/create-interface/positional-overload.ts
- test-parity/node-suite/readline/README.md
- test-parity/node-suite/readline/lifecycle/cursor-position-width.ts
- test-parity/node-suite/readline/async-iterator/nested.ts
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
crates/perry-codegen/src/loop_purity.rs (1)
128-130: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winDon’t treat generic
IndexUpdateas allocation-free.
IndexUpdatecan lower tojs_dyn_index_set, which may grow a plain JS array or string-keyed storage and can String coerce keys, soarr[i]++may reallocate and move GC roots. Keep the poll for this path, or narrow it to a statically proven fixed-size typed-array case.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/perry-codegen/src/loop_purity.rs` around lines 128 - 130, The Expr::IndexUpdate branch in expr_alloc_free must not classify generic index updates as allocation-free. Preserve the allocation poll for dynamic array or string-keyed storage, or restrict the optimization to cases statically proven to use fixed-size typed arrays.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@crates/perry-codegen/src/loop_purity.rs`:
- Around line 128-130: The Expr::IndexUpdate branch in expr_alloc_free must not
classify generic index updates as allocation-free. Preserve the allocation poll
for dynamic array or string-keyed storage, or restrict the optimization to cases
statically proven to use fixed-size typed arrays.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: c95a4eae-277e-4f34-b8b9-be2fbd24cbba
📒 Files selected for processing (1)
crates/perry-codegen/src/loop_purity.rs
# Conflicts: # scripts/node_suite_regression_check.py # test-parity/node_suite_baseline.json
# Conflicts: # test-parity/node_suite_baseline.json
Summary
Expands the granular
node:readlineparity suite from 12 to 95 fixtures using Node 26.5.0 as the exact oracle. The fixtures cover deterministic public contracts with in-memory streams and fixed input bytes.Changes
tty,process,events,stream,child_process, andrepl.Related issue
n/a
Test plan
cargo build --release -p perrycleancargo test --workspace --exclude perry-ui-ios --exclude perry-ui-tvos --exclude perry-ui-watchos --exclude perry-ui-gtk4 --exclude perry-ui-android --exclude perry-ui-windowspassescargo fmt --all -- --checkdeno fmt --check test-parity/node-suite/readline scripts/node_suite_regression_check.py test-parity/node_suite_baseline.jsonpython3 -m py_compile scripts/node_suite_regression_check.pypython3 -m json.tool test-parity/node_suite_baseline.jsongit diff --check origin/main...HEADtest-files/or a#[test]in the affected crate — not applicable; this PR changes parity fixtures onlydocs/src/— not applicable; runtime code is unchanged-p perry-ui-<backend>locally on that platform — not applicableScreenshots / output
Perry PR #6858 remains open and absent from
main. This fixture-only change neither depends on nor copies its implementation fix.Checklist
feat:/fix:/docs:/chore:prefix convention used in the logSummary by CodeRabbit
New Features
readlinecompatibility coverage across async iteration, completion, history, prompts, streams, keypresses, lifecycle behavior, validation, and promises APIs.Bug Fixes
Documentation