Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 11, 2026

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 context
else if (isDiscussionContext) {
  itemNumber = context.payload?.discussion?.number;
}
// 3. Target resolution (issues/PRs)
else {
  const result = 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>
Copilot AI changed the title [WIP] Update safe output tool to make item_number optional Make item_number optional for add_comment safe output tool Jan 11, 2026
Copilot AI requested a review from pelikhan January 11, 2026 07:25
@pelikhan pelikhan added the smoke label Jan 11, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 11, 2026

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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 11, 2026

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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 11, 2026

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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 11, 2026

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

@github-actions
Copy link
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 main Jan 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 free to 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