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
41 changes: 40 additions & 1 deletion desktop/VALIDATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,53 @@ cargo test --locked --manifest-path desktop/src-tauri/Cargo.toml

## Compatibility scope

[compatibility.json](src-tauri/src/connections/compatibility.json) preserves the recorded Server sources, normalized OpenAPI contract digests and qualification-wheel digests for the historical profiles below. The current contract is qualified by `sqlite-atomic-dd62723d-v1` below; ordinary builds require explicitly selecting it and checking the connection before business operations become available. The `sqlite-atomic-98275dbb-v1`, `sqlite-atomic-1da99747-v1`, `sqlite-atomic-8f10c560-v1`, `sqlite-atomic-d9a78567-v1`, `sqlite-atomic-caf2a35a-v1`, `sqlite-atomic-683e2db0-v1` and `sqlite-atomic-cab054db-v1` records qualify their corresponding Server source deployments and do not match this bundled contract. Historical records are disabled in the selector, and saved unavailable selections remain visible until explicitly replaced. CI builds have their own artifact identities and do not change product qualification.
[compatibility.json](src-tauri/src/connections/compatibility.json) preserves the recorded Server sources, normalized OpenAPI contract digests and qualification-wheel digests for the historical profiles below. The current contract has source-specific qualifications `sqlite-atomic-dd62723d-v1` and `sqlite-atomic-4ffdf4e9-v1` below. Ordinary builds require explicitly selecting the record whose tested Server source and wheel match the deployment, then checking the connection before business operations become available. The `dd62723d` record covers the migration-framework sources; the `4ffdf4e9` record covers the earlier release-preparation sources. The `sqlite-atomic-98275dbb-v1`, `sqlite-atomic-1da99747-v1`, `sqlite-atomic-8f10c560-v1`, `sqlite-atomic-d9a78567-v1`, `sqlite-atomic-caf2a35a-v1`, `sqlite-atomic-683e2db0-v1` and `sqlite-atomic-cab054db-v1` records qualify their corresponding Server source deployments and do not match this bundled contract. Historical records are disabled in the selector, and saved unavailable selections remain visible until explicitly replaced. CI builds have their own artifact identities and do not change product qualification.

The real Server harness covers SQLite with anonymous loopback, static Bearer, HTTPS with explicit CA/base path, and injected-provider/enforced access. It exercises save/search/exact reads, identity changes, binding revocation, ambiguous writes without replay and Scope pagination. Installed UI checks cover repeated launches preserving the existing editor, late committed-save responses preserving a new Scope draft, explicit connection/Scope selection, clipboard copies, connection isolation, draft cancellation, byte limits and independent Server survival after Desktop exit.

Selecting a compatibility profile does not attest the remote binary identity. Existing `sqlite-1.1.1-v1` / `sqlite-63f918b7-v1` / `sqlite-ab43e3a7-v1` / `sqlite-f1089f4e-v1` / `sqlite-6e237568-v1` / `sqlite-legacy-58f7f4f6-v1` selections require explicitly choosing an available matching profile and rechecking the connection. Desktop reads memories only through Atomic Memory references, so Servers that answer only with Memory entry citations are not qualified. CLI diagnostics separately verify the registered executable path and digest, then validate the diagnostic response schema. The observed version is optional report information; a registration does not require a version.

### Current Server protocol qualification

#### Server 4ffdf4e9 protocol qualification

`sqlite-atomic-4ffdf4e9-v1` qualifies the v1.4.1 preparation sources at
`4ffdf4e97ad43c55d8718a1df581596db2e6097d` for the bundled OpenAPI digest
`c12901b88b8e958c9cd63469298b9a04b9d5e2b0b4564d83b50f7ae95542519a`.
The qualification wheel is `powercontext-1.4.1.dev176+g4ffdf4e97-py3-none-any.whl`, SHA-256
`33079ebc5eb61d03dd4cccc0d104c47b0415beab1502a5b01fbc38f2cc30af2b`, built from that clean commit.
All 552 packaged runtime files in `powercontext/` and `powercontext_service_bootstrap/`
match the source bytes at that commit. The runtime manifest digest is
`ea7f63e5e0a16fa7386c3bdea80ea083dd09fe00447a3639391ed114a9e65ec3`
(sorted `wheel/path sha256` lines, with a final newline).
This is a development wheel from the release preparation branch; it is not evidence of a published v1.4.1 package.

