Skip to content

Fix file reduction campaign by removing oneOf from update_project schema#8113

Merged
mnkiefer merged 3 commits intomainfrom
copilot/analyze-file-reduction-issues
Dec 29, 2025
Merged

Fix file reduction campaign by removing oneOf from update_project schema#8113
mnkiefer merged 3 commits intomainfrom
copilot/analyze-file-reduction-issues

Conversation

Copy link
Contributor

Copilot AI commented Dec 29, 2025

Investigated and fixed workflow run #20579463931 which failed on Dec 29 after 12 consecutive successful runs. The failure occurred in the "Execute GitHub Copilot CLI" step of the agent job.

Root Cause

The 400 Bad Request error was caused by a oneOf JSON Schema constraint in the update_project tool schema that was inadvertently introduced in PR #8106. The Copilot CLI API does not support the oneOf keyword and returns a 400 Bad Request when encountering it in tool schemas.

Fix Applied

Removed the oneOf constraint from pkg/workflow/js/safe_outputs_tools.json and simplified the schema to use basic required fields:

Before:

{
  "inputSchema": {
    "type": "object",
    "properties": { ... },
    "oneOf": [
      {
        "required": ["project", "content_type", "content_number"],
        "properties": { "content_type": { "enum": ["issue", "pull_request"] } }
      },
      {
        "required": ["project", "content_type", "draft_title"],
        "properties": { "content_type": { "const": "draft_issue" } }
      }
    ]
  }
}

After:

{
  "inputSchema": {
    "type": "object",
    "required": ["project", "content_type"],
    "properties": { ... },
    "additionalProperties": false
  }
}

The conditional requirements (content_number vs draft_title based on content_type) are now handled by runtime validation in the JavaScript action scripts rather than JSON Schema validation.

Changes Made

  • pkg/workflow/js/safe_outputs_tools.json: Removed oneOf constraint and added simple required: ["project", "content_type"]
  • Recompiled workflows: All affected lock files updated with the fixed schema
  • Verified: All unit tests pass

Impact

  • The update_project tool schema is now compatible with Copilot CLI API
  • Campaign orchestrator workflows can successfully execute without 400 Bad Request errors
  • Runtime validation ensures proper field requirements based on content_type
Original prompt

Analyse issues in latest file reduction campaign run: https://github.com/githubnext/gh-aw/actions/runs/20579463931


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Analyze issues in latest file reduction campaign run Analyze file reduction campaign run failure (no code changes) Dec 29, 2025
Copilot AI requested a review from mnkiefer December 29, 2025 18:29
@mnkiefer
Copy link
Contributor

mnkiefer commented Dec 29, 2025

@copilot Fix errors and warning detected in annotations.

…d Request

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 29, 2025

@copilot Fix errors and warning detected in annotations.

Fixed in 7a7c40e. The 400 Bad Request was caused by a oneOf JSON Schema constraint in the update_project tool schema that Copilot CLI doesn't support. Removed the constraint and simplified the schema to only require project and content_type fields. The workflow should now run successfully.

Copilot AI changed the title Analyze file reduction campaign run failure (no code changes) Fix file reduction campaign 400 Bad Request by removing oneOf from update_project schema Dec 29, 2025
@mnkiefer mnkiefer changed the title Fix file reduction campaign 400 Bad Request by removing oneOf from update_project schema Fix file reduction campaign by removing oneOf from update_project schema Dec 29, 2025
@mnkiefer mnkiefer marked this pull request as ready for review December 29, 2025 18:49
@mnkiefer mnkiefer merged commit ffd9d2c into main Dec 29, 2025
90 checks passed
@mnkiefer mnkiefer deleted the copilot/analyze-file-reduction-issues branch December 29, 2025 18:49
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.

2 participants