Skip to content

test(state): reuse legacy database fixtures - #119423

Merged
steipete merged 2 commits into
mainfrom
codex/test-perf-compact-large-7-owner
Aug 5, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/test-perf-compact-large-7-owner

Conversation

@steipete

@steipete steipete commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • build one closed, integrity-checked v13 agent database template and clone it for legacy migration cases
  • let verifier apply-time race tests consume prepared advisory failures because the production owner always reconfirms the current pathname
  • keep the live-WAL state integration while relying on the stronger readonly-location owner suite for sidecar-free and missing-SHM snapshot mechanics

Why

The agent migration tests rebuilt the full current schema and then executed the same test-only reverse migration for every legacy case. Verifier race tests repeatedly classified corruption even though applyOpenClawDatabaseVerificationResults deliberately ignores advisory error details and reconfirms the authoritative file. Two state-wrapper WAL cases duplicated lower-level snapshot invariants already covered at their owning boundary.

The new template is checkpointed, sidecar-free, and verified for integrity, foreign keys, schema version, owner identity, and expected v13 tables before any clone is used. Every production migration, reopen, registration, ownership, WAL, and quarantine path remains real.

Proof

  • focused changed suites: 221 passed, 5 skipped
  • readonly-location owner plus cache suite: 16 passed
  • final full core-unit-src-security: unit-src 341 passed files, 2 skipped files, 4,227 passed tests, 12 skipped tests; unit-security 35 passed files and 254 passed tests
  • controlled same-path A/B with identical source bytes, cache, configs, and three workers: 163.48s baseline to 152.41s candidate, saving 11.07s
  • local fallback check:changed: clean
  • autoreview: clean, no accepted or actionable findings

The two removed wrapper tests are duplicate integration assertions; their WAL snapshot mechanics remain covered in src/infra/sqlite-readonly-location.test.ts, and src/state/openclaw-state-db.test.ts retains the live-WAL integration. Production LOC delta is zero; the test diff is net -66 lines.

No changelog entry: test-only performance work.

@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Aug 5, 2026
@steipete steipete self-assigned this Aug 5, 2026
@steipete
steipete merged commit c8730c7 into main Aug 5, 2026
117 checks passed
@steipete
steipete deleted the codex/test-perf-compact-large-7-owner branch August 5, 2026 02:51
@steipete

steipete commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 5, 2026
* origin/main: (22 commits)
  refactor(plugins): consolidate lifecycle hook dispatch (#119429)
  fix(ci): stabilize TUI PTY proof ownership (#119420)
  test(system-agent): reduce suite setup overhead (#119424)
  fix(ui): keep session rail pill status from overlapping the headline (#119397)
  fix(discord): avoid doctor runtime loading (#119391)
  fix(media): decouple playback cache retention (#119417)
  fix(slack): infer upload filename extensions from MIME types (#119399)
  refactor(channels): unify configured binding resolution (#119414)
  refactor(google-meet): unify gateway and tool dispatch (#119413)
  test(state): reuse legacy database fixtures (#119423)
  fix(reset): preserve bootstrap guidance for dynamic models (#119179)
  fix(chutes): honor serving context limits (#119196)
  refactor(status): consolidate scan projections and lazy loaders (#119412)
  fix(status): status --all slows down with missing plugins (#119203)
  refactor(gateway): consolidate usage reporting and caches (#119409)
  perf(gateway): keep reload and recovery machinery off gateway cold start (#119094)
  fix(cli): align TaskFlow controller columns for wide text (#118801)
  fix: make startup migration restart guidance install-neutral (#119406)
  fix(ci): preserve cache warmer shard envelopes (#119403)
  fix(sessions): preserve compatible auth profiles on model changes (#117550)
  ...
steipete added a commit that referenced this pull request Aug 5, 2026
* test(state): reuse legacy database fixtures

* test(state): use tracked temp fixture

---------

Co-authored-by: Peter Steinberger <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 5, 2026
* test(state): reuse legacy database fixtures

* test(state): use tracked temp fixture

---------

Co-authored-by: Peter Steinberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant