Require issue-intent metadata for close/assignment tools by default, with per-tool opt-out#46014
Conversation
…assignment tools Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot intent is NOT required by default |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Extends safe-output issue-intent metadata to close and assignment tools across schema generation, runtime handlers, typings, tests, and compiled workflows.
Changes:
- Adds
rationale,confidence, andsuggestfields. - Introduces per-tool
issue-intentconfiguration. - Propagates metadata through close and assignment handlers.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/safe_outputs_validation_config.go |
Adds intent validation fields. |
pkg/workflow/safe_outputs_tools_generation.go |
Generates required intent fields. |
pkg/workflow/safe_outputs_tools_generation_test.go |
Tests required-field generation. |
pkg/workflow/safe_outputs_handler_registry.go |
Serializes intent configuration. |
pkg/workflow/safe_outputs_config_types.go |
Defines the per-tool option. |
pkg/workflow/safe_output_validation_config_test.go |
Expands validation tests. |
pkg/workflow/js/safe_outputs_tools.json |
Updates static tool schemas. |
actions/setup/js/types/safe-outputs.d.ts |
Extends safe-output typings. |
actions/setup/js/safe_outputs_tools.json |
Updates runtime tool schemas. |
actions/setup/js/generate_safe_outputs_tools.test.cjs |
Tests dynamic descriptions. |
actions/setup/js/generate_safe_outputs_tools.cjs |
Applies intent guidance. |
actions/setup/js/close_issue.test.cjs |
Tests close metadata behavior. |
actions/setup/js/close_issue.cjs |
Sends close intent metadata. |
actions/setup/js/assign_to_user.test.cjs |
Tests user-assignment metadata. |
actions/setup/js/assign_to_user.cjs |
Sends assignment metadata. |
actions/setup/js/assign_to_agent.cjs |
Propagates agent-assignment metadata. |
actions/setup/js/assign_agent_helpers.test.cjs |
Tests agent helper metadata. |
actions/setup/js/assign_agent_helpers.cjs |
Sends agent intent metadata. |
.github/workflows/workflow-generator.lock.yml |
Recompiles assignment schema. |
.github/workflows/smoke-copilot.lock.yml |
Recompiles intent requirements. |
.github/workflows/smoke-copilot-aoai-entra.lock.yml |
Recompiles intent requirements. |
.github/workflows/smoke-copilot-aoai-apikey.lock.yml |
Recompiles intent requirements. |
.github/workflows/smoke-codex.lock.yml |
Recompiles intent requirements. |
.github/workflows/smoke-agent-public-approved.lock.yml |
Recompiles assignment schema. |
.github/workflows/semantic-function-refactor.lock.yml |
Recompiles close schema. |
.github/workflows/objective-impact-report.lock.yml |
Recompiles close schema. |
.github/workflows/lint-monster.lock.yml |
Recompiles close/assignment schemas. |
.github/workflows/issue-monster.lock.yml |
Recompiles assignment schema. |
.github/workflows/eslint-monster.lock.yml |
Recompiles close/assignment schemas. |
.github/workflows/dependabot-go-checker.lock.yml |
Recompiles close schema. |
.github/workflows/daily-assign-issue-to-user.lock.yml |
Recompiles user-assignment schema. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 30/31 changed files
- Comments generated: 6
- Review effort level: Medium
| GitHubToken string `yaml:"github-token,omitempty"` // GitHub token for this specific output type | ||
| GitHubApp *GitHubAppConfig `yaml:"github-app,omitempty"` // GitHub App credentials for minting a per-handler installation access token | ||
| Staged *TemplatableBool `yaml:"staged,omitempty"` // Templatable preview-only mode for this specific output type | ||
| IssueIntent *bool `yaml:"issue-intent,omitempty"` // When true, enable issue-intent rationale/confidence guidance and schema requirements for this output type. |
There was a problem hiding this comment.
Fixed in e41a65c: issue-intent is now accepted in main_workflow_schema.json for close-issue, assign-to-user, and assign-to-agent, and covered by schema tests.
| func issueIntentRequired(issueIntent *bool) bool { | ||
| return issueIntent != nil && *issueIntent | ||
| } |
There was a problem hiding this comment.
Addressed in 739c45a: behavior is now maintainer-aligned — unset issue_intent keeps intent fields optional, true makes them required, and false omits them.
| function isIssueIntentEnabledForTool(toolName, toolConfig) { | ||
| if (!ISSUE_INTENT_TOOL_NAMES.has(toolName)) { | ||
| return false; | ||
| } | ||
| return !!(toolConfig && typeof toolConfig === "object" && "issue_intent" in toolConfig && toolConfig.issue_intent === true); | ||
| } |
There was a problem hiding this comment.
Addressed in 739c45a: generator logic now models three states for intent fields (required/optional/absent) based on issue_intent value, with unset treated as optional.
| AddTemplatableInt("max", c.Max). | ||
| AddStringSlice("allowed", c.Allowed). | ||
| AddStringSlice("blocked", c.Blocked). | ||
| AddBoolPtr("issue_intent", c.IssueIntent). |
There was a problem hiding this comment.
Fixed in e41a65c: add_labels.cjs now honors config.issue_intent; metadata normalization/forwarding happens only when explicitly enabled.
| config := newHandlerConfigBuilder(). | ||
| AddTemplatableInt("max", c.Max). | ||
| AddStringSlice("allowed", c.Allowed). | ||
| AddBoolPtr("issue_intent", c.IssueIntent). |
There was a problem hiding this comment.
Fixed in e41a65c (with header cleanup in 739c45a): set_issue_type.cjs now reads config.issue_intent and uses legacy behavior when disabled.
| config := newHandlerConfigBuilder(). | ||
| AddTemplatableInt("max", c.Max). | ||
| AddStringSlice("allowed_fields", c.AllowedFields). | ||
| AddBoolPtr("issue_intent", c.IssueIntent). |
There was a problem hiding this comment.
Fixed in e41a65c (with follow-up 326a94d/739c45a): set_issue_field.cjs now gates issue-intent metadata on config.issue_intent and keeps legacy behavior when disabled.
|
@copilot run pr-finisher skill |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done. I ran the PR-finisher flow, triaged reviews/checks/mergeability, and pushed fix |
|
@copilot please run the Failed checks:
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Addressed in
Focused tests were updated and passing for the modified handlers/schema generator. |
Completed.
Note: local full-suite targets ( |
|
🎉 This pull request is included in a new release. Release: |
This extends issue-intent behavior to
close_issue,assign_to_user, andassign_to_agent, aligning them with existing issue-intent-aware mutation tools. By default, generated schemas now requirerationaleandconfidence; each tool can independently opt out via its ownissue-intent: falsesetting.Schema + tool-definition coverage
rationale,confidence, andsuggestfields to static tool definitions for:close_issueassign_to_userassign_to_agentPer-tool configuration model (
safe-outputs.<tool>.issue-intent)issue-intentto per-safe-output base config (child of each safe output entry, not a globalsafe-outputstoggle).issue-intent: falsedisables intent requirements and guidance for that tool only.Dynamic MCP schema/description generation
tools_meta.required_field_additionsnow adds["rationale", "confidence"]for enabled tools.issue_intentmode.close_issue,assign_to_user, andassign_to_agentin dynamic intent guidance set.Runtime handler behavior
issue_intentinto handler configs for close/assign paths.Type and test updates