Skip to content

fix(tools): ignore comments and literals in progress scanning - #2181

Closed
ArjenS-LA wants to merge 1 commit into
boykopovar:mainfrom
ArjenS-LA:fix/progress-source-scanning
Closed

ArjenS-LA wants to merge 1 commit into
boykopovar:mainfrom
ArjenS-LA:fix/progress-source-scanning

Conversation

@ArjenS-LA

Copy link
Copy Markdown
Contributor

What

The library progress scanner counted commented-out or quoted APS5_VABI definitions and treated braces inside literals as function boundaries. For example, a "}" string before NotImplemented_nid_no_patch made a pending export appear implemented. import_audit.py uses the same scanner.

Mask C++ comments, ordinary/raw strings and character literals before scanning definitions, bodies and local stub wrappers. Handle escaped newlines and match stub calls by complete name with optional whitespace/comments before (, avoiding matches in longer identifiers or diagnostic text. Add regression coverage in the existing progress tests.

Tested

Windows, Python 3.14.3:

  • New regression cases fail against the original scanner and pass with the fix.
  • python -m unittest discover -s tools/tests: 27 tests passed, including progress reporting and import audits.
  • Full-tree before/after scan: identical per-library results, 2,578 implemented functions out of 3,044.
  • Generated and checked all five progress artifacts: JSON, HTML, SVG map and two badges; unchanged-snapshot comparison is empty.
  • python tools/check_conventions.py --base origin/main and git diff --check origin/main...HEAD pass.

Open-PR changed-file checks were refreshed before implementation, during validation and before publication; no other PR changes tools/progress.py or tools/tests/test_progress.py. Related #1323 changes the separate conventions checker.

No C++ runtime changes; no title or hardware testing.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt; C++ comments in tests are fixture data
  • Unimplemented paths throw; no runtime exports or silent stubs changed
  • No notes, investigation files or images added to the repository
  • New third-party code is a submodule built from source; none added
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes — OpenAI Codex assisted with implementation, tests and this description

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#2193 tools/progress.py L75

@rmz-24

rmz-24 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Windows run (Windows 11 Pro 25H2, Python 3.14), 13e6aa2 cherry-picked onto main d70b899:

  • tools/tests/test_progress.py: 6/6 pass.
  • With tools/progress.py reset to main and the new tests kept: FAILED (failures=15), so the tests catch what the change fixes.

AI-assisted: yes

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Closing: the full-tree scan in your description gives the same per-library counts as main, so nothing is miscounted today. Please reopen if a source file on main gets counted wrong.

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.

3 participants