fix: fail closed on embedded Python JIT budget gaps#1502
Conversation
|
@codex review |
Performance BenchmarksCompared
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 080407ef58
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ) | ||
| if index >= _MAX_DEFAULT_EMBEDDED_PYTHON_SNIPPETS: | ||
| if not has_priority_marker: | ||
| omitted_budgeted_candidates += 1 |
There was a problem hiding this comment.
Count only uncovered snippets as omitted
When a normal source-like member has more than 10 def/class/import starts, the first selected candidate often spans from the first marker through the rest of the file, so the later candidates are already covered by a parsed selected span. Incrementing the omitted counter here still emits an analysis_incomplete finding, which makes fully covered files inconclusive and can turn an otherwise clean scan into a failed/exit-1 result. Please only count candidates whose spans are not covered by an already selected span.
Useful? React with 👍 / 👎.
Summary:\n- emit analysis_incomplete findings when embedded Python/JIT byte caps or snippet budgets are exhausted\n- mark scanner bridge outcomes inconclusive for those detector findings\n- add over-budget byte/snippet regressions plus benign within-budget guards\n\nValidation:\n- targeted new tests: 4 passed\n- focused JIT/PyTorch ZIP suites: 362 passed, 5 warnings\n- ruff format/check, mypy, git diff --check