fix(runtime): materialize error stacks during inspect - #9933
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthrough
ChangesLazy Error inspection
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Error inspection now preserves lazy stack frames when displaying causes and AggregateError entries, restoring expected stack and body formatting. No current merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1 unsupported.)
✨ 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 |
|
Landed on |
util.inspect(new Error("outer", { cause }))and AggregateError inspection lost their stack/body layout after Error stacks became lazy in #9486. The formatter readErrorHeader.stackdirectly, saw the pre-materialization null slot, and emitted the property body on a standalone{line; thenode-suite/util/inspect/error-cause-and-aggregateparity row consequently failed.Route inspection through the shared lazy stack materializer before selecting the displayed frame. This preserves captured frames until inspection actually consumes them and restores Node-compatible formatting for Error causes and AggregateError entries.
Tracked by #9202.
Validation:
./run_parity_tests.sh --suite node-suite --module util --filter error-cause-and-aggregate(1/1)./run_parity_tests.sh --suite node-suite --module util(88/88)cargo test --profile perry-dev -p perry-runtime -- --test-threads=1(3,256 passed, 4 ignored; doc tests 8 ignored)./scripts/run_lint_gates.sh(all 64 local gates passed; 2 CI-only expressions skipped)Summary by CodeRabbit