Skip to content

JS: Fix parsing of Member[num] token in summaries - #22784

Open
asgerf wants to merge 3 commits into
github:mainfrom
asgerf:js/fix-member-token
Open

asgerf wants to merge 3 commits into
github:mainfrom
asgerf:js/fix-member-token

Conversation

@asgerf

@asgerf asgerf commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Fixes the root cause of the issue identified in #22781.

When Member[n] appeared as the input or output in a flow summary, and n is a number in the "max precise array index" range (0..9) it wasn't parsed correctly.

The canonical representative for this content is ArrayElement[n!] (! to exclude the unknownArrayElement content), which is why reverse-encoding fails to parse Member[n].

MathiasVP and others added 3 commits October 8, 2026 11:06
The canonical representative for this content is `ArrayElement[n!]`,
which is why reverse-encoding fails to parse `Member[n]`, but this
token needs to work for consistency with API graphs.
@github-actions github-actions Bot added the JS label Oct 8, 2026
@asgerf asgerf added the no-change-note-required This PR does not need a change note label Oct 8, 2026
@asgerf
asgerf marked this pull request as ready for review October 9, 2026 08:18
@asgerf
asgerf requested a review from a team as a code owner October 9, 2026 08:19
Copilot AI balanced review requested due to automatic review settings October 9, 2026 08:19

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

The focused parser change correctly handles numeric members and includes representative regression coverage.

0 open findings

What changed in this PR

Fixes JavaScript flow-summary parsing for numeric Member[n] tokens by decoding them as exact property content.

Changes:

  • Adds fallback decoding for numeric member tokens.
  • Adds Map constructor and iteration flow coverage.
  • Updates the consistency-test baseline.
File Description
FlowSummaryPrivate.qll Decodes non-canonical Member[n] content.
tst.js Tests value flow through a constructed Map.
DataFlowConsistency.expected Records the new test’s consistency output.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

JS no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants