Skip to content

fix: inject SKILL.md content, load trigger fixtures, pass MCP servers#191

Merged
spboyer merged 2 commits into
mainfrom
squad/190-skill-injection-and-fixtures
Apr 21, 2026
Merged

fix: inject SKILL.md content, load trigger fixtures, pass MCP servers#191
spboyer merged 2 commits into
mainfrom
squad/190-skill-injection-and-fixtures

Conversation

@spboyer

@spboyer spboyer commented Apr 20, 2026

Copy link
Copy Markdown
Member

Summary

Fixes three related bugs that prevent waza evals from working correctly with the copilot-sdk executor.

#190 — SKILL.md not injected as system context

Root cause: PR #140 removed buildSkillSystemMessage(), relying solely on SkillDirectories. The SDK's SkillDirectories handles skill tool routing but doesn't inject skill content into the system prompt.

Fix: Re-added skill content injection via SessionConfig.SystemMessage (mode: append). Injects the full SKILL.md body for the target skill and compact <available_skills> summaries for all discovered skills. Scans both direct and nested skill directories, skipping hidden/vendor dirs.

#186 — Trigger tests don't have access to fixtures

Root cause: trigger/runner.go:testTrigger() built ExecutionRequest without Resources. The workspace was always empty.

Fix: NewRunner() now walks cfg.FixtureDir() once at init, caches []ResourceFile, and passes them on every trigger ExecutionRequest. Skips hidden dirs, vendor, node_modules, and files >1MB.

#180 — mcp_servers config not passed to copilot session

Root cause: spec.Config.ServerConfigs was never passed through to ExecutionRequest or the copilot SessionConfig.

Fix: Added MCPServers field to ExecutionRequest, convertMCPServers() helper (validates each entry is map-shaped), and passthrough in both orchestration and trigger runners.

Test Coverage

  • 8 new unit tests for buildSkillSystemMessage and parseSkillFrontmatter
  • 3 new copilot engine tests verifying SystemMessage and MCPServers on CreateSession and ResumeSession
  • 6 new trigger runner tests for fixture loading, MCP propagation, and edge cases
  • All existing tests pass (go test ./..., go vet)

Closes #190
Closes #186
Closes #180

Copilot AI added 2 commits April 9, 2026 13:27
…#190, #186, #180)

- Re-add buildSkillSystemMessage() to inject SKILL.md content via
  SystemMessage (mode: append) on CreateSession/ResumeSession. Injects
  full body for the target skill and compact summaries for all skills.
  PR #140 removed this, relying solely on SkillDirectories, which only
  handles skill tool routing — not content injection.

- Load fixture files for trigger tests. trigger/runner.go now walks
  cfg.FixtureDir() once at init, caches ResourceFiles, and passes them
  on every trigger ExecutionRequest. Skips hidden dirs, vendor,
  node_modules, and files >1MB.

- Pass mcp_servers eval config to copilot session. Adds MCPServers field
  to ExecutionRequest, convertMCPServers() helper in both orchestration
  and trigger runners, and passthrough in copilot.go.

Closes #190
Closes #186
Closes #180

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 20, 2026 21:45
@github-actions github-actions Bot enabled auto-merge (squash) April 20, 2026 21:46

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 fixes gaps in the copilot-sdk executor integration so evals behave like intended: skill guidance is included in the system context, trigger tests can run against fixture workspaces, and MCP server configs are passed through to Copilot sessions.

Changes:

  • Inject SKILL.md content into Copilot system message (append mode) and add parsing/tests around skill frontmatter.
  • Load and cache trigger fixtures as ExecutionRequest.Resources and set SourceDir for trigger executions.
  • Plumb mcp_servers (ServerConfigs) through orchestration/trigger runners into ExecutionRequest and Copilot session configs.
Show a summary per file
File Description
internal/execution/copilot.go Builds and appends a skill-derived system message; passes MCP servers into session creation/resume.
internal/execution/engine.go Adds ExecutionRequest.MCPServers to carry MCP config through execution.
internal/execution/copilot_test.go Adds tests asserting SystemMessage/MCPServers are sent on CreateSession/ResumeSession.
internal/execution/skill_injection_test.go New unit tests for skill system message construction and frontmatter parsing.
internal/trigger/runner.go Loads fixture dir once, passes resources + source dir + MCP servers into execution requests.
internal/trigger/runner_test.go Adds tests for fixture loading, skipping rules, MCP passthrough, and edge cases.
internal/orchestration/runner.go Passes MCP server configs into execution requests (plus local conversion helper).
.github/workflows/squad-promote.yml Alters “forbidden paths” stripping/checking rules during dev→preview promotion.
.adc-sdk/** Adds an ADC SDK subtree (new module + APIs + tests + examples).
.squad/**, .github/agents/squad.agent.md, .github/workflows/squad-heartbeat.yml Adds/updates Squad-related templates/docs/workflow behavior.

Copilot's findings

  • Files reviewed: 78/80 changed files
  • Comments generated: 6

Comment thread internal/trigger/runner.go
Comment thread internal/trigger/runner.go
Comment thread internal/orchestration/runner.go
Comment thread .github/workflows/squad-promote.yml
Comment thread .adc-sdk/adc.go
Comment thread internal/execution/copilot.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants