Skip to content

[WIP] Fix failing GitHub Actions job JS Tests (shard 4/4)#33165

Merged
pelikhan merged 6 commits into
mainfrom
copilot/fix-js-tests-shard-4-4
May 18, 2026
Merged

[WIP] Fix failing GitHub Actions job JS Tests (shard 4/4)#33165
pelikhan merged 6 commits into
mainfrom
copilot/fix-js-tests-shard-4-4

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 18, 2026

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Fix the failing GitHub Actions job "JS Tests (shard 4/4)"
Analyze the Actions logs, identify the root cause of the failure, and implement a fix.
Check run ID: 76621518074
Job URL: https://github.com/github/gh-aw/actions/runs/26061187877/job/76621518074

Copilot AI and others added 2 commits May 18, 2026 21:33
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
The Anthropic API rejects input_schema objects that use anyOf at the
top level. The constraint is already conveyed in the tool description,
so the anyOf can be safely removed.

Fixes failing test: safe_outputs_mcp_schema_validation.test.cjs >
Schema Consistency > should not use oneOf, allOf, or anyOf at the
top level of inputSchema (Anthropic API incompatible)

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan May 18, 2026 21:35
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot format and lint

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 18, 2026

@copilot format and lint

Ran format:cjs and format:pkg-json — all files including safe_outputs_tools.json were already properly formatted (unchanged). Nothing to commit.

Copilot AI and others added 2 commits May 18, 2026 21:47
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review May 18, 2026 21:50
Copilot AI review requested due to automatic review settings May 18, 2026 21:50
@pelikhan pelikhan merged commit b25613e into main May 18, 2026
6 of 7 checks passed
@pelikhan pelikhan deleted the copilot/fix-js-tests-shard-4-4 branch May 18, 2026 21:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a failing test in the JS Tests (shard 4/4) job. The MCP schema validation test enforces that tool inputSchema objects must not use top-level anyOf/oneOf/allOf (Anthropic API incompatible). The update_pull_request tool definition had a top-level anyOf, causing the test to fail. The PR removes that anyOf, relying on the existing handler-level validation (hasUpdatePullRequestFields) and the tool description to enforce the "at least one of title/body/update_branch=true" constraint.

Changes:

  • Remove top-level anyOf from the update_pull_request tool inputSchema in safe_outputs_tools.json.
  • Reformat (collapse multi-line to single-line) the hasUpdatePullRequestFields helper in safe_outputs_handlers.cjs.
  • Reformat several existing assertions in safe_outputs_handlers.test.cjs to single lines (no behavioral change).
Show a summary per file
File Description
actions/setup/js/safe_outputs_tools.json Removes the top-level anyOf constraint from the update_pull_request tool schema to satisfy the Anthropic-API compatibility test; also drops a stray blank line.
actions/setup/js/safe_outputs_handlers.cjs Cosmetic single-line reformat of hasUpdatePullRequestFields; runtime validation behavior unchanged.
actions/setup/js/safe_outputs_handlers.test.cjs Cosmetic reformatting of existing expect(...).toThrow(...) and toHaveBeenCalledWith calls; tests still cover null/undefined args, update_branch: false, and successful update cases.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 3/3 changed files
  • Comments generated: 0

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants