Skip to content

Make item_number optional for add_comment safe output tool - #9603

Merged
pelikhan merged 2 commits into
mainfrom
copilot/update-safe-output-tool
Jan 11, 2026
Merged

Make item_number optional for add_comment safe output tool#9603
pelikhan merged 2 commits into
mainfrom
copilot/update-safe-output-tool

Conversation

CopilotAI commented Jan 11, 2026

Copy link
Copy Markdown
Contributor

The add_comment tool required item_number even when the target could be resolved from workflow context (triggering issue/PR/discussion), causing validation errors.

Changes

  • Schema updates: Removed item_number from required fields in safe_outputs_tools.json
  • Resolution logic: Added explicit check for item_number before falling back to context resolution
  • Test coverage: Added tests for explicit item_number with triggering target and context-based resolution

Resolution Priority

// 1. Explicit item_number (if provided)if(item.item_number!==undefined){itemNumber=item.item_number;}// 2. Discussion contextelseif(isDiscussionContext){itemNumber=context.payload?.discussion?.number;}// 3. Target resolution (issues/PRs)else{constresult=resolveTarget({...});itemNumber=result.number;}

Backward compatible - existing usage with explicit item_number continues to work.

Original prompt

Update safe output tool add_comment:

The item_number parameter must be optional (not required).

See error:

└ calling "tools/call": Invalid arguments: missing or empty 'item_number'

If the item_number is missing, empty, apply the resolution to determine the item_number from the current context.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
CopilotAI changed the title [WIP] Update safe output tool to make item_number optionalMake item_number optional for add_comment safe output toolJan 11, 2026
CopilotAI requested a review from pelikhanJanuary 11, 2026 07:25
@github-actions

github-actionsBot commented Jan 11, 2026

Copy link
Copy Markdown
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions

github-actionsBot commented Jan 11, 2026

Copy link
Copy Markdown
Contributor

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions

github-actionsBot commented Jan 11, 2026

Copy link
Copy Markdown
Contributor

🎬 THE ENDSmoke ClaudeMISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions

github-actionsBot commented Jan 11, 2026

Copy link
Copy Markdown
Contributor

💀 Blimey! Changeset Generator failed and walked the plank! No treasure today, matey! ☠️

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test Results - Claude Engine (Run #20891531083)

Last 2 Merged PRs:

Test Results:

  • ✅ GitHub MCP: Retrieved PRs successfully
  • ✅ Serena: Tool active (v0.1.4, Go project detected)
  • ✅ Playwright: Navigated to github.com (title verified)
  • ❌ safeinputs-gh: Tool not found in system
  • ✅ File Writing: Test file created successfully
  • ✅ Bash Tool: File verified with cat command

Overall Status: PARTIAL PASS (5/6 tests passed)

Note: safeinputs-gh tool doesn't exist - may need creation or is referenced incorrectly.

AI generated by Smoke Claude

@pelikhan
pelikhan marked this pull request as ready for review January 11, 2026 07:36
@pelikhan
pelikhan merged commit b5fbc31 into mainJan 11, 2026
35 of 36 checks passed
@pelikhan
pelikhan deleted the copilot/update-safe-output-tool branch January 11, 2026 07:36
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@pelikhan