Skip to content

fix(lint): the helper guard scans files that wrap launchers in functools.partial (#5052) - #5068

Merged
Daniel Meppiel (danielmeppiel) merged 3 commits into
mainfrom
guard-partial-launchers
Nov 23, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 3 commits into
mainfrom
guard-partial-launchers

Conversation

@danielmeppiel

Copy link
Copy Markdown
Collaborator

Description

Stacked on #5006 (base: windows-trusted-executables); retarget to main once #5006 lands.

The transport-platform-external-executable-owner guard prefilters files by call facts before its tree scan. A launch wrapped as functools.partial(subprocess.run, executable="git") records only a partial call fact, so a file with a plain import subprocess and no other launcher call was skipped. The prefilter now also admits files with a partial call fact; the tree scan already flags the literal executable= keyword.

Issue and approved scope

Issue: Fixes #5052

Human scope-approval comment: follow-up filed by the program desk from the #5006 review; scope as stated in the issue.

Does this PR complete the issue, or what remains? It completes the issue.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)

Red first: the first commit adds a MutationCase that wraps the lock-evidence git probe in functools.partial(subprocess.run, executable="git"). The guard stayed silent before the fix and catches it after. All 47 external-executable mutation cases pass, and the architecture boundary lint is clean.

Changelog

  • One fragment per section, changelog.d/<pr>.<section>.md.
  • N/A -- internal-only change (CI, tests, refactor).

Spec conformance (OpenAPM v0.1)

  • N/A -- this PR does not change OpenAPM-observable behaviour.

…rtial (#5052)

Co-authored-by: Copilot App <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
…ols.partial (#5052)

Co-authored-by: Copilot App <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>

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

No active review issues are reported for the partial-call prefilter change and its accompanying regression mutation.

No open issues 🎉

What changed in this PR

Fixes #5052 by closing a prefilter gap in the external-executable architecture guard introduced in #5006. Files using functools.partial now reach the existing tree scan, allowing it to flag literal helper executable names.

Changes:

  • Admit files with a partial call fact to the guard’s tree scan.
  • Add a regression mutation covering functools.partial(subprocess.run, executable="git").
File Description
tests/​integration/​test_architecture_owner_rule_mutations.py Adds a mutation case for a partial-wrapped launcher.
scripts/​architecture_linter/​checks/​transport_external_executables.py Includes partial in the call-fact prefilter.

Review effort: Balanced

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

No active review issues are reported for the change addressing partial-wrapped executable launcher detection.

No open issues 🎉

Review effort: Balanced

@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit a3226b8 into main Nov 23, 2026
117 of 118 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the guard-partial-launchers branch November 23, 2026 17:51
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.

lint: helper guard prefilter misses launchers passed through functools.partial

2 participants