Skip to content

Add workflow-configured default body operation for update-issue - #77558

Merged
pelikhan merged 6 commits into
mainfrom
copilot/update-issue-default-operation
Nov 14, 2026
Merged

pelikhan merged 6 commits into
mainfrom
copilot/update-issue-default-operation

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

When an agent omits operation, issue updates default to append, potentially duplicating reports intended to replace a tracker section. Workflow authors currently cannot change that default.

  • Configuration: Add safe-outputs.update-issue.operation, matching existing pull-request update behavior.
  • Precedence: Explicit agent operation → workflow default → append. This is a default, not an enforced operation.
  • Contract: Validate supported operations and document precedence in references and agent-facing tool schemas.
safe-outputs:
  update-issue:
    body:
    operation: replace-island

With no agent-supplied operation, this updates the workflow’s island while preserving surrounding issue text.

pelikhan and others added 2 commits November 13, 2026 21:05
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>
@pelikhan pelikhan changed the title [WIP] Update workflow to fix default body operation Add workflow-configured default body operation for update-issue Nov 13, 2026
@pelikhan
pelikhan marked this pull request as ready for review November 13, 2026 22:32
Copilot AI adaptive review requested due to automatic review settings November 13, 2026 22:32
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

Commit pushed: 0b99ed5

Generated by PR Specification Reviewer for #77558 · copilot · gpt56 · ~5 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 1.6K · ◷

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

✅ 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: reported_no_action

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.

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · pi · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 8.6K · ◷

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

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 analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 7.2K · ◷

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

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.

Generated by Ponytail Reviewer for #77558 · codex · routed: gpt61 medium · ~4 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 182 · ◷

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~6 AIC · ⌖ ~2 AIC · ⊞ 6.6K · ◷

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

PR Code Quality Reviewer

Outcome: reported_action

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.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt56 · ~4 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 1.5K · ◷

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.

🟢 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>

@github-actions github-actions Bot 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.

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

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (spec-review-history)
{"id":"ldg-31114ca3-c379-46d9-86e4-820c9057eae1","parents":[],"payload":{"id":"ldg-8fcc3465-feac-42e4-91f9-483f519336d6","operation":"append","value":{"finding_count":1,"head_sha":"1024138f7b6da5b542cb0c4b5601478b5810ca08","outcome":"updated"}},"sha":"sha256:e8b8921220c88610eb44638f31430335e2219568e23e266154613a4dce21c7c5","timestamp":"2026-11-13T22:45:05.069Z","type":"ledger_append","version":1}
History

@github-actions github-actions Bot 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.

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

@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (review-history)
{"id":"ldg-443b0b9a-9e58-4186-a54a-56c77c4d95e5","parents":[],"payload":{"id":"ldg-ad92b175-221a-4852-af6a-6e41a05e8482","operation":"append","value":{"finding_count":0,"head_sha":"1024138f7b6da5b542cb0c4b5601478b5810ca08","outcome":"no_findings"}},"sha":"sha256:e17cb4ce49d8c0e7068a8392ce258ac6e8a18a0e1d94de70b38247b3c9feb830","timestamp":"2026-11-13T22:46:22.588Z","type":"ledger_append","version":1}
History

@github-actions github-actions Bot 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.

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: replace overwrites the whole issue body for every agent update that omits operation. 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_operation is omitted when unset).
  • ✅ The replace-island integration test now checks a second run, which guards against island duplication.

Verification

  • go test ./pkg/workflow -run TestUpdateIssueOperation|TestUpdateIssueConfigParsing passes, and gofmt is clean.
  • I could not run the vitest suite or npm run typecheck here, because npm ci failed 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.

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.

[/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.

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.

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.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (docs/src/content/docs/reference/safe-outputs.md:755): address unresolved feedback - Review comment

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"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~3 AIC · ⌖ ~2 AIC · ⊞ 6.9K · ◷
Comment /souschef to run again

gh-aw-bot and others added 2 commits November 13, 2026 23:13
…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>
Copilot AI requested a review from gh-aw-bot November 13, 2026 23:54
@pelikhan
pelikhan merged commit b6e5d5d into main Nov 14, 2026
95 checks passed
@pelikhan
pelikhan deleted the copilot/update-issue-default-operation branch November 14, 2026 00:10
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.3.0

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.

update-issue: let the workflow fix or default the body operation (an agent that omits it silently appends a second post)

4 participants