Materialize task-level context fixtures in workspaces#329
Merged
Conversation
Copilot
AI
changed the title
[WIP] Fix copilot-sdk executor to materialize task-level context fixture
Materialize task-level context fixtures in workspaces
Jun 16, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes inputs.context.fixture in task YAML actually materialize fixture content into each task’s fresh workspace before engine execution, aligning Copilot SDK runs with the declared task context and documenting the behavior across docs and schema metadata.
Changes:
- Adds task-level fixture materialization (
inputs.context.fixture) supporting both files and directories (directory contents copied into workspace root). - Introduces path-safety validation for fixture paths (rejecting empty/absolute/traversal) and adds regression tests for directory copying + traversal rejection.
- Updates README, guide docs, and the task schema description to document the new supported behavior.
Show a summary per file
| File | Description |
|---|---|
| site/src/content/docs/guides/eval-yaml.mdx | Documents inputs.context.fixture and directory-copy semantics in site docs. |
| schemas/task.schema.json | Updates schema metadata to mention fixture behavior (recommend defining fixture explicitly). |
| README.md | Adds user-facing documentation for task fixture workspace materialization. |
| internal/orchestration/runner.go | Implements fixture-to-workspace resource expansion before execution. |
| internal/orchestration/runner_test.go | Adds tests for directory fixture materialization and traversal rejection. |
| docs/GUIDE.md | Adds guide documentation for using inputs.context.fixture. |
Copilot's findings
- Files reviewed: 6/6 changed files
- Comments generated: 4
- Reject Windows rooted paths (leading / or \, non-empty VolumeName) that filepath.IsAbs misses on non-Windows hosts - Reject fixture paths that clean to '.' to prevent copying the entire spec directory into the task workspace - Add EvalSymlinks-based containment check after os.Stat so symlink escapes are caught even when the lexical path stays under the spec dir - Explicitly define 'fixture' property in task.schema.json context object for editor IntelliSense; additionalProperties:true preserves arbitrary metadata Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
copilot-sdkruns were acceptinginputs.context.fixtureas task metadata but never copying those fixture files into the per-task workspace. Agents started in an empty temp directory even when task YAML declared a fixture.Workspace materialization
inputs.context.fixtureinto execution resources before engine execution.Path safety
inputs.files, instruction files, and git resource behavior unchanged.Coverage and docs
inputs.context.fixturebehavior in README, guide docs, site docs, and schema metadata.Example:
Files under
fixtures/demoare now available in the fresh task workspace before the agent runs.