Skip to content

fix: route prompt graders through CopilotEngine#258

Merged
github-actions[bot] merged 3 commits into
mainfrom
spboyer/animated-train
May 20, 2026
Merged

fix: route prompt graders through CopilotEngine#258
github-actions[bot] merged 3 commits into
mainfrom
spboyer/animated-train

Conversation

@spboyer

@spboyer spboyer commented May 20, 2026

Copy link
Copy Markdown
Member

Summary

  • migrate prompt graders to run judge turns through the execution engine instead of constructing copilot.Client directly
  • add engine request options for grader tools, enqueue mode, streaming, ephemeral sessions, and workspace-capture skipping
  • thread a narrow executor into grader context and preserve prompt-grader post-grade error recovery

Closes #54

Validation

  • go test ./...
  • production grep confirms copilot.NewClient is confined to internal/execution

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot enabled auto-merge (squash) May 20, 2026 20:56
spboyer and others added 2 commits May 20, 2026 16:58
# Conflicts:
#	internal/graders/prompt_grader.go
#	internal/graders/prompt_grader_test.go
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@spboyer spboyer requested a review from Copilot May 20, 2026 21:04
@github-actions github-actions Bot merged commit e5a70e2 into main May 20, 2026
9 checks passed

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 migrates prompt graders to execute judge turns via the shared execution.CopilotEngine instead of constructing copilot.Client instances directly, while adding engine request options needed by graders (tools, enqueue mode, streaming, ephemeral sessions, and skipping workspace capture).

Changes:

  • Thread a narrow Executor into graders.Context and plumb it from the orchestration runner.
  • Update prompt graders (independent + pairwise) to call the execution engine with grader-specific execution options.
  • Extend execution request/engine support for tools, streaming, message mode, ephemeral sessions (with deletion), and optional workspace capture; update mocks/tests accordingly.
Show a summary per file
File Description
internal/orchestration/runner.go Attaches the execution engine to grader context so prompt graders can execute judge turns.
internal/graders/grader.go Introduces a narrow Executor interface and adds it to graders.Context.
internal/graders/prompt_grader.go Routes prompt grading through the execution engine and preserves post-grade error recovery behavior.
internal/graders/prompt_grader_test.go Updates/extends tests to validate executor usage and new execution request options.
internal/execution/engine.go Extends ExecutionRequest with tools, message mode, streaming, ephemeral session, and workspace-capture skipping.
internal/execution/copilot.go Implements the new request options in CopilotEngine.Execute, including ephemeral session deletion and optional workspace capture.
internal/execution/mock.go Adds SkipWorkspaceCapture handling to the mock engine response.
internal/execution/copilot_engine_test.go Adds coverage for grader request options and ephemeral session deletion / tracking behavior.

Copilot's findings

  • Files reviewed: 8/8 changed files
  • Comments generated: 2

Comment thread internal/graders/prompt_grader.go
Comment thread internal/execution/mock.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

Development

Successfully merging this pull request may close these issues.

Migrate all uses of copilot.Client to use execution's CopilotEngine instead

2 participants