Skip to content

Name the PowerShell Suppression Form and Fix the Python CI Backstop Text - #4457

Merged
ptr727 merged 4 commits into
developfrom
burndown/codestyle-ps-suppress-pycheck
Nov 25, 2026
Merged

ptr727 merged 4 commits into
developfrom
burndown/codestyle-ps-suppress-pycheck

Conversation

@ptr727

@ptr727 ptr727 commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • CODESTYLE.md "PowerShell" names the in-code suppression form, [Diagnostics.CodeAnalysis.SuppressMessageAttribute('<RuleName>', '', Justification = '<reason>')] on the param() block of the function holding the finding. A finding outside any function takes the script's own param() block. That is the narrowest scope "Analyzer Diagnostics and Suppressions" prefers, and the section names no Skill to carry it. No powershell-codestyle Skill is added and AGENTS.md is unchanged, per the 2026-11-25 answer on Decide Whether CODESTYLE.md's New PowerShell Section Is Packaged as a powershell-codestyle Skill #4403.
    • The second positional argument is '' rather than the decision comment's '<target>' placeholder, and the attribute sits on the param() block rather than "on the function or parameter". Measured with Invoke-ScriptAnalyzer -ScriptDefinition on PSScriptAnalyzer 1.23.0, the version CI installs:
      • '' on a function's or a script's param() block suppresses the finding.
      • A function name as the second argument raises "Cannot find any DiagnosticRecord with the Rule Suppression ID", since PSScriptAnalyzer reads it as a RuleSuppressionID.
      • The attribute on a single parameter inside param(...) suppresses nothing.
  • python-codestyle "Local development loop" matches its Toolchain contract. The clean-compile runs both checkers only where the repo enforces pyright beside mypy. CI's backstop runs one type checker, mypy where both are configured, and such a repo backstops pyright from its own validate hook. validate-task.yml is unchanged, per the 2026-11-25 answer on Decide Whether the Validator Runs Both Python Type Checkers or python-codestyle Says CI Backstops One #4407.
  • The generated .github/skills/ and .claude-plugin/ copies are regenerated with scripts/build_dist.py, and --check passes.

Closes on promotion: #4403, #4407

Dropped findings

  • .agents/skills/python-codestyle/references/profiles.md:12, wording on text this change did not touch: "A repo running both" sits under "Type checker in CI", so it already means both checkers enforced.

Pre-existing findings, not filed

  • PSScriptAnalyzerSettings.psd1, scope: the root settings exclude two rules for every .ps1 file, while their stated reasons name only the host-setup/windows scripts.

Test plan

  • uv run --no-project --script scripts/build_dist.py --check reports the distributions current.
  • prose_lint.py --diff origin/develop reports no violation on the changed files.
  • The pre-commit hook (ruff, mypy, prose, eol) passes.
  • The suppression form is measured in mcr.microsoft.com/powershell:latest with PSScriptAnalyzer 1.23.0, as above.

🤖 Generated with Claude Code

ptr727 and others added 3 commits November 25, 2026 14:46
CODESTYLE.md "PowerShell" states the in-code SuppressMessageAttribute form,
the narrowest suppression scope the general rule prefers, since the section
names no Skill to carry it.

python-codestyle's local loop now matches the Toolchain contract: CI runs one
type checker, mypy where both are configured, and a repo enforcing pyright
beside mypy backstops pyright from its own validate hook.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
PSScriptAnalyzer reads SuppressMessageAttribute's second positional argument
as a RuleSuppressionID, so a function name there suppresses nothing. The
general form passes an empty string and sits on a param() block or a
parameter.

The ruff-pin sentence names CI, since the inserted sentences left its "Its"
pointing at the repo's own validate hook.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
PSScriptAnalyzer 1.23.0 ignores a SuppressMessageAttribute on a single
parameter, measured with Invoke-ScriptAnalyzer -ScriptDefinition. The
attribute suppresses only on the param() block of the script or function.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings November 25, 2026 22:57
@ptr727

ptr727 commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 5631d4ca6b0bd40c0d8eecb6e2bd7ae6b5d6c9f6, the content this pull request carries at that commit against develop, and it recorded 2 findings.

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 22 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between e9cf79a and 95a2d0f.

Files ignored due to path filters: 3

  • .claude-plugin/fleet-skills/.source-digests/python-codestyle is excluded by !.claude-plugin/fleet-skills/**
  • .claude-plugin/fleet-skills/skills/python-codestyle/SKILL.md is excluded by !.claude-plugin/fleet-skills/**
  • .github/skills/python-codestyle/SKILL.md is excluded by !.github/skills/**
Files selected for processing: 2

  • .agents/skills/python-codestyle/SKILL.md
  • CODESTYLE.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A script's top-level param() block silences the rule for every function in
the file, so it is the placement only for a finding outside any function.

Co-Authored-By: Claude Opus 5.5 <[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.

🟡 Changes recommended

An active documentation issue remains in CODESTYLE.md because its explanation of script-level and function-level param() scope contradicts the narrowest-scope rule.

1 open issue
What changed in this PR

This pull request documents the PowerShell suppression form, aligns Python type-checking guidance with current CI behavior, and regenerates the distributed skill copies and source digest.

Changes:

  • Adds PSScriptAnalyzer suppression syntax guidance to CODESTYLE.md.
  • Clarifies Python local and CI type-checking behavior.
  • Regenerates the GitHub Copilot and Claude skill distributions and source digest.

A documentation finding remains for the distinction between script-level and function-level suppression scope in CODESTYLE.md:152.

File Description
CODESTYLE.md Documents the PowerShell in-code suppression attribute and its placement.
.github/​skills/​python-codestyle/​SKILL.md Regenerates the GitHub Copilot Python coding skill guidance.
.claude-plugin/​fleet-skills/​skills/​python-codestyle/​SKILL.md Regenerates the Claude Python coding skill guidance.
.claude-plugin/​fleet-skills/​.source-digests/​python-codestyle Updates the generated source digest for the Python coding skill.
.agents/​skills/​python-codestyle/​SKILL.md Updates the canonical Python type-checking and CI guidance.

Review effort: Lite

Comment thread CODESTYLE.md Resolved
@ptr727

ptr727 commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 95a2d0fa5868e1d6d369b3c0b9dc4a6700ef1afe, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@codecov

codecov Bot commented Nov 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.62%. Comparing base (b38e084) to head (95a2d0f).
⚠️ Report is 348 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4457      +/-   ##
===========================================
- Coverage    81.60%   79.62%   -1.99%     
===========================================
  Files           26       47      +21     
  Lines         9070    16398    +7328     
===========================================
+ Hits          7402    13057    +5655     
- Misses        1668     3341    +1673     
Flag Coverage Δ
python-3.13 79.62% <ø> (-1.99%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727

ptr727 commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@ptr727

ptr727 commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

/review

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ptr727
ptr727 merged commit d6cd6c1 into develop Nov 25, 2026
14 checks passed
@ptr727
ptr727 deleted the burndown/codestyle-ps-suppress-pycheck branch November 25, 2026 23:15
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.

2 participants