Skip to content

Default-on issue intent metadata for set_issue_type, set_issue_field, and add_labels#46207

Draft
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/preserve-issue-intent-metadata
Draft

Default-on issue intent metadata for set_issue_type, set_issue_field, and add_labels#46207
pelikhan with Copilot wants to merge 3 commits into
mainfrom
copilot/preserve-issue-intent-metadata

Conversation

Copilot AI commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Three handlers (set_issue_type, set_issue_field, add_labels) gated intent metadata on config.issue_intent === true, silently discarding agent-supplied rationale/confidence when frontmatter was omitted — inconsistent with close_issue and assign_to_agent which default-on with !== false.

Handler changes

  • set_issue_type / set_issue_field / add_labels: Change gate from config.issue_intent === trueconfig.issue_intent !== false. Omitted frontmatter now forwards metadata through the GraphQL/intent-aware path by default.

  • add_labels strict mode: Introduce issueIntentStrict = config.issue_intent === true. When explicitly true, plain-string label names are rejected — agents must supply structured objects with intent fields. Default (omitted) accepts both strings and objects.

// Before: metadata silently dropped with omitted config
const issueIntentEnabled = config.issue_intent === true;  // false when omitted

// After: default-on, consistent with close_issue / assign_to_agent
const issueIntentEnabled = config.issue_intent !== false;  // true when omitted
const issueIntentStrict = config.issue_intent === true;    // add_labels strict mode

Schema

Added issue-intent: boolean property to add-labels, set-issue-type, and set-issue-field in main_workflow_schema.json. Previously the compiler rejected issue-intent frontmatter for these handlers, making opt-out (issue_intent: false) impossible via valid workflow syntax.

Tests

Added focused tests covering: omitted-config selects the intent path and forwards metadata; strict mode (true) rejects plain string labels; plain strings remain compatible in default mode; explicit disable (false) still selects the legacy REST path.

… omitted

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Change `set_issue_type`, `set_issue_field`, `add_labels` handlers from
  `config.issue_intent === true` to `config.issue_intent !== false` so
  intent metadata is forwarded by default, consistent with `close_issue`
  and `assign_to_agent` semantics.
- Add strict-mode enforcement in `add_labels`: when `issue_intent: true`
  is explicitly set, plain string label names are rejected.
- Add `issue-intent` boolean to JSON schema for `add-labels`,
  `set-issue-type`, and `set-issue-field` (compiler previously rejected
  the frontmatter for these handlers).
- Add focused tests covering omitted config, strict mode, metadata
  forwarding, and plain-string compatibility.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue intent metadata handling when frontmatter is omitted Default-on issue intent metadata for set_issue_type, set_issue_field, and add_labels Jul 17, 2026
Copilot AI requested a review from pelikhan July 17, 2026 11:49
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the clear PR description and for calling out the consistency issue with close_issue and assign_to_agent specifically. The change looks focused, the schema update is well-scoped, and the added handler tests make the behavioral intent easy to verify.

This PR looks ready for review — nice work tightening the default-on issue_intent behavior while preserving explicit opt-out semantics.

Generated by ✅ Contribution Check · 80.9 AIC · ⌖ 8.97 AIC · ⊞ 6.2K ·

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.

Preserve issue intent metadata when frontmatter is omitted

2 participants