Repository navigation
refactor(workboard): use canonical queries for card-tree writes - #139106
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 5, 2026, 10:37 AM ET / 14:37 UTC. ClawSweeper reviewWhat this changesWorkboard card saves replace handwritten SQL with the shared query builder while preserving existing SQLite persistence behavior. Warning SQLite table change This PR modifies persisted SQLite tables in Merge readiness⛔ Blocked before merge - 3 items remain Keep open: this remains useful, distinct work absent from current main, and the inspected patch has no actionable correctness findings. Priority: P3 Review scores
Verification
How this fits togetherWorkboard stores task cards and their associated records in a plugin-owned SQLite database. CLI, Gateway, and agent-tool mutations pass through its store, which checks revisions and claims before committing changes. flowchart TD
A[CLI and Gateway requests] --> B[Workboard store]
B --> C[Revision and claim checks]
C --> D[Card and child queries]
D --> E[Native SQLite transaction]
E --> F[Stored cards and associated records]
E --> G[Mutation result and change notification]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -8. Total -8 across 1 file. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep card-tree persistence on the existing compile/bind helper and native transaction owner, preserving the current stored representation and preparation order. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR removes duplicated query construction rather than reporting broken behavior; no introduced defect was established. Is this the best way to solve the issue? The owner boundary and shared-helper choice are appropriate; eager value construction would lose the preserved preparation order. A final best-solution judgment remains limited by unavailable upstream Kysely source. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against bcecb3d1d19a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
I completed direct inspection of the installed Kysely 0.29.5 compiler, insert-values-parser, update-set-parser and on-conflict builder. Bound values retain their identity through SQL-order parameter collection; the SQLite compiler emits The data-model warning is a classifier false positive: this PR changes query construction, not tables. I byte-compared the complete schema DDL, column ensure, schema migration and database open/close block against the merge base; it is unchanged (SHA-256 da78125331ec5f35f3cadacaabd0d21e437234411b3be94936f68a18a807b7b2). Schema version remains 3. Stored field mappings and all conflict columns also match. No migration is required. Twelve actual native baseline/candidate cases preserve complete rows, errors and traces, including reopen, rollback, attachment identity and CAS/claim outcomes; existing-database persistence was also exercised across three real Gateway starts with the same card and 72 KiB attachment bytes. The 191 focused tests, full changed gate, official CLI/Gateway proof and sixteen independent clean review reports cover this unchanged head. These checks resolve the dependency-inspection and data-model notes; no schema approval or review-policy exception is needed. |
|
Merged via squash.
|
* commit '3e4becea5e2ce38ede69e8ecf5302805ecbfc09c': refactor: simplify outbound message execution context (openclaw#139107) fix(models): keep ordinary chat selections session-scoped (openclaw#139232) docs: slim root agent instructions and clarify testing scope (openclaw#139236) test(agents): give the sibling-drain completion wait a tolerance on slow runners (openclaw#139176) refactor(workboard): use canonical queries for card-tree writes (openclaw#139106) fix(canvas): recognize versioned macOS nodes (openclaw#138958) fix: load GitHub connections without a default agent (openclaw#139222) fix(memory): explain unsafe legacy host-event path recovery (openclaw#139195) refactor(talk): centralize typed voice session queries (openclaw#139103) fix(cli): preserve command dispatch and structured errors (openclaw#139067) refactor(agents): consolidate reply failure summaries (openclaw#139175) fix(auth): keep an unset default model unchanged during login (openclaw#139218) perf(media): reuse validated attachment read handles (openclaw#139168) refactor(channels): simplify account configuration updates (openclaw#139096) refactor(android): remove unused updater export root (openclaw#139198) fix(gateway): stop admitting post-ready producers during close (openclaw#139092) fix(gateway): expose agent hook completion outcomes (openclaw#139155) fix(config): return the saved configuration after plugin install commits (openclaw#139203) fix(android): reduce repeated retries to unreachable gateways (openclaw#138732)
What Problem This Solves
Workboard card saves maintained the same fields in handwritten SQL column lists, placeholders, conflict assignments, and separately ordered bindings. That duplication made changes across the parent and child records harder to keep consistent.
Why This Change Was Made
Construct the existing card-tree writes through the canonical Kysely compile/bind helper. Each field now sits beside its value; the parent still binds 33 values once and updates the same 32 non-key columns through
excluded. Native SQLite still prepares and executes each statement, with payload getters and JSON serialization evaluated after preparation.The existing transaction, child replacement/ordinal order, attachment identity, CAS/claim checks, decoder, and close owners remain unchanged. No schema, API, configuration, retention, or concurrency changes. Production delta: +245/-253 (net -8); no test-source changes.
User Impact
No user-visible behavior change. Existing Workboard CLI, Gateway, card, attachment, and worker-claim operations retain their persistence behavior.
Evidence
entry.cardId, absent/stale/exact writes, all claim outcomes, prepare-before-getter/JSON behavior, native prepare denial, and reopen. The executed parent statement has 33 bindings and 32 excluded updates.check-changedgate passed, including production/test types, plugin boundaries, lint, doctor contracts, dead exports, storage guards, and import cycles.create/move/showand authenticated native Gateway operations passed across three starts: cross-process write visibility, exact/stale update, comment, 72 KiB attachment, claim/heartbeat/release, wrong-token rejection, byte-identical restart readback, and deletion/restart with unrelated card/blob retained. Nativequick_checkpassed; owned processes and proxy closed.The live harness uses one completed build plus the official
openclaw.mjspackage entry and waits for/readyz. Two earlier harness attempts (development-wrapper rebuild race and TCP-before-sidecars readiness) are retained separately; neither required a production change. No external provider or worker was invoked.Independent review found no P0–P2 findings.