Skip to content

Materialize task-level context fixtures in workspaces#329

Merged
spboyer merged 4 commits into
mainfrom
copilot/fix-copilot-sdk-context-fixture
Jun 16, 2026
Merged

Materialize task-level context fixtures in workspaces#329
spboyer merged 4 commits into
mainfrom
copilot/fix-copilot-sdk-context-fixture

Conversation

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

copilot-sdk runs were accepting inputs.context.fixture as 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

    • Expands inputs.context.fixture into execution resources before engine execution.
    • Supports fixture files and directories.
    • Copies directory fixture contents into the workspace root.
  • Path safety

    • Rejects empty, absolute, and traversal fixture paths.
    • Keeps existing inputs.files, instruction files, and git resource behavior unchanged.
  • Coverage and docs

    • Adds regression coverage for directory fixture copying and traversal rejection.
    • Documents the supported inputs.context.fixture behavior in README, guide docs, site docs, and schema metadata.

Example:

inputs:
  context:
    fixture: fixtures/demo
  prompt: "Inspect repository files and summarize what you find."

Files under fixtures/demo are now available in the fresh task workspace before the agent runs.

Copilot AI requested review from Copilot and removed request for Copilot June 16, 2026 15:10
Copilot AI requested review from Copilot and removed request for Copilot June 16, 2026 15:17
Copilot AI requested review from Copilot and removed request for Copilot June 16, 2026 15:22
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
Copilot AI requested a review from spboyer June 16, 2026 15:25
@spboyer spboyer requested a review from Copilot June 16, 2026 15:48
@spboyer spboyer marked this pull request as ready for review June 16, 2026 15:48

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 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

Comment thread internal/orchestration/runner.go Outdated
Comment thread internal/orchestration/runner.go
Comment thread internal/orchestration/runner.go
Comment thread schemas/task.schema.json
- 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>
@spboyer spboyer merged commit 0db3f0d into main Jun 16, 2026
10 checks passed
@spboyer spboyer deleted the copilot/fix-copilot-sdk-context-fixture branch June 16, 2026 18:59
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