Skip to content

fix(plugin): include PowerShell module and data files - #715

Open
faizan-oai wants to merge 1 commit into
mainfrom
agent/windows-powershell-module-inventory
Open

fix(plugin): include PowerShell module and data files#715
faizan-oai wants to merge 1 commit into
mainfrom
agent/windows-powershell-module-inventory

Conversation

@faizan-oai

@faizan-oai faizan-oai commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Extend the PowerShell file coverage added in #707: the shared text-extension list includes .ps1, but still omits .psm1 script modules and .psd1 manifests/data files. Otherwise eligible files of these types are skipped by automatic diff-inventory and rank-input selection.

Explicit files supplied through a scopes file can already bypass extension filtering; this is not a claim that these file types cannot be targeted by any route.

Changes

  • Add .psm1 and .psd1 to the existing shared TEXT_CODE_EXTENSIONS set.
  • Extend the existing diff-inventory regression fixture with module and manifest/data files, retaining the .ps1 and JSON controls.
  • Reuse the existing sampled-text preview and selection logic; no PowerShell-specific parser or separate extension lists.

Testing

On native Windows with Python 3.12.13 and pytest 9.0.3:

  • The original .ps1/JSON regression passed on the unchanged production code.
  • With the expanded module fixture but unchanged production code, the regression failed as expected: the command succeeded but its inventory omitted both module files.
  • With the two extension entries added, the same regression passed.
  • python -B -m pytest -q tests/test_generate_in_scope_files.py tests/test_generate_rank_input.py tests/test_rank_preview.py (with isolated temporary/cache directories and JUnit output): 115 passed, 2 skipped. Both skips are existing executable-script-shim cases unsupported on Windows.
  • git diff --check: passed.

The full TypeScript suite was not rerun locally for this Python-only selection change. Hosted CI at 34d06af passed all three required checks and all 28 node-ci jobs, including all 18 Windows jobs; the other four applicable workflows also passed.

Risk and rollout

Automatic selection will include these additional source/configuration files on all host platforms, so affected repositories may produce more candidates.

Files remain data: they are not imported or executed by PowerShell. No commands, flags, execution-policy settings or sandbox behavior change. Existing excluded-path, binary-content and file/path checks remain in place. This does not add UTF-16 decoding; the existing NUL-byte filter still excludes UTF-16 files. That separate decoding fix is in #716. No data migration is required.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@github-actions github-actions Bot added the bug Something isn't working label Aug 28, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-28T17:55:39.397159Z 34d06af Manual request
🔒 Security Review Completed 2026-08-28T17:55:50.587504Z 34d06af PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 34d06afb26

ℹ️ 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".

Copy link
Copy Markdown
Contributor Author

CI follow-up for 34d06afb261c3b268059be2905908023a31013c2:

  • The initial node-ci run passed all 28 jobs, including all 18 Windows jobs.
  • Updating the PR description triggered another full run. Its macOS test job reported 2,031 passed, 31 skipped, 0 failed, but the Test step exceeded its existing 10-minute deadline (601.32 seconds). That workflow attempt failed; the zero-failure test summary did not make its required checks pass.
  • One approved failed-job-only rerun passed three fresh jobs: the macOS test job and two summary checks. The other 25 successes were carried forward. The fresh macOS job reported 2,031 passed, 31 skipped, 0 failed in 485.55 seconds, and package inspection also passed.

All three required checks now pass. The published head and checked-out source were unchanged; no workflow, test expectation, or timeout was changed for the rerun. The reason for the earlier deadline overrun remains unknown, and the differently seeded successful run does not establish its cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant