Skip to content

Reject failed agent outputs before sealing discussion replies - #499

Merged
robgruen merged 1 commit into
mainfrom
dev/robgruen/reject-failed-reply-output
Oct 31, 2026
Merged

robgruen merged 1 commit into
mainfrom
dev/robgruen/reject-failed-reply-output

Conversation

@robgruen

Copy link
Copy Markdown
Contributor

Summary

Follow up on the unresolved review comment in #498: #498 (comment).

The direct reply writers can run before the final conclusion job records a model failure. Require the trusted collector's output types to be exactly noop in the shared sealing step, before rendering or creating a publishable artifact.

  • Reject report_missing_data, report_incomplete, mixed completion/failure reports, and missing or unknown output types—even with a valid candidate and a successful scan.
  • Protect both Issue and Discussion writers through their existing successful-seal prerequisite, without introducing a dependency cycle on the conclusion job.
  • Preserve the successful preview/manual-publish and direct-reply paths, and document the new gate.
  • Keep owner authorization, permissions, policy, model configuration, and budgets unchanged.

Validation

  • 112 targeted tests passed on Node 24.22.1, with zero failures or skipped tests.
  • Regression coverage executes the authored workflow scripts for Issue/draft, Discussion/draft, Issue/reply, and Discussion/reply; invalid completion produces neither a sealed artifact nor a public comment.
  • Confirmed the new regressions failed before the fix.
  • Strict compilation with pinned gh-aw v0.93.5: zero warnings. Repeat compilation produced identical workflow and action-lock hashes.
  • Whitespace checks passed.

No live model run or public response was triggered. Human review and merge are still required.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 31, 2026 21:12

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 change that restricts artifact sealing to exclusively noop collector output.

No open issues 🎉

What changed in this PR

This PR closes the failure-handling gap identified in #498 by requiring the trusted collector’s output types to be exactly noop before sealing a discussion-response artifact. This protects both Issue and Discussion replies without waiting for the later conclusion job.

Changes:

  • Reject missing, unknown, incomplete, failure, and mixed output types before rendering or sealing.
  • Add regression coverage across draft and direct-reply modes, including authored/generated workflow consistency.
  • Document the sealing gate while preserving existing authorization and publication controls.
File Description
tools/​tests/​discussion-workflows.test.mjs Checks collector-output wiring, generated parity, and writer seal prerequisites.
tools/​tests/​discussion-draft.test.mjs Tests rejection of invalid completion signals across Issue and Discussion modes.
AUTOMATION.md Documents the completion gate and protection against publication races.
.github/​workflows/​discussion-draft.md Requires an exclusive noop output before sealing.
.github/​workflows/​discussion-draft.lock.yml Includes the compiled gate and updated workflow metadata.

Review effort: Balanced

@robgruen
robgruen merged commit 7c4c6d0 into main Oct 31, 2026
14 checks passed
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.

2 participants