Repository navigation
refactor(board): remove duplicate in-memory store - #117353
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 4:52 AM ET / 08:52 UTC. ClawSweeper reviewWhat this changesThis PR deletes the test-only in-memory board store and updates board, Gateway, HTTP, and canvas tests to use the SQLite-backed board store used by the production Gateway. Merge readinessKeep this actively assigned, Priority: P3 Review scores
Verification
How this fits togetherGateway board and canvas requests resolve a session key, then persist or retrieve widgets through the board store in an agent-scoped SQLite database. The new test fixture seeds canonical session ownership so tests traverse that durable storage boundary before handlers return board data or HTTP documents. flowchart LR
A[Gateway and canvas requests] --> B[Session key resolution]
B --> C[Board storage contract]
C --> D[SQLite board store]
D --> E[Agent SQLite database]
D --> F[Board snapshots and HTTP documents]
G[Board test fixture] --> C
Before merge
Agent review detailsSecurityNone. PR surfaceSource -207, Tests -45. Total -252 across 9 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the single SQLite-backed test path, validate the exact current-main merge result, and land once the focused board, Gateway, HTTP, and canvas suites confirm the shared fixture remains safe on the refreshed base. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR is internal test-owner cleanup rather than a report of broken user behavior. The supplied real Gateway restart transcript nevertheless demonstrates the durable board path after the change. Is this the best way to solve the issue? Yes. Removing the unused in-memory implementation makes tests exercise the same SQLite owner and session prerequisite that production Gateway code uses, avoiding parity drift between parallel stores. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fcaa9d48421e. LabelsLabel 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
HistoryReview history (6 earlier review cycles)
|
|
Merged via squash.
|
* origin/main: fix: stop lost cancellations, false success, and stuck Codex compaction (openclaw#117902) fix(cli): reject incomplete hosted video downloads (openclaw#117893) refactor(board): remove duplicate in-memory store (openclaw#117353) refactor: consolidate Teams and error helpers (openclaw#117907) fix(msteams): cancel unread Graph error response bodies (openclaw#117664) fix(imessage): rewind the recovery cursor when chat.db is replaced at the same path (openclaw#117788) feat(browser): relay CDP compat for Puppeteer clients (chrome-devtools-mcp) (openclaw#117915)
* origin/main: fix: stop lost cancellations, false success, and stuck Codex compaction (openclaw#117902) fix(cli): reject incomplete hosted video downloads (openclaw#117893) refactor(board): remove duplicate in-memory store (openclaw#117353) refactor: consolidate Teams and error helpers (openclaw#117907) fix(msteams): cancel unread Graph error response bodies (openclaw#117664) fix(imessage): rewind the recovery cursor when chat.db is replaced at the same path (openclaw#117788) feat(browser): relay CDP compat for Puppeteer clients (chrome-devtools-mcp) (openclaw#117915)
What Problem This Solves
The board test suite maintained a second, in-memory implementation of the board storage contract even though the Gateway only ships the SQLite-backed store. That duplicate path had accumulated its own cloning, grant, document, and generated-identity logic, letting tests exercise storage behavior that production never uses.
Why This Change Was Made
Remove the internal
InMemoryBoardStoreand its private helpers, then run every affected board, Gateway, HTTP, session-deletion, and canvas test againstSqliteBoardStore. A test-only fixture seeds real session ownership rows and canonicalizes shorthand session keys the same way the tested Gateway path expects.No public package/plugin-SDK export, database schema/version, configuration, or runtime behavior changes. Production code is +1/-256 (net -255); the complete patch is +116/-368 (net -252).
User Impact
No intentional user-visible behavior change. Board tests now cover the actual durable runtime owner, including session-key canonicalization, persistence, restart behavior, concurrent generated-name collisions, and deletion. This removes a parallel implementation that could drift from shipped behavior.
Evidence
check:changedpassed, including core/test typechecks, lint, formatting, dead-export scans, schema/database guards, and import-cycle checks.gpt-5.6-solautoreview atxhighreturned clean with no actionable P0-P2 findings (correctness 0.88).git diff --checkpassed;rg InMemoryBoardStorereturns no remaining references.checks-node-compact-small-2TUI PTY no-output watchdog, which repeated on one failed-job rerun. The same false stall is red onmainat the PR base and the nextmainrun; the latest preceding greenmainrun passed that shard here. Existing PR refactor(agents): make multi-agent ownership explicit (H2-1 core) #114388 contains the independent reporter fix; this board patch does not touch TUI code.aa743c9f818. There is no touched-path overlap between this patch's nine files andmainchanges through locally observed4e47c4cabf8; an optional rebase was skipped to preserve the tested exact SHA. The landing owner can refresh the base if repository merge policy requires it.Real Gateway restart transcript
Run on exact head
ba8e29439207in isolated Blacksmith Testboxtbx_01kyyhqzmhw9cqn9vzh280f3k3. The harness built the package, launched the real foreground Gateway with an ephemeral state directory/token, created a real session throughsessions.create, wrote throughboard.widget.put, read throughboard.get, stopped and restarted the Gateway process against the same state directory, read again, and independently queried the SQLite row. The temporary harness and state directory were deleted after the run.AI-assisted; I reviewed the implementation and validation evidence.