Skip to content

build(scripts): adopt PowerShell 7.4 floor repo-wide#1842

Merged
rezatnoMsirhC merged 4 commits into
mainfrom
feat/1637-e-ps74-pytest
Jun 30, 2026
Merged

build(scripts): adopt PowerShell 7.4 floor repo-wide#1842
rezatnoMsirhC merged 4 commits into
mainfrom
feat/1637-e-ps74-pytest

Conversation

@WilliamBerryiii

@WilliamBerryiii WilliamBerryiii commented Jun 2, 2026

Copy link
Copy Markdown
Member

Pull Request

Description

Adopts PowerShell 7.4 as the repo-wide floor, in two parts:

  1. Analyzer targetscripts/linting/PSScriptAnalyzer.psd1 sets PSUseCompatibleSyntax.TargetVersions to @('7.4'), dropping the out-of-support 5.1 / 7.0 / 7.2 targets. This config is the single source of truth applied to all PowerShell files.
  2. Runtime floor — bumps #Requires -Version 7.0 to 7.4 across 91 source scripts and modules under scripts/, .github/skills/, and .github/hooks/. The PowerShell convention (powershell.instructions.md), docs/contributing/copyright-headers.md, and scripts/collections/README.md are aligned to 7.4, and plugins/ generated outputs were regenerated via npm run plugin:generate.

Rebased onto main (previously stacked on feat/1637-d-skill-paths). The original "bootstrap python test deps" change was dropped: main's Invoke-PythonTests.ps1 already runs uv sync before pytest, and the polyglot fuzz harnesses run under pytest without atheris, so syncing the manylinux-only fuzz group is unnecessary and would break test:py on macOS/Windows.

Note: skill scripts distributed via collections now require PowerShell 7.4+ at runtime. This matches the repo's supported toolchain (devcontainer powershell:1 feature and GitHub Actions both ship 7.4+).

Related Issue(s)

Closes #1827

Type of Change

Select all that apply:

Code & Documentation:

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature causing existing functionality to change)
  • Documentation update

Infrastructure & Configuration:

  • GitHub Actions workflow
  • Linting configuration (markdown, PowerShell, etc.)
  • Security configuration
  • DevContainer configuration
  • Dependency update

AI Artifacts:

  • Reviewed contribution with prompt-builder agent and addressed all feedback
  • Copilot instructions (.github/instructions/*.instructions.md)
  • Copilot prompt (.github/prompts/*.prompt.md)
  • Copilot agent (.github/agents/*.agent.md)
  • Copilot skill (.github/skills/*/SKILL.md)

Other:

  • Script/automation (.ps1, .sh, .py)
  • Other (please describe):

Testing

  • npm run lint:ps — all PowerShell files pass with the 7.4 syntax target.
  • npm run lint:md — 0 errors on edited docs.
  • npm run test:ps -- -TestPath scripts/tests/linting/Test-CopyrightHeaders.Tests.ps1 — 55/55 passed (copyright-header fixtures updated to 7.4).
  • npm run plugin:generate — regenerated plugins/ so generated #Requires copies match.

Checklist

Required Checks

  • Documentation is updated (if applicable)
  • Files follow existing naming conventions
  • Changes are backwards compatible (if applicable)
  • Tests added for new functionality (if applicable)

Required Automated Checks

  • Markdown linting: npm run lint:md
  • Frontmatter validation: npm run lint:frontmatter
  • PowerShell analysis: npm run lint:ps
  • Plugin freshness: npm run plugin:generate

Security Considerations

  • This PR does not contain any sensitive or NDA information
  • Any new dependencies have been reviewed for security issues
  • Security-related scripts follow the principle of least privilege

Additional Notes

Raising the runtime floor is a deliberate breaking change: scripts now refuse to run on PowerShell 7.0–7.3. This aligns the runtime contract with the analyzer target and the repo's supported toolchain.

