فهرست منبع

docs: fix stale JSDoc on checkRetryBudget (referenced nonexistent force param)

Michael Henke 1 ماه پیش
والد
کامیت
d91fa0b983
1فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 5 5
      src/hooks/foreground-fallback/index.ts

+ 5 - 5
src/hooks/foreground-fallback/index.ts

@@ -246,11 +246,11 @@ export class ForegroundFallbackManager {
   // Retry budget
   // ---------------------------------------------------------------------------
 
-  /** True when the budget is exhausted and fallback should proceed.
-   *  When `force` is false (session.error / message.updated), fresh errors
-   *  with no prior retries always intervene immediately.
-   *  When `force` is true (session.status retry), the budget never bypasses
-   *  — even the first retry is counted. */
+  /** Increment retry counter and return true when the budget is exhausted.
+   *  Used by the session.status retry path — each retry counts toward the
+   *  budget and only triggers fallback after maxRetries - 1 absorptions.
+   *  Non-retry paths (session.error / message.updated) use shouldIntervene(),
+   *  which bypasses the counter on first occurrence. */
   private checkRetryBudget(sessionID: string): boolean {
     const tried = this.sessionRetries.get(sessionID) ?? 0;
     if (tried < this.maxRetries - 1) {