Skip to content

fix(skills): keep only the PowerShell vally safety lint - #3142

Merged
Jamie Kim (jkim323) merged 6 commits into
microsoft:mainfrom
MohammedAlkindi:fix/vally-safety-lint-bash
Oct 9, 2026
Merged

Jamie Kim (jkim323) merged 6 commits into
microsoft:mainfrom
MohammedAlkindi:fix/vally-safety-lint-bash

Conversation

@MohammedAlkindi

@MohammedAlkindi Mohammed Alkindi (MohammedAlkindi) commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request

Description

Removes the bash safety lint, as asked in review: Lint-VallyTestSafety.ps1 is the lint import_corpus.py runs, and the bash copy had drifted.

Related Issue(s)

Fixes #3135

Type of Change

  • Bug fix (non-breaking change fixing an issue)
  • Copilot skill (.github/skills/*/SKILL.md)
  • Script/automation (.ps1, .sh, .py)

Sample Prompts (for AI Artifact Contributions)

N/A

Testing

The PowerShell cases now include both #3135 inputs and a UTF-16LE file with BOM. pytest 48 passed, Pester 50 passed; validate:local passes except lint:md-links.

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)

AI Artifact Contributions

N/A

Required Local Checks

  • Local validation aggregate: npm run validate:local
  • Documentation validation (if docs changed): npm run validate:docs
  • Spell checking: npm run spell-check
  • Link validation: npm run lint:md-links

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

None.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this PR, Mohammed Alkindi (@MohammedAlkindi), and for tracking down both root causes in #3135. The new test cases for case-insensitivity, escaped brackets, [\s\-], and wrapped lines are a real improvement.

We also owe you an apology. This skill should never have had a bash safety lint. It already requires PowerShell 7+, and Lint-VallyTestSafety.ps1 is the lint that import_corpus.py actually runs, so the bash mirror only added a second parser that could drift. That's on us, and we're sorry it cost you time to debug.

Rather than bring in perl, we'd like to move to PowerShell only:

  • Delete scripts/lint-vally-test-safety.sh and the bash tests, and keep your new CASES on the PowerShell lint.
  • Add the two inputs from #3135 and a UTF-16LE-with-BOM stimulus to CASES.
  • Remove the bash lint row from the SKILL.md Helper Script Index, bump metadata.last_updated, and update the engine sentence in references/refusal-taxonomy.md and the test module docstring.
  • Run npm run validate:local and the vally-tests pytest and Pester suites, and add the results to the Testing section. Updating the title and Type of Change to reflect the removed script would help too.

The inline comments have the details. If you'd rather not take this on, just let us know and we're happy to pick it up, with credit to you for the diagnosis. Please comment if you have questions about any of it.

Comment thread .github/skills/hve-core/vally-tests/scripts/lint-vally-test-safety.sh Outdated
Comment thread .github/skills/hve-core/vally-tests/scripts/lint-vally-test-safety.sh Outdated
Comment thread .github/skills/hve-core/vally-tests/tests/test_lint_safety.py Outdated
Comment thread .github/skills/hve-core/vally-tests/tests/test_lint_safety.py
Comment thread .github/skills/hve-core/vally-tests/tests/test_lint_safety.py Outdated
@MohammedAlkindi Mohammed Alkindi (MohammedAlkindi) changed the title fix(skills): match taxonomy patterns in the bash vally safety lint fix(skills): keep only the PowerShell vally safety lint Oct 7, 2026
@MohammedAlkindi

Copy link
Copy Markdown
Contributor Author

Done in 924cdeb. The bash lint and its tests are gone, and your new cases, the two #3135 inputs and a UTF-16LE-with-BOM stimulus now run against Lint-VallyTestSafety.ps1. The file-name test uses _run_pwsh, the SKILL.md index row is removed with last_updated bumped, and the taxonomy sentence and test docstring describe only the PowerShell lint. vally-tests pytest: 48 passed; Pester: 50 passed. npm run validate:local passes every step except lint:md-links, which fails on two dead external links (an owasp.org 404 and a medium.com 403) in files this PR does not touch. Title and Type of Change are updated.

@codecov-commenter

Codecov Comments Bot (codecov-commenter) commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.73%. Comparing base (af0e654) to head (6bf3610).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3142      +/-   ##
==========================================
- Coverage   86.79%   83.73%   -3.07%     
==========================================
  Files         132       87      -45     
  Lines       15197    11383    -3814     
  Branches       46        0      -46     
==========================================
- Hits        13190     9531    -3659     
+ Misses       2001     1852     -149     
+ Partials        6        0       -6     
Flag Coverage Δ
docusaurus ?
pester 83.86% <ø> (-0.01%) ⬇️
pytest 76.77% <ø> (-18.29%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 48 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.

Comment thread .github/skills/hve-core/vally-tests/SKILL.md Outdated
@jkim323
Jamie Kim (jkim323) added this pull request to the merge queue Oct 9, 2026
Merged via the queue into microsoft:main with commit ca11004 Oct 9, 2026
147 checks passed
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.

fix(skills): bash vally safety lint exits 1 on every input

5 participants