88 Commits

Author SHA1 Message Date
jxxghp
be65e047b0 fix(plugin): support mirrors for Release asset downloads (#7224) 2026-10-27 22:21:48 +08:00
jxxghp
2c0ea1d0c6 fix(display): 避免固定编号导致 Xvfb 启动冲突 (#7217)
移除将 DISPLAY 追加到 Xvfb 命令的参数,交由显示后端分配空闲编号。补充真实命令构造、显示环境恢复和重复启停的回归测试。

Refs #7212
2026-10-27 13:03:48 +08:00
jxxghp
53f455cac8 fix(resources): normalize GitHub proxy and retry downloads
Reuse the checked resource manifest within each download and retain phase-specific retry errors. Preserve application update error contracts.

Refs #7185
2026-10-26 09:04:54 +08:00
Aqr-K
6610a8c008 fix: retain plugin lifecycle ownership and recover installation state (#7146)
* fix: retain plugin lifecycle ownership and recover installation state

* test: cover plugin rollback and uninstall lifecycle boundaries

---------

Co-authored-by: jxxghp <jxxghp@gmail.com>
2026-10-23 07:44:07 +08:00
Aqr-K
f3c1449c8b fix(storage): preserve transfer contents and cleanup identities (#7142) 2026-10-23 06:51:54 +08:00
InfinityPacer
ec922865be feat(update): require image system baseline before installing updates
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:44 +08:00
jxxghp
2393f198af fix(fsworker): rename symlinks by link device 2026-10-22 06:49:18 +08:00
jxxghp
6d4ce83837 fix(types): clear host mypy debt and prevent typing regressions
严格检查全部宿主源码,清零类型错误预算并移除按模块类型豁免。
按原因、所属方法、错误码及语法指纹锁定必要兼容例外和站点类型桩,
CI 阻断新增忽略、检查范围退化、本地桩替代真实接口及新的类型错误。

修复空值、异步和供应方类型边界,保持插件与 API 兼容合同,
并补充存储、订阅、通知、Agent 和工作流边界的回归覆盖。
2026-10-21 22:03:18 +08:00
秋澪Akimio
e3d32e491b feat(storage): 本地复制支持仅限关键字参数 try_reflink 并新增实验室配置项 (#7089) 2026-10-19 22:54:43 +08:00
秋澪Akimio
8b5e536452 feat(storage): 本地复制优先尝试写时复制(reflink)并支持自动回退 (#7082) 2026-10-19 18:01:22 +08:00
秋澪Akimio
114c2cebe5 feat(storage): 本地存储增加引用链接(reflink)整理方式 (#7077) 2026-10-19 16:48:41 +08:00
DDSRem
54ba4f435b refactor(plugin): share dependency recovery decisions (#7060) 2026-10-18 15:29:31 +08:00
DDSRem
e0642eafa7 chore(types): reduce v3 host mypy debt (#7057)
* chore(types): clear AniList endpoint mypy debt

* chore(types): clear Douban endpoint mypy debt

* chore(types): clear recommendation endpoint mypy debt

* chore(types): clear subscription notification mypy debt

* chore(types): clear SDK string compatibility mypy debt

* chore(types): ratchet v3 host mypy across remaining files

* chore(types): reduce v3 host mypy debt and retire ledger

* chore(types): reconcile host snapshot with upstream HTTP pool

* test(types): cover host paths exposed by mypy cleanup
2026-10-18 09:37:49 +08:00
DDSRem
2de976f6b3 Merge pull request #7050 from DDSRem-Dev/codex-comment-migration
docs: 统一全项目中文注释和结构化契约说明
2026-10-17 19:26:29 +08:00
jxxghp
f26aca38a4 fix(types): expose stdio stream encoding 2026-10-17 07:19:38 +08:00
jxxghp
68a6504a92 refactor(types): govern filesystem worker request and response contracts 2026-10-16 13:25:40 +08:00
jxxghp
7b3f6fb9d9 refactor(types): keep resource response import type only 2026-10-16 12:46:25 +08:00
jxxghp
802b7ae9c7 refactor(types): govern resource response and proxy types 2026-10-16 12:46:24 +08:00
jxxghp
dd3bd909ce refactor(types): align database backup process runner contract 2026-10-16 12:46:24 +08:00
jxxghp
4955b7b9ea fix: harden backend isolation and execution safety 2026-10-16 09:11:28 +08:00
jxxghp
edc719596d feat(update): prepare latest updates for a single restart 2026-10-13 12:50:01 +08:00
jxxghp
40711d2e32 fix(update): preserve pending update state across checks
Re-check the target state after a check request returns so a download or
install that started meanwhile cannot be overwritten.

When an older check already turned a staged resource package into
available, validate the complete staged files and their digests against the
same package version and restore ready, full progress and the install
entry instead of forcing a repeated download.
2026-10-13 09:19:37 +08:00
jxxghp
cb6bc02228 fix(agent): inherit deployment environment in Python kernels 2026-10-10 23:33:26 +08:00
jxxghp
b663825fe7 fix(plugin): recover dependencies without disabled constraints
Keep enabled host and clone sources in dependency recovery. Fall back to per-plugin requests while retaining ready and recovered manifest constraints, preserving original sources and cancellation ownership.

Refs #6943
2026-10-10 12:20:13 +08:00
jxxghp
d7db4cfc0b fix(plugin): serialize package swaps with imports (#6939) 2026-10-10 07:42:37 +08:00
freeman
f3ad81b39e style: apply safe ruff auto-fixes and exempt startup late imports
Run `ruff check app tests scripts --fix` with the configured rule set
(E4/E7/E9/F/I): import sorting (I001), f-strings without placeholders
(F541), lambda/variable/unused-import cleanups that ruff marks safe.
Nine files whose only ruff debt sits next to pre-existing pylint
import-resolution errors (lazy exports, sys.path script imports) or
whose "unused" imports are reached through attribute access by tests are
left untouched so the changed-file pylint gate and the benchmark tests
stay green; their diagnostics remain in the baseline.

app/startup/lifecycle/__init__.py and app/main.py import business
modules after cache composition, import-path and stdio setup on purpose
(the source comments document the contract), so declare E402
per-file-ignores for them instead of adding per-line noqa.

Ruff ratchet watermark drops from 498 to 100; sync the baseline fixture
and the optimization checklist figure.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-09 13:29:09 +08:00
InfinityPacer
7e76239c86 fix(agent): reap macOS kernels before retrying group termination 2026-10-06 03:05:16 +08:00
jxxghp
f803e6cc5c feat(agent): add persistent Python read-only orchestration 2026-09-30 20:16:53 +08:00
InfinityPacer
27ce5ec613 fix(update): clear stale update records after external upgrade
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 14:18:17 +08:00
InfinityPacer
82f5fca11c fix(update): accept -N hotfix suffix for stable releases
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 18:27:35 +08:00
jxxghp
71a2725776 fix(monitor): defer Blu-ray transfer while temp files remain 2026-09-26 09:27:17 +08:00
InfinityPacer
0bb033afe7 feat(plugin): preflight plugin dependencies on free-threaded runtime (#6766)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 12:53:46 +08:00
InfinityPacer
0238351071 fix(plugin): v3t 下不再隐藏不兼容插件,改为提示不支持 (#6760)
* feat(plugin): surface v3t incompatibility instead of hiding plugins

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* chore(architecture): refresh dependency baseline after plugin gate split

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(plugin): keep runtime-incompatible plugins out of startup sync

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(plugin): annotate runtime compatibility ports without bare dict

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 00:35:20 +08:00
moviepilot-codex[bot]
240f43b327 fix(update): converge stale state and Docker transaction 2026-09-21 15:49:21 +08:00
moviepilot-codex[bot]
9df35e7b83 fix: 修复配置快照、依赖同步和 Agent 上限 2026-09-21 04:26:48 +08:00
InfinityPacer
23159dee8b fix(update): handle OverlayFS directory swaps 2026-09-21 02:38:51 +08:00
jxxghp
207e1112dc fix(update): refresh current application version 2026-09-16 15:52:42 +08:00
jxxghp
d5e469a4e4 fix(update): preserve host plugin entrypoint during Docker upgrades 2026-09-16 12:24:19 +08:00
jxxghp
989a4b0dce fix(update): preserve new Docker modules during upgrades 2026-09-15 11:01:13 +08:00
Aqr-K
bc99355b2a fix(plugin): 补上换入删除旧目录中途失败时的回滚 (#6691) 2026-09-14 15:12:51 +08:00
Aqr-K
dd4ae3e8d5 refactor(plugin): 移除已无调用者的物理分身源码改写器 (#6683)
物理分身是早期实现:复制整个插件目录,再用字符串替换改写副本源码里的类名、
plugin_config_prefix 和联邦构建产物。虚拟实例接管后,分身不再复制目录,
由装载器改写类身份、按实例 ID 隔离配置与数据,这套改写器随之失去调用者。

求证依据(全仓 git grep,覆盖 app/、tests/、scripts/、docs/、skills/):

- PluginPackageManager.clone() 无任何生产调用者。分身的唯一生产路径是
  POST /api/v1/plugin/clone/{plugin_id} -> PluginManager.clone_plugin()
  -> PluginCloneService.clone(),后者只写 PluginInstance 记录与隔离配置,
  不碰包适配器。clone() 也没有经 PluginSystemServices 暴露出去。
- clone() 的四个私有实现 _modify_plugin_files / _modify_python_file /
  _modify_federation_files / _rename_federation_assets,消费者只有 clone()
  自身与 PluginSystemServices 的同名透传。
- PluginSystemServices 的四个透传,消费者只有 PluginManager 的 _modify_* shim。
- PluginManager 的四个 shim 无任何调用者。动态可达性已单独排查:
  全仓没有 getattr/字符串反射指向这些名字;app/runtime/compat/manifest.py
  不登记它们的别名(只有 app.core.plugin -> 本模块的模块级映射);
  app/sdk/ 不再导出;PluginManager 与 PluginPackageManager 都没有
  __getattr__ 兜底,属性不存在即 AttributeError;官方插件基线
  official-plugin-baseline.json 零命中。
- @observe_compat_facade("PluginManager") 只包装类上已存在的方法,
  不会凭空合成属性,因此 shim 删除后 enforce_facade 再也匹配不到
  notices.py 里那四条 key,登记随之成为不可达数据,一并删除。

替代路径:这四条弃用声明当初承诺的替代目标是
get_plugin_system().package._modify_*(),那是一次「门面搬到适配器」的
重定位登记,本次连同能力一起下线;分身能力本身的替代路径是虚拟实例
PluginCloneService.clone(),它已在生产链路上,见
docs/v2-to-v3-overview.md §3.6「不复制插件源码,也能保持各实例配置隔离」。
既有磁盘上的旧物理分身不受影响:卸载路径读取 is_clone 属性并调用
remove_plugin_package() 的逻辑原样保留,只是不再产生新的物理分身。

这是对已公告弃用 API(DeprecationStage.SILENT,since v3.0.0)的正式移除。

连带改动:
- package.py 的 import re 仅服务于 _modify_python_file,同步移除;模块
  docstring 去掉「分身处理」。
- system.py 的 typing.cast 仅服务于被删透传,同步移除。
- tests/test_plugin_package_manager.py::test_clone_rewrites_python_and_federation_assets
  是这套改写器的唯一测试,且只覆盖已无调用者的路径,随实现一并删除。
  (删的是测试函数不是测试文件,tests/run.py 的分片装箱不变。)
- mypy 低水位随实现下降:app/runtime/extensions/plugin/manager.py 的
  assignment 8->4(四个 shim 的 version/icon 参数 str = None)、
  no-untyped-def 12->11(_rename_federation_assets 缺返回标注),
  fixture 与 docs/refactor/optimization-checklist.md 的全量 mypy 计数
  9,371 -> 9,366 同步更新。依赖、复杂度、ruff、并发等其余基线无变化。

Co-authored-by: jxxghp <jxxghp@gmail.com>
2026-09-14 07:19:46 +08:00
Aqr-K
5c01cdddb3 fix(plugin): 插件安装改为暂存后原子换入,避免下载失败删掉已装插件 (#6678) 2026-09-14 07:00:50 +08:00
developer-wlj
11a2a09bf6 feat(update): 添加exe部署环境下的更新支持 (#6668) 2026-09-13 21:06:59 +08:00
jxxghp
8072b7d78f Refactor application architecture and compatibility boundaries 2026-09-13 12:53:00 +08:00
InfinityPacer
4491610adb 修复插件来源仲裁与数据库备份 review 问题
合并 PR #6658。业务相关检查已通过;剩余失败为 PR-Agent 外部 API 日限额与上游既有复杂度 ratchet,不属于本次改动。
2026-09-12 21:22:01 +08:00
jxxghp
c0158b1f63 fix(plugin): isolate startup recovery failures 2026-09-12 20:39:19 +08:00
InfinityPacer
1ec7005b51 feat(database): back up plugin sqlite databases 2026-09-12 19:53:38 +08:00
ranzhigg
69d4a15571 fix(plugin): preserve binary files in fallback downloads
Write file-list plugin payloads as raw bytes in both sync and async paths so wheel archives remain valid after Release fallback. Add a regression test covering binary payload preservation.

Co-authored-by: Codex <codex@openai.com>
2026-09-09 21:17:06 +08:00
jxxghp
20bcffa9c4 fix(update): support Docker overlay site resource replacement 2026-09-09 07:09:41 +08:00
jxxghp
44c41ec476 fix(config): separate auto-update and dev tracking settings for clarity 2026-09-07 13:35:52 +08:00