On 2026-10-26, Linux x86_64 with Python 3.14.6 and Rust 1.96.0 ran the existing
`desktop/tests/real_server.py` harness against the extracted wheel and independent SQLite Server processes.
All four modes passed: anonymous loopback, static Bearer, HTTPS with an explicit CA and base path,
and an injected provider with enforced access. The ten recorded operations cover Atomic Memory
save/search/exact revision reads, Scope selection and pagination, identity changes, same-identity
revocation, committed writes with lost responses without replay, and Server survival after client exit.
The report records the source commit above and `desktopWorkingTreeDirty=false`.

The native client compiled the unmodified product `connections`, `credentials`, `error`, and `transport`
modules and the existing `server_probe.rs` in a standalone library. Dependency versions and checksums
match the product Cargo lock. The standalone library excludes the Tauri GUI shell because the local
Linux environment lacks WebKit development libraries. These results qualify SQLite protocol behavior;
Windows/macOS packaging, native vaults, installed UI, signing, IME, and screen-reader behavior require
their own platform checks.

From the recorded checkout, use an empty wheel output directory and a platform with the Desktop native
build dependencies to run the existing harness:

```sh
uv sync --frozen --python 3.14
uv build --wheel --out-dir desktop/.artifacts/server-wheel
cargo build --locked --manifest-path desktop/src-tauri/Cargo.toml --example server_probe
uv run --no-sync python desktop/tests/fixture_qualification.py --server-commit 4ffdf4e97ad43c55d8718a1df581596db2e6097d
uv run --no-sync python desktop/tests/real_server.py
```

#### Server dd62723d protocol qualification

