Repository navigation
Add workflow-configured default body operation for update-issue - #77558
Conversation
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
✅ PR Specification Reviewer completed successfully! Commit pushed:
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the configurable issue-update operation default.
No open issues 🎉
What changed in this PR
Adds a workflow-configured default body operation for issue updates in gh-aw, addressing #77503 by letting tracker workflows use replace-island when the agent omits an operation.
Changes:
- Adds and validates
safe-outputs.update-issue.operation, then passes it to the runtime handler. - Preserves precedence: explicit agent operation → workflow default →
append. - Adds parsing and runtime tests, including repeated island updates, and documents the default behavior.
| File | Description |
|---|---|
pkg/workflow/update_issue.go |
Defines and parses the configured operation. |
pkg/workflow/update_issue_test.go |
Tests validation, parsing, and handler configuration serialization. |
pkg/workflow/safe_outputs_handler_registry_issues.go |
Passes the default operation to the handler. |
pkg/workflow/js/safe_outputs_tools.json |
Documents precedence in the compiler’s tool schema. |
pkg/parser/schemas/main_workflow_schema.json |
Validates supported workflow operation values. |
docs/src/content/docs/specs/safe-outputs-specification.md |
Updates the documented tool default. |
docs/src/content/docs/reference/safe-outputs.md |
Explains issue-update precedence and tracker usage. |
docs/src/content/docs/reference/safe-outputs-pull-requests.md |
Clarifies existing pull-request operation precedence. |
actions/setup/js/update_issue.test.cjs |
Tests defaults, overrides, body permissions, and repeated island updates. |
actions/setup/js/update_issue.cjs |
Applies the configured default through the shared update helper. |
actions/setup/js/types/safe-outputs-config.d.ts |
Adds the issue operation configuration type. |
actions/setup/js/safe_outputs_tools.json |
Updates the runtime tool schema’s operation description. |
Review effort: Balanced (dynamic)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Reviewed PR head 1024138f7b6da5b542cb0c4b5601478b5810ca08 against Safe Outputs MCP Gateway Specification v1.29.25, especially the update_issue contract and operational semantics.
The implementation intentionally adds safe-outputs.update-issue.operation with validated values and precedence: explicit agent operation, workflow default, then append. The existing formal specification omitted this configuration and precedence. I synchronized docs/src/content/docs/specs/safe-outputs-specification.md to v1.29.26 (2026-11-13), documenting the configuration, validation, precedence, and unchanged body-disabled/no-body behavior; the update is committed as 952d5e3 and queued for publication to the PR branch.
No blocking conformance violation remains. Runtime/parser tests in the PR provide evidence for valid values, invalid configuration rejection, precedence, and body-update edge cases; this static review did not execute tests. The review ledger records outcome updated.
Generated by PR Specification Reviewer for #77558 · copilot · gpt50 · ~5 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review-specs to run again
Comment MemoryPeek at saved memory (spec-review-history)History |
There was a problem hiding this comment.
Reviewed the changed lines and related implementation paths. I found no actionable correctness, security, performance, or maintainability issues that should block merge. The specialist pass completed; its advisory candidates were either defensive hardening or test/documentation suggestions rather than merge-blocking defects. Static review only; tests were not run per review instructions.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~4 AIC · ⌖ ~2 AIC · ⊞ 1.5K
Comment /review to run again
Comment MemoryPeek at saved memory (review-history)History |
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /tdd (test coverage), /grill-with-docs (docs and terminology), and /codebase-design (consistency with the PR path). The change is solid: precedence (agent, then workflow default, then append) is implemented in the shared buildCommonEntityUpdateData helper and mirrors update-pull-request. The schema, Go validation, and both safe_outputs_tools.json copies agree.
📋 Key Themes & Highlights
Key Themes
- First-run behaviour of
replace-island: the docs imply an in-place update from the start, but it only applies once the island exists (see inline comment). - Destructive default: a workflow-level
operation: replaceoverwrites the whole issue body for every agent update that omitsoperation. Consider a warning in the docs.
Positive Highlights
- ✅ Precedence is tested: explicit override, configured default, and the absent or disabled cases.
- ✅ Go tests cover valid and invalid values and verify serialization (
default_operationis omitted when unset). - ✅ The
replace-islandintegration test now checks a second run, which guards against island duplication.
Verification
go test ./pkg/workflow -run TestUpdateIssueOperation|TestUpdateIssueConfigParsingpasses, andgofmtis clean.- I could not run the vitest suite or
npm run typecheckhere, becausenpm cifailed on a sandbox TLS certificate. Please confirm they pass in CI.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~6 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
| - `replace-island`: Updates a specific section marked with HTML comments | ||
|
|
||
| Agent output format: `{"type": "update_issue", "issue_number": 123, "operation": "append", "body": "..."}`. The `operation` field is optional (defaults to `append`). Each call must include at least one update field: `status`, `title`, `body`, `labels`, `assignees`, `milestone`, or `artifacts`; an issue number or operation alone is rejected. Set `milestone` to `null` to clear the issue's milestone; omitting `milestone` leaves it unchanged. | ||
| Agent output format: `{"type": "update_issue", "issue_number": 123, "operation": "append", "body": "..."}`. The agent's `operation` field is optional: when omitted, the handler uses `safe-outputs.update-issue.operation`, or `append` if no workflow default is configured. An explicit agent operation overrides the workflow default. For tracker issues rewritten each run, set `operation: replace-island` to update the workflow's section without appending another report or replacing the surrounding issue text. Each call must include at least one update field: `status`, `title`, `body`, `labels`, `assignees`, `milestone`, or `artifacts`; an issue number or operation alone is rejected. Set `milestone` to `null` to clear the issue's milestone; omitting `milestone` leaves it unchanged. |
There was a problem hiding this comment.
[/grill-with-docs] This sentence says replace-island updates "without appending another report", but that only holds after the first run. When no island exists yet, the shared buildUpdatedBody helper (update_pr_description_helpers.cjs) appends a new island with a separator. Document that first-run fallback so authors do not expect an in-place update on run one.
@copilot please address this.
There was a problem hiding this comment.
Clarified that when the workflow-specific island is absent—including on the first run—replace-island appends a new island with a separator; later updates replace it while preserving surrounding issue text. Committed as e516f0250c.
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "0b99ed5b5a9bad9a9227a78754fd66f81ecae4e7",
"kind": "requested",
"schema_version": "1",
"state": "4b3ec90a14107f3283857e349f556701eaf6376f73ef9425b250bb9d8b35407a",
"work": [
"88cbda0c317e0a21f6d3668c9352ede617513f0fc51c05194daea8f5af74b7b2"
],
"workflow": "pr-sous-chef"
}
|
…default-operation Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
🎉 This pull request is included in a new release. Release: |
When an agent omits
operation, issue updates default toappend, potentially duplicating reports intended to replace a tracker section. Workflow authors currently cannot change that default.safe-outputs.update-issue.operation, matching existing pull-request update behavior.append. This is a default, not an enforced operation.With no agent-supplied operation, this updates the workflow’s island while preserving surrounding issue text.
operation(an agent that omits it silently appends a second post) #77503