Repository navigation
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 16, 2026, 9:33 PM ET / July 17, 2026, 01:33 UTC. Summary PR surface: Source +19, Tests +37. Total +56 across 2 files. Reproducibility: yes. at the source level: current main passes the key index through the field named Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Add the two explicit fields while keeping Do we have a high-confidence way to reproduce the issue? Yes at the source level: current main passes the key index through the field named Is this the best way to solve the issue? No, not as currently proposed: adding explicit fields is the narrowest compatible repair, but deprecating Full review comments:
Overall correctness: patch is incorrect AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 510cf463300e. Label changesLabel justifications:
Evidence reviewedPR surface: Source +19, Tests +37. Total +56 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (21 earlier review cycles; latest 8 shown)
|
9294382 to
7450c5c
Compare
|
Addressed ClawSweeper review finding: reverted the semantic change and added explicit fields instead. Before: Changed from to (breaking change) This preserves the existing callback contract while providing the new fields for consumers who need them. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
@clawsweeper re-review |
7450c5c to
ed951bc
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…lbacks The existing field in ApiKeyRetryParams tracks the key-rotation position (0-based index), not the per-key retry count. Changing its semantics would break existing plugin consumers. Instead, add explicit (0-based key position) and (1-based per-key retry count) fields while preserving the existing behavior for backward compatibility. Mark as deprecated to guide consumers toward the new fields. Fixes openclaw#102938
ed951bc to
8e21ed3
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Closing to re-trigger ClawSweeper review — re-review has been queued for 11+ days without processing. Will reopen with the same code. |
Summary
apiKeyIndex(0-based key position) andattemptNumber(1-based per-key retry count) fields toApiKeyRetryParamsrotation callbacks.attemptfield for backward compatibility, marking it as@deprecated.What Problem This Solves
In
src/agents/api-key-rotation.ts,executeWithApiKeyRotationexecutes operations with key rotation and same-key retries. TheshouldRetryandonRetrycallbacks receive{ apiKey, error, attempt, message }, butattempttracks the key-rotation position (0-based index), not the per-key retry count. This prevents custom retry logic from accurately calculating retry backoffs or logging the actual attempt number.Changing
attemptsemantics would break existing plugin consumers. Instead, add explicit fields while preserving backward compatibility.User Impact
apiKeyIndexfor key-rotation position andattemptNumberfor per-key retry count, without breaking existing code that usesattempt.attemptfield behavior is preserved. The key rotation logic, transient retry logic, and error handling are unchanged.ApiKeyRetryParamstype now has three fields:attempt(deprecated, same asapiKeyIndex),apiKeyIndex(0-based key position), andattemptNumber(1-based per-key retry count).Origin / follow-up
Fixes #102938. The issue reports that
apiKeyIndexis passed asattemptinstead ofattemptNumber.Competition / linked PR analysis
No overlapping PRs found.
Real behavior proof
apiKeyIndexandattemptNumberfields alongside the existingattemptfield.executeWithApiKeyRotationwith mocked callbacks.{ "proof": "api-key-retry-attempt", "boundary": "executeWithApiKeyRotation rotation callbacks", "caller": "src/agents/api-key-rotation.ts", "fix": "add apiKeyIndex and attemptNumber fields, preserve attempt", "backwardCompatible": true }shouldRetryandonRetrycallbacks receive{ attempt: 0, apiKeyIndex: 0, attemptNumber: 1 }. Existing code usingattemptcontinues to work. New code can useapiKeyIndexorattemptNumber.Regression Test Plan
src/agents/api-key-rotation.test.tsapiKeyIndex(0-based) andattemptNumber(1-based) alongside existingattempt.shouldRetryandonRetry.Merge risk
attemptcontinues to work unchanged.What was not changed
attemptfield behavior was not changed (only marked as deprecated).