Skip to content

MLE-29958: [node-client-api][polaris]NULL Pointer Dereference in optic-cts-param-runtime.test.ts - #1136

Merged
vishwach merged 1 commit into
developfrom
MLE-29958
Nov 20, 2026
Merged

vishwach merged 1 commit into
developfrom
MLE-29958

Conversation

@vishwach

@vishwach vishwach commented Nov 19, 2026 •

Copy link
Copy Markdown

Summary

  • Replaced should.exist(paramNode) assertions with explicit null checks throwing descriptive Errors in optic-cts-param-runtime.test.ts.
  • Introduces an unconditional control-flow termination branch prior to dereferencing paramNode.ns and paramNode.fn, satisfying Polaris CFG data-flow analysis and narrowing TypeScript types.

Verification

Verified and it passed locally:
npx mocha test-typescript/optic-cts-param-runtime.test.js

@vishwach
vishwach marked this pull request as ready for review November 20, 2026 04:35
Copilot AI balanced review requested due to automatic review settings November 20, 2026 04:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the cts.param smoke-test improvements.

No open issues 🎉

What changed in this PR

This PR strengthens the cts.param Optic smoke tests by checking that a serialized parameter node exists before accessing its properties.

Changes:

  • Replaces any in the lookup helper with unknown and a record type guard, simplifying nested traversal.
  • Centralizes node validation in requireCtsParam using Node’s strict assertions.
  • Adds helper tests for missing and nested nodes and updates serialization assertions.
File Description
test-typescript/​optic-cts-param-runtime.test.ts Adds typed node lookup, shared existence validation, and regression coverage for lookup behavior.

Review effort: Balanced

@vishwach
vishwach merged commit f4d3ee1 into develop Nov 20, 2026
4 of 5 checks passed
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.

5 participants