Skip to content

Await specialist sub-agents so the review panel posts a verdict - #459

Merged
stbenjam merged 1 commit into
mainfrom
fix/panel-parallel-await
Jul 26, 2026
Merged

Await specialist sub-agents so the review panel posts a verdict#459
stbenjam merged 1 commit into
mainfrom
fix/panel-parallel-await

Conversation

@not-stbenjam

Copy link
Copy Markdown
Collaborator

The bug

The parallel dispatch added in #458 launches the six specialists with run_in_background: true. A background agent returns immediately, so the dispatching turn ends with every review still in flight. Interactively that's fine — the completion notifications arrive and work resumes. Headlessly it isn't: when the turn ends, the CI job ends.

The panel has posted no verdict since #458 landed.

Evidence

Run 30216174198 on #451 — exited success after 3m22s, 22 turns, having posted nothing. From its own execution log, the six dispatches and then the final message:

Six specialists are running in parallel against PR #451 […] I'll synthesize the verdict and post it as a single PR comment once all six report back.

They had been launched moments earlier. None had returned. The turn ended; the job ended.

The failure mode is the bad kind: is_error: false, a green check, and no findings — indistinguishable from a clean review unless you go read the execution artifact. Compare run 30214646754 (pre-#458, serial) which took ~14 minutes and posted a full verdict.

The fix

Dispatch synchronously — run_in_background: false, still all six in a single message.

Both halves matter, and the skill now says so explicitly:

  • a single message is what makes them run concurrently
  • run_in_background: false is what makes the call block until all six return

So #458's parallelism is fully preserved; only the fire-and-forget goes. Six concurrent reviews, awaited.

I also added a line to the Completeness Gate: the run must never end there. If specialists are missing and can't be recovered, post the verdict anyway naming which ones failed — a partial verdict beats silence that reads as approval.

Verification

  • make update regenerates cleanly; all three copies (.apm/, .agents/, .claude/) verified byte-identical
  • .venv/bin/skillsaw lint .apm/skills/skillsaw-review-panel/ — 0 errors, 0 warnings, A+
  • make lint clean, make test 2965 passed

Note on overlap

There's a second PR in flight adding a seventh specialist to this same skill. It touches the roster table and frontmatter; this touches Step 3's dispatch mechanics and Step 4. Different regions, so they should merge cleanly in either order — but worth landing this one first, since without it the new specialist would never report either.

🤖 Generated with Claude Code

The parallel dispatch added in #458 launches the six specialists with
`run_in_background: true`. A background agent returns immediately, so
the dispatching turn ends with every review still running. Interactively
that is fine — the notifications arrive and work resumes. Headlessly it
is not: when the turn ends, the CI job ends.

Observed on PR #451 (run 30216174198). The job exited `success` after
3m22s having posted nothing. Its final message was "I'll synthesize the
verdict and post it as a single PR comment once all six report back" —
the six had been dispatched moments earlier and none had returned. From
outside the workflow this is indistinguishable from a clean review: a
green check and no findings.

Dispatch synchronously instead — `run_in_background: false`, still all
in one message. The single message is what makes them concurrent; the
synchronous flag is what makes the call block until all six return. The
parallelism #458 wanted is preserved; only the fire-and-forget goes.

Also state in the Completeness Gate that the run must never end there.
A panel that stops after dispatching produces nothing actionable and
looks identical to a clean pass, so a partial verdict naming the failed
specialists beats silence.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@not-stbenjam
not-stbenjam requested a review from stbenjam as a code owner July 26, 2026 19:15
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@not-stbenjam, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 7 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1f2c6554-25f4-4dd1-a6c3-aa120ffc745f

📥 Commits

Reviewing files that changed from the base of the PR and between b85c0e4 and 0c72509.

⛔ Files ignored due to path filters (3)
  • .agents/skills/skillsaw-review-panel/SKILL.md is excluded by !.agents/**
  • .claude/skills/skillsaw-review-panel/SKILL.md is excluded by !.claude/**
  • .skillsaw-card.svg is excluded by !**/*.svg
📒 Files selected for processing (1)
  • .apm/skills/skillsaw-review-panel/SKILL.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/panel-parallel-await

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Await parallel specialist agents so review panel always posts a verdict

🐞 Bug fix 📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Switch specialist dispatch to synchronous mode so CI waits for all reviews.
• Document why single-message + non-background dispatch is required for true parallelism.
• Tighten Completeness Gate to always post a (partial) verdict instead of ending silently.
Diagram

graph TD
  A["Review Panel skill"] --> B["Agent tool dispatch"] --> C["6 specialist sub-agents"] --> D["Completeness Gate"] --> E["Panel arbiter synthesis"] --> F["PR verdict comment"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Keep background dispatch but add explicit wait/poll loop
  • ➕ Preserves fire-and-forget semantics in interactive environments
  • ➕ Can implement timeouts and progress reporting explicitly
  • ➖ More moving parts (polling, correlation IDs, timeouts) and higher failure surface
  • ➖ Still risks CI termination if waiting is not robustly tied to the job lifecycle
2. Single aggregated specialist agent (no sub-agents)
  • ➕ Eliminates orchestration/await complexity entirely
  • ➕ Simplifies completeness and retry logic
  • ➖ Loses specialist separation and parallelism benefits
  • ➖ Harder to attribute failures to a specific specialist lens
3. Workflow-level guard (CI waits regardless of agent backgrounding)
  • ➕ Solves the lifecycle mismatch outside the skill/prompt layer
  • ➕ Could protect other tools from similar early-exit issues
  • ➖ May not be feasible depending on runner/agent integration
  • ➖ Separates the fix from the source of truth (the skill instructions)

Recommendation: The PR’s approach (parallel, single-message dispatch with run_in_background: false) is the best tradeoff here: it preserves concurrency while guaranteeing the CI job doesn’t exit before results are returned. The added Completeness Gate guidance is a pragmatic safeguard against silent green runs by ensuring a partial verdict is still posted when some specialists fail.

Files changed (4) +58 / -10

Bug fix (3) +57 / -9
SKILL.mdMake parallel specialist dispatch synchronous and CI-safe +19/-3

Make parallel specialist dispatch synchronous and CI-safe

• Updates the parallel-mode guidance to use run_in_background: false and explains that concurrency comes from a single dispatch message while blocking comes from synchronous execution. Adds Completeness Gate guidance to never end the run without posting a verdict, even if partial.

.agents/skills/skillsaw-review-panel/SKILL.md

SKILL.mdMirror synchronous dispatch + completeness guardrails in APM copy +19/-3

Mirror synchronous dispatch + completeness guardrails in APM copy

• Mirrors the same dispatch semantics and CI rationale in the .apm copy of the skill. Clarifies that Step 4 must only run once all six results are in hand and that missing specialists should still yield a posted verdict.

.apm/skills/skillsaw-review-panel/SKILL.md

SKILL.mdMirror synchronous dispatch + completeness guardrails in Claude copy +19/-3

Mirror synchronous dispatch + completeness guardrails in Claude copy

• Replicates the non-background parallel dispatch requirement and the Completeness Gate 'never end here' rule in the .claude copy. Ensures consistent behavior/documentation across all generated skill locations.

.claude/skills/skillsaw-review-panel/SKILL.md

Documentation (1) +1 / -1
.skillsaw-card.svgRegenerate report card token count +1/-1

Regenerate report card token count

• Updates the generated SVG stats to reflect the new content token count after the skill text changes.

.skillsaw-card.svg

@stbenjam
stbenjam enabled auto-merge (squash) July 26, 2026 19:16
@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📜 Skill insights (1)

Context used
✅ Compliance rules (platform): 136 rules
✅ Skills: 5 invoked
  skillsaw-pr-review
  skillsaw-issue-solver
  skillsaw-pr-followup
  skillsaw-create-plugin
  skillsaw-review-panel

Grey Divider


Informational

1. No regression test for panel 📜 Skill insight ▣ Testability
Description
This PR fixes a CI/headless bug by changing the review panel’s parallel sub-agent dispatch to be
awaited (run_in_background: false) so the run doesn’t exit before specialists complete, but it
adds no regression test to ensure this behavior doesn’t silently revert. Without test coverage, CI
can return to a “green but no verdict posted” failure mode with no signal.
Code

.agents/skills/skillsaw-review-panel/SKILL.md[R129-140]

Launch **all 6 specialist sub-agents in a single message** so they
-run concurrently, using the Agent tool with `run_in_background: true`.
+run concurrently, using the Agent tool with `run_in_background: false`.
+
+Both halves of that matter. A single message is what makes them run
+concurrently. `run_in_background: false` is what makes the dispatch
+*block* until every one returns.
+
+Do **not** use `run_in_background: true` here. A background agent
+returns immediately, so the dispatching turn ends with the reviews
+still running — and when the panel runs headlessly in CI, the turn
+ending ends the job. The workflow then exits green having posted no
+verdict at all, which is worse than failing loudly.
Relevance

⭐ Low

Similar request to add integration/regression coverage for review-panel templates was explicitly
rejected.

PR-#454

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The compliance checklist calls for regression tests whenever a PR fixes a bug, and the cited skill
change explicitly modifies the review panel’s dispatch behavior to run_in_background: false to
prevent CI from ending before specialist results return—clearly indicating a behavioral bug fix.
However, the PR content described includes only skill documentation changes (and a generated SVG
update) and no test additions or updates that would fail if the previous fire-and-forget/parallel
behavior were reintroduced, demonstrating the absence of required coverage.

Rule 2314726: Add regression tests for every bug fix
.agents/skills/skillsaw-review-panel/SKILL.md[129-140]
Skill: skillsaw-review-panel

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The PR fixes a headless/CI behavioral bug by making the review panel’s parallel specialist dispatch awaited (`run_in_background: false`) so the job doesn’t exit before results return, but it does not include a regression test to ensure this behavior can’t silently regress.

## Issue Context
The `skillsaw-review-panel` skill is operational logic used headlessly in CI. If the panel returns to fire-and-forget sub-agent dispatch, the workflow can appear green while exiting before specialists finish, resulting in no verdict being posted.

## Fix Focus Areas
- tests/test_review_panel_skill_regression.py[1-120]
- .agents/skills/skillsaw-review-panel/SKILL.md[127-140]
- .apm/skills/skillsaw-review-panel/SKILL.md[127-140]
- .claude/skills/skillsaw-review-panel/SKILL.md[127-140]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0c7250922c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread .apm/skills/skillsaw-review-panel/SKILL.md
@not-stbenjam

Copy link
Copy Markdown
Collaborator Author

Conflicts with #460 on exactly one line, in all three skill copies. #460 adds a seventh specialist and changes the count; this changes the flag. Both edit:

Launch **all 6 specialist sub-agents in a single message** so they
run concurrently, using the Agent tool with `run_in_background: true`.

Resolution either way is all 7 + run_in_background: false — take the count from #460 and the flag from here.

Worth landing this one first regardless: without it the seventh specialist would be dispatched and abandoned like the other six.

@stbenjam
stbenjam merged commit 95769b5 into main Jul 26, 2026
19 checks passed
@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.54%. Comparing base (b85c0e4) to head (0c72509).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #459   +/-   ##
=======================================
  Coverage   93.54%   93.54%           
=======================================
  Files         145      145           
  Lines       11418    11418           
=======================================
  Hits        10681    10681           
  Misses        737      737           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

not-stbenjam added a commit to not-stbenjam/skillsaw that referenced this pull request Jul 26, 2026
Resolves the conflict with stbenjam#459 as flagged on both PRs — `all 7` from
here, `run_in_background: false` from there.

Addresses the review findings:

- **The BLOCKING criterion was unsatisfiable.** Palimpsest was told to
  escalate a factually false comment only when Architecture or the
  Technical Writer corroborated it — but specialists run isolated from one
  another, so it could never see that and would always self-downgrade,
  while synthesis never upgraded it back. A corroborated correctness
  defect could ship as a SUGGESTION under an APPROVE. It now reports a
  `BLOCKING CANDIDATE` and the arbiter assigns the final severity in a new
  synthesis step, which may not leave one unsettled.

- **Regression coverage** for both this reviewer and the stbenjam#459 dispatch
  fix, in a new `tests/test_review_panel_skill.py`. The panel is a prompt,
  so its failure modes are textual and invisible to the rest of the suite —
  which is exactly how the headless silent-exit shipped green. The guards
  cover: dispatch is synchronous and background dispatch appears only in
  its own prohibition; the run may not end before the verdict; every
  specialist is rostered with a scope file that exists and a quality gate;
  Palimpsest reports a candidate rather than deciding; the three skill
  copies are byte-identical; and the verdict template has a section per
  specialist.

Adding a seventh specialist pushed SKILL.md past the 3,000-token warn
limit its own linter enforces — main was already at ~2,930. Serial mode
moved to `references/serial-mode.md`: it is the non-default path, so an
always-read copy costs every invocation for something most never use.
That is the progressive-disclosure pattern the skill already applies to
specialist scopes, and stbenjam#458 inlined dispatch specifically because it *is*
always read. The file is now smaller than on main despite the addition,
and a test pins the budget so the next specialist has to face the same
question.

No README change: the review panel is not documented there, so there is
nothing for a new specialist to fall out of sync with.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@stbenjam
stbenjam deleted the fix/panel-parallel-await branch July 27, 2026 20:06
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