Draft
Default-on issue intent metadata for set_issue_type, set_issue_field, and add_labels#46207
Conversation
… 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
Contributor
|
Thanks for the clear PR description and for calling out the consistency issue with This PR looks ready for review — nice work tightening the default-on
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three handlers (
set_issue_type,set_issue_field,add_labels) gated intent metadata onconfig.issue_intent === true, silently discarding agent-supplied rationale/confidence when frontmatter was omitted — inconsistent withclose_issueandassign_to_agentwhich default-on with!== false.Handler changes
set_issue_type/set_issue_field/add_labels: Change gate fromconfig.issue_intent === true→config.issue_intent !== false. Omitted frontmatter now forwards metadata through the GraphQL/intent-aware path by default.add_labelsstrict mode: IntroduceissueIntentStrict = config.issue_intent === true. When explicitlytrue, plain-string label names are rejected — agents must supply structured objects with intent fields. Default (omitted) accepts both strings and objects.Schema
Added
issue-intent: booleanproperty toadd-labels,set-issue-type, andset-issue-fieldinmain_workflow_schema.json. Previously the compiler rejectedissue-intentfrontmatter 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.