Skip to content

feat(extension): Peer 独立分发参与 - #129

Merged
xiaoland merged 22 commits into
mainfrom
feat/native-distribution-completeness
Oct 13, 2026
Merged

xiaoland merged 22 commits into
mainfrom
feat/native-distribution-completeness

Conversation

@xiaoland

@xiaoland xiaoland commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

不同 Peer 现在可以为同一个共享 Extension 身份选择独立的 Native Distribution、精确版本和启用意图。Core 将选择保存在 Peer × Extension 参与记录中;共享配置与业务 state 仍属于 Extension。迁移会保留旧 Peer 的精确版本和启用意图,并把无法解析的旧选择留在 unresolved 状态,不猜测安装类型或切到 latest。

管理 v2 分别报告目标版本、实际加载版本、运行状态、重启需求和操作错误;旧 v1 写入口返回 410。Core 当前只应用 Python Distribution。缺少精确 wheel 时会暂停该 Peer 的工作、排空在途操作、安装到共享解释器,并由正式 Web 入口执行 exec 启动新进程;失败保留暂停和错误状态,不声称自动回滚。Restore 只消费已有启用意图;显式 enable 先保存意图,异步启动前后复核精确选择,避免迟到启动覆盖外部 disable 或换版。Authenticated Peer 可读写共享 Extension state;匿名写入、非 object state 和身份修改仍被拒绝。

独立 Python producer 通过 Registry v2 按 name/distribution/version prepare、上传 wheel、publish 和匿名验证;候选 wheel 与 metadata 在首次 Registry 写入前保存,恢复只使用同一份不可变产物,缺失或过期时明确失败,不重建覆盖。Core Runtime SDK 0.2.0 与 Toolkit 0.5.0 已切换为正式发布的 wheel URL,并在锁文件中固定 SHA256(分别为 b85b6fdeb363e8d3e6de1cdf4f3c6fd1c342163f22aac3bde3460006bf1e2bf8 和 f690aefd4bfc61862c468ed73e9518057bd86453042f05ebb0394b7003015f82)。

pdm lock --check、Core Runtime 与发布工具组的 PDM 冻结同步、pdm run check 均通过(20 passed、57 skipped)。本地 Docker build 未能取得 Docker Hub 的 Dockerfile frontend,因 TLS 握手超时而在构建开始前失败;PR Actions 镜像/仓库检查用于验证 CI 构建路径。当前 source head c76d5e6dc1059b4f4e68fd75c1cf6e369cee9843 的 repository/artifact、Portable DB 与 application preview 检查均通过;preview deploy run 38424570162。

隔离 Core runtime qualification 使用 application source head fa7887b030fb329e1adcd2dfe61288825ccf0bcf 构建的 Linux/amd64 镜像;目标 daemon image ID 为 sha256:27d0fcf7c09a1de74379e9ddb52ea27ba4decacf61f78d049c87de222f0b3fc8,Runtime SDK 为 0.2.0,数据库协议为 extension-peer-participation-v2。真实 SPA 已完成 preview Mail Python 0.3.2 冷安装:隔离 wheel SHA256 为 1f319bd80b4b0f157d8fd35d0edddd045fc065b72406a23ff6637eb3ce0a9bae,选择返回 HTTP 200,数据库记录精确 Python 版本且 config_schema IS NULL,Peer 重启后可启用并报告 loaded_version=0.3.2、running=true。producer 全链也在隔离 Registry 对该 Mail wheel 完成 prepare/upload/publish/匿名验证,摘要与上传 wheel 一致。另只读检查了生产历史 Mail 0.3.2 wheel SHA256 bc231cf9e27f760c26f3a052e1cac119aca4463956e51dcbf1991e10e1f68a65;其依赖与 SDK range 兼容性已经核对。

RSS Python 0.2.2 已作为 preview-only release 发布到隔离 Registry。真实 SPA 在 RSS Job running 时应用 Mail Python 0.3.3,原 Job 持久变为 aborted;Core freshboot 后 Mail 0.3.3 与 RSS 0.2.2 均运行,后续真实 RSS feed Job 完成。保存了重启边界的完整网络记录;其中一轮未捕获原始响应的 UI 曾显示 Failed to fetch,但相同执行路径的捕获记录中 selection 与后续 status 均为 HTTP 200 并正常关闭对话框,现有证据不能把首轮未知结果归因到 Core exec 中断。

