Skip to content

fix(sqlite): avoid cold-open waits when borrowing published actors - #173040

Merged
vincentkoc merged 2 commits into
mainfrom
fix/control-ui-owner-followup-20261015-01a13605
Oct 15, 2026
Merged

vincentkoc merged 2 commits into
mainfrom
fix/control-ui-owner-followup-20261015-01a13605

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Borrowing an already-open SQLite database waits behind the broker's global cold-open queue. If an unrelated cold open is awaiting its worker reply, an otherwise healthy published actor cannot accept a new client.

User Impact

Reusing a healthy SQLite actor no longer waits for unrelated cold-open replies. Unknown or unavailable actors still use serialized identity admission; capacity limits, cancellation, authority checks, and cleanup remain enforced.

Why This Change Was Made

The broker now recognizes a published, unsealed client for the requested path, revalidates physical identity and actor availability after asynchronous preparation, and attaches to that actor without entering cold admission. A stale candidate falls back to normal admission. Both paths retain input and client reservations and join the same shutdown drainage.

Evidence

  • Frozen source base: 33488188fcab94359d61e6b96b11b6ac0b91ddee.
  • Repair head: a8d36f46b9e260dd863b66b9f7e8c818ddf32df4.
  • The diagnostic head 99ac112c3e1289d9dcb1175619ddd86c6ea15937 was an unmeasured synthetic investigation, not a merge candidate. That diagnostic-only commit must never merge on its own.
  • Baseline CI actually selected and ran the broker regression: run 38721801736. The new test hit the existing 120-second deadline (120.031 seconds); all 15 sibling tests passed. File duration was 140.74 seconds, with 143.86 seconds scoped-wrapper wall time.
  • The regression withholds an actual cold-open reply, confirms the warm database remains readable, then borrows it through the public broker entry point. It checks actor continuity and continued use of the original client after the borrowed client closes.
  • Final formatted source passed independent AutoReview with no actionable P0-P2 findings; oxfmt 0.72.0 and git diff --check passed.
  • Repaired exact-head CI selected and executed the regression: borrowAndWriteMs: 3.517348000000311, coldReplyHeld: true. The test passed in 803 ms; all 16 broker tests passed, file duration 11.97 seconds, scoped-wrapper wall time 13.52 seconds. Actor continuity and continued original-client use passed before the cold reply was released.
  • Capacity tests: 10/10 passed, including queued/reused drainage (2 ms/1 ms); file duration 2.88 seconds, wrapper 4.33 seconds. All selected Node test jobs, production/test typechecks, lint, and security checks passed.
  • Exact-head CI completed with an inherited UI failure: session-management.sidebar.e2e.test.ts / nests spawned sessions (personal pin false and true), expected 4 child rows to be 0. Both fail identically in scheduled main CI; the tested merge retains the baseline parent's entire ui tree. The automated job-name classifier reports unknown; the direct test comparison above supplies the attribution. The native inherited-failure exception is used; CI is not represented as green.
  • Dependency-backed local tests are restricted for this investigation; normal PR CI is the approved proof route. Local test wall time is unmeasured.

All inputs are synthetic. This reproduces a source-level admission blockage; it does not attribute production latency tails. No schema, protocol, dependency, or configuration changes.

@vincentkoc vincentkoc self-assigned this Oct 15, 2026
@clawsweeper

clawsweeper Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review October 15, 2026 10:39
@vincentkoc vincentkoc changed the title chore(sqlite): investigate warm handle admission delays fix(sqlite): avoid cold-open waits when borrowing published actors Oct 15, 2026
@vincentkoc
vincentkoc merged commit aeffc9e into main Oct 15, 2026
140 of 145 checks passed
@vincentkoc
vincentkoc deleted the fix/control-ui-owner-followup-20261015-01a13605 branch October 15, 2026 11:11
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 16, 2026
…penclaw#173040)

* test(sqlite): reproduce warm handle admission blocking

* fix(sqlite): bypass cold admission for published actors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant