Skip to content

fix: accept first chat while the model catalog loads - #201127

Merged
RomneyDa merged 4 commits into
mainfrom
openclaw/land-message-buffer-fix
Nov 18, 2026
Merged

RomneyDa merged 4 commits into
mainfrom
openclaw/land-message-buffer-fix

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The first message in a fresh chat can fail with an unavailable session-facts error when background model discovery creates the agent database between capturing and consuming the message's initial facts.

User Impact

User impact: the first chat message, including captions and attachments, can be accepted reliably while the model catalog is still loading. No configuration or migration is required.

Why This Change Was Made

Prepare the agent database through its existing execution owner before publishing a configured model owner that may start catalog discovery. Read-only and refused write admission remain unchanged; catalog discovery stays asynchronous.

The existing real-Gateway message-buffer test now forces the independent catalog save between initial fact capture and consumption. Lifecycle-only fixtures mock only the new preparation call, preserving all other exports and real persistence in the Gateway regression. The real retirement fixture initializes its empty auth store before injecting the synthetic snapshot, preserving persisted-source provenance and all retirement assertions.

Evidence

  • Causal frozen-base reproduction: first-chat catalog race fails before the repair and passes afterward; 11 message/caption/attachment/error cases and 94 negative guards passed.
  • Current-main startup/catalog/cancellation/database admission proof: 84 tests passed, including read-only startup, supersession, and the exact adopted-auth case.
  • The adopted-auth fixture initially timed out with real persistence introduced; pristine current-main passed, and the reviewed export-preserving fixture adaptation passed. Raw failure retained.
  • Targeted lint, format, diff checks and gateway-server/agents-root typechecks passed.
  • Independent fresh review: no confirmed production P0–P2 findings. Local ClawSweeper/Codex CLI unavailable; independent narrative autoreview fallback used, with its machine-isolation limitation recorded.
  • Current-main real-Gateway regression passed (21.1s test, all message/history/artifact assertions). The first isolated attempt failed before exercising behavior because its sandbox ancestor was group/world writable; retained raw output, then selected private creation permissions without changing the runner or production safeguards.
  • CI run 44282115138 exposed a retirement fixture with no persisted auth source. The exact case passed on the old build (724ms), failed before fixture correction (1632ms), then all three real retirement tests passed after correction (failing case 1272ms). Independent review confirmed the source-provenance diagnosis and the exact eight-line correction. No production auth invalidation, persistence, or abort assertions were mocked or weakened. The pending auto-merge was cancelled before publishing the correction; raw failures are retained.

This is a narrowly scoped ordering repair. It adds no new schema, state owner, retries, or compatibility path. Separate release startup/upgrade failures are not represented as fixed by this change.

RomneyDa and others added 2 commits November 18, 2026 10:05
Prepare configured-owner storage before publication so independent catalog persistence cannot invalidate captured first-chat facts. Preserve read-only admission and isolate lifecycle-only fixtures from persistence.

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 1aa06656-e8e7-4f6d-8b15-8926f6f1acae
@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 complete

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

View the workflow run.

@RomneyDa
RomneyDa marked this pull request as ready for review November 18, 2026 10:05
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling size: S labels Nov 18, 2026
@RomneyDa
RomneyDa enabled auto-merge (squash) November 18, 2026 10:10
@RomneyDa
RomneyDa disabled auto-merge November 18, 2026 10:17
RomneyDa and others added 2 commits November 18, 2026 10:18
Initialize the isolated empty auth store before injecting its runtime snapshot so early database preparation does not correctly invalidate unproven first-file state.

Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: ac4fbefa-cfe9-438b-8cb9-ae11a7923cea
@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 8c4fcb8 into main Nov 18, 2026
137 checks passed
@RomneyDa
RomneyDa deleted the openclaw/land-message-buffer-fix branch November 18, 2026 10:35
@RomneyDa

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 19, 2026
* fix: accept first chat while the model catalog loads

Prepare configured-owner storage before publication so independent catalog persistence cannot invalidate captured first-chat facts. Preserve read-only admission and isolate lifecycle-only fixtures from persistence.

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

* fix: accept first chat while the model catalog loads

OpenClaw-Publication: 1aa06656-e8e7-4f6d-8b15-8926f6f1acae

* test: persist auth source before catalog retirement fixture

Initialize the isolated empty auth store before injecting its runtime snapshot so early database preparation does not correctly invalidate unproven first-file state.

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

* Publish openclaw/land-message-buffer-fix

OpenClaw-Publication: ac4fbefa-cfe9-438b-8cb9-ae11a7923cea

---------

Co-authored-by: RomneyDa <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 19, 2026
* fix: accept first chat while the model catalog loads

Prepare configured-owner storage before publication so independent catalog persistence cannot invalidate captured first-chat facts. Preserve read-only admission and isolate lifecycle-only fixtures from persistence.

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

* fix: accept first chat while the model catalog loads

OpenClaw-Publication: 1aa06656-e8e7-4f6d-8b15-8926f6f1acae

* test: persist auth source before catalog retirement fixture

Initialize the isolated empty auth store before injecting its runtime snapshot so early database preparation does not correctly invalidate unproven first-file state.

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

* Publish openclaw/land-message-buffer-fix

OpenClaw-Publication: ac4fbefa-cfe9-438b-8cb9-ae11a7923cea

---------

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 8c4fcb8)
Release adaptation: Move source fixture setup into the baseline relocated scope integration test; no test duplication.:
Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit c618a1f5966a34f5cc4cee65981c76c4d75d4356)
tideclaw-bot added a commit that referenced this pull request Nov 24, 2026
Baseline adaptation: Prepare configured writable agent storage before the catalog owner is visible; the pinned native execution owner supplies its captured creation reference and startup read-only owners retain read-only custody.

(cherry picked from commit 8c4fcb8)

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 98f2d7b31fa7ece0055636b07214110fc8f3a078)
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. gateway Gateway runtime size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant