Skip to content

chore: refactor skill filtering in integration tests - #3023

Merged
JasonYeMSFT (JasonYeMSFT) merged 5 commits into
microsoft:mainfrom
JasonYeMSFT:chuye/skill-filtering-refactor
Aug 10, 2026
Merged

chore: refactor skill filtering in integration tests#3023
JasonYeMSFT (JasonYeMSFT) merged 5 commits into
microsoft:mainfrom
JasonYeMSFT:chuye/skill-filtering-refactor

Conversation

@JasonYeMSFT

Copy link
Copy Markdown
Member

Description

Refactoring code for some better readability.

Checklist

  • Tests pass locally (cd tests && npm test)
  • Title has one of the prefixes: fix:, feat:, feature:, chore:, misc:, test:, eval:
  • If modifying skill descriptions: verified routing correctness with integration tests (In tests/, npm run test:integration -- <skill> or npm run test:vally -- --skill <skill>)

Related Issues

Copilot AI lite review requested due to automatic review settings August 5, 2026 22:07
@JasonYeMSFT
JasonYeMSFT (JasonYeMSFT) requested a review from a team as a code owner August 5, 2026 22:07
Comment thread tests/utils/skill-loader.ts Fixed

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.

Pull request overview

This PR refactors the integration test harness’s skill-selection logic by extracting plugin/skill filtering (including optional truncation) out of agent-runner into skill-loader for improved readability and reuse.

Changes:

  • Added getSkillsForTest() to centralize which plugins/skills are loaded, and which are disabled for a run.
  • Updated agent-runner to use getSkillsForTest() instead of duplicating filtering/truncation logic.
  • Kept the existing character-budget truncation behavior (via truncateSkills) as part of the new flow.
Show a summary per file
File Description
tests/utils/skill-loader.ts Adds getSkillsForTest() to compute skill directories, loaded skills metadata, and disabled skills for a test run.
tests/utils/agent-runner.ts Replaces inline skill filtering/truncation with a call to getSkillsForTest() when creating the Copilot session.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 3
  • Review effort level: Lite

Comment thread tests/utils/agent-runner.ts
Comment thread tests/utils/skill-loader.ts Outdated
Comment thread tests/utils/skill-loader.ts Outdated
@JasonYeMSFT
JasonYeMSFT (JasonYeMSFT) marked this pull request as draft August 5, 2026 22:43
reorganize branching
add unit tests
@JasonYeMSFT
JasonYeMSFT (JasonYeMSFT) marked this pull request as ready for review August 6, 2026 17:03
@JasonYeMSFT
JasonYeMSFT (JasonYeMSFT) merged commit f73216b into microsoft:main Aug 10, 2026
11 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.

4 participants