← Back to Pull requests

Read on after a source's defect in a polled RPC watch #88

Closed
unknown closed this pull request without merging on Nov 26, 2026 18:29 UTC
View on GitHub
unknown unknown commented on Nov 26, 2026 18:19 UTC
Author

A watch polling an ActionRpc.layer server (mode: "poll") ended with "Internal server error" when the event's source died. The poll rpc concealed the defect as a die, and the watch retries only typed transient failures. Over HTTP the same poll is a 500 and over MCP a -32603, and both clients read on, as a streamed RPC watch and one in process do.

pollHandlerOf now reports a source's defect once and answers Action.Unavailable, which the poll rpc already declared and every client's watch reads on after. Only feed.poll is caught (the source, the event's authorizer and its subscription hook), not decoding, check, the caller or encoding. Not breaking: an older client's watch already reads on after Unavailable.

Proof, by running it:

  • Before (main): the polled watch fails after one read with "Internal server error".

  • After: it reads on, the defect is reported once, and the next occurrence arrives.

  • The new case in tests/rpc/poll.test.ts fails when the catch is removed.
  • Review: deslop review in https://ampcode.com/threads/T-01a21914-2007-70dc-8179-d88192f051cd. It found the fix in the right place: treating the concealed error as transient on the client would also retry action, encoding and verifier defects.

  • Finding 1 (the catch also covers the authorizer and subscription hook): behaviour kept, matching HTTP's 500 that its watch reads on after. The message, JSDoc and changelog now name all three. Greptile asked to narrow it; my reply on its comment explains why not here.

  • Finding 2 (ActionEntity.layer shares the handler): the changelog says so. I didn't run or test the entity path, so I claim nothing about its watch.

  • Finding 4 (a one-caller helper): inlined.

  • It found nothing deleted or reverted.

    Checks: vp check, env -u NO_COLOR vp test and vp run test:package pass, rebased on fcfb451.

    Diff: 231 lines (+173 / -58) across 2 files Reviewer: gjermundgaraba Review duration: 9m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 231 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.326
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #88"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 37% (MEDIUM) · Higher = larger blast radius
    37%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.6% · Safe to merge
    14.6%