Summary
The assign_milestone safe-output handler rejects items that specify milestone_title instead of milestone_number, even though both the tool's MCP schema and its description explicitly state that either field is acceptable.
Reproduction
Workflow test-copilot-assign-milestone in githubnext/gh-aw-test compiled with --use-samples. Sample:
safe-outputs:
assign-milestone:
allowed: ["Copilot Safe Output Test Milestone"]
samples:
- issue_number: ${{ github.event.issue.number }}
milestone_title: "Copilot Safe Output Test Milestone"
Trigger by opening an issue whose body contains the marker so the workflow fires.
Observed
Run: https://github.com/githubnext/gh-aw-test/actions/runs/27076996919 (workflow finished success, but the milestone was never applied to the issue).
Agent job:
GH_AW_SAMPLES: [{"tool":"assign_milestone","arguments":{"issue_number":"2227","milestone_title":"Copilot Safe Output Test Milestone"}}]
[info] apply_samples: sample[0] (tool=assign_milestone) ok
[info] apply_samples: 1 sample(s) replayed successfully.
agent_output.json from the artifact:
{"items":[],"errors":["Line 1: assign_milestone 'milestone_number' is required"]}
safe_outputs job:
Loaded config from GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG:
{"assign_milestone":{"allowed":["Copilot Safe Output Test Milestone"]}, …}
No safe-output messages available - nothing to process
i.e. the MCP tool call succeeded, the item was written to safeoutputs.jsonl with milestone_title, then the post-processor that builds safe-output-items.jsonl dropped it for missing milestone_number.
Expected
The assign_milestone tool schema (pkg/workflow/js/safe_outputs_tools.json) says:
milestone_number: "Either milestone_number or milestone_title must be provided."
milestone_title: "Either milestone_number or milestone_title must be provided."
and required is only ["issue_number"]. The post-processor should:
- Accept the item when either
milestone_number or milestone_title is present, and
- Resolve
milestone_title → milestone number in the safe_outputs job using the GitHub API (since allowed: already gates which titles are permitted).
Impact
Blocks test-copilot-assign-milestone in githubnext/gh-aw-test from passing under --use-samples. Any user workflow that emits assign_milestone with milestone_title is silently dropped.
Suggested fix
In the safe-output validator that runs at the end of the agent step (the source of the "X is required" error in agent_output.json.errors):
- Mark
assign_milestone as requiring (milestone_number OR milestone_title) instead of milestone_number.
- Have the safe_outputs handler resolve
milestone_title against the repo's open+closed milestones (respecting allowed: and auto-create).
Environment
- gh-aw
main (commit d25afa6 as of 2026-06-06)
- Compiled with
--use-samples
Summary
The
assign_milestonesafe-output handler rejects items that specifymilestone_titleinstead ofmilestone_number, even though both the tool's MCP schema and its description explicitly state that either field is acceptable.Reproduction
Workflow
test-copilot-assign-milestoneingithubnext/gh-aw-testcompiled with--use-samples. Sample:Trigger by opening an issue whose body contains the marker so the workflow fires.
Observed
Run: https://github.com/githubnext/gh-aw-test/actions/runs/27076996919 (workflow finished
success, but the milestone was never applied to the issue).Agent job:
agent_output.jsonfrom the artifact:{"items":[],"errors":["Line 1: assign_milestone 'milestone_number' is required"]}safe_outputsjob:i.e. the MCP tool call succeeded, the item was written to
safeoutputs.jsonlwithmilestone_title, then the post-processor that buildssafe-output-items.jsonldropped it for missingmilestone_number.Expected
The
assign_milestonetool schema (pkg/workflow/js/safe_outputs_tools.json) says:and required is only
["issue_number"]. The post-processor should:milestone_numberormilestone_titleis present, andmilestone_title→ milestone number in the safe_outputs job using the GitHub API (sinceallowed:already gates which titles are permitted).Impact
Blocks
test-copilot-assign-milestoneingithubnext/gh-aw-testfrom passing under--use-samples. Any user workflow that emitsassign_milestonewithmilestone_titleis silently dropped.Suggested fix
In the safe-output validator that runs at the end of the agent step (the source of the "X is required" error in
agent_output.json.errors):assign_milestoneas requiring(milestone_number OR milestone_title)instead ofmilestone_number.milestone_titleagainst the repo's open+closed milestones (respectingallowed:andauto-create).Environment
main(commitd25afa6as of 2026-06-06)--use-samples