Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,38 @@ consumer chain, including a committed-but-lost native reply. Its discovered rese
fall-through is a renderer recovery defect; no further native write change is
required by that correction.

## SQLite namespace diagnostics

The streaming-budget test inspects a temporary Native SQLite database directly.
Its three statistics queries must support both the installed container v3
(`roost_kv.space`) and container v4's interned namespaces (`roost_spaces.name`
joined by `space_id`). A test-local relation exposes the same `space/key/value`
columns for either format, with an explicit accepted-version assertion. Update
bytes, receipt count and projection-row budgets remain unchanged. The diagnostic
relation changes no production read/write behavior. Companion storage work:
[Roost #15](https://github.com/loro-dev/roost/pull/15).
Diagnostic compatibility PR: [#1735](https://github.com/LodyAI/Lody/pull/1735).

The coordinated Roost 0.2.0 release is now published. PR #1735 pins the
TypeScript package in the shared catalog and Native exactly in the CLI manifest
and publication guard, retaining the published-runtime version contract. It keeps all six exact
platform dependencies in the lockfile and release-age exceptions. This upgrades
the Native runtime to SQLite container v4; earlier containers are refused, with
no migration, automatic reset or data cleanup. The dependent
[message-state fix #1737](https://github.com/LodyAI/Lody/pull/1737) consumes this
same catalog update and must merge after #1735. Acceptance is repeated against
the published packages rather than a local SDK artifact.

Frozen installation, complete `pnpm check`, repository format and documentation
checks pass with the published 0.2.0 packages and no native override. The full CLI
suite passes 4,429 tests with four existing skips, including streaming storage
budgets and reopen. The four Electron native-staging tests pass: foreign target
selection uses synthetic bindings; the installed host binding executes real
signed SQLite write/reopen probes. The Native release manifest identifies merged
Roost source `e85c970`; this is not cross-platform runtime acceptance on this host.
The public CLI build also passes at a 2 GiB heap, including its published-bundle
runtime probes; all six existing dependency-version policy tests pass.

## Outbox and existing data

Outbox rows are not pending-delivery counts. The installed TypeScript Store's ACK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,30 @@ Native 写入与其他客户端的增量正文读取,不足以作为发行验
把生产 RPC 加解密端点和两个渲染器副本加入同一消费者链路,并覆盖原生提交成功但回复丢失。
其中发现的 reset 快捷路径是渲染器恢复缺陷;这项更正不需要继续修改原生写入。

## SQLite namespace 统计

流式预算测试直接检查临时 Native SQLite 数据库。三处统计查询同时支持当前安装的
container v3(`roost_kv.space`)和 namespace 整数引用的 v4(通过 `space_id`
关联 `roost_spaces.name`)。测试内的查询关系为两种格式提供相同的
`space/key/value` 列,并显式断言支持的版本;更新字节、回执行数和投影行数预算不变。
统计查询本身不改变生产读写行为。
配套存储改动:[Roost #15](https://github.com/loro-dev/roost/pull/15)。
统计兼容 PR:[#1735](https://github.com/LodyAI/Lody/pull/1735)。

Roost 0.2.0 已统一发布。PR #1735 在共享 catalog 固定 TypeScript 包,在 CLI
清单及发布校验中精确固定 Native,沿用运行时依赖发布合同。锁文件及发布冷却期
豁免保留全部六个精确匹配的平台包。Native 运行时
因此升级到 SQLite container v4,拒绝更早容器,不迁移、不自动重置、不清理数据。
依赖它的[消息状态修复 #1737](https://github.com/LodyAI/Lody/pull/1737) 复用同一次
catalog 更新,在 #1735 后合并。验收改用 npm 正式包,不再使用本地 SDK 产物。

使用 npm 正式 0.2.0 包、没有 Native 覆盖时,冻结安装、完整 `pnpm check`、
全仓格式和文档检查通过。CLI 全量 4,429 项通过、4 项原有跳过,包含流式存储预算
及重开。Electron 四项 Native staging 测试通过:其他平台使用合成绑定验证选择,
本机安装的真实绑定执行签名 SQLite 写入及重开。Native 发布 manifest 对应已合并的
Roost 源码 `e85c970`;这不代表在本机完成其他平台的运行时验收。
公开 CLI 在 2 GiB 堆上限内构建通过,包含发布包运行时探针;六项已有依赖版本策略测试通过。

## Outbox 与既有数据

Outbox 行数不等于待发送数量。已安装 TypeScript Store 的 ACK 推进消费者游标而不删除行,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ history coverage and device-level responsiveness remain validation limits.

## Decision and boundaries

Pin `@loro-dev/roost-node@0.1.2` as a CLI runtime dependency and exempt only that
version and its six exact platform dependencies from the release-age policy.
Keep `@loro-dev/roost@0.1.2` for identity,
application JSON, and `NodeLodyHistory`. Neither Rust source nor a sibling Roost
checkout is needed to install, build, or package Lody.
Pin `@loro-dev/roost-node@0.2.0` as an exact CLI runtime dependency, with
`@loro-dev/roost@0.2.0` from the shared catalog for identity, application JSON, and
`NodeLodyHistory`. Exempt only these exact versions and the six matching platform
dependencies from the release-age policy. Native 0.2.0 uses SQLite container v4;
it refuses earlier containers without migration or automatic reset. Neither Rust
source nor a sibling Roost checkout is needed to install, build, or package Lody.

Use `RoostNativeClient` directly. Preserve the database path, credential-store
seed, admitted owner, bounded queue, shared stream leases, and awaited final close.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ CLI 现在接入已发布的 Node-API 包,在 Worker 内运行 SQLite 实现

## 决策与边界

CLI 运行依赖固定为 `@loro-dev/roost-node@0.1.2`,发布冷却期仅豁免该版本及
六个精确匹配的平台包版本。
保留 `@loro-dev/roost@0.1.2` 的身份、应用 JSON 和 `NodeLodyHistory` 适配器。
CLI 将运行依赖精确固定为 `@loro-dev/roost-node@0.2.0`,身份、应用 JSON 和
`NodeLodyHistory` 使用共享 catalog 的 `@loro-dev/roost@0.2.0`。
发布冷却期仅豁免这两个精确版本和六个匹配的平台包版本。
Native 0.2.0 使用 SQLite container v4,拒绝更早容器,不迁移或自动重置。
安装、构建和打包 Lody 无须 Rust 源码或旁边的 Roost 仓库。

直接使用 `RoostNativeClient`,保留数据库位置、系统凭据存储中的种子、允许的签名身份、
Expand Down
4 changes: 2 additions & 2 deletions apps/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@lody/shared": "workspace:*",
"@lody/turn-diff-store": "workspace:*",
"@loro-dev/flock-wasm": "catalog:",
"@loro-dev/roost": "0.1.3",
"@loro-dev/roost": "catalog:",
"@loro-dev/streams-crdt": "catalog:",
"@loro-dev/streams-client": "catalog:",
"@modelcontextprotocol/client": "2.0.0",
Expand Down Expand Up @@ -128,7 +128,7 @@
],
"dependencies": {
"@effect/platform-node-shared": "catalog:",
"@loro-dev/roost-node": "0.1.2",
"@loro-dev/roost-node": "0.2.0",
"@lydell/node-pty": "1.2.0-beta.14",
"@napi-rs/keyring": "2.1.0",
"better-sqlite3": "catalog:",
Expand Down
2 changes: 1 addition & 1 deletion apps/cli/scripts/check-published-bundle-imports.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const requiredPublishedRuntimeDependencies = [
const requiredExactPublishedRuntimeDependencies = ['loro-crdt'];
const requiredPinnedPublishedRuntimeDependencies = new Map([
['@lydell/node-pty', '1.2.0-beta.14'],
['@loro-dev/roost-node', '0.1.2'],
['@loro-dev/roost-node', '0.2.0'],
]);

for (const block of dependencyBlocks) {
Expand Down
13 changes: 10 additions & 3 deletions apps/cli/tests/roost-session-backend-contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2516,18 +2516,25 @@ describe('Production Roost history semantics', () => {
}
const db = new Database(join(nativeDirectory, 'history.db'), { readonly: true });
try {
const containerVersion = db.pragma('user_version', { simple: true });
expect([3, 4]).toContain(containerVersion);
const kvRows =
containerVersion === 4
? `(SELECT roost_spaces.name AS space, key, value
FROM roost_kv JOIN roost_spaces ON roost_spaces.id = roost_kv.space_id)`
: 'roost_kv';
const stats = db
.prepare(`SELECT COUNT(*) AS rows, SUM(LENGTH(key) + LENGTH(value)) AS bytes
FROM roost_kv WHERE space LIKE ?`)
FROM ${kvRows} WHERE space LIKE ?`)
.get(`%${fixture.doc.sessionId}%:updates`) as { rows: number; bytes: number };
expect(stats.rows).toBeGreaterThan(128);
expect(stats.bytes).toBeLessThan(1024 * 1024);
const receipts = db
.prepare(`SELECT COUNT(*) AS count FROM roost_kv WHERE space LIKE ?`)
.prepare(`SELECT COUNT(*) AS count FROM ${kvRows} WHERE space LIKE ?`)
.get(`%${fixture.doc.sessionId}%:lody_agent_operation_receipts_v1`) as { count: number };
expect(receipts.count).toBe(128);
const projection = db
.prepare(`SELECT COUNT(*) AS count FROM roost_kv WHERE space LIKE ?`)
.prepare(`SELECT COUNT(*) AS count FROM ${kvRows} WHERE space LIKE ?`)
.get(`%${fixture.doc.sessionId}%:projection`) as { count: number };
expect(projection.count).toBeGreaterThan(0);
expect(projection.count).toBeLessThan(1000);
Expand Down
71 changes: 37 additions & 34 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ catalog:
'@devframes/plugin-terminals--assets': 1.0.0
'@loro-dev/flock-wasm': ^0.4.4
'@loro-dev/loro-cli': 0.6.0
'@loro-dev/roost': 0.2.0
'@loro-dev/sqlite-riverrun': 0.2.0
'@loro-dev/streams-client': 0.12.1
'@loro-dev/streams-crdt': 0.19.1
Expand Down Expand Up @@ -87,15 +88,15 @@ minimumReleaseAgeExclude:
- '@effect/vitest@4.0.2'
- '@effect/platform-node-shared@4.0.2'
# Keep the split release's complete optional platform graph available on every host.
- '@loro-dev/roost-node@0.1.2'
- '@loro-dev/roost-node-darwin-arm64@0.1.2'
- '@loro-dev/roost-node-darwin-x64@0.1.2'
- '@loro-dev/roost-node-linux-arm64-gnu@0.1.2'
- '@loro-dev/roost-node-linux-x64-gnu@0.1.2'
- '@loro-dev/roost-node-win32-arm64-msvc@0.1.2'
- '@loro-dev/roost-node-win32-x64-msvc@0.1.2'
- '@loro-dev/roost-node@0.2.0'
- '@loro-dev/roost-node-darwin-arm64@0.2.0'
- '@loro-dev/roost-node-darwin-x64@0.2.0'
- '@loro-dev/roost-node-linux-arm64-gnu@0.2.0'
- '@loro-dev/roost-node-linux-x64-gnu@0.2.0'
- '@loro-dev/roost-node-win32-arm64-msvc@0.2.0'
- '@loro-dev/roost-node-win32-x64-msvc@0.2.0'
# Use the pinned npm release instead of requiring a sibling Roost checkout.
- '@loro-dev/roost@0.1.3'
- '@loro-dev/roost@0.2.0'
# pnpm 10.20 uses the first rule per package; keep exact Codex versions together.
- '@openai/codex@0.154.0 || 0.156.0 || 0.156.0-darwin-arm64 || 0.156.0-darwin-x64 || 0.156.0-linux-arm64 || 0.156.0-linux-x64 || 0.156.0-win32-arm64 || 0.156.0-win32-x64 || 0.159.2 || 0.159.2-darwin-arm64 || 0.159.2-darwin-x64 || 0.159.2-linux-arm64 || 0.159.2-linux-x64 || 0.159.2-win32-arm64 || 0.159.2-win32-x64'
# Exact transitive dependencies already selected for werift.
Expand Down
Loading