-
Notifications
You must be signed in to change notification settings - Fork 4
Migration and Compatibility
Language: English · 简体中文
LWC upgrades preserve canonical knowledge first, rebuild derived state when necessary, and migrate only integration fragments it can prove it owns. Compatibility does not mean that an older binary may safely write a newer Store.
| Layer | Compatibility rule |
|---|---|
| CLI JSON | Existing codes and fields remain machine-readable; additive fields are allowed |
| SQLite Store | Supported older schemas migrate transactionally to the current format |
| Config | Older supported files are read and upgraded on a later write |
| Markdown, FTS, spans, graph | Derived state may be rebuilt from canonical SQLite |
| Changesets and checkpoints | Integrity metadata and inverse payloads remain verifiable across supported versions |
| Agent integration | Owned legacy fragments migrate; foreign content is preserved or reported as a conflict |
| CodeGraph | Pinned runtime upgrades are separate from project index compatibility |
The running binary and current source tree are authoritative. Internal version numbers are implementation details; do not write automation that assumes them.
Use the same project and user account that own the Wiki:
lwc --version
lwc --scope project lint
lwc --scope project work list
lwc --scope project graph verify
lwc --scope project checkpoint create pre-upgradeWait for active mutations before changing binaries. A checkpoint protects canonical SQLite, not external Sources or user-owned Agent configuration; back those up through their native systems when needed.
Use the same distribution channel that installed LWC. Afterward:
lwc --version
lwc --scope project context --limit 1
lwc agent refresh --target auto --location global
lwc agent status --target all --location globalThe first command that encounters a supported legacy Store coordinates one transactional writable migration before continuing. Read commands keep current Stores read-only; only the old format boundary opens the dedicated migration path.
Do not copy wiki.db between machines while WAL state or a write is active. Do not run two LWC versions against the same Store during migration.
A successful migration must:
- validate the source schema before transforming it;
- commit all schema and metadata changes atomically;
- preserve immutable Source content and current Page knowledge;
- rebuild or invalidate derived indexes instead of treating them as canonical;
- record the current format only after every step succeeds;
- remain safe when two processes discover the same legacy Store.
If the Store is newer than the binary, LWC returns unsupported_store_version. Upgrade the binary; never force the older executable to write.
Older Stores may contain Sources without trustworthy tracked-path revision history. Migration deliberately keeps them untracked rather than guessing a filesystem origin. Add a current file as a new Source if future path status and diff behavior are required.
This can produce two immutable Source snapshots with related content. Preserve both IDs when they support different historical claims; do not rewrite old evidence to make the lineage look cleaner.
Supported older config formats are parsed into the current layered model. A later config set or config unset writes the current format atomically.
lwc --scope global config show
lwc --scope project config showVerify effective values and origin after migration. An inherited value and an explicit disabled value have different semantics.
Document-graph sidecars are rebuildable. A Store migration may remove obsolete inline graph tables or require a full projection. After any graph-affecting upgrade:
lwc --scope project graph status
lwc --scope project graph verifyIf verification fails while canonical lint is clean, queue a full projection for the already selected engine and wait for its Work. Do not switch engines merely to make a check pass.
CodeGraph reports an obsolete project-local runtime but does not silently delete it. cg init installs or reuses the pinned user runtime and builds the current project index. Remove legacy files only after the new status and queries pass.
agent refresh recognizes prior LWC and standalone CodeGraph fragments only when they match known owned shapes. It consolidates CodeGraph MCP access behind the lwc server, updates marker-bounded Instructions and canonical Skills, and records a new receipt.
If a user or another tool has replaced the same entry, LWC reports a conflict instead of claiming ownership. Review with --print-config; do not delete the host's entire configuration file.
Sparse inverse payloads use checksums. New optional fields remain absent when empty so older payload bytes continue to verify. A committed changeset retry can rebuild graph projection documents when an older operation record lacks the newer derived-work detail.
Keep failed drafts and pre-commit checkpoints until the upgraded binary completes the documented retry. Never edit their SQLite or JSON sidecars to make an integrity check pass.
LWC does not promise backward writes from an older binary into a newer Store. To return to an older release:
- stop all LWC processes;
- restore a checkpoint created by that compatible release, or restore a complete external backup;
- restore matching Agent integration and optional index state when required;
- verify with the older binary before resuming writes.
Installing an old executable over a new one is not a database downgrade.
lwc --scope project lint
lwc --scope project search "known project fact" --limit 5 --explain
lwc --scope project graph verify
lwc --scope project cg status
lwc agent status --target all --location globalRequire canonical reads, one fixed retrieval, enabled graph verification, project CodeGraph status, and the intended Agent surfaces to pass independently. For the release pipeline itself, see Testing and release process.
LWC Wiki
- Home · 首页
- Project overview · 项目简介
- Basic concepts · 基本概念
- Use cases · 应用场景
- Installation and upgrades · 安装与升级
- Quick start · 快速开始
- Persistent memory · 持久记忆体系
- Agent workflow and memory policy · Agent 工作流与主动记忆策略
- Sources and ingestion · 来源与知识整合
- Wiki pages and provenance · Wiki 页面与来源证明
- Search and context · 搜索与上下文载入
- Document knowledge graph · 文档知识图(记忆图网)
- Code graph · 代码图
- Word graph · 词图
- Tags and strong context · 标签与强上下文
- Document conversion · 文档转换
-
MCP server and
lwc_explore· MCP 服务与lwc_explore - Skills, Hooks, and Instructions · Skills、Hooks 与 Instructions
- AgentTarget installation · AgentTarget 安装与集成
- Changesets · Changeset 原子变更
- Work system · Work 任务系统
- Checkpoints and rollback · Checkpoint、恢复与回滚
- Read-only Viewer · 只读可视化界面
- Architecture overview · 总体架构
- Storage and data model · 存储与数据模型
- Retrieval and indexing · 检索与索引设计
- Graph projection and performance · 图投影与性能设计
- MCP, Hooks, and AgentTarget design · MCP、Hook 与 AgentTarget 设计
- Safety and trust boundaries · 安全模型与信任边界
- Maintenance and diagnostics · 维护与诊断
- Troubleshooting and FAQ · 故障排查与常见问题
- Migration and compatibility · 迁移与版本兼容
- Support and issue reporting · 获取帮助与问题反馈
- CLI and configuration reference · CLI 与配置参考
- JSON output and error contract · JSON 输出与错误契约
- Limits and glossary · 系统限制与术语表
- Contributing and development · 贡献与开发指南
- Testing and release process · 测试与发布流程
- Wiki style guide · Wiki 编写规范