fix: inject SKILL.md content, load trigger fixtures, pass MCP servers#191
Merged
Conversation
…#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>
Contributor
There was a problem hiding this comment.
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.Resourcesand setSourceDirfor trigger executions. - Plumb
mcp_servers(ServerConfigs) through orchestration/trigger runners intoExecutionRequestand 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
This was referenced Apr 21, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 onSkillDirectories. The SDK'sSkillDirectorieshandles 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()builtExecutionRequestwithoutResources. The workspace was always empty.Fix:
NewRunner()now walkscfg.FixtureDir()once at init, caches[]ResourceFile, and passes them on every triggerExecutionRequest. Skips hidden dirs, vendor, node_modules, and files >1MB.#180 — mcp_servers config not passed to copilot session
Root cause:
spec.Config.ServerConfigswas never passed through toExecutionRequestor the copilotSessionConfig.Fix: Added
MCPServersfield toExecutionRequest,convertMCPServers()helper (validates each entry is map-shaped), and passthrough in both orchestration and trigger runners.Test Coverage
buildSkillSystemMessageandparseSkillFrontmatterSystemMessageandMCPServerson CreateSession and ResumeSessiongo test ./...,go vet)Closes #190
Closes #186
Closes #180