@WilliamBerryiii WilliamBerryiii requested a review from a team as a code owner June 2, 2026 03:43
rezatnoMsirhC
rezatnoMsirhC previously approved these changes Jun 5, 2026
agreaves-ms
agreaves-ms previously approved these changes Jun 9, 2026
- set PSUseCompatibleSyntax TargetVersions to 7.4, dropping out-of-support 5.1/7.0/7.2

🔧 - Generated by Copilot
@WilliamBerryiii WilliamBerryiii force-pushed the feat/1637-e-ps74-pytest branch from 21c5f06 to be189dd Compare June 30, 2026 04:47
@WilliamBerryiii WilliamBerryiii changed the base branch from feat/1637-d-skill-paths to main June 30, 2026 04:53
@WilliamBerryiii WilliamBerryiii dismissed stale reviews from agreaves-ms and rezatnoMsirhC June 30, 2026 04:53

The base branch was changed.

@WilliamBerryiii WilliamBerryiii changed the title build(scripts): target PowerShell 7.4 and bootstrap python test deps build(scripts): target PowerShell 7.4 in PSScriptAnalyzer Jun 30, 2026
- bump #Requires -Version from 7.0 to 7.4 across 91 source scripts and modules
- align PowerShell convention and copyright-header docs with the 7.4 floor
- regenerate plugin outputs

🔧 - Generated by Copilot
@WilliamBerryiii WilliamBerryiii changed the title build(scripts): target PowerShell 7.4 in PSScriptAnalyzer build(scripts): adopt PowerShell 7.4 floor repo-wide Jun 30, 2026
@codecov-commenter

codecov-commenter commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.00%. Comparing base (61d1b5f) to head (aeabac8).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1842      +/-   ##
==========================================
+ Coverage   81.64%   87.00%   +5.36%     
==========================================
  Files         130       79      -51     
  Lines       19470     9022   -10448     
  Branches       12       12              
==========================================
- Hits        15897     7850    -8047     
+ Misses       3570     1169    -2401     
  Partials        3        3              
Flag Coverage Δ
docusaurus 61.84% <ø> (ø)
pester 86.02% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...erimental/powerpoint/scripts/Invoke-EmbedAudio.ps1 78.78% <ø> (ø)
...perimental/powerpoint/scripts/Invoke-ExportSvg.ps1 78.78% <ø> (ø)
...ental/powerpoint/scripts/Invoke-GenerateThemes.ps1 76.66% <ø> (ø)
...imental/powerpoint/scripts/Invoke-PptxPipeline.ps1 79.26% <ø> (ø)
...mental/tts-voiceover/scripts/Invoke-EmbedAudio.ps1 0.00% <ø> (ø)
...tts-voiceover/scripts/Invoke-GenerateVoiceover.ps1 0.00% <ø> (ø)
...voiceover/scripts/Modules/TtsVoiceoverHelpers.psm1 93.75% <ø> (ø)
...h-code-scanning/scripts/Get-CodeScanningAlerts.ps1 97.50% <ø> (ø)
...ub/skills/shared/pr-reference/scripts/generate.ps1 95.07% <ø> (-0.71%) ⬇️
...shared/pr-reference/scripts/list-changed-files.ps1 94.02% <ø> (ø)
... and 40 more

... and 53 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Eval Execution

Status: Passed — no merge-blocking failures (8 advisory assertion failure(s) present)

  • Artifacts evaluated: 1
  • Specs run: 1
  • Assertions passed: 7
  • Assertions failed (blocking): 0
  • Assertions failed (advisory): 8
  • Failed specs (merge-blocking): 0
Artifact Kind Status Specs Passed Failed (blocking) Failed (advisory)
powershell instruction ⚠️ advisory-fail 1 7 0 8

Legend — ✅ clean · ⚠️ advisory failures only (non-blocking) · ⏭️ skipped · ❌ merge-blocking failure

Only Failed specs (merge-blocking) gates this PR. Advisory assertion failures are signal-quality checks captured during iteration; review them, but they do not block merge and may be acceptable.

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.

Adopt PowerShell 7.4 floor repo-wide

4 participants