Skip to content

[Bug]: Missing database-first legacy-store guard script #91628

Description

@galiniliev

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

The database-first validation plan references pnpm check:database-first-legacy-stores, but the package script is missing, leaving no reliable CI guard against reintroducing legacy runtime state stores.

Steps to reproduce

  1. Check the package scripts for check:database-first-legacy-stores.
  2. Run the database-first SQLite validation plan's referenced proof command.
  3. Observe that the command is unavailable, so the plan falls back to noisy manual searches.

Expected behavior

pnpm check:database-first-legacy-stores should exist and fail new runtime source that writes legacy session/transcript/state/cache stores outside doctor, migration, or explicit fixture owners.

Actual behavior

The script is missing. The SQLite plan execution recorded the proof as missing and noted that manual searches produced too much noise to serve as a regression guard.

OpenClaw version

2026.6.2 source checkout at 6fcc9457020e5a9cb21ba2dbceb010a765a3335d

Operating system

Linux

Install method

Source checkout using pnpm

Model

NOT_ENOUGH_INFO

Provider / routing chain

NOT_ENOUGH_INFO

Additional provider/model setup details

NOT_ENOUGH_INFO

Logs, screenshots, and evidence

Source: SQLite plan execution
RAW: MISSING check:database-first-legacy-stores

Source: SQLite plan local summary
RAW: check:database-first-legacy-stores: missing; manual searches captured
RAW: manual legacy hits: 13095
RAW: manual state write hits: 1224

Source: docs/refactor/database-first.md
RAW: docs/refactor/database-first.md references check:database-first-legacy-stores as database-first proof.

Impact and severity

Affected: database-first architecture validation for core and plugin runtime state changes.

Severity: High, because focused SQLite store tests can be green while runtime legacy file writes are reintroduced without an early CI failure.

Frequency: Always, until the package script and guard are added.

Consequence: Runtime sessions.json, transcript JSONL, sidecar SQLite, and JSON/JSONL state/cache regressions can slip through normal check paths.

Additional information

The observed local bug bundle contained no secrets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.bugSomething isn't workingclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.maintainerMaintainer-authored PR

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions