Repository navigation
[safeoutputs] Document assign_to_user/unassign_from_user reject temporary_id references - #74231
Conversation
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
🟡 Changes recommended
Active documentation inaccuracies remain in both schema copies, including incorrect error text, an omitted required field, and unconditional temporary-ID failure claims that do not apply to the default triggering target.
5 open issues
Clarify issue_number is required and scope the warning to wildcard targets · New Scope the temporary-ID warning to wildcard targets · New Document a generic validation error for invalid target numbers · New Clarify issue_number is required and scope the warning to wildcard targets · New Scope the temporary-ID warning to wildcard targets · New
What changed in this PR
This pull request updates the safe-output tool descriptions for assign_to_user and unassign_from_user to clarify their handling of temporary_id references, while keeping the compiler and runtime schema copies synchronized. Runtime behavior is unchanged.
Changes:
- Documents the temporary-ID limitation for user assignment and unassignment tools.
- Updates both mirrored safe-output schema files.
- Preserves existing tool behavior and schema synchronization.
| File | Description |
|---|---|
pkg/workflow/js/safe_outputs_tools.json |
Updated compiler-embedded descriptions for the user assignment tools. |
actions/setup/js/safe_outputs_tools.json |
Updated runtime tool descriptions to match the compiler copy. |
Review effort: Lite (auto)
| "issue_number": { | ||
| "type": ["number", "string"], | ||
| "description": "Issue number to assign users to. This is the numeric ID from the GitHub URL (e.g., 543 in github.com/owner/repo/issues/543). If omitted, assigns to the issue that triggered this workflow.", | ||
| "description": "Issue number to assign users to. This is the numeric ID from the GitHub URL (e.g., 543 in github.com/owner/repo/issues/543) of an issue that already exists. Unlike add_comment, add_labels, or assign_milestone, this field does NOT accept a temporary_id (e.g. 'aw_xxx') referencing an issue created earlier in the same run — passing one will fail with 'Invalid item_number/issue_number specified'. If omitted, assigns to the issue that triggered this workflow.", |
| "issue_number": { | ||
| "type": ["number", "string"], | ||
| "description": "Issue number to unassign users from. This is the numeric ID from the GitHub URL (e.g., 543 in github.com/owner/repo/issues/543). If omitted, uses the issue that triggered this workflow.", | ||
| "description": "Issue number to unassign users from. This is the numeric ID from the GitHub URL (e.g., 543 in github.com/owner/repo/issues/543) of an issue that already exists. Unlike add_comment, add_labels, or assign_milestone, this field does NOT accept a temporary_id (e.g. 'aw_xxx') referencing an issue created earlier in the same run — passing one will fail with 'Invalid item_number/issue_number specified'. If omitted, uses the issue that triggered this workflow.", |
| "issue_number": { | ||
| "type": ["number", "string"], | ||
| "description": "Issue number to unassign users from. This is the numeric ID from the GitHub URL (e.g., 543 in github.com/owner/repo/issues/543). If omitted, uses the issue that triggered this workflow.", | ||
| "description": "Issue number to unassign users from. This is the numeric ID from the GitHub URL (e.g., 543 in github.com/owner/repo/issues/543) of an issue that already exists. Unlike add_comment, add_labels, or assign_milestone, this field does NOT accept a temporary_id (e.g. 'aw_xxx') referencing an issue created earlier in the same run — passing one will fail with 'Invalid item_number/issue_number specified'. If omitted, uses the issue that triggered this workflow.", |
| "issue_number": { | ||
| "type": ["number", "string"], | ||
| "description": "Issue number to assign users to. This is the numeric ID from the GitHub URL (e.g., 543 in github.com/owner/repo/issues/543). If omitted, assigns to the issue that triggered this workflow.", | ||
| "description": "Issue number to assign users to. This is the numeric ID from the GitHub URL (e.g., 543 in github.com/owner/repo/issues/543) of an issue that already exists. Unlike add_comment, add_labels, or assign_milestone, this field does NOT accept a temporary_id (e.g. 'aw_xxx') referencing an issue created earlier in the same run — passing one will fail with 'Invalid item_number/issue_number specified'. If omitted, assigns to the issue that triggered this workflow.", |
| "issue_number": { | ||
| "type": ["number", "string"], | ||
| "description": "Issue number to unassign users from. This is the numeric ID from the GitHub URL (e.g., 543 in github.com/owner/repo/issues/543). If omitted, uses the issue that triggered this workflow.", | ||
| "description": "Issue number to unassign users from. This is the numeric ID from the GitHub URL (e.g., 543 in github.com/owner/repo/issues/543) of an issue that already exists. Unlike add_comment, add_labels, or assign_milestone, this field does NOT accept a temporary_id (e.g. 'aw_xxx') referencing an issue created earlier in the same run — passing one will fail with 'Invalid item_number/issue_number specified'. If omitted, uses the issue that triggered this workflow.", |
|
🎉 This pull request is included in a new release. Release: |

Summary
Analysis of the last ~22.5 hours of workflow runs (585 session logs across 721 downloaded run directories) found 1 evidence-backed tool-description error:
assign_to_user'sissue_numberfield description doesn't warn that it rejectstemporary_idreferences, unlike sibling safe-output tools. This fix documents the limitation so agents stop making the same mistake.Evidence
Run:
41394170937— workflow "Daily Container Image Security Scan"The agent created an issue with a
temporary_id:safeoutputs create_issue '{"temporary_id":"aw_scanfail","title":"Container scan operational failure", ...}'Then tried to assign a user to that same just-created issue using the temp ID, the same way it would for
add_comment/add_labels:safeoutputs assign_to_user '{"issue_number":"aw_scanfail","assignees":["pelikhan"]}'This failed in the
safe_outputsjob:The issue was created successfully (
#74055) but was never assigned, breaking the scan's triage/SLA workflow.Root cause
Checked
actions/setup/js/safe_output_helpers.cjs'sresolveTarget()(used byassign_to_user/unassign_from_userviaassign_to_user.cjs): fortarget: "*"it does a plainparseInt(String(numberField), 10)onissue_number/item_numberand never calls the temp-ID resolver (resolveIssueNumber/resolveSafeOutputIssueTargetintemporary_id.cjs). By contrast,add_comment,add_labels,remove_labels,replace_label,set_issue_type, andset_issue_fieldadditionally callresolveSafeOutputIssueTarget, which does resolvetemporary_idvalues — and their tool descriptions say so ("Can also be a temporary_id from ...").assign_to_user/unassign_from_user's descriptions say neither way, so an agent reasonably assumes the sametemporary_idsupport applies everywhere.Scanned all safe-output tools with
issue_number/item_number/parentfields against their handler code:assign_milestoneandassign_to_agentalso lackresolveSafeOutputIssueTargetbut import the lower-levelresolveRepoIssueTargetfromtemporary_id.cjsdirectly, and their descriptions do document temp-ID support — consistent with their actual behavior.assign_to_user/unassign_from_userare the only tools that both lack the resolver and fail to document that gap.This is a tool-description fix, not a tool-implementation fix (per this workflow's scope) — the underlying lack of temp-ID support in
assign_to_user/unassign_from_useris left as-is; only the description now makes the limitation explicit so agents don't attempt it.Change
Updated
issue_numberdescriptions forassign_to_userandunassign_from_userin bothpkg/workflow/js/safe_outputs_tools.json(compiler-embedded copy) andactions/setup/js/safe_outputs_tools.json(runtime copy, kept in sync perTestSafeOutputsToolsJSONInSync):(and the equivalent wording for
unassign_from_user.)Validation
python3 -I -c "import json; json.load(...)").pkg/workflow/js/safe_outputs_tools.jsonandactions/setup/js/safe_outputs_tools.jsonremain byte-identical after the edit (diff— no output), which is exactly whatTestSafeOutputsToolsJSONInSyncinpkg/workflow/safe_outputs_tools_test.goasserts.assign_to_user/unassign_from_userfor exact-text assertions on this description string; none found (safe_outputs_specification_assign_to_user_test.gochecks a separate markdown spec doc, unrelated to this JSON).go test/go buildin this sandbox: module downloads toproxy.golang.orgfail TLS verification (not on this workflow's firewall allowlist), sogo test ./pkg/workflow -run TestSafeOutputsToolsJSONInSynccould not be executed here. A maintainer with full network/build access should run it to confirm.Scope note
Checked the full run cluster where the
safe_outputsjob failed (47 runs, all "PR Sous Chef"add_commentcalls failing with "Bad credentials" / HTTP 401) — this is a credential/API failure, explicitly out of scope for this workflow (tool implementation/execution failures, not schema misuse). No pull request or fix was created for that cluster.🤖 Generated with [Claude Code]((claude.com/redacted)