Repository navigation
refactor(storage): retire redundant state and optional product chains - #1182
Conversation
XuPeng-SH
left a comment
There was a problem hiding this comment.
Code-review verdict: approve for head 688c025ea112ee514858daa0fe6e34c8ac6537b4; no blocking correctness or design finding.
This is deliberate feature retirement for fresh, same-version deployments. The ownership changes are coherent: immutable graph manifests already own edges; retained criterion revision 1 and its owner/Work-scoped primary key fence identity reuse. Retired products are removed through schema/bootstrap/cleanup, routes, workers, DTOs, SDK and Web consumers rather than replaced with another projection or state machine. Canonical Context, durable provider receipts, invocation recovery, saved progress, authorization and generic artifact-reference custody retain their owners. The extracted Git observation/locking/hash/path core is unchanged. The lost Work exact-reviewed patch transfer/commit guarantee and diagnostic-only artifact pins are documented explicitly.
Performance assessment: no new application hot-path SQL or background worker. Run projection removes two diagnostic reads; Session state removes those plus the latest-manifest reads. Criterion admission keeps one indexed query against the retained revision authority. Trace-gated diagnostic writes and unconditional hash-diff planning disappear; production defaults already disabled the diagnostic writes, so this does not establish a per-turn physical-write multiplier or 1,000-Session capacity result.
Fresh verification for this review: 45 schema-inventory tests; 74 workspace-observation tests including real Git and cross-process coordination; five observation hash/classification unit tests; 18 real MatrixOne criteria/collision/schema cases, including concurrent CAS, identity reuse after set replacement, replay, owner isolation, rollback and idempotent fresh bootstrap. All ten retired tables were absent, and the task-owned database was dropped. SDK typecheck/build and 159 client/Work tests passed; 65 relevant Web tests and Web typechecking against this checkout's newly built SDK declarations passed. Formatting and diff whitespace checks passed. Worktree is clean. Earlier broader artifact/provider/HTTP/100-Session evidence was checked against the retained source: none of this PR's production files changed after its original delivery; the intervening changes to PR files are build-identity adjustments in two tests and documentation. Those earlier runs are not claimed as fresh executions here.
No existing PR discussion comments or review threads needed resolution at review start. No CI rerun/wait, source changes, or subagents. No whole-workspace gate, TSan, or 1,000-Session benchmark is claimed.
Submission note: GitHub rejected the APPROVE submission with HTTP 422 (Review Can not approve your own pull request), because the authenticated account and PR author are both XuPeng-SH. Recording the completed review as COMMENT; this is not a formal GitHub approval.
Capability assessment: Updated: retire optional cloud prompt hash-diff and persisted Context-manifest diagnostics, legacy database-versioning HTTP checkpoints/lineage, and Work Git patch export/application/commit in fresh same-version deployments. Update API, storage, Context, Work journey, baseline and coverage references; preserve canonical execution/recovery, live Context traces, actual provider receipts and saved progress.
Summary
Retire complete low-value persistence products and two duplicate Work representations. The complete production schema inventory falls from 131 to 121 declarations (individual bootstrap boundaries initialize subsets) with no replacement cache, storage path or worker:
Run projection avoids two diagnostic reads; Session state avoids those two plus one/two latest-manifest reads. Work pages no longer issue two/three patch reads. Diagnostic writes were trace-gated and production defaults already disabled them; this does not claim every production exchange saves writes or quantify engine physical write amplification.
Related issue
Closes #1180
Change type
User and compatibility impact
This is deliberate feature retirement, not a behavior-preserving cleanup. The retired diagnostic fields and products are unavailable; diagnostic-only artifact pins no longer extend custody. Work patch review/application/commit is removed. Ordinary authorized Git/Runner operations remain, but do not offer the removed exact-reviewed transfer/commit guarantee.
Fresh empty database and same-version deployment only. No compatibility shims, migrations, new schema marker, old-table cleanup or engine snapshot cleanup. Historical strict request-context payloads are not supported. Old Git workers must stop and old pending effects must be handled by the old deployment before handing a workspace to a new deployment.
Architecture and complexity delta
Verification
-D warnings) over all targets of the eight changed Rust packages, including Runtime e2e/MOI features; Rust format, SDK/Web type checks and SDK build. Final complete-diffgpt-6.1-terra/maxdesign and overall review found no unresolved material blocker; formatting and final Clippy exited 0. No claim of the whole namedmake check/test-offlinetargets.ASTRA_TEST_DB_ITfor normal units, selecting the existing 10s test reconciliation timeout instead of 50ms. The failed capacity case passed in its intended environment; all 52 settlement-module tests subsequently passed with the DB flag unset. Do not interpret this as one successful whole-Runtime command. An additional pre-existing first-request fixture timeout led to moving Client/TLS construction outside the unchanged 1s provider-start window and reporting early caller errors; its exact earlier timing cause is unproven, and no production timeout changed.Final checklist