Skip to content

fix(agents): retain storage-failure retry and credential coverage - #139531

Merged
steipete merged 1 commit into
mainfrom
codex/team-fix-assistant-failure-test
Sep 6, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/team-fix-assistant-failure-test

Conversation

@steipete

@steipete steipete commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Reproduced the original failure before fix(test): unblock CI after storage-failure regression assertion #139519: 22 tests passed, one failed at assistant-failure.test.ts:273 with undefined is not a spy or a call to a spy!.
  • Passed 95 tests across the assistant-failure, assistant-failure failover, failover-retry-controller, and attempt-recovery files.
  • Passed all 880 tests across the 12 src/agents/failover/*.test.ts files.
  • The requested assistant-failover selector no longer exists; assistant-failure includes the current assistant-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.mjs completed successfully, including core-test typechecking, repository guards, all dead-export scans, and changed-file lint.
  • Codex autoreview: scoped-clean, no actionable P0–P2 findings.
  • The rebase preserves byte-identical validated test files; the three relevant production owners are unchanged from the validated base.
  • git diff --check passed.

@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS maintainer Maintainer-authored PR labels Sep 5, 2026
@steipete
steipete force-pushed the codex/team-fix-assistant-failure-test branch from 0872d84 to ad80cbd Compare September 6, 2026 00:00
@steipete steipete changed the title fix(agents): repair storage-failure test after failover owner move fix(agents): retain storage-failure retry and credential coverage Sep 6, 2026
@steipete
steipete marked this pull request as ready for review September 6, 2026 00:00
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 8:10 PM ET / September 6, 2026, 00:10 UTC.

ClawSweeper review

What this changes

Strengthens 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
Reviewed head: ad80cbdb0e988ec78546d29e9a9b40768c22efab

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, useful coverage improvement with no actionable correctness or security findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied repository state identifies a MEMBER-authored, maintainer-requested test-only PR; the external runtime-proof gate does not apply, and no production authority boundary changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied repository state identifies a MEMBER-authored, maintainer-requested test-only PR; the external runtime-proof gate does not apply, and no production authority boundary changes.
Evidence reviewed 9 items Verified introduced scope: The pinned base-to-head diff matches the supplied introduction evidence: existing assertions are strengthened and a storage-lock scenario is added, with no production changes.
Coverage remains distinct from current main: Comparing fetched main with the reviewed head shows the added test coverage remains unique; assistant-failure, attempt-recovery, and failover-retry-controller production files are identical between those revisions.
Documented behavior contract: The troubleshooting documentation explicitly states that storage failures do not trigger provider credential rotation or automatic replay, supporting the added negative assertions.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +11. Total +11 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 13 2 +11
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 13 2 +11

Review metrics

None.

Technical review

Best 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.

Labels

Label justifications:

  • P3: This is focused test maintenance preserving an existing contract without changing runtime behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied repository state identifies a MEMBER-authored, maintainer-requested test-only PR; the external runtime-proof gate does not apply, and no production authority boundary changes.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-06T00:05:12.341Z sha ad80cbd :: needs maintainer review before merge. :: none

@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete merged commit aa91024 into main Sep 6, 2026
307 of 310 checks passed
@steipete
steipete deleted the codex/team-fix-assistant-failure-test branch September 6, 2026 02:10
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit to ylcn91/openclaw that referenced this pull request Sep 6, 2026
* 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)
  ...
vincentkoc added a commit that referenced this pull request Sep 6, 2026
* 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)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant