Skip to content

feat(local-files): 提供 Python 文件正文读取分发 - #158

Open
xiaoland wants to merge 4 commits into
feat/capture-receiptsfrom
feat/local-files-reader
Open

xiaoland wants to merge 4 commits into
feat/capture-receiptsfrom
feat/local-files-reader

Conversation

@xiaoland

@xiaoland xiaoland commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

目的与范围

新增 inkcre-ext-local-files Python 读取分发,使 Python Peer 可以读取 Mac 等执行分发已收入的文件正文与原件状态,无需访问原 Peer 或原文件。

只注册 extensions.local_files.file.v1 Resolver:校验位置 URI、读取唯一 body 正文关系,并保留原件失效、提取失败及最后成功修订的区别。不注册 Source 执行占位,不引入 Mac 写入服务或数据库迁移。

验证

  • pdm run pytest tests/extensions/local_files:2 项通过。
  • pdm run ruff check extensions/local_files tests/extensions/local_files 通过。
  • wheel 构建和 scripts/extension_distribution.py 产物形状检查通过;已实际读取 Swift 写入一次性 PostgreSQL 的六格式资料。
  • pdm run python scripts/release.py check --base origin/feat/capture-receipts 通过。

风险、回退与交付

需要部署此独立读取分发才能解释新文件根类型;Mac 收入不以其安装为前提。回退或停用分发会失去该类型的解析能力,保留正文与图。不发布 wheel、不触发迁移或生产部署。源码及 wheel 保留 MIT 许可。

依赖关系

跨仓配套

docs/_shared 通过独立提交指向已推送的 Hub 831e8358a87894ecf29f25e18bff2c2ef3ce42bb;合并前先完成共享合同 PR #42 的审查与合并,并按最终 Hub 提交更新引用。

CI 状态(2026-10-25)

同一提交 fca9f8f250446ba324865d2911c738369e3b4713 的失败任务重试后通过:

  • 预览数据库:创建隔离分支成功,HTTP 422 未再出现。
  • 应用预览:扩展、镜像、预览部署及就绪检查通过。
  • inkcre-cli checks、Hermetic repository contract、Portable peer database runtime 已通过。

关闭 PR 时才执行的资源清理任务按条件跳过。本次复验没有修改候选源码;PR 仍为 draft,合并前依然需要按上述依赖顺序更新基底。

- 读取本地文件元数据与已收入正文,不依赖原 Peer 在线
- 保留原件失效与上次成功修订语义,仅注册 Resolver
- 固定已推送的 Hub 合同提交 831e835
- 与分发实现提交分离,合并依赖 InKCre/docs#42
@xiaoland
xiaoland marked this pull request as ready for review October 25, 2026 09:22

This branch was successfully deployed

1 active deployment
preview — 529d7cc2 Deployed Oct 25, 2026 by xiaoland via impl-py preview #510
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