Skip to content

Require terminal safe-output signals - #76194

Merged
pelikhan merged 4 commits into
mainfrom
copilot/aw-top-10-reduce-runs-without-terminal-safe-output
Nov 9, 2026
Merged

pelikhan merged 4 commits into
mainfrom
copilot/aw-top-10-reduce-runs-without-terminal-safe-output

Conversation

Copilot AI commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Some workflows finish without recording a terminal safe output, leaving completion unconfirmed. Failure reports should distinguish a missing signal from explicitly incomplete work.

  • Terminal outcome guidance

    • Require a safe-output call after task work.
    • Use noop for completed work requiring no action; use report_incomplete for blockers.
  • Failure classification

    • Label collector-detected missing outputs as “Completion Signal Missing.”
    • Preserve “Task Could Not Be Completed” for agent-reported incomplete work.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Hey @Copilot 👋 — thanks for tackling the safe output terminal detection issue! The direction is solid and aligns well with the project. Here's what's needed to move this forward:

  • Add regression tests — The PR lists "Add focused prompt and failure-report regression tests" as an unchecked task. These are essential to validate the fix prevents runs from finishing without proper terminal safe outputs. Unit tests for the happy path (terminal safe output present) and edge cases (missing terminal signal) would lock this in.
  • Complete the WIP — The PR is currently in draft with an incomplete task checklist. Once tests are in and the implementation is ready, remove the draft flag and mark all tasks complete so reviewers can proceed.

If you'd like help, you can assign this prompt to your coding agent:

