Skip to content

Fix false parser limits in Node assertion templates - #921

Merged
mohgupta-ship-it merged 2 commits into
mainfrom
yashraj/fix-javascript-template-completeness
Oct 27, 2026
Merged

mohgupta-ship-it merged 2 commits into
mainfrom
yashraj/fix-javascript-template-completeness

Conversation

@yashrajp22

@yashrajp22 yashrajp22 commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Node assertion diagnostics such as check.equal(actual, expected, `${row.key} is required`) were interpreted as shell command substitutions, producing a false static_parse_limit and failing strict completeness checks.

Add bounded recognition of direct diagnostic-template arguments on a verified node:assert or node:assert/strict import. Only the proven template delimiters change in the shell-completeness view; raw command checks, finding contents, and source offsets remain intact. Classify .mjs and .cjs consistently in ordinary files and archive members.

Unknown consumers, ambiguous syntax, aliases, shadowing, mutations, interpolation with calls or updates, fragments, and exceeded resource limits retain conservative behavior. TypeScript keeps its existing parser path because postfix and type expressions require different grammar. This covers a deliberately narrow JavaScript subset and assumes ordinary built-in assertion semantics; it does not add general JavaScript dataflow analysis.

Validation on the proposed commit:

  • 2,538 relevant pytest cases passed, including 116 new regression cases.
  • 11 isolated boundary, interruption, alias, and concurrency checks passed.
  • Fresh base and HEAD wheels match every package/resource file in their source exports.
  • 52 full-directory offline CLI scans cover 12 pinned sample skills plus the reported skill, on both revisions and in both source/wheel modes. All 26 source/wheel report pairs agree; all 12 comparison-skill reports, including their existing limitations, remain unchanged.
  • The full reported skill was scanned on both revisions in source and installed-wheel modes: inspected coverage improves from 4/5 to 5/5 and strict CLI exit changes from 1 to 0. All four existing findings, confidence, risk score, and reference records are retained.

All verification above used isolated offline scans with --no-llm; scanned skill payloads were not executed. Target: main.

@yashrajp22
yashrajp22 force-pushed the yashraj/fix-javascript-template-completeness branch from f195787 to cb6c96e Compare October 27, 2026 11:00
@mohgupta-ship-it
mohgupta-ship-it merged commit a5425e5 into main Oct 27, 2026
6 checks passed
@mohgupta-ship-it
mohgupta-ship-it deleted the yashraj/fix-javascript-template-completeness branch October 27, 2026 11:19
from collections.abc import Callable
from dataclasses import dataclass

_MAX_SOURCE_CHARS = 1_000_000

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

these should be really high values.

yashrajp22 added a commit that referenced this pull request Oct 28, 2026
Publish the tested 2.13.2 maintenance candidate, preserving v2.13.1 and including PRs #779, #917 and #921. The release owner approved publication after reviewing the documented live CAD timeout limitations and deferred issues.
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.

2 participants