Repository navigation
fix(agents): harden auth refresh redaction - #82670
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. by source inspection. Current main can surface raw OAuth refresh cause text and omits the initialized runtime close handle on the ACP dispatch-failure cleanup path; this read-only review did not execute tests. Real behavior proof Next step before merge Security Review detailsBest possible solution: Keep this scoped hardening PR open for maintainer review and merge gates, while leaving the provider-owned Gemini refresh fix and broader OAuth policy work in their linked lanes. Do we have a high-confidence way to reproduce the issue? Yes, by source inspection. Current main can surface raw OAuth refresh cause text and omits the initialized runtime close handle on the ACP dispatch-failure cleanup path; this read-only review did not execute tests. Is this the best way to solve the issue? Yes. The patch keeps redaction at the OAuth manager error boundary, uses the existing ACP cleanup handle contract, and limits apply-patch work to regression coverage for an existing path-safety guard. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 4003a955eee3. |
1d6ce26 to
9c9993e
Compare
Summary
Refs #42541, but does not close it. The provider-owned Gemini refresh fix remains owned by #78030.
Related follow-up lanes
Verification
Behavior addressed: failed ACP dispatch cleanup no longer leaves the initialized runtime handle open; OAuth refresh failures no longer surface credential material from current, attempted bootstrap, token-shaped, non-JSON, or reloaded credentials; apply-patch move-target symlink escapes stay rejected.
Real environment tested: local Codex worktree for focused Vitest proof, plus Blacksmith Testbox through Crabbox for
pnpm check:changed.Exact steps or command run after this patch:
Evidence after fix: final auth-focused Vitest passed 2 files / 34 tests; the touched-surface suite passed 8 files / 214 tests earlier in the same review-fix loop; final Codex review helper reran a targeted set at 6 files / 180 tests and reported
codex-review clean: no accepted/actionable findings reported; final Testbox-through-Crabbox passed with providerblacksmith-testbox, idtbx_01krrx5hzp5h6bd3gne14354wj, GitHub Actions run https://github.com/openclaw/openclaw/actions/runs/25968292153, exit 0.Observed result after fix: cleanup receives the initialized ACP runtime close handle on dispatch failure, OAuth refresh wrapper/cause text redacts all credential variants under test before generic token masking, non-JSON refresh failure values do not replace the refresh error with a TypeError, and the changed gate reports 0 lint errors plus 0 runtime import cycles.
What was not tested: no live Gemini OAuth refresh was run here; #78030 owns that provider behavior and the closing path for #42541.