Skip to content

[review-pull-request] Pass sibling-worker refutations to review-candidate-verifier and validate remedies against in-repo tests (#70497) #70548

Open

Agent suggestions

Public preview

Description

@PureWeen

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

Part of EPIC #70231.

On #70497 (85c375ba5e454bb09dd9a6b8b09652597aa3131e, re-run 43248403697), /review published a confidence: verified P2 inline finding (r4552604532 on src/Components/Server.AutoPause/src/js/AutoPauseManager.ts:243, review 5877323311):

P2 — Keep auto-pause armed for a replacement circuit while the tab remains hidden
...
Suggested fix: Preserve a pending hidden pause across disposal so this finally schedules the replacement timer, for example by setting _hiddenTimerPending after clearHiddenTimer() when a pause is in flight and document.visibilityState === 'hidden'.

Inspection of the frozen source at 85c375ba5e454bb09dd9a6b8b09652597aa3131e and the run's agent artifact (events.jsonl subagent transcripts in run 43248403697) exposes three concrete gaps in candidate packaging and verification:

  1. Explicit design comment in the same file (AutoPauseManager.ts:95) and cross-worker refutation:
    • In onCircuitDisposed() (src/Components/Server.AutoPause/src/js/AutoPauseManager.ts:92-99), line 95 explicitly documents this exact lifecycle choice right above this.clearHiddenTimer():
      // A replacement started while hidden waits for the next visibility change to auto-pause.
      this.clearHiddenTimer();
    • In earlier run 43192121099 (review 5872205880), this AutoPauseManager.ts concern was discarded without publication. In re-run 43248403697 (agent artifact events.jsonl), the CrossCutting worker read AutoPauseManager.ts:95 and src/Components/Server.AutoPause/src/js/test/AutoPauseManager.test.ts:296-311 and withdrew the defect hypothesis in its follow-up turn (retaining it only as an optional design question).
    • However, the Blazor worker submitted the same scenario as a P2 defect without citing line 95, and the coordinator packaged the Blazor candidate for review-candidate-verifier without including CrossCutting's refutation or AutoPauseManager.ts:95.
  2. Over-broad contract promotion to KEEP (verified) from a general baseTip summary:
    • The verifier promoted links.contract to KEEP (downgradeKind: null) by citing the general baseTip public option XML summary in src/Components/Server.AutoPause/src/AutoPauseBrowserOptions.cs:7-9 (pausing a circuit after the browser tab has been hidden for HiddenDelay), over-extrapolating a high-level steady-state summary into a requirement for mid-pause circuit disposal/replacement (a lifecycle that did not exist at baseTip) to override an explicit edge-case lifecycle choice documented in head (AutoPauseManager.ts:95).
  3. Prescribed remedy breaks an in-repo unit test added in the same PR (AutoPauseManager.test.ts:296-311):
    • pauseNow()'s finally block (AutoPauseManager.ts:243-245) runs:
      if (!this._disposed && (circuitVersion === this._circuitVersion || this._hiddenTimerPending) && !this._autoPaused && document.visibilityState === 'hidden') {
        this.startHiddenTimer();
      }
    • Because onCircuitDisposed() increments this._circuitVersion and resets _autoPaused = false while leaving manager-level this._disposed === false even when no replacement circuit has started (e.g., after static-SSR navigation), r4552604532's suggested fix (setting this._hiddenTimerPending = true after clearHiddenTimer() when a pause is in flight and document.visibilityState === 'hidden') causes an obsolete in-flight pauseNow() completion to call this.startHiddenTimer() with no active circuit, invoking pauseCircuit a second time and failing unit test 'an obsolete pause completion does not rearm the hidden timer' (src/Components/Server.AutoPause/src/js/test/AutoPauseManager.test.ts:296-311 at line 310: expect(pauseCircuit).toHaveBeenCalledTimes(1)).

Describe the solution you'd like

(Note: Per .github/agents/review-candidate-verifier.agent.md:62-64, head comments and tests remain under review and must not be treated as binding contracts that automatically DROP a bug candidate, which would regress #69782 / V23 in #70250 when a PR author's comment/test encodes a real contract violation.)

  1. Include sibling-worker refutations and proposed fixes in the verifier package (.github/skills/review-pull-request/SKILL.md:247-249, 267-292):
    • When multiple routed specialist workers inspect the same file/hunk and one worker withdraws, refutes, or downgrades a candidate citing specific file:line evidence (such as AutoPauseManager.ts:95 and AutoPauseManager.test.ts:296-311) while another worker proposes it as a defect, require the coordinator to include the refuting worker's file:line citations and the candidate's proposed fix in the review-candidate-verifier input package.
  2. Clarify links.contract and links.intent for explicit head edge-case lifecycle comments without a specific contradicting baseTip contract (.github/agents/review-candidate-verifier.agent.md:58-94):
    • Clarify in lines 58-68 that a general baseTip feature/option summary (such as AutoPauseBrowserOptions.cs:7-9) that does not specify the edge-case lifecycle under review does not satisfy links.contract to forbid an explicit edge-case design choice in head unless a specific baseTip caller, test, interface, or protocol invariant requires the opposite behavior on that edge case.
    • Extend links.intent (lines 72-77) so an explicit head code comment (such as AutoPauseManager.ts:95) or PR description documenting that exact input's behavior establishes intent when contract is n/a, routing the candidate to DOWNGRADE (downgradeKind: "intent", confidence: question per lines 90-94) or DROP (dropBasis: "unestablished" per lines 64-68) rather than KEEP (confidence: verified).
  3. Verify candidate remedies against existing/PR unit tests in frozen source (.github/skills/review-pull-request/SKILL.md:267-292, 360, .github/agents/review-candidate-verifier.agent.md:53-56, 79-86):
    • When a candidate includes a Suggested fix, check nearby test files in source/<sha> (such as AutoPauseManager.test.ts:296-311) to confirm the prescribed fix does not contradict an explicit test assertion on a related path (e.g., circuit disposal without replacement). For non-test-gap candidates (SKILL.md:360, where a fix snippet is optional), omit a verifier-refuted Suggested fix (or extend the verifier/coordinator contract alongside [Review agent] Enforce strict 11-key JSON output from review-candidate-verifier with bounded normalization/retry (#70299, #70340) #70361) rather than publishing a fix snippet that breaks existing or PR unit tests, while keeping DROP (contradicted) when the broken assertion/remedy is the claim (lines 53-56).
  4. Synchronize embedded workflow verifier instructions:
    • Mirror all .github/agents/review-candidate-verifier.agent.md updates in .github/workflows/pull-request-review.md:995-1111 and recompile .github/workflows/pull-request-review.lock.yml.

Additional context

Activity

  1. github-actions commented on Nov 12, 2026

    @github-actions
    Contributor

    Triage Summary

    Area: area-infrastructure (review-pull-request skill and review-candidate-verifier agent tooling)
    Type: Task (maintenance of review agent tooling)

    Potential Duplicates

    • None found

    Notes

    Generated by Issue Triage Agent for dotnet/aspnetcore for #70548 · copilot · auto · 13.5 AIC · ⌖ 1.01 AIC · ⊞ 7.5K · ◷

  2. PureWeen commented on Nov 13, 2026

    @PureWeen
    MemberAuthor

    Author response update on #70497 (2026-11-13T06:49:56Z)

    In commit 74accaa13353d998f052815d29cc183debed1628 ("Fix hidden replacement"), @surya3655 updated the PR in response to both comments:

    • For r4548699168, added JSDoc on ReconnectionHandler.onConnectionUp() in CircuitStartOptions.ts:50-53 documenting that exceptions thrown during disposal cleanup are logged without preventing teardown or causing disposal to reject (the documentation alternative suggested by r4548699168).
    • For r4552604532, changed AutoPauseManager.onCircuitDisposed() (AutoPauseManager.ts:96) to set this._hiddenTimerPending = this._pauseInFlight && document.visibilityState === 'hidden' and updated the unit test from 'an obsolete pause completion does not rearm the hidden timer' to 'rearms the hidden timer after a retired pause completes without a visibility change'.

    (Both verifier pipeline failure modes documented above — omitting sibling-worker refutations when dispatching review-candidate-verifier and not checking whether a proposed remedy contradicts an explicit test in the PR diff — remain valid structural improvements to track here.)

  3. PureWeen commented on Nov 13, 2026

    @PureWeen
    MemberAuthor

    Additional live occurrence on 2026-11-13: PR #68633 (run 43404162989) — review whipsaw against prior review thread + PR regression test (r4561913441)

    Run 43404162989 on #68633 (Fixed circuit disconnects caused by navigation during slow custom CircuitHandler execution, frozen head 739615d592b75f9f609e9dd2ca9b12b33fff4951) published r4561913441 (src/Components/Server/src/Circuits/CircuitHost.cs:823, P2, confidence: verified):

    • Published claim: **P2 — Don’t let client notification block circuit teardown** — claims that await TryNotifyClientErrorAsync(Client, GetClientErrorMessage(exception), exception); before UnhandledException?.Invoke(...) in ReportRootComponentUpdateQueueOverflowAsync() can hang indefinitely if JS.Error delivery never completes, and suggests invoking UnhandledException before awaiting TryNotifyClientErrorAsync.
    • Why this happened and why it is a false-positive whipsaw:
      1. Sibling worker refutation omitted: The BlazorComponentsGuidance worker explicitly cleared ReportRootComponentUpdateQueueOverflowAsync ("Queue overflow's terminal behavior is consistent with the circuit failure policy: it reports the client error and raises UnhandledException (CircuitHost.cs:819-825)"), while CrossCuttingGuidance raised the candidate. The coordinator did not pass the BlazorComponentsGuidance worker's assessment OR feedback.json to review-candidate-verifier.
      2. Prior review thread + PR test explicitly required this exact ordering: In r4430065858 / r4442087284, an earlier review specifically asked the author to await TryNotifyClientErrorAsync before raising UnhandledException because CircuitRegistry.CircuitHost_UnhandledException runs synchronously and calls Client.SetDisconnected() before its first await, which otherwise causes TryNotifyClientErrorAsync (if (!client.Connected) return;) to suppress JS.Error.
      3. Test mock treated as production trigger + proposed fix breaks the PR test: The verifier (overflow-verifier) noted in links.intent that UpdateRootComponents_RejectsUpdate_WhenPendingQueueLimitIsReached (CircuitHostTest.cs:1389-1447) deliberately uses a TaskCompletionSource (clientErrorSendCompletion.Task) to hold JS.Error incomplete and asserts Assert.Empty(unhandledExceptions) and Assert.True(clientProxy.Connected) before releasing the send. That never-completing SendCoreAsync task is a test-only mock gate (not a reachable production SignalR ISingleClientProxy.SendCoreAsync behavior), and the coordinator's suggested fix (var notification = TryNotifyClientErrorAsync(...); UnhandledException?.Invoke(...); await notification;) immediately fails Assert.Empty(unhandledExceptions) at CircuitHostTest.cs:1439.
      4. Verifier schema drift (#70361): overflow-verifier also returned 12 top-level keys (adding "rationale" alongside "reason") and nested { "statement", "citations" } objects inside links.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions