Skip to content

Fix --use-samples replay for call/dispatch workflow tools and enable replace-label sample schema - #54813

Merged
pelikhan merged 5 commits into
mainfrom
copilot/fix-samples-mode-replay-issues
Aug 22, 2026
Merged

Fix --use-samples replay for call/dispatch workflow tools and enable replace-label sample schema#54813
pelikhan merged 5 commits into
mainfrom
copilot/fix-samples-mode-replay-issues

Conversation

Copilot AI commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

--use-samples could not deterministically replay call-workflow and dispatch-workflow because replay emitted family tool names (call_workflow / dispatch_workflow) instead of the generated workflow-specific tool names. replace-label also could not accept samples at compile time because its MCP tool schema was missing from safe_outputs_tools.json.

  • Replay tool-name resolution for dynamic workflow handlers

    • Updated sample entry generation to map workflow_name → normalized dynamic tool name (e.g., worker-aworker_a) for call-workflow and dispatch-workflow.
    • Preserved argument shaping for dynamic calls:
      • inputs payload is passed as tool args
      • dispatch-workflow also carries ref when provided
  • Schema coverage for replace_label samples

    • Added replace_label tool schema to runtime and embedded tool schema catalogs:
      • actions/setup/js/safe_outputs_tools.json
      • pkg/workflow/js/safe_outputs_tools.json
    • This aligns compile-time sample validation with runtime handler availability.
  • Regression-focused tests

    • Added coverage that collectSampleEntries emits workflow-specific tool names for dynamic workflow samples.
    • Extended dynamic-sample validation coverage to include replace-label sample configuration.
// dynamic workflow sample now targets generated tool name, not "call_workflow"
{
  "tool": "worker_a",
  "arguments": { "sentinel": "sample" }
}

Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix samples mode to replay call-workflow, dispatch-workflow, and replace-label Fix --use-samples replay for call/dispatch workflow tools and enable replace-label sample schema Aug 22, 2026
Copilot AI requested a review from dsyme August 22, 2026 14:10
@dsyme
dsyme marked this pull request as ready for review August 22, 2026 17:56
Copilot AI balanced review requested due to automatic review settings August 22, 2026 17:56
@github-actions

github-actions Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Test Quality Sentinel failed during test quality analysis.

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Design Decision Gate 🏗️ failed during design decision gate check.

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer failed during the skills-based review.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Ponytail Reviewer failed. Please review the logs for details.

Generated by Ponytail Reviewer for #54813

@github-actions

github-actions Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

⚠️ PR Code Quality Reviewer failed during code quality review.

🔎 Code quality review by PR Code Quality Reviewer

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

Fixes #54811 by making sample replay target workflow-specific MCP tools and enabling replace-label sample validation.

Changes:

  • Normalizes dynamic workflow sample tool names and reshapes arguments.
  • Adds replace_label to both schema catalogs.
  • Adds regression coverage for replay and validation.
Show a summary per file
File Description
pkg/workflow/samples_replay.go Resolves dynamic workflow sample tool names and arguments.
pkg/workflow/samples_validation_test.go Tests dynamic replay and replace-label validation.
pkg/workflow/js/safe_outputs_tools.json Adds the embedded replace_label schema.
actions/setup/js/safe_outputs_tools.json Adds the runtime replace_label schema.

Review details

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot this PR looks close, but it still needs a maintainer-ready finish.

  • Please review the unresolved feedback/check status on the current HEAD, address any remaining blockers, refresh the branch if needed, and leave a concise maintainer handoff with commands and outcomes.
  • Then run the pr-finisher skill before handing back.

Run: https://github.com/github/gh-aw/actions/runs/32591161200

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 8.55 AIC · ⌖ 8.26 AIC · ⊞ 9.5K ·
Comment /souschef to run again

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

@copilot this PR looks close, but it still needs a maintainer-ready finish.

  • Please review the unresolved feedback/check status on the current HEAD, address any remaining blockers, refresh the branc...

Addressed in f4c1d64:

  • Fixed the real blocker from lint-go-golangci (incremental lint on HEAD a335750): mapsloop modernize violation in pkg/workflow/samples_replay.go:86 — replaced the manual copy loop with maps.Copy.
  • Fixed the real blocker from JS Tests (shard 4/4): safe_outputs_mcp_schema_validation.test.cjs failed because replace_label's label_to_add/label_to_remove descriptions were too short (47 chars) and lacked example/format guidance. Extended both descriptions with concrete examples (e.g. 'triage', 'in-progress') in both actions/setup/js/safe_outputs_tools.json and pkg/workflow/js/safe_outputs_tools.json.
  • The other failing bot checks (Test Quality Sentinel, Design Decision Gate, Matt Pocock Skills Reviewer, Ponytail Reviewer, PR Code Quality Reviewer) had no failed jobs in their runs — they're commentary-style agentic workflows, not gating CI failures, and had no unresolved review threads to action.

Verified locally on the new commit: go build ./..., golangci-lint run ./pkg/workflow/... (0 issues), go test ./pkg/workflow/... (pass), and the full JS suite in actions/setup/js (only pre-existing unrelated flake in claude_harness.test.cjs, passes in isolation).

No open review threads on this PR. CI on this new HEAD needs a maintainer re-trigger since my push doesn't re-run workflows.

Copilot AI requested a review from gh-aw-bot August 22, 2026 18:53
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot this PR still needs forward progress.

  • This branch is in a conflicting/dirty merge state. Please run make merge-main, resolve the conflicts cleanly, rerun the relevant validation, and push the result.
  • After that, run the pr-finisher skill and leave a concise maintainer handoff with commands and outcomes.

Run: https://github.com/github/gh-aw/actions/runs/32595245207

Generated by 👨‍🍳 PR Sous Chef · gpt54 · 13 AIC · ⌖ 9.48 AIC · ⊞ 9.5K ·
Comment /souschef to run again

…ode-replay-issues

# Conflicts:
#	pkg/workflow/samples_replay.go

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Aug 22, 2026

Copy link
Copy Markdown
Contributor Author

@copilot this PR still needs forward progress.

  • This branch is in a conflicting/dirty merge state. Please run make merge-main, resolve the conflicts cleanly, rerun the relevant validation, and pus...

Merged in f3df3fd. Fetched origin/main and ran git merge origin/main; the only real conflict was in pkg/workflow/samples_replay.go's import block — this branch added maps while an unrelated concurrent fix on main (#54814) added sort. Kept both imports, then ran make build, make recompile (289/289 workflows compiled), and make fmt as instructed.

Verified locally on the merge commit: go build ./..., golangci-lint run ./pkg/workflow/... (0 issues), go test ./pkg/workflow/... (pass), and the relevant JS test suites (safe_outputs_mcp_schema_validation.test.cjs, safe_outputs_config.test.cjs) pass.

PR mergeable_state is now blocked (no longer conflicting/dirty) — this reflects pending/stale status checks on the new HEAD, which need a maintainer re-trigger since my push doesn't re-run CI. No unresolved review threads remain.

@pelikhan
pelikhan merged commit de637d3 into main Aug 22, 2026
41 checks passed
@pelikhan
pelikhan deleted the copilot/fix-samples-mode-replay-issues branch August 22, 2026 23:52
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.

samples mode cannot replay call-workflow, dispatch-workflow, or replace-label

5 participants