Skip to content

test: address PR review feedback on primitives discovery/parser tests#268

Merged
danielmeppiel merged 2 commits intotest-assist/primitives-discovery-parser-coverage-da40935ebde67a0afrom
copilot/sub-pr-254
Mar 12, 2026
Merged

test: address PR review feedback on primitives discovery/parser tests#268
danielmeppiel merged 2 commits intotest-assist/primitives-discovery-parser-coverage-da40935ebde67a0afrom
copilot/sub-pr-254

Conversation

Copy link
Contributor

Copilot AI commented Mar 12, 2026

Fixes four review issues raised on the primitives discovery/parser test PR.

Changes

  • parser.py_extract_primitive_name(): Added agents/ to the structured-directory list so .agent.md suffix is stripped consistently with .chatmode.md, .instructions.md, etc. Files under .apm/agents/ or .github/agents/ now yield just the agent name (e.g. reviewer, not reviewer.agent).

  • Removed unused imports: Dropped stat and discover_primitives from the test file's import block.

  • Stable unreadability test: Replaced os.chmod(0o000) (unreliable on Windows / elevated-privilege runners) with patch("apm_cli.primitives.discovery.open", side_effect=PermissionError).

  • Accurate test name: Renamed test_unreadable_skill_md_warns_and_skipstest_parse_error_on_skill_md_warns_and_skips; the test exercises a parse failure, not file readability.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: danielmeppiel <51440732+danielmeppiel@users.noreply.github.com>
Copilot AI changed the title [WIP] [Test Improver] Increase test coverage for primitives discovery and parser test: address PR review feedback on primitives discovery/parser tests Mar 12, 2026
Copilot AI requested a review from danielmeppiel March 12, 2026 21:38
@danielmeppiel danielmeppiel marked this pull request as ready for review March 12, 2026 21:50
@danielmeppiel danielmeppiel merged commit 110e270 into test-assist/primitives-discovery-parser-coverage-da40935ebde67a0a Mar 12, 2026
1 check passed
@danielmeppiel danielmeppiel deleted the copilot/sub-pr-254 branch March 12, 2026 21:50
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