Skip to content

CodeQL: initialise the 4 py/uninitialized-local-variable locals (Part of #7153) - #7239

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/7153-20261031T0230Z
Oct 31, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/7153-20261031T0230Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #7153. Checklist: done [c:d63a0a9e]

Reviews the 4 open py/uninitialized-local-variable alerts (#1536, #1409, #1408, #891). All four are false positives: CodeQL does not see that pytest.skip / ap.error do not return, nor that a nested def and its call share one guard. Each local is now initialised explicitly; behaviour is unchanged.

  • tests/cobol_mainframe/test_det_layout.py: records = [] before the try.
  • tests/tools/phase_ab.py: leg_env initialised before the try.
  • tests/tools/harness_report.py: raise SystemExit(2) after ap.error.
  • gitgalaxy/core/prism.py: mask_perl = None, set after the nested def, called under if mask_perl is not None.

Class / Sibling gaps

Class: a local assigned in one branch and read later, where the other branch exits through a call or guard CodeQL cannot follow. All four open members of the rule are fixed here. Sibling gaps: none (no other open alert of this rule; no sweep for unflagged same-pattern code). No burned-estate program is involved.

Facts checked: pr_gates --fast 9/9 pass; crucible_check.py (both legs, no --update) passes with zero golden diff; test_phase_ab_evict, test_harness_report, test_det_layout and the perl extraction tests pass (det_layout Docker cases skip without Docker). Not run: --ratchets (no ratchet input changed).

🤖 Generated with Claude Code

…citly (Part of #7153)

All four were false positives (NoReturn calls / same-guard def and call
CodeQL cannot follow); no behaviour change, goldens unchanged.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 31, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review October 31, 2026 02:39
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 31, 2026 02:45
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

1 similar comment
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit bfa3523 into main Oct 31, 2026
120 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/7153-20261031T0230Z branch October 31, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant