Preserve runtime external auth snapshots#85558
Conversation
|
Codex review: passed. Reviewed May 26, 2026, 12:41 AM ET / 04:41 UTC. Summary PR surface: Source +381, Tests +974. Total +1355 across 8 files. Reproducibility: yes. from source: current main writes the disk-filtered localStore into an existing runtime snapshot after save, which matches the reported credential drop path. I did not run a failing current-main repro in this read-only pass. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the branch after exact-head CI/automerge gates if maintainers accept the supplied direct auth-store proof; request a live Claude CLI smoke only if end-to-end provider proof is required before merge. Do we have a high-confidence way to reproduce the issue? Yes from source: current main writes the disk-filtered localStore into an existing runtime snapshot after save, which matches the reported credential drop path. I did not run a failing current-main repro in this read-only pass. Is this the best way to solve the issue? Yes, the branch fixes the implicated save path while preserving disk filtering and adds boundary tests for runtime preservation, authoritative removal, and inherited main OAuth behavior. A live Claude CLI smoke would improve end-to-end confidence but is not required to identify the source-level fix. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 7db4b3db412d. Label changesLabel justifications:
Evidence reviewedPR surface: Source +381, Tests +974. Total +1355 across 8 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
|
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Pearl Signal Puff Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
5c2ddbe to
44cb41e
Compare
44cb41e to
bed8a58
Compare
|
@clawsweeper re-review Addressed the P1 disk-only save gap:
Proof run after the fix:
Post-push checks:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
5574597 to
63bb721
Compare
|
Maintainer verification for
Scope notes:
Ready for final maintainer review. |
|
@clawsweeper ask Create a maintainer-facing ASCII state visual for this PR. Do not generate images. Do not use Mermaid. Show the auth/runtime state change caused by this PR:
Include:
End with: |
|
🦞👀 I queued a lightweight read-only assist pass. It will post a separate answer comment and will not edit the durable ClawSweeper review comment or trigger close, merge, repair, label, or branch changes. Request: Create a maintainer-facing ASCII state visual for this PR. Do not generate images. Do not use Mermaid. Show the auth/runtime state change caused by this PR: - before: saveAuthProfileStore builds a disk-filtered local store and writes that same filtered store back into the active runtime snapshot, dropping runtime-only external CLI OAuth profiles like anthropic:claude-cli - after: disk persistence still uses the filtered local store, but the active runtime snapshot is refreshed with a runtime-saf... |
|
ClawSweeper assist: Here is a maintainer-facing ASCII state visual for #85558. 1. Before state picture 2. After state picture 3. Runtime vs disk boundary map 4. Tradeoffs before merge 5. Proof already shown
6. Remaining proof gap
7. Final maintainer ruling question Benefit: Preserves Source: #85558 (comment) |
|
@clawsweeper automerge |
|
🦞🧹
Draft PRs stay fix-only until GitHub marks them ready for review. Pause with Automerge progress:
|
a4523f5 to
1fe1f50
Compare
1fe1f50 to
38dff32
Compare
38dff32 to
a73074e
Compare
Summary: - The PR adds runtime-only external OAuth provenance to auth-profile stores, updates save/merge/read paths to ... e profiles in active snapshots while filtering disk persistence, and expands auth-profile regression tests. - PR surface: Source +381, Tests +974. Total +1355 across 8 files. - Reproducibility: yes. from source: current main writes the disk-filtered localStore into an existing runtime ... tches the reported credential drop path. I did not run a failing current-main repro in this read-only pass. Automerge notes: - PR branch already contained follow-up commit before automerge: Preserve runtime external auth snapshots Validation: - ClawSweeper review passed for head a73074e. - Required merge gates passed before the squash merge. Prepared head SHA: a73074e Review: openclaw#85558 (comment) Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR adds runtime-only external OAuth provenance to auth-profile stores, updates save/merge/read paths to ... e profiles in active snapshots while filtering disk persistence, and expands auth-profile regression tests. - PR surface: Source +381, Tests +974. Total +1355 across 8 files. - Reproducibility: yes. from source: current main writes the disk-filtered localStore into an existing runtime ... tches the reported credential drop path. I did not run a failing current-main repro in this read-only pass. Automerge notes: - PR branch already contained follow-up commit before automerge: Preserve runtime external auth snapshots Validation: - ClawSweeper review passed for head a73074e. - Required merge gates passed before the squash merge. Prepared head SHA: a73074e Review: openclaw#85558 (comment) Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR adds runtime-only external OAuth provenance to auth-profile stores, updates save/merge/read paths to ... e profiles in active snapshots while filtering disk persistence, and expands auth-profile regression tests. - PR surface: Source +381, Tests +974. Total +1355 across 8 files. - Reproducibility: yes. from source: current main writes the disk-filtered localStore into an existing runtime ... tches the reported credential drop path. I did not run a failing current-main repro in this read-only pass. Automerge notes: - PR branch already contained follow-up commit before automerge: Preserve runtime external auth snapshots Validation: - ClawSweeper review passed for head a73074e. - Required merge gates passed before the squash merge. Prepared head SHA: a73074e Review: openclaw#85558 (comment) Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR adds runtime-only external OAuth provenance to auth-profile stores, updates save/merge/read paths to ... e profiles in active snapshots while filtering disk persistence, and expands auth-profile regression tests. - PR surface: Source +381, Tests +974. Total +1355 across 8 files. - Reproducibility: yes. from source: current main writes the disk-filtered localStore into an existing runtime ... tches the reported credential drop path. I did not run a failing current-main repro in this read-only pass. Automerge notes: - PR branch already contained follow-up commit before automerge: Preserve runtime external auth snapshots Validation: - ClawSweeper review passed for head a73074e. - Required merge gates passed before the squash merge. Prepared head SHA: a73074e Review: openclaw#85558 (comment) Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary
saveAuthProfileStoredisk persistence filtered for runtime-only external CLI OAuth profilesanthropic:claude-cliremaining available in-process after save while staying out ofauth-profiles.jsonandauth-state.jsonFixes #85521
Real behavior proof
Behavior addressed: Saving an auth profile store with an active runtime snapshot no longer replaces in-process runtime state with the disk-filtered store, so runtime-only external CLI OAuth profiles such as
anthropic:claude-cliremain available after save while staying out of persisted local auth files.Real environment tested: Local OpenClaw checkout on macOS, Node via the repository test runner, using the real auth profile store implementation plus OpenClaw's external-auth runtime test hook to model a runtime-only external CLI OAuth profile.
Exact steps or command run after this patch:
Evidence after fix:
{ "persistedHasExternalProfile": false, "persistedHasLocalProfile": true, "persistedStateHasExternalOrder": false, "runtimeHasExternalProfile": true, "runtimeExternalAccess": "external-access", "runtimeExternalRefresh": "external-refresh", "runtimeOrderIncludesExternal": true, "runtimeLastGoodExternal": "anthropic:claude-cli" }Observed result after fix: The runtime-only external OAuth credential is absent from persisted auth files but still present in the active runtime snapshot immediately after
saveAuthProfileStore, so subsequent snapshot-backed auth resolution can still findanthropic:claude-cli.What was not tested: I did not launch a real Anthropic Claude CLI process or perform a live OAuth refresh against Anthropic; the proof exercises OpenClaw's auth store behavior directly with fake token material.
Author attribution
If this PR is squashed or reworked, please preserve author attribution for Andy Ye 35905412+TurboTheTurtle@users.noreply.github.com or include:
Co-authored-by: Andy Ye 35905412+TurboTheTurtle@users.noreply.github.com