Skip to content

fix(panel-review): orchestrator self-arbitrates and emits in skill contract#907

Merged
danielmeppiel merged 1 commit intomainfrom
fix/panel-review-orchestrator-emits-verdict
Apr 24, 2026
Merged

fix(panel-review): orchestrator self-arbitrates and emits in skill contract#907
danielmeppiel merged 1 commit intomainfrom
fix/panel-review-orchestrator-emits-verdict

Conversation

@danielmeppiel
Copy link
Copy Markdown
Collaborator

@danielmeppiel danielmeppiel commented Apr 24, 2026

Problem

PR #905 broke the panel: agent posts zero comments. Issue #906 captures the failure on run 24897368527.

Root cause

Inspected the agent artifact (agent_output.json={"items":[]}, full stdio transcript). Two coupled issues with #905:

  1. The 'do not post any comment; return to orchestrator' instruction is a no-op. Sub-agents launched via the task tool do not have safe-outputs MCP access -- only the orchestrator session does.

  2. Real bug: phrasing the contract as 'CEO synthesizes the single verdict' framed CEO as a separate emitter. The orchestrator dispatched 5 personas, got 4 results, was waiting on a slow one, never dispatched apm-ceo, and the session ended at 6m without ever reaching synthesis.

Fix lives in the skill, not the workflow

The user's architectural point: .apm/skills/apm-review-panel/SKILL.md is the authoritative source for routing, dispatch, arbitration, emission. The workflow .md should be a thin shell.

This PR:

  • SKILL.md step 5: orchestrator runs CEO arbitration as itself, never delegates to a sub-agent.
  • SKILL.md step 7: orchestrator writes the comment via safe-outputs.add-comment, never the GitHub API.
  • SKILL.md output contract: max cap reference updated to fail-soft ceiling of 7 (matches workflow frontmatter).
  • Workflow .md: removed Steps 3 and 4. They were duplicating skill territory. Step 2 now expanded slightly to point at all the skill responsibilities (including emission contract).

Stats

3 files changed, 23 insertions(+), 36 deletions(-) -- net simpler, single source of truth.

Verification

Will be verified live by re-triggering the panel on PR #889 after merge.

Closes #906.

Copilot AI review requested due to automatic review settings April 24, 2026 15:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes the PR Review Panel workflow prompt so the orchestrator reliably produces a single synthesized verdict comment (addressing the “zero comments emitted” regression introduced by the Step 3 prompt rewrite in #905).

Changes:

  • Replaces “Output contract” wording with “Workflow-only guardrails” to avoid implying a separate CEO agent must emit the final verdict.
  • Explicitly states the orchestrator performs CEO arbitration and must emit the final synthesized verdict itself.
  • Clarifies the comment is written via the output channel and published by a downstream job.
Show a summary per file
File Description
.github/workflows/pr-review-panel.md Updates Step 3/4 prompt text to ensure the orchestrator self-synthesizes and emits exactly one final verdict comment.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

…ntract

The previous wording in #905 framed the CEO as a separate emitter and
told the orchestrator to instruct each sub-agent 'do not post any
comment'. This produced two regressions:

1. Sub-agents launched via the task tool do not have safe-outputs MCP
   access to begin with -- the no-op instruction added orchestration
   bloat without protecting anything.
2. The 'CEO synthesizes the single verdict' phrasing made the
   orchestrator wait for a CEO sub-agent that was never dispatched.
   Result: agent_output.json={"items":[]} -- zero comments posted.

Fix lives in the skill (the authoritative source), not the workflow:

- SKILL.md execution checklist step 5: orchestrator runs CEO
  arbitration as itself, never delegates to a sub-agent.
- SKILL.md execution checklist step 7: orchestrator writes the
  comment to safe-outputs.add-comment, never calls GitHub API.
- SKILL.md output contract: cap reference updated to fail-soft
  ceiling of 7 (matches workflow frontmatter).

Workflow .md is now a thin shell: gather PR context, then defer to
the skill for routing, dispatch, arbitration, emission. No more
duplicated orchestration logic at the workflow boundary.

Closes #906

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@danielmeppiel danielmeppiel force-pushed the fix/panel-review-orchestrator-emits-verdict branch from cab3289 to 9bf2770 Compare April 24, 2026 15:55
@danielmeppiel danielmeppiel changed the title fix(panel-review): orchestrator must self-synthesize and emit verdict fix(panel-review): orchestrator self-arbitrates and emits in skill contract Apr 24, 2026
@danielmeppiel danielmeppiel merged commit 81a5845 into main Apr 24, 2026
13 checks passed
@danielmeppiel danielmeppiel deleted the fix/panel-review-orchestrator-emits-verdict branch April 24, 2026 15:59
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.

[aw] PR Review Panel failed

2 participants