-
Notifications
You must be signed in to change notification settings - Fork 4
Testing and Release Process
Language: English · 简体中文
LWC tests the changed surface locally and uses the full release workflow as its cross-platform gate. A release consists of a source tag, checksum-verified binaries for six targets, a GitHub Release, and the public @i-xor/lwc package. Release notes are an operational contract, not a one-line commit summary.
This page is for maintainers. Users should follow Installation and upgrades.
x86_64-apple-darwin
aarch64-apple-darwin
x86_64-unknown-linux-gnu
aarch64-unknown-linux-gnu
x86_64-pc-windows-msvc
aarch64-pc-windows-msvc
Unix targets publish .tar.gz; Windows targets publish .zip. SHA256SUMS covers every archive.
Before tagging, keep these versions identical:
-
Cargo.tomlpackage version; - the resolved package version in
Cargo.lock; -
npm/package.jsonversion.
The Git tag is v<version>, while both binaries and npm report lwc <version>.
Do not publish npm under a version whose GitHub assets are missing: npm postinstall resolves the matching tag and archive name.
Start with tests covering the complete changed surface and its direct dependents. Do not rerun unrelated expensive suites after every documentation-only edit; CI remains the full release gate.
Before final tag, the release workflow requires:
cd web
npm ci
npm test
npm run typecheck
npm run build
cd ..
cargo fmt --all -- --check
cargo clippy --locked --all-targets --all-features -- -D warnings
cargo test --locked --all-targets --all-features
node --test tests/npm_package.mjs
cargo test --locked --all-targets --no-default-features
cargo package --lockedThe release gate also runs the ignored graph benchmark budget. Platform jobs run release-mode tests and a real init/config/graph smoke on each target.
Use a clean source tree. Generated Viewer assets must match web/src; the workflow builds and rejects a dirty web/dist diff.
Create an annotated tag with complete Markdown notes. Use this structure when applicable:
## Highlights
One short paragraph explaining the user-visible outcome.
## Added
- New capabilities and commands, with the problem they solve.
## Changed
- Behavior changes, migrations, performance, and compatibility.
## Fixed
- Correctness, recovery, security, and platform fixes.
## Upgrade notes
- Required actions, restarts, config changes, or known compatibility limits.
## Verification
- Release gates, real end-to-end coverage, supported targets, and checksums.
## Acknowledgements
- Contributors and upstream projects when relevant.Do not include internal Agent chatter, local temp paths, unverified claims, vague “bug fixes,” or a dump of commit subjects. Call out breaking changes and data migrations prominently.
The GitHub workflow validates that the tag is annotated and notes are non-empty, persists that annotation, and publishes the same bytes through --notes-file.
- Merge the reviewed changes to clean
main. - Confirm version files and release notes.
- Create and push the annotated
v<version>tag. - Wait for release acceptance and all six target builds.
- Verify the GitHub Release title, notes, archives,
SHA256SUMS, andinstall.sh. - Perform an isolated download/install and read back
lwc --version.
Do not replace or move an existing release tag. Correct a bad release with a new patch version.
Each target job:
- tests and builds the release binary;
- performs a target-native smoke;
- packages binary, English/Chinese READMEs, and Apache license;
- emits an archive-specific SHA-256 file.
The checksum job combines those files into sorted SHA256SUMS. Consumers should verify the archive hash before extraction.
GitHub assets must exist first. The release workflow then installs the local npm package against those published assets as a smoke.
Actual registry publication is an authenticated local maintainer action by design:
cd npm
npm publish --access publicBefore publication, confirm npm authentication and package ownership. After publication, install into a fresh isolated prefix and verify:
npm install --global @i-xor/lwc@<version> --prefix <temporary-prefix>
<temporary-prefix>/bin/lwc --versionThe npm installer supports Node.js 22 or newer, maps platform/architecture to one release archive, downloads archive and checksums with 30-second per-attempt timeouts and two retries, verifies SHA-256, extracts, and checks binary version before replacement.
Never publish npm first: its postinstall would point at assets that do not yet exist.
Crate publication is a separate authenticated maintainer action. Run cargo package --locked, inspect the package contents, and publish only when the crates.io version is part of the intended release.
Registry success is not a substitute for GitHub binary verification; the two channels serve different installation paths.
On first open, a newer compatible binary migrates an older Store through the supported migration path. Long migrations may return Work and a safety checkpoint.
After an upgrade:
lwc --version
lwc --scope project lint
lwc --scope project config show
lwc --scope project graph status
lwc --scope project graph verify
lwc --scope project cg status
lwc agent refresh --target auto --location globalDo not initialize missing graphs merely because an upgrade exposes them. Graph enablement remains explicit project consent.
Older failed drafts and inverse patches must remain checksum-compatible. A migration or recovery change requires fixture coverage from the previous published format.
Verify all public surfaces independently:
- Git tag type and target commit;
- GitHub Release notes and assets;
- Actions conclusion for quality and all target jobs;
-
SHA256SUMSagainst one downloaded archive; - npm registry version, metadata, and isolated install;
- crates.io version if published;
- bundled
using-lwcSkill and AgentTarget integration from the installed binary; - release documentation links.
Only then announce availability. A pushed tag or successful upload request is not publication proof.
- Before registry publication: fix source, bump patch, create a new tag.
- GitHub assets incomplete: do not publish npm; diagnose the failed target job.
- npm postinstall fails with valid assets: distinguish network retry exhaustion from checksum, extraction, or version mismatch.
- A released binary has a correctness or security defect: document impact, prepare a patch, and use the Security policy when embargo is required.
- Never delete user drafts or production Wiki state as part of release cleanup.
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 编写规范