Skip to content

test(inspector): expand promise session parity coverage#6491

Merged
proggeramlug merged 2 commits into
mainfrom
test/expand-node-inspector-promises-parity
Jul 18, 2026
Merged

test(inspector): expand promise session parity coverage#6491
proggeramlug merged 2 commits into
mainfrom
test/expand-node-inspector-promises-parity

Conversation

@TheHypnoo

@TheHypnoo TheHypnoo commented Jul 16, 2026

Copy link
Copy Markdown
Member

Summary

  • replace the monolithic node:inspector/promises smoke case with 30 granular Promise-specific fixtures
  • cover public identities/descriptors, Session inheritance and lifecycle, asynchronous validation/rejection, deterministic concurrent settlement, safe protocol results, Runtime semantics, and notification-to-fulfillment order
  • document exact Node 26.5.0, Deno 2.9.2, Bun 1.3.14, and Perry evidence, with explicit reconciliation against callback inspector PR test(inspector): expand granular Node parity coverage #6490
  • ratchet the measured inspector-promises baseline from 1/1 to 3/30

Validation

  • exact Node 26.5.0 oracle: repeated complete runs with identical aggregate SHA-256 994cab8da5deb3aa67bb505560eae5f6d7ee0754dfdd0aad92f4c95266688d49
  • Perry release runner: three identical focused runs at 3/30 with 27 stable diffs, no compile failures, and no execution timeouts
  • Deno 2.9.2: 28 pass, 1 diff, 1 deterministic process error
  • Bun 1.3.14: 1 pass, 11 diffs, 17 errors, 1 bounded timeout
  • cargo build --release
  • cargo fmt --all -- --check
  • deno fmt --check test-parity/node-suite/inspector-promises test-parity/node_suite_baseline.json
  • scripts/check_file_size.sh
  • JSON/baseline/count, scope, artifact, process, endpoint, and cleanup checks

Scope

Tests and evidence only. No runtime, compiler, transport, linker, or build behavior changes. Callback-style contracts remain in #6490; profiling, heap/coverage payloads, active debugger waits, external frontends, worker races, and timing-sensitive probes remain excluded.

Summary by CodeRabbit

  • Tests

    • Added comprehensive parity coverage for the promise-based Node Inspector API.
    • Added tests for session lifecycle, concurrent operations, event ordering, validation, errors, protocol domains, runtime evaluation, and export behavior.
    • Expanded baseline tracking to include the new Inspector Promises coverage and results.
  • Documentation

    • Added deterministic test specifications and cross-runtime evidence for Inspector Promises behavior.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@proggeramlug, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 9 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3e109e24-634d-4030-9668-5818f124083c

📥 Commits

Reviewing files that changed from the base of the PR and between ce218d9 and 8c9e502.

📒 Files selected for processing (4)
  • test-parity/node-suite/inspector-promises/lifecycle/disconnected.ts
  • test-parity/node-suite/inspector-promises/post/argument-validation.ts
  • test-parity/node-suite/inspector-promises/post/circular-params.ts
  • test-parity/node_suite_baseline.json
📝 Walkthrough

Walkthrough

The PR adds a deterministic node:inspector/promises parity suite covering API surface, session lifecycle, Session.post() contracts, protocol responses, runtime evaluation shapes, event ordering, evidence documentation, and updated baseline results.

Changes

Inspector Promises parity