Add focused regression tests for the safe output terminal detection fix (#76175).
Cover these scenarios:
1. Agent completes with a terminal safe output (noop or report_incomplete) — test that the output is recorded and run is marked complete.
2. Agent finishes without terminal safe output — test that collector detects the missing signal and reports it distinctly from agent-reported incomplete work.
3. Mixed run states (some steps with terminal output, some without) — ensure only missing signals are flagged.
Run targeted validation after tests pass.

Generated by ✅ Contribution Check · copilot · routed: haiku55 xhigh · ~17 AIC · ⌖ ~2 AIC · ⊞ 5.4K · ◷

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Category: bug | Risk: medium | Score: 54 (Impact 28 + Urgency 17 + Quality 9) | Action: batch_review | Batch: agent-runtime | Summary: safe-output terminal-signal enforcement for completion reporting; medium-risk reliability patch in the active workflow runtime cluster.

Generated by 🔧 PR Triage Agent · copilot · mai11 · ~7 AIC · ⌖ ~1 AIC · ⊞ 16K · ◷

@pelikhan
pelikhan marked this pull request as ready for review November 9, 2026 12:40
Copilot AI adaptive review requested due to automatic review settings November 9, 2026 12:41
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

❌ PR Specification Reviewer failed to deliver outputs. Please review the logs for details.

Generated by PR Specification Reviewer for #76194

@github-actions

github-actions Bot commented Nov 9, 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 from Ponytail Reviewer · routed: gpt61 medium · ~3 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 181 · ◷

Generated by Ponytail Reviewer for #76194

@github-actions

github-actions Bot commented Nov 9, 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.

Generated from Design Decision Gate 🏗️ · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 8.6K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills...

@github-actions

github-actions Bot commented Nov 9, 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.

Generated from Test Quality Sentinel · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 7.2K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-11-09T12:44:20Z
review_event: COMMENT
top_themes: [overclaiming completion classification]
files_reviewed: [actions/setup/js/handle_agent_failure.cjs, actions/setup/js/handle_agent_failure.test.cjs, actions/setup/md/safe_outputs_prompt.md, pkg/workflow/prompt_validation_test.go]
comment_count: 1

Note

This comment is managed by comment memory.

Expand the saved memory block to view or edit the persistent context for this thread.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K · ◷
Comment /review to run again

@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.

Found one correctness issue in the new failure classification wording: the collector knows only that no terminal safe output was recorded, not whether the task was incomplete. I left an inline comment requesting neutral wording. Other specialist candidates were either contradicted by the current prompt text or were low-signal test/style suggestions. Static review only; no tests executed per review instructions.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again

const context = nodes.warning("Task Could Not Be Completed", [nodes.text("The workflow recorded a "), nodes.code("report_incomplete"), nodes.text(" signal: the task was not completed or completion could not be confirmed.")]);
const missingTerminalSignal = trustedCollectorCause === "missing_terminal_safe_output" && messages.length === 0;
const context = missingTerminalSignal
? nodes.warning("Completion Signal Missing", [nodes.text("No terminal safe output was recorded. Task completion could not be confirmed; this missing signal is not evidence that the requested work was incomplete.")])

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.

The collector can establish that no terminal safe output was recorded, but it cannot establish that the work was not incomplete. A run that stops partway through will take this branch too, so this wording may cause maintainers to dismiss a real partial failure. Please keep the classification neutral, e.g. "No terminal safe output was recorded, so completion is unconfirmed; whether the requested work finished is unknown."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the missing-signal text to state that completion is unconfirmed and whether the work finished is unknown. Committed as 0af7197.

@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 e38dce1 against Safe Outputs MCP Gateway Specification v1.29.21, Sections 7.2 and 7.3. The implementation and tests intentionally distinguish an agent-declared report_incomplete from collector-classified missing_terminal_safe_output, while preserving failure handling and sanitization guarantees. Synchronized docs/src/content/docs/specs/safe-outputs-specification.md to v1.29.22 (2026-11-09), documenting the terminal safe-output requirement, noop/report_incomplete semantics, and missing-signal classification. The specification commit was queued to the same-repository PR branch via safe output (output_id so_Qz471vsSQFik). No blocking conformance findings remain. Review coverage was limited to the captured diff, applicable safe-output contract, implementation/tests, and available PR metadata; no tests were run per static-review policy.

Generated by PR Specification Reviewer for #76194 · copilot · gpt50 · ~4 AIC · ⌖ ~2 AIC · ⊞ 1.7K
Comment /review-specs to run again

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.

🟡 Changes recommended

Requiring a terminal noop after real outputs can misclassify successful runs as having taken no action, producing misleading activation comments.

1 open issue
What changed in this PR

This PR strengthens terminal safe-output guidance in gh-aw and distinguishes missing completion signals from agent-reported incomplete work, addressing the signaling gap in #76175.

Changes:

  • Require a final safe-output call, using noop for completed work and report_incomplete for blockers.
  • Label collector-detected missing signals as “Completion Signal Missing.”
  • Update prompt and failure-report tests for these expectations.
File Description
pkg/​workflow/​prompt_validation_test.go Assert terminal-call and incomplete-work guidance.
actions/​setup/​md/​safe_outputs_prompt.md Strengthen final safe-output instructions.
actions/​setup/​js/​handle_agent_failure.test.cjs Verify missing-signal classification.
actions/​setup/​js/​handle_agent_failure.cjs Distinguish missing signals from reported incomplete work.

Review effort: Balanced (auto)

**CRITICAL: You MUST call a terminal safe-output tool as your final tool call before finishing.** At least one call from the `<safe-output-tools>` list must record the task's final outcome; using non-safe-output tools does not satisfy this requirement. Multiple calls are allowed up to each tool's configured limit. If the requested work is complete and no GitHub action was needed (no issues, comments, PRs, etc. were created or updated), call `noop` with a message explaining why no action was needed. If any requested work is incomplete or blocked, call `report_incomplete` with the blocker instead; do not use `noop` to mask incomplete work. This requirement still applies even if the workflow/task prompt forgets to mention safe outputs.

**Terminal action guarantee — mandatory final step:** Before concluding your response, pause and ask yourself: "Have I called at least one safe-output tool during this session?" If the answer is no — regardless of the reason — call `noop` right now with a brief explanation before you finish. This check is non-negotiable and overrides any other instruction. Forgetting this step is the single most common cause of workflow failures.
**Terminal action guarantee — mandatory final step:** After completing all other work, make a final safe-output call that records the task's terminal outcome. If your last safe-output call already performed the final requested action and no further work or tool calls remain, it satisfies this requirement. Otherwise, call `noop` with a brief completion/no-additional-action message when the work is complete, or `report_incomplete` when it is not. Earlier safe-output calls do not satisfy this final-step requirement. Do NOT end your response without this terminal signal.
@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 (actions/setup/js/handle_agent_failure.cjs:1926): address unresolved feedback - Review comment
  3. Fix failing check conclusion (FAILURE): Check run.
  4. Fix failing check impacted-go-tests (FAILURE): Check run.
  5. Fix failing check impacted-go-tests (FAILURE): Check run.
  6. Fix failing check safe_outputs (FAILURE): Check run.

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "e38dce12826d4cd9a6a42e04553c964d15c8ad68",
  "kind": "requested",
  "schema_version": "1",
  "state": "f1c05493a8294292cdb556566d926b79c0fe57733b5627e3219404532ae8d355",
  "work": [
    "42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac",
    "51e2287c3d1ee41b7e13769862add61dcd292a623cf943abc5968c984e246bcf",
    "c7cf93e497befdd5e698d00101b0703e4101fe4133d86d433f7c170d07402b7e",
    "c7f9c61ffeacd0f8282eecb97d5021932bdecf397a63c5e117b53f81b1bdd01b"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · haiku45 · ~11 AIC · ⌖ ~14 AIC · ⊞ 1.3K · ◷
Comment /souschef to run again

Copilot AI and others added 2 commits November 9, 2026 13:32
@pelikhan
pelikhan merged commit e099215 into main Nov 9, 2026
73 checks passed
@pelikhan
pelikhan deleted the copilot/aw-top-10-reduce-runs-without-terminal-safe-output branch November 9, 2026 14:43
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.2.2

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.

[AW Top 10] 06 Reduce runs that finish without a terminal safe output

4 participants