Repository navigation
fix(agents): retain storage-failure retry and credential coverage - #139531
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
0872d84 to
ad80cbd
Compare
|
Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 8:10 PM ET / September 6, 2026, 00:10 UTC. ClawSweeper reviewWhat this changesStrengthens tests that Gateway storage failures leave retry state unchanged and do not refresh or rotate provider credentials. Merge readiness✅ Ready for maintainer review Keep open: the additional behavioral coverage remains absent from fetched main and complements the merged hotfix. No actionable patch defect was found; this maintainer-requested, protected PR remains useful. Priority: P3 Review scores
Verification
How this fits togetherThe embedded agent runner processes failed attempts through recovery and assistant-failure handlers before producing the final result. These tests protect the distinction between local storage failures and retryable provider failures. flowchart TD
A[Failed agent attempt] --> B[Attempt recovery]
B --> C{Retryable provider failure?}
C -->|Yes| D[Continue existing transcript]
C -->|No| E[Assistant failure handling]
E --> F{Gateway storage failure?}
F -->|Yes| G[Surface error without credential changes]
F -->|No| H[Provider failure policy]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +11. Total +11 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Retain the focused owner-level coverage so storage failures remain distinct from provider retries and credential recovery. Do we have a high-confidence way to reproduce the issue? Not applicable to a new runtime defect: this PR strengthens coverage after the broken assertion was removed by a merged hotfix; tests were inspected but not executed. Is this the best way to solve the issue? Yes: extending the existing fixtures and checking the real retry controller protects the documented behavior without adding production seams or duplicating recovery logic. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b305817c7629. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
* commit '6c55a99226ed0611ca088004c81b00fb296f1f71': (182 commits) test(ui): scope dashboard settings setup to the top frame (openclaw#139618) refactor(skills): share pending proposal creation (openclaw#139617) fix(release): accept frozen targets before worker bundles (openclaw#136699) fix(gateway): preserve percent sequences in media filenames (openclaw#139508) fix: preserve current update availability alongside update history (openclaw#139501) feat(diagnostics): expose garbage collection duration metrics (openclaw#139592) fix(ui): keep Logbook timestamps clear of the activity stripe (openclaw#139539) fix(ui): keep Swarm outcomes visible after completion (openclaw#139490) test: check file accessibility without runtime-specific return values (openclaw#139590) refactor(sdk): keep helper types private (openclaw#139601) fix(cron): preserve current-session delivery intent (openclaw#139491) fix: prevent browser profile permission hangs in Doctor (openclaw#139612) fix(agents): repair storage-failure test fixture after failover owner move (openclaw#139531) fix(cli): keep note text with Windows and Unicode line endings (openclaw#139512) fix(agents): keep isolated completion context on its admitted generation (openclaw#139607) fix: avoid declaration builds during source-server updates (openclaw#139392) fix(models): keep discovered models after catalog refresh failures (openclaw#139357) fix(gateway): record a transcript notice when a run fails before replying (openclaw#139439) refactor(ios): reuse shared integer conversion (openclaw#139581) fix(sessions): prevent database lock failures during reclamation (openclaw#139469) ...
* commit 'refs/openclaw/tasks/pr-135167-main-latest': test(ui): scope dashboard settings setup to the top frame (#139618) refactor(skills): share pending proposal creation (#139617) fix(release): accept frozen targets before worker bundles (#136699) fix(gateway): preserve percent sequences in media filenames (#139508) fix: preserve current update availability alongside update history (#139501) feat(diagnostics): expose garbage collection duration metrics (#139592) fix(ui): keep Logbook timestamps clear of the activity stripe (#139539) fix(ui): keep Swarm outcomes visible after completion (#139490) test: check file accessibility without runtime-specific return values (#139590) refactor(sdk): keep helper types private (#139601) fix(cron): preserve current-session delivery intent (#139491) fix: prevent browser profile permission hangs in Doctor (#139612) fix(agents): repair storage-failure test fixture after failover owner move (#139531) fix(cli): keep note text with Windows and Unicode line endings (#139512) fix(agents): keep isolated completion context on its admitted generation (#139607) fix: avoid declaration builds during source-server updates (#139392) fix(models): keep discovered models after catalog refresh failures (#139357) fix(gateway): record a transcript notice when a run fails before replying (#139439)
What Problem This Solves
Preserves meaningful no-retry and no-credential-rotation coverage for Gateway storage failures after the failover owner move. This maintainer-requested fix-forward began by repairing the red-main test introduced by #139409's rebase over #139410. While it was being validated, #139519 independently removed the stale assertion and cleared the immediate failure; this PR is rebased on that fix and adds the remaining behavioral coverage.
#139410 moved the fixture under the failover controller; #139397 subsequently moved transient retry handling into attempt recovery and removed that method from the assistant-failure input.
Why This Change Was Made
Keep the storage-failure assertion at its current owner: require
action: "proceed", no profile failure reason, no retry state or trace, and no runtime auth refresh, credential rotation, or profile failure marking. Add a storage-lock case to the existing attempt-recovery table and check the real controller's retry count remains zero.User Impact
No production behavior changes. CI explicitly protects that a Gateway storage failure surfaces without replaying the run or rotating credentials, including at the current transient-retry owner.
Evidence
assistant-failure.test.ts:273withundefined is not a spy or a call to a spy!.src/agents/failover/*.test.tsfiles.assistant-failoverselector no longer exists;assistant-failureincludes the currentassistant-failure.failover.test.ts. The failover directory selector also routes to an empty lane, so those files were run explicitly through the repository wrapper.node scripts/check-changed.mjscompleted successfully, including core-test typechecking, repository guards, all dead-export scans, and changed-file lint.git diff --checkpassed.