Repository navigation
test(state): reuse current agent database fixture - #118677
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 9:34 AM ET / 13:34 UTC. ClawSweeper reviewWhat this changesReuses a validated per-worker agent SQLite database template for selected schema-drift and repair tests while retaining fresh-database coverage for initialization and lifecycle cases. Merge readinessKeep this focused test-performance refactor open for the assigned maintainer and exact-head CI. The branch reuses a closed, integrity-checked current-schema agent database only in test setup, and review found no introduced correctness or security defect. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw stores agent-scoped runtime state in per-agent SQLite databases. These tests create controlled database drift, then exercise the production opener's validation, repair, quarantine, and ownership checks against those files. flowchart LR
A[Fresh test state directory] --> B[Validated agent database template]
B --> C[Per-test database copy]
C --> D[Injected schema drift]
D --> E[Production agent database opener]
E --> F[Repair or rejection assertions]
E --> G[SQLite integrity and owner checks]
Decision needed
Why: The patch is narrowly scoped and source review found no defect, but the protected maintainer label requires explicit maintainer handling rather than automated cleanup. Before merge
Agent review detailsSecurityNone. PR surfaceTests +40. Total +40 across 1 file. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Land the focused test-only fixture reuse after the remaining exact-head checks are green, retaining the explicit checkpoint, sidecar cleanup, and validation guardrails that preserve isolation. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR optimizes test setup rather than reporting a user-facing defect. The PR body supplies a direct full-suite timing comparison and a focused test result, but this read-only review did not execute tests. Is this the best way to solve the issue? Yes. Reusing a validated closed database keeps the selected drift tests on the real production reopen path while avoiding repeated initialization; the untouched tests continue to cover fresh-database lifecycle behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1acc64b28a18. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* origin/main: (57 commits) fix(media): fall back when providers return empty output (#118660) fix(nextcloud-talk): allow bounded parallel room deliveries (#118692) test(state): reuse current agent database fixture (#118677) fix(scripts): bound check-file-utils git lookup (#111582) fix(slack): scope interactive conversation bindings safely (#118662) fix(agents): avoid false compaction after mid-turn precheck (#117963) fix(ui): show original filename on chat history attachment cards instead of managed UUID suffix (#118628) fix(whatsapp): preserve terminal retry exhaustion lifecycle (#118659) fix(doctor): audit every agent workspace (#111840) fix(release): skip unavailable Buzz on frozen candidates (#118670) fix(ui): surface onboarding and pairing clipboard failures (#118651) fix(config): stop plugin schemas rejecting the channel key core writes (#117992) test(memory): isolate wiki plugin fixtures (#118654) fix(line): clear default access token when removing account (#118055) feat: enable rich setup controls in custodian chat (#114631) test(ui): reuse responsive browser fixtures (#118655) chore(tui): stabilize queued-turn admission in Gateway PTY test (#118638) fix(xai): classify exhausted credits as billing (#118615) fix(otel): fail closed when configured TLS material is invalid (#118648) fix(cli): preserve gateway request errors in health JSON (#118645) ...
Co-authored-by: Peter Steinberger <[email protected]>
* origin/main: (57 commits) fix(media): fall back when providers return empty output (openclaw#118660) fix(nextcloud-talk): allow bounded parallel room deliveries (openclaw#118692) test(state): reuse current agent database fixture (openclaw#118677) fix(scripts): bound check-file-utils git lookup (openclaw#111582) fix(slack): scope interactive conversation bindings safely (openclaw#118662) fix(agents): avoid false compaction after mid-turn precheck (openclaw#117963) fix(ui): show original filename on chat history attachment cards instead of managed UUID suffix (openclaw#118628) fix(whatsapp): preserve terminal retry exhaustion lifecycle (openclaw#118659) fix(doctor): audit every agent workspace (openclaw#111840) fix(release): skip unavailable Buzz on frozen candidates (openclaw#118670) fix(ui): surface onboarding and pairing clipboard failures (openclaw#118651) fix(config): stop plugin schemas rejecting the channel key core writes (openclaw#117992) test(memory): isolate wiki plugin fixtures (openclaw#118654) fix(line): clear default access token when removing account (openclaw#118055) feat: enable rich setup controls in custodian chat (openclaw#114631) test(ui): reuse responsive browser fixtures (openclaw#118655) chore(tui): stabilize queued-turn admission in Gateway PTY test (openclaw#118638) fix(xai): classify exhausted credits as billing (openclaw#118615) fix(otel): fail closed when configured TLS material is invalid (openclaw#118648) fix(cli): preserve gateway request errors in health JSON (openclaw#118645) ...
Summary
Performance
Direct AWS Crabbox full unit-src comparison on the same lease:
The first patched run exposed a zero-length WAL sidecar. The final helper checkpoints and closes the template, rejects nonempty WAL content, removes closed sidecars, and then verifies integrity, foreign keys, schema version, and the exact owner before reuse.
Proof
The changed-check remote router could not allocate a configured backend; PR CI is the broader gate.