Skip to content

[safeoutputs] Document assign_to_user/unassign_from_user reject temporary_id references - #74231

Merged
pelikhan merged 1 commit into
mainfrom
safe-outputs-assign-to-user-tempid-docs-255892696ae06ef7
Nov 2, 2026
Merged

pelikhan merged 1 commit into
mainfrom
safe-outputs-assign-to-user-tempid-docs-255892696ae06ef7

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

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's issue_number field description doesn't warn that it rejects temporary_id references, 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_outputs job:

##[error]✗ Message 2 (assign_to_user) failed: Invalid item_number/issue_number specified: aw_scanfail
##[error]1 safe output(s) failed:

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's resolveTarget() (used by assign_to_user/unassign_from_user via assign_to_user.cjs): for target: "*" it does a plain parseInt(String(numberField), 10) on issue_number/item_number and never calls the temp-ID resolver (resolveIssueNumber/resolveSafeOutputIssueTarget in temporary_id.cjs). By contrast, add_comment, add_labels, remove_labels, replace_label, set_issue_type, and set_issue_field additionally call resolveSafeOutputIssueTarget, which does resolve temporary_id values — 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 same temporary_id support applies everywhere.

Scanned all safe-output tools with issue_number/item_number/parent fields against their handler code: assign_milestone and assign_to_agent also lack resolveSafeOutputIssueTarget but import the lower-level resolveRepoIssueTarget from temporary_id.cjs directly, and their descriptions do document temp-ID support — consistent with their actual behavior. assign_to_user/unassign_from_user are 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_user is left as-is; only the description now makes the limitation explicit so agents don't attempt it.

Change

Updated issue_number descriptions for assign_to_user and unassign_from_user in both pkg/workflow/js/safe_outputs_tools.json (compiler-embedded copy) and actions/setup/js/safe_outputs_tools.json (runtime copy, kept in sync per TestSafeOutputsToolsJSONInSync):

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.

(and the equivalent wording for unassign_from_user.)

Validation

  • Confirmed both JSON files parse as valid JSON (python3 -I -c "import json; json.load(...)").
  • Confirmed pkg/workflow/js/safe_outputs_tools.json and actions/setup/js/safe_outputs_tools.json remain byte-identical after the edit (diff — no output), which is exactly what TestSafeOutputsToolsJSONInSync in pkg/workflow/safe_outputs_tools_test.go asserts.
  • Searched other tests referencing assign_to_user/unassign_from_user for exact-text assertions on this description string; none found (safe_outputs_specification_assign_to_user_test.go checks a separate markdown spec doc, unrelated to this JSON).
  • Could not run go test/go build in this sandbox: module downloads to proxy.golang.org fail TLS verification (not on this workflow's firewall allowlist), so go test ./pkg/workflow -run TestSafeOutputsToolsJSONInSync could 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_outputs job failed (47 runs, all "PR Sous Chef" add_comment calls 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)

Generated by ⚡ Daily Safe Output Tool Optimizer · claude · agent · ~330 AIC · ⌖ ~1 AIC · ⊞ 4.8K · ◷

  • expires on Nov 4, 2026, 1:27 PM UTC-08:00

@github-actions github-actions Bot added automated-analysis bug Something isn't working cookie Issue Monster Loves Cookies! safe-outputs tool-improvement labels Nov 2, 2026
@pelikhan
pelikhan marked this pull request as ready for review November 2, 2026 22:42
Copilot AI adaptive review requested due to automatic review settings November 2, 2026 22:42
@pelikhan
pelikhan merged commit 9f45d04 into main Nov 2, 2026
9 checks passed
@pelikhan
pelikhan deleted the safe-outputs-assign-to-user-tempid-docs-255892696ae06ef7 branch November 2, 2026 22:42
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

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

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ 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: reported_no_action

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.

Generated from Design Decision Gate 🏗️ · routed: gpt56 max · ~1 AIC · ⌖ ~2 AIC · ⊞ 7.7K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

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.

Generated from Test Quality Sentinel · haiku45 · ~8 AIC · ⌖ ~15 AIC · ⊞ 9.3K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated from Ponytail Reviewer · gpt56 · ~11 AIC · ⌖ ~6 AIC · ⊞ 15.1K · ◷

Generated by Ponytail Reviewer for #74231

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.

🟡 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
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.",
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

🎉 This pull request is included in a new release.

Release: v1.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automated-analysis bug Something isn't working cookie Issue Monster Loves Cookies! safe-outputs tool-improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants