Skip to content

Clarify intent-aware safe-output mutation contracts across optional and strict modes#46857

Closed
pelikhan with Copilot wants to merge 1 commit into
mainfrom
copilot/update-intent-aware-mutation-descriptions
Closed

Clarify intent-aware safe-output mutation contracts across optional and strict modes#46857
pelikhan with Copilot wants to merge 1 commit into
mainfrom
copilot/update-intent-aware-mutation-descriptions

Conversation

Copilot AI commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Intent-aware issue mutation tools were generating ambiguous contracts: omitted issue-intent exposed metadata but did not encourage it, while strict mode could require metadata in schema yet still describe it as optional. add_labels was especially inconsistent by enforcing object-only labels in strict mode while still documenting plain string labels.

  • Mode-specific intent guidance

    • Omitted issue-intent now strongly encourages rationale and confidence for all intent-aware mutations while keeping both optional.
    • issue_intent: true now states clearly that rationale and confidence are required.
    • issue_intent: false continues to omit intent guidance and strip intent fields from generated schemas.
  • Strict add_labels contract alignment

    • Replaced the contradictory strict-mode description with object-only guidance.
    • Explicitly documents per-label required fields: name, rationale, and confidence.
    • Uses metadata-rich label examples and removes strict-mode language implying plain strings are allowed.
  • Field description cleanup

    • Strict-mode field descriptions for rationale and confidence no longer call those fields optional.
    • Optional-mode descriptions now consistently recommend metadata and enumerate allowed confidence values: LOW, MEDIUM, HIGH.
  • Regression coverage

    • Added generator tests for all affected mutations covering:
      • optional guidance when issue-intent is omitted
      • required guidance and required-field wording in strict mode
      • disabled guidance/field stripping when issue-intent: false
      • strict add_labels object-only schema + matching description

Example strict add_labels output now matches both schema and description:

{
  "type": "add_labels",
  "item_number": 123,
  "labels": [
    {
      "name": "bug",
      "rationale": "The report describes reproducible incorrect behavior.",
      "confidence": "HIGH"
    }
  ]
}

Copilot AI changed the title [WIP] Update intent-aware mutation descriptions to clarify metadata requirements Clarify intent-aware safe-output mutation contracts across optional and strict modes Jul 20, 2026
Copilot AI requested a review from pelikhan July 20, 2026 14:54
@pelikhan
pelikhan marked this pull request as ready for review July 20, 2026 14:58
Copilot AI review requested due to automatic review settings July 20, 2026 14:58

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.

@pelikhan pelikhan closed this Jul 20, 2026
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.

Intent-aware mutation descriptions should encourage optional metadata and clearly require strict metadata

3 participants