Layer / File(s) Summary
Suite definition and baseline
test-parity/node-suite/inspector-promises/README.md, test-parity/node-suite/inspector-promises/EVIDENCE.md, test-parity/node_suite_baseline.json
Documents oracle and comparison rules, records runtime results, and updates aggregate and module baseline counts.
Session surface and lifecycle
test-parity/node-suite/inspector-promises/surface/*, test-parity/node-suite/inspector-promises/lifecycle/*
Checks exports, constructors, descriptors, receivers, connection control, reconnects, repeated sessions, and disconnect behavior.
Post contracts and concurrency
test-parity/node-suite/inspector-promises/post/*
Covers argument and parameter validation, optional parameters, unknown commands, rejection identity, asynchronous settlement, and concurrent completion behavior.
Protocol and runtime result coverage
test-parity/node-suite/inspector-promises/protocol/*, test-parity/node-suite/inspector-promises/runtime/*
Validates protocol domains and runtime results for promises, exceptions, object release, numeric values, primitives, and returned values.
Notification settlement ordering
test-parity/node-suite/inspector-promises/events/notification-settlement.ts
Records ordering between promise settlement and inspector notification listeners and cleans up listeners and the session.

Estimated code review effort: 4 (Complex) | ~45 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the summary and validation well, but it omits the template's Changes and Related issue sections. Add the missing Changes and Related issue sections, and align the format more closely with the repository template.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: expanding inspector/promises parity coverage.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/expand-node-inspector-promises-parity

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

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

@coderabbitai coderabbitai Bot 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.

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 `@test-parity/node-suite/inspector-promises/post/argument-validation.ts`:
- Around line 17-36: Preserve synchronous errors in the shared promise
error-capture pattern by rethrowing the caught error so the outer catch logs its
properties instead of awaiting undefined. Apply this change at
test-parity/node-suite/inspector-promises/post/argument-validation.ts:17-36,
test-parity/node-suite/inspector-promises/post/circular-params.ts:8-27, and
test-parity/node-suite/inspector-promises/lifecycle/disconnected.ts:9-28,
wrapping each synchronous call as needed while retaining the existing
asynchronous rejection 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: e76565e0-189c-466e-87c7-f858c26fe3c1

📥 Commits

Reviewing files that changed from the base of the PR and between 77def53 and ce218d9.

📒 Files selected for processing (34)
  • test-parity/node-suite/inspector-promises/EVIDENCE.md
  • test-parity/node-suite/inspector-promises/README.md
  • test-parity/node-suite/inspector-promises/events/notification-settlement.ts
  • test-parity/node-suite/inspector-promises/lifecycle/disconnected.ts
  • test-parity/node-suite/inspector-promises/lifecycle/pending-disconnect.ts
  • test-parity/node-suite/inspector-promises/lifecycle/reconnect.ts
  • test-parity/node-suite/inspector-promises/lifecycle/repeated-sessions.ts
  • test-parity/node-suite/inspector-promises/lifecycle/sync-control.ts
  • test-parity/node-suite/inspector-promises/post/argument-validation.ts
  • test-parity/node-suite/inspector-promises/post/circular-params.ts
  • test-parity/node-suite/inspector-promises/post/concurrent-order.ts
  • test-parity/node-suite/inspector-promises/post/concurrent-rejection.ts
  • test-parity/node-suite/inspector-promises/post/invalid-protocol-params.ts
  • test-parity/node-suite/inspector-promises/post/optional-params.ts
  • test-parity/node-suite/inspector-promises/post/rejection-identity.ts
  • test-parity/node-suite/inspector-promises/post/settlement-async.ts
  • test-parity/node-suite/inspector-promises/post/unknown-command.ts
  • test-parity/node-suite/inspector-promises/protocol/enable-disable.ts
  • test-parity/node-suite/inspector-promises/protocol/schema-domains.ts
  • test-parity/node-suite/inspector-promises/runtime/await-promise.ts
  • test-parity/node-suite/inspector-promises/runtime/await-rejection.ts
  • test-parity/node-suite/inspector-promises/runtime/exception-details.ts
  • test-parity/node-suite/inspector-promises/runtime/get-properties-release.ts
  • test-parity/node-suite/inspector-promises/runtime/numeric-specials.ts
  • test-parity/node-suite/inspector-promises/runtime/primitives.ts
  • test-parity/node-suite/inspector-promises/runtime/return-by-value.ts
  • test-parity/node-suite/inspector-promises/session/runtime.ts
  • test-parity/node-suite/inspector-promises/surface/constructor.ts
  • test-parity/node-suite/inspector-promises/surface/exports.ts
  • test-parity/node-suite/inspector-promises/surface/inherited-receivers.ts
  • test-parity/node-suite/inspector-promises/surface/post-descriptor.ts
  • test-parity/node-suite/inspector-promises/surface/post-receiver.ts
  • test-parity/node-suite/inspector-promises/surface/session-class.ts
  • test-parity/node_suite_baseline.json
💤 Files with no reviewable changes (1)
  • test-parity/node-suite/inspector-promises/session/runtime.ts

Address CodeRabbit: a synchronous throw from session.post() set synchronous=true
but discarded the error, leaving pending undefined so 'await pending' resolved and
the case logged 'unexpected', losing the asserted name/code. Nest the sync-detection
try inside the outer try and re-throw so the real error reaches the logging catch,
while pending/synchronous still reflect sync-vs-async accurately.
@proggeramlug proggeramlug added the ready PR triaged: CodeRabbit feedback + conflicts addressed label Jul 18, 2026
@proggeramlug
proggeramlug merged commit 5d06431 into main Jul 18, 2026
11 of 26 checks passed
@proggeramlug
proggeramlug deleted the test/expand-node-inspector-promises-parity branch July 18, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready PR triaged: CodeRabbit feedback + conflicts addressed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants