Skip to content

fix(lint): the helper guard recognizes aliased asyncio launches (#5023) - #5071

Merged
Daniel Meppiel (danielmeppiel) merged 6 commits into
mainfrom
guard-asyncio-aliases
Nov 23, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 6 commits into
mainfrom
guard-asyncio-aliases

Conversation

@danielmeppiel

Copy link
Copy Markdown
Collaborator

Description

Stacked on #5068 (base: guard-partial-launchers); retarget once #5068 and #5006 land.

The transport-platform-external-executable-owner guard now resolves asyncio import aliases: from asyncio import create_subprocess_exec as <name> and import asyncio as <name>. A launch through either spelling with a literal program name is flagged like asyncio.create_subprocess_exec.

Issue and approved scope

Issue: Fixes #5023

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 two MutationCases (a from-imported asyncio alias and an aliased asyncio module), which the guard missed before the fix. All 53 external-executable mutation cases pass, and the architecture boundary lint is clean. No production call site changes.

Changelog

  • N/A -- internal-only change (CI, tests, refactor).

Spec conformance (OpenAPM v0.1)

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

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

There are no active review issues for the architecture-guard update covering asyncio import aliases.

No open issues 🎉

What changed in this PR

Closes the asyncio-alias gap in the trusted-executable architecture guard for #5023, building on the earlier helper-launch hardening. Production executable resolution and call sites remain unchanged.

Changes:

  • Recognizes both aliased asyncio imports and aliased create_subprocess_exec imports.
  • Adds two mutation cases covering literal program launches through those aliases.
File Description
tests/​integration/​test_architecture_owner_rule_mutations.py Adds regression cases for both asyncio import-alias forms.
scripts/​architecture_linter/​checks/​transport_external_executables.py Tracks asyncio aliases and recognizes their subprocess launch calls.

Review effort: Balanced

Co-authored-by: Copilot App <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
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 identified for the asyncio-alias guard update.

No open issues 🎉

Review effort: Balanced

Base automatically changed from guard-partial-launchers to main November 23, 2026 17:51

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 architecture guard changes that recognize aliased asyncio launches.

No open issues 🎉

Review effort: Balanced

@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit 7272c0b into main Nov 23, 2026
73 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the guard-asyncio-aliases branch November 23, 2026 18:30
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 23, 2026
…le corpus

Regenerated against main (#4877, #4727, #5071); the #4981 named removals
match the 123 bin cells the filter demotes (two new project gate-matrix
cells: lock and mcp-install under a denied dependency).

Co-authored-by: Copilot App <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
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.

arch guard: cover aliased asyncio launches

2 participants