PR preview Core URL 为 https://inkcre-core-py-pr-129-fe7bc9d2bc45.herokuapp.com,其 /readyz 返回 HTTP 200,数据库协议为 extension-peer-participation-v2。同一 preview 的 sibling Registry origin 为 https://pr-129.inkcre-core-py-extension-registry-preview.pages.dev。其 v2 Python descriptor inkcre/mail 0.3.2 匿名 GET 返回 HTTP 200、state=published;PEP 503 Simple index 与 wheel 下载均成功,当前 preview wheel SHA256 为 6db64ed8f2cb999eb8a23a0e8797b4078dca7052fa3192d25001c3ad93b6c700,uv 0.12.5 pip install --target 配置 PyPI 与 preview Simple index 后安装成功。该 preview wheel 与生产历史 Mail 0.3.2 wheel 是不同 bytes。这验证了 preview 的 native Python descriptor、Simple index 和 wheel 下载/安装协议;不代表 combined MF+Python full SPA 已通过。

- Save Core and Web source SHAs with all producer metadata and artifact digests.
- Prepare all associations before uploading and publishing candidate Distributions.
- Recover the original candidate artifact without rebuilding it.
@xiaoland
xiaoland force-pushed the feat/native-distribution-completeness branch from b977c4c to b76df46 Compare October 13, 2026 08:22
@xiaoland xiaoland changed the title fix(extensions): 声明发布格式并保护 Core 升级状态 feat(release): 统一组装第一方 Extension 产物 Oct 13, 2026
- Download the located artifact ID and merge its single file tree into the expected candidate directory.
- Revalidate protected-main inputs on every publish attempt.
- Defer optional Toolkit imports so hermetic repository checks can typecheck the assembler.
- Pin Web package installation to actual candidates and explicit dispatch probes.
- Resume publication from saved bytes without consulting moving main.
- Advance the Hub contract used by all first-party release Spokes.
- Adopt the Hub contract for independent Peer selections and shared state.\n- Keep this shared-doc ref isolated from Core implementation changes.
- Consume the shared Extension Peer participation and state authority contract.
- Store exact native selections and enabled intent per Peer while keeping shared Extension state.
- Pause and restart the Core process before applying shared Python environment changes.
- Preserve unresolved legacy pins without assigning their config schema to an unknown distribution.
- Preserve the existing PR branch history while replacing its implementation tree with the reviewed Peer-scoped Core source.
@xiaoland xiaoland changed the title feat(release): 统一组装第一方 Extension 产物 feat(extension): Peer 独立分发参与 Oct 13, 2026
- Keep capability discovery available before shared Extension installation.
- Filter status rows using the canonical Extension name after validation.
用 native Python Distribution 坐标执行查询、prepare、publish 和匿名校验。\n\n- 固定 Toolkit 资格候选以便冻结安装和生产脚本验证\n- 文档与 Python Release 独立版本化\n- 修正 legacy 迁移测试遵循 Extension state 插入约束
- Persist missing version-scoped config schemas as SQL NULL so first Peer selection satisfies the database contract.
- Capture wheel, prepare metadata, source revision, and digest before Registry writes; publish retries restore the same artifact and fail if it is missing.
- Pin the validated Toolkit candidate source and document the 90-day recovery boundary.
- Persist explicit enable intent before activation begins.
- Re-read the exact Peer pin and enabled state around asynchronous startup and discard stale runtime candidates.
- Keep cold restore read-only and verify its intent before and after startup.
- Advance the Hub contract to the exact pushed revision.
- Let capture reach its existing rerun rejection guard\n- Document publish-only recovery from the saved candidate\n- Verify full-rerun failure and artifact-bound publish recovery
- Bump the shared Hub ref to the canonical main commit
- Pin the Core runtime and Toolkit to published, hash-locked wheel assets.\n- Remove the builder Git package requirement used only by the former source pins.
@xiaoland
xiaoland merged commit c5a8429 into main Oct 13, 2026
7 checks passed
@xiaoland
xiaoland deleted the feat/native-distribution-completeness branch October 15, 2026 13:05

This branch was successfully deployed

1 active deployment
preview — c76d5e6d Deployed Oct 13, 2026 by xiaoland via Retire preview resources #404
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant