Repository navigation
perf(boards): hydrate board.get widgets from one store snapshot - #114363
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 27, 2026, 2:12 AM ET / 06:12 UTC. ClawSweeper reviewWhat this changesThe PR changes Merge readiness⛔ Blocked until stronger real behavior proof is added - 3 items remain Keep open for normal maintainer review. The branch is a focused internal performance optimization with no definite defect found in the supplied diff, but it carries the protected Priority: P3 Review scores
Verification
How this fits togetherThe Control UI repeatedly requests a session board through the gateway. The gateway reads board state from memory or the per-agent SQLite store, then prepares permitted HTML widgets with sandbox metadata before returning the board response. flowchart LR
A[Control UI polling] --> B[Gateway board.get]
B --> C[Board store]
C --> D[Snapshot and HTML documents]
D --> E[Sandbox widget preparation]
E --> F[Board response]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +64, Tests +34. Total +98 across 5 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase onto current main, preserve the single-snapshot contract across both board stores, and attach redacted after-fix runtime or benchmark output showing Do we have a high-confidence way to reproduce the issue? No user-facing failure reproduction is applicable; source inspection of the supplied diff clearly identifies the prior Is this the best way to solve the issue? Likely yes: combining the snapshot and HTML-document retrieval at the board-store boundary keeps memory and SQLite behavior aligned and avoids request-time rereads without changing the gateway response contract; the rebased result and live measurement still need confirmation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0406e6636916. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
board.getis the Control UI's second-most-called method on team.openclaw.ai — 275 calls in 4h at avg 197ms (max 877ms), polled continuously by the workboard surface. Per request the handler read the board store once for the snapshot and then once more per admitted HTML widget to hydrate documents:1 + Hstore reads (SQLite enumeration + conversion) forHwidgets.Why This Change Was Made
One combined snapshot-and-HTML-documents read (
BoardSnapshotWithHtmlDocuments) serves the whole request: the gateway handler hydrates every admitted widget from the single snapshot instead of re-reading the store per widget. Document conversion and cloning semantics are unchanged; sandbox-origin caching stays request-local; memory and SQLite board stores keep parity (new parity regressions). RPC count and response shape are unchanged; fresh view tickets remain intact, so no protocol or revision short-circuit was introduced.User Impact
Board polling latency approaches a single snapshot-read cost; the win scales with widget count. Empty boards unchanged.
Evidence
gpt-5.6-sol, xhigh): clean, "patch is correct (0.94)".