Skip to content

refactor(storage): retire low-value persistence paths and redundant restore hydration #1177

Closed

Description

@XuPeng-SH

Problem

Several persistence paths no longer have a production owner or useful current consumer: DB CSL duplicates canonical Server Context/Run ownership; cloud session_checkpoints has readers but no production writer; the skill-selection hook copies user queries and records fixed successful execution; Sandbox CRUD stores metadata without provisioning; Marketplace metrics add an unused global report/ranking projection.

These paths retain tables, SQL, runtime wiring and feature-specific tests. Full Server resume also hydrates legacy checkpoint state before replacing it with canonical Context.

Intended change

Retire these five fresh-schema tables and their complete application paths. Require validated owner-scoped canonical Context before Server Session activation. Preserve CLI local recovery, Run checkpoint custody, decision auditing, selected-skill runtime behavior, observer dispatch, actual execution isolation, skill registry/install/personal evaluation, and ordinary data versioning.

Correct the SDK resume return contract to match canonical hydration. No compatibility shims, schema version bump, replacement tables or migration machinery. Removing documented Sandbox metadata and Marketplace report/stats/ranked-search endpoints is an intentional product cut. Existing physical tables and historical data are not mutated; deployment and historical-data retention are outside this source cleanup.

Acceptance

Fresh real MatrixOne schema omits the retired tables; public canonical restore fails without activation on missing/corrupt/foreign state; retained behavior and deletion fencing pass targeted tests; ordinary chat SQL budget does not regress. Report source-derived savings separately from measured SQL and do not claim the broader wide-row write-amplification problem is solved.

Related: #1124 (broader SQL overhead; this issue does not replace its remaining scope).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions