Repository navigation
Description
Problem
The PR Review Advisor now treats material maintainability defects as first-class blockers and directs fixes toward smaller source-and-test designs. The remaining risk is outside a single review pass: an author or fixing agent can cycle through repeated review-and-fix revisions, rename symptoms of the same root problem, or grow the pull request while attempting to satisfy the reviewer.
That loop consumes reviewer capacity and can make the final change harder to maintain even when every individual response appears locally reasonable.
This issue complements #8240 and #9631. It does not reopen the first-pass reduction rules that #9631 delivered.
Goal
Make repeated advisor runs recognize stable root findings, measure whether revisions make material progress, and stop with a clear human-review handoff when an automated fix loop is no longer converging.
Measurement before behavior changes
Build a sanitized corpus from recent advisor-eligible pull-request revision sequences and report:
- consecutive advisor runs per pull request;
- stable root findings across revisions;
- findings that reappear with changed wording or location;
- findings resolved, superseded, or replaced by an independent current defect;
- source-and-test additions and deletions between reviewed heads;
- revisions that add a mechanism without reducing the root design problem;
- terminal outcome: clean, human decision, abandoned, or merged with an accepted limitation.
The corpus report must contain no repository credentials, private URLs, or untrusted pull-request text beyond the minimum redacted fixture needed for a regression case.
Proposed convergence contract
- Give each material root finding a stable identity across consecutive reviewed heads.
- Count progress only when the root finding closes, the complete source-and-test design materially shrinks, or checked-in evidence proves that the finding is superseded.
- Do not reset the convergence history merely because a symptom moves, wording changes, or another abstraction is added.
- Keep independently evidenced correctness, security, authorization, and scope findings eligible.
- After two consecutive reviewed revisions with the same actionable root and no material progress, stop issuing another automated fix instruction for that root and request human maintainer judgment.
- A new independent defect may be reported, but it must not silently reset the stalled root's history.
- Record the convergence decision and reason in the advisor artifact and rendered summary.
The two-revision threshold is a proposed initial contract. The baseline corpus should confirm it before activation or recommend a different fixed value with evidence.
Acceptance criteria
- A checked-in, sanitized baseline report measures recent multi-revision advisor sequences and records the selected fixed threshold.
- Root finding identity survives file movement, symptom wording changes, and follow-on machinery that does not resolve the original design problem.
- Advisor artifacts record the prior reviewed head, stable root IDs, progress classification, consecutive no-progress count, and terminal stop reason.
- A shrinking fix clears or advances the root without triggering escalation.
- Two consecutive no-progress revisions produce one human-review handoff rather than another fix instruction.
- A net-growing revision that adds a mechanism without resolving the root counts as no progress.
- A genuinely independent current defect remains reportable after another root stalls.
- Superseded and refreshed-base-only overlap do not consume the retry budget.
- Workflow reruns for the same head are idempotent and do not increment the count.
- Tests cover shrinking resolution, repeated root, symptom churn, net growth, independent findings, superseded overlap, and same-head reruns.
- Documentation explains the convergence fields and the human-review handoff.
Non-goals
- Automatically editing contributor branches.
- Treating the advisor as merge authority.
- Suppressing a new security or correctness finding because another root stalled.
- Replacing the lifecycle-alignment work in Use the same engineering checks during planning, implementation, and PR review #8240.
- Reintroducing a general iterative agent loop inside the advisor workflow.
Activity
cjagwani commentedon Aug 20, 2026
Initial convergence baseline
I sampled 28 successful primary-lane advisor artifacts from seven pull requests with multiple reviewed heads since August 19. This is a targeted convergence corpus, not a claim about every advisor run.
Observations
Test conditional Google Chat adapter loading, thenCover the Hermes Google Chat plugin load gatetwice. The current per-run IDs could not identify those as one root.Current implementation gap
The checked-in advisor assigns canonical finding IDs by array position on every run (
F-001,F-002, and publicPRA-1,PRA-2). The sticky comment records the current head and run metadata, then replaces its previous body. It does not carry a stable root identity, prior reviewed head, progress classification, or no-progress count into the next run.Threshold recommendation
Keep the proposed two-consecutive-no-progress threshold for a shadow-mode implementation. The #9393 sequence demonstrates that a third restatement can occur without root identity, while #9762 demonstrates why independent findings must remain eligible.
Before activation, shadow mode should classify a larger time window and report false joins and false splits. Activation should require deterministic fixtures for:
No behavior change is proposed until the issue receives the repository's required maintainer decision and validation plan.
cjagwani commentedon Aug 20, 2026
I expanded the shadow baseline from the initial 28 runs / 7 PRs to every available successful multi-head primary-advisor artifact since August 19:
The larger corpus makes two boundaries clearer.
First, a clean head must not reset all prior history: later independent findings are real and remain eligible. Second, the outer loop still needs a semantic-root history that survives title, line, and nearby-code changes.
The strongest sequence is PR #9593. Across 7 successful reviewed heads, the advisor produced 6 consecutive security blockers in the same 2 files before a clean result:
These are not identical messages, but they form one serial remediation root. The exact-base diff grew from 707 additions / 643 deletions (net +64) on the first reviewed head to 1,132 additions / 660 deletions (net +472) on the last, a +408-line net increase while the advisor discovered the chain one head at a time.
Other repeat evidence:
This supports keeping the bound semantic rather than keyed only by title or file:
For #8240, I would keep this root ledger and stop policy in the Advisor's independent mechanics. The shared engineering checks can prevent some serial discovery earlier, but they should not own or duplicate the runtime loop state.
Suggested maintainer decision before implementation: accept the 2-repeat shadow threshold and the semantic-root/progress definitions above, or choose the threshold and counterexample set you want measured first. The next safe slice would be shadow-only telemetry plus fixtures for #9593, #9323, #9393, #9723, and #9679; no production stop behavior until the shadow classification is reviewed.
cjagwani commentedon Aug 20, 2026
Manual shadow gold set: stall versus serial discovery
I reviewed the complete finding bodies and evidence for the repeated candidates, not only title/file similarity. That changes the proposed implementation in one important way: same-root stall count and same-family iteration depth must be separate signals.
62d6e5dd->3668e10e->06b846d9hermes-googlechat-plugin-load-gateroot. All three say the conditional plugin import/registry replacement has no checked-in configured/unset regression test. Wording and line move; the missing proof does not materially change.8e2fd432->395c8db6manual-e2e-latest-head-bindingroot: both require.head.sha == CHECKOUT_SHAat authorization and pre-execution. The second head also has an independent trusted-branch credential root.34f05fc4->170e36dafork-approval-diagnostic-redactionroot: raw GitHub stdout/stderr can expose credentials. The later head also contains three independent findings.619a12af->9b6f0228ff023829Recommended shadow record per observation:
Fail-safe rules:
unknownnever suppresses or auto-closes a finding; it requests human classification.same_root + no_progressincrements the two-repeat stop counter.new_subrootandmaterial_progressreset that root's no-progress counter but continue the family-depth metric.The current historical corpus has one clear positive stop fixture (#9393), two one-repeat non-stop fixtures, and several critical false-join fixtures. That is enough to test the schema in shadow mode, but not enough to activate production stopping. Activation should require synthetic positive variants plus zero false stops on this gold set.
This also gives the #8240 split a precise boundary: shared planning/implementation checks may reduce
family_iteration_depth; the Advisor alone owns runtime root identity, recurrence counters, and stop/handoff state.