`sqlite-atomic-dd62723d-v1` qualifies Server sources at `dd62723dceabae8b41e293531f0080a819f87c68`
Expand Down
19 changes: 19 additions & 0 deletions desktop/src-tauri/src/connections/compatibility.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,25 @@
],
"evidence": "desktop/VALIDATION.md#server-98275dbb-protocol-qualification"
},
{
"id": "sqlite-atomic-4ffdf4e9-v1",
"serverCommit": "4ffdf4e97ad43c55d8718a1df581596db2e6097d",
"contractSha256": "c12901b88b8e958c9cd63469298b9a04b9d5e2b0b4564d83b50f7ae95542519a",
"artifactSha256": "33079ebc5eb61d03dd4cccc0d104c47b0415beab1502a5b01fbc38f2cc30af2b",
"operations": [
"get_access_principal",
"get_artifact_revision",
"get_capabilities",
"get_default_scope",
"get_liveness",
"get_readiness",
"get_scope",
"list_scopes",
"remember_memory",
"search_memory"
],
"evidence": "desktop/VALIDATION.md#server-4ffdf4e9-protocol-qualification"
},
{
"id": "sqlite-atomic-dd62723d-v1",
"serverCommit": "dd62723dceabae8b41e293531f0080a819f87c68",
Expand Down
8 changes: 6 additions & 2 deletions docs/en/development/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ installation pins are synchronized.

`release/upgrade-support.json` declares the target version, source-version selection policy, backends, and
configurations. `automatic_sources` keeps 1.3.0 as its fixed baseline; explicit `cases` are empty.
The gate requires twelve cases: one source × three backends × vectors enabled/disabled × Code enabled/disabled.
The catalog declares twelve cases: one source × three backends × vectors enabled/disabled × Code enabled/disabled.
Publication requires the ten automatic cases to pass. The two embedded seekDB configurations with Code enabled
are temporarily manual-only because of native DDL waits; they remain unverified and are excluded from supported
upgrade declarations. Passing the automatic gate does not establish complete twelve-case acceptance.
The target is always the actual wheel built by CI. Future target releases keep testing 1.3.0;
intervening releases are not added automatically. The registered 1.4.0 bridge remains implemented but is outside
CI upgrade acceptance, so a passing gate does not certify its upgrade path. Source wheel URLs and SHA-256s are resolved
Expand Down Expand Up @@ -183,7 +186,8 @@ policy validation alone does not establish an upgrade path. Ordinary PR builds m
version; the `--release` check must run against the final tagged wheel without overriding its version.

The **Upgrade release gate** CI job requires successful public migration commands, full Server readiness, target
startup, preserved records and new writes on real 1.3.0 databases in all twelve declared cases. Limited bundle verification with
startup, preserved records and new writes on real 1.3.0 databases in all ten required automatic cases. The two
manual seekDB Code cases do not block publication or establish supported upgrades. Limited bundle verification with
`server_ready=false` fails. Every backend runs even if another backend fails, with separate logs and results.
seekDB runs embedded in a temporary runner directory. PR and publication jobs start a disposable OceanBase CE
container, wait for its MySQL tenant, archive diagnostics, and remove it even on failure. No external database
Expand Down
6 changes: 4 additions & 2 deletions docs/zh/development/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ DSH README 中说明某项能力已包含在 `1.1.0` 的文字同样属于历史
### 数据库升级支持范围

`release/upgrade-support.json` 声明目标版本、来源版本选择策略、后端和配置。`automatic_sources` 继续将 1.3.0
作为固定基线,显式 `cases` 为空。共要求 12 个组合:一个来源 × 三种后端 × 向量开关 × Code 开关。
作为固定基线,显式 `cases` 为空。共登记 12 个组合:一个来源 × 三种后端 × 向量开关 × Code 开关。
发布要求十个自动验收组合全部通过。两个启用 Code 的嵌入式 seekDB 配置因原生 DDL 等待暂时仅手动运行,
尚未验收,不计入支持的升级声明;自动门禁通过不代表完整的十二项验收通过。
目标始终是本次 CI 构建的实际 wheel;后续目标发布版本继续测试 1.3.0,不自动加入中间发行版。
1.4.0 桥接实现和登记仍保留,但不纳入 CI 升级验收;门禁通过不能证明该路径已通过验收。来源 wheel 的公开 PyPI 地址和 SHA-256 与目标产物一起记录。

Expand Down Expand Up @@ -162,7 +164,7 @@ uv run python scripts/run_upgrade_release_gate.py --release --release-notes /pat
旧版发行包和目标 wheel。测试缺失、后端跳过、执行失败或证据缺失都会阻断检查。仅通过静态策略检查不表示
存在升级路径。普通 PR 构建允许使用开发版本;`--release` 必须验证最终 tag 构建的 wheel,不能覆盖版本号。

CI 中的 **Upgrade release gate** 要求真实 1.3.0 数据库在全部 12 个登记组合中通过公开命令迁移、
CI 中的 **Upgrade release gate** 要求真实 1.3.0 数据库在十个必测自动组合中通过公开命令迁移、
完整 Server 就绪验证、目标版本启动、历史数据读取和新增写入。局部迁移验证返回 `server_ready=false` 也会失败。一个后端失败后,仍继续执行其他后端,
分别保存结果和日志。seekDB 直接在 runner 临时目录中以嵌入式启动;PR 和发布工作流均启动隔离的 OceanBase CE
容器,等待 MySQL 租户就绪,归档诊断并在测试失败时也清理容器,不依赖外部数据库凭据。
Expand Down
3 changes: 2 additions & 1 deletion tests/test_api_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
from powercontext.http._generated.operations import (
ACKNOWLEDGE_HANDOFF,
ACTIVATE_HANDOFF,
API_VERSION,
APPROVE_CANDIDATE,
CAPTURE_CONTENT_SOURCE,
CAPTURE_WORKING_NOTE,
Expand Down Expand Up @@ -197,7 +198,7 @@ def test_contract_uses_the_namespaced_request_id_header() -> None:
def test_server_info_contract_is_observable_and_forward_compatible() -> None:
contract = yaml.safe_load(CONTRACT_PATH.read_text())

assert contract["info"]["version"] == "1.4.1"
assert contract["info"]["version"] == API_VERSION
operation = contract["paths"]["/v1/server-info"]["get"]
assert operation["operationId"] == "get_server_info"
assert operation["x-powercontext-access"] == {
Expand Down
Loading
Loading