Skip to content

Align issue-intent rationale limits to GitHub’s 280-character API constraint#42775

Closed
Copilot wants to merge 2 commits into
mainfrom
copilot/issue-intents-align-rationale-maxlength
Closed

Align issue-intent rationale limits to GitHub’s 280-character API constraint#42775
Copilot wants to merge 2 commits into
mainfrom
copilot/issue-intents-align-rationale-maxlength

Conversation

Copilot AI commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Issue-intent rationales were unconstrained at schema level and capped at 1024 in runtime/validator code, while GitHub mutations enforce a 280-character maximum. This mismatch allowed oversized rationales to pass local validation and fail at mutation time.

  • Schema constraints (safe outputs tools)

    • Added maxLength: 280 and updated field descriptions to explicitly state the limit for:
      • set_issue_type.rationale
      • set_issue_field.rationale
      • add_labels.labels[].rationale
      • remove_labels.labels[].rationale
      • update_issue.labels[].rationale
    • Applied in both runtime and embedded compiler copies of safe_outputs_tools.json to keep them in sync.
  • Runtime normalization

    • Updated ISSUE_INTENT_RATIONALE_MAX_LENGTH in issue_intents.cjs from 1024 to 280.
  • Validator sanitization

    • Updated issue-intent label rationale sanitization in safe_output_type_validator.cjs from maxLength: 1024 to maxLength: 280.
  • Validator test expectations

    • Updated rationale max-length expectations in safe_output_type_validator.test.cjs from 1024 to 280.
// Before
const ISSUE_INTENT_RATIONALE_MAX_LENGTH = 1024;

// After
const ISSUE_INTENT_RATIONALE_MAX_LENGTH = 280;

Copilot AI linked an issue Jul 1, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix rationale maxLength to comply with GitHub API limit Align issue-intent rationale limits to GitHub’s 280-character API constraint Jul 1, 2026
Copilot AI requested a review from pelikhan July 1, 2026 15:35
@pelikhan pelikhan marked this pull request as ready for review July 1, 2026 15:41
Copilot AI review requested due to automatic review settings July 1, 2026 15:41

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.

Copilot wasn't able to review any files in this pull request.

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.

issue intents: align rationale maxLength to API limit of 280 characters

3 participants