Repository navigation
Name the First Value model step's failures (#745) - #748
Conversation
The gateway SDK reports the probe's own 15-second deadline as a retryable 500, and the retry wait then throws AbortError, so every deadline expiry was logged as AbortError with the upstream error discarded. The model step now runs its own attempts with SDK retries off, under one deadline it owns: at most three calls, two then four seconds apart, the SDK default made explicit. Every step logs elapsed time and one entry per attempt, pass or fail: a call cut short is named by the deadline, and a failed one keeps only the gateway's status, type, retryability, and generation id. Alerting is unchanged; the policy decision is #747. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Review follow-ups: a call that never honours its abort signal now ends at the step's deadline instead of hanging the pass; the no-model path logs the same diagnostic shape as every other model step; the runbook's record counts retried calls; the default-call test restores its spy. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe First Value model check now retries eligible gateway failures up to twice within a 15-second deadline. It records elapsed time and per-attempt outcomes, and limits logged error details to allowlisted fields. The tests and operational documentation cover retries, deadline outcomes, and the resulting logs. ChangesFirst Value model check
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant FirstValueCheck
participant modelStep
participant callModel
participant hostedModel
participant logger
FirstValueCheck->>modelStep: Run model check
loop Up to three attempts within the deadline
modelStep->>callModel: Call with abort signal
callModel->>hostedModel: Generate text with SDK retries disabled
hostedModel-->>callModel: Return result or gateway error
callModel-->>modelStep: Return call outcome
opt Retryable failure and time remains
modelStep->>modelStep: Wait 2 or 4 seconds
end
end
modelStep->>logger: Record elapsed time and attempt outcomes
modelStep-->>FirstValueCheck: Return pass or failure
Merge Risk: ⚪ Minimal · up to The First Value model check now retries transient gateway failures within a 15-second deadline and logs bounded diagnostics. The supplied evidence shows no concrete merge-blocking risk. 🚥 Pre-merge checks | ✅ 3 | ❓ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation For ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. I’m a rabbit counting calls, Comment |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — The PR changes an existing production recovery probe by introducing custom deadline, backoff, cancellation, and structured error handling, with up to three metered gateway attempts. Its scope is limited to the synthetic check and is well tested, but the new runtime policy and metering behavior are substantial enough to warrant human review. Not approved because:
Review your spending limits in Billing settings. You can add or adjust custom eligibility rules. Learn more. |
Closes #745. The alert, retry, and recovery policy decision moved to #747.
Summary
The gateway SDK reports the probe's own 15-second deadline as a retryable 500, and the retry wait then throws
AbortError: Delay was aborted. So both 2026-10-05 alerts show only that the deadline ran out; the upstream error was thrown away. The model step now runs its own attempts under a deadline it owns, and logs what each one did.Alerting is unchanged: any failed cheap step still opens
first_value_pathon that pass. The one policy difference is that a gatewayRetry-Afteris no longer honoured. The SDK would have waited up to 60s for it, past the deadline anyway.Evidence
AbortError, so the log says{ step: "model", reason: "AbortError" }.After:
first-value-check.test.ts(fake timers, no paid calls):pnpm verifytypecheck, lint, and tests passed (344 test files). The webnext buildhung once at "Creating an optimized production build" and passed on retry (exit 0).pnpm coverage:ci && FALLOW_AUDIT_BASE=origin/main pnpm fallow:cipassed with no findings.Merge Danger
Door: two-way
Reverting restores the old probe. No schema, config, or data changes.
Blast Radius: probe-only
Only the synthetic First Value model step changes. A failing model step can now make up to three calls (it already could through the SDK default), and each pass adds one
first_value_check.passedinfo log line.grounded_eve_answer, the daily claim, metering through the model-call entry point, pinned provider, and zero-retention routing are untouched.🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Documentation