Skip to content

fix: preserve credentials while preparing model catalogs - #201229

Merged
RomneyDa merged 2 commits into
mainfrom
openclaw/land-frv11-lifecycle-ordering
Nov 18, 2026
Merged

RomneyDa merged 2 commits into
mainfrom
openclaw/land-frv11-lifecycle-ordering

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Model authentication operations can lose the credential snapshot they just captured when preparing a newly created agent database. A concurrent config reload and logout can consequently return without the expected configured profiles.

User Impact

Authentication and catalog preparation now admit their writable local storage before capturing credentials. No configuration changes, migration, or user action are required.

Why This Change Was Made

Move the existing guarded database-admission step ahead of workspace/auth capture, retaining the same refusal, read-only, generation, and cancellation checks. Discovery remains asynchronous. The accepted firstbirth fixture fix from #201176 is unchanged.

Evidence

  • Reproduced on main fab709100ef164ae66a345cf784483eaff349728: the existing hybrid auth-logout/config-reload regression failed at models-auth-removal.integration.test.ts:299 because the expected profiles were undefined.
  • With this production-only change, all 37 tests in the auth-removal, catalog OAuth peers, firstbirth, and cancelled-admission suites pass on both Node 26 and pinned Bun. The existing hybrid logout regression is now green; both unchanged firstbirth cases pass.
  • Targeted formatting, lint, core typecheck, and git diff --check pass.
  • Canonical autoreview (OpenClaw engine, P0–P3) reviewed the complete local change against fab709100ef164ae66a345cf784483eaff349728: scoped-clean, no findings. Coverage is the supplied diff; unchanged surrounding modules were not included in that automated review. Published head 49608cd36679ba5c7f5d53528d4ab855e8f1dd8a has the identical tested/reviewed tree 6ed976abef462d15e0a913dc3d685e791f241cb2.
  • Simplification: this only relocates existing guarded admission; no added helper, state owner, retry, or public contract. Existing production-path regression coverage is reused.
Focused validation
# Run once with each runtime: node and bun
OPENCLAW_VITEST_RUNTIME=node node scripts/run-vitest.mjs run src/agents/prepared-model-catalog-worker.oauth-peers.integration.test.ts src/gateway/server-methods/models-auth-removal.integration.test.ts src/gateway/server.sessions.create.firstbirth.test.ts src/agents/prepared-model-runtime.cancelled-admission.test.ts --maxWorkers=1 --reporter=verbose
node scripts/run-format.mts --check src/agents/prepared-model-runtime.build.ts
node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/agents/prepared-model-runtime.build.ts
node scripts/run-tsgo.mjs -p tsconfig.core.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/lifecycle-core.tsbuildinfo
git diff --check

RomneyDa and others added 2 commits November 18, 2026 13:30
Admit configured writable agent storage before auth capture so database creation cannot retire the credential snapshot being built. Retain existing refusal, read-only, and cancellation guards.

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 6455fc6e-8501-4334-9e58-761b670b9554
@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review ended

ClawSweeper stopped reviewing this revision because the pull request closed.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: XS labels Nov 18, 2026
@RomneyDa
RomneyDa marked this pull request as ready for review November 18, 2026 13:31
@RomneyDa
RomneyDa enabled auto-merge (squash) November 18, 2026 13:33
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 18, 2026
@RomneyDa
RomneyDa merged commit 2272c09 into main Nov 18, 2026
206 checks passed
@RomneyDa
RomneyDa deleted the openclaw/land-frv11-lifecycle-ordering branch November 18, 2026 13:45
@RomneyDa

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

RomneyDa added a commit that referenced this pull request Nov 18, 2026
* fix: preserve credentials while preparing model catalogs

Admit configured writable agent storage before auth capture so database creation cannot retire the credential snapshot being built. Retain existing refusal, read-only, and cancellation guards.

Co-authored-by: RomneyDa <[email protected]>

* fix: preserve credentials while preparing model catalogs

OpenClaw-Publication: 6455fc6e-8501-4334-9e58-761b670b9554

---------

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 2272c09)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 19, 2026
…1229)

* fix: preserve credentials while preparing model catalogs

Admit configured writable agent storage before auth capture so database creation cannot retire the credential snapshot being built. Retain existing refusal, read-only, and cancellation guards.

Co-authored-by: RomneyDa <[email protected]>

* fix: preserve credentials while preparing model catalogs

OpenClaw-Publication: 6455fc6e-8501-4334-9e58-761b670b9554

---------

Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant