Commit Graph

414 Commits

Author SHA1 Message Date
jxxghp
4955b7b9ea fix: harden backend isolation and execution safety 2026-10-16 09:11:28 +08:00
jxxghp
72c8bff312 feat(music): preserve local covers and fall back after online scraping fails 2026-10-14 23:15:41 +08:00
jxxghp
c670432882 fix(transfer): preserve success on size overwrite decline (#6960) 2026-10-11 12:22:10 +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
jxxghp
db4e898005 style(monitor): normalize snapshot imports 2026-10-03 08:47:31 +08:00
jxxghp
66e791603c fix(monitor): type snapshot reconciliation state 2026-10-03 08:43:31 +08:00
jxxghp
cac298fd02 fix(monitor): keep snapshot reconciliation within complexity budget 2026-10-03 08:33:15 +08:00
ranzhigg
1965cc4de7 perf(monitor): index incremental snapshot reconciliation 2026-10-01 15:49:12 +08:00
freeman
ed0460fc8b fix(smb): keep remote snapshots complete and recoverable 2026-09-30 21:19:41 +08:00
jxxghp
0833169781 fix(smb): restore multi-share capacity and diagnose unmapped paths 2026-09-30 13:12:25 +08:00
jxxghp
ee9fbf2264 feat(smb): mount multiple shares in one storage service 2026-09-30 11:27:24 +08:00
jxxghp
61e9ef7d8e fix(transfer): organize remote downloads on the SMB server 2026-09-30 10:36:56 +08:00
jxxghp
979f625017 feat(music): recognize and archive whole-album CUE resources 2026-09-30 02:59:57 +08:00
jxxghp
512bd102ea fix(smb): clear stale state before reconnecting storage 2026-09-29 23:35:36 +08:00
InfinityPacer
313f894052 perf(memory): import storage and passkey SDKs on demand
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 03:46:22 +08:00
jxxghp
8072b7d78f Refactor application architecture and compatibility boundaries 2026-09-13 12:53:00 +08:00
jxxghp
990e3ac3ae fix(module): enhance documentation for transfer plan checkpoint method parameters 2026-09-13 12:38:20 +08:00
jxxghp
765b185d42 fix(module): add preview parameter to transfer plan checkpoint method 2026-09-13 12:33:50 +08:00
jxxghp
49cc9bc63c fix(transfer): guide manual review recovery in logs 2026-09-12 12:03:14 +08:00
jxxghp
d32d17568a fix(runtime): apply configuration changes without restart 2026-09-11 00:12:05 +08:00
jxxghp
3331ba43cd fix(transfer): settle missing library directory as planning rejection 2026-09-08 18:37:14 +08:00
jxxghp
6ae5b9d9f0 fix(transfer): preserve frozen source step identity 2026-09-07 12:20:44 +08:00
jxxghp
0528e531e3 fix(transfer): keep directory intercept intent stable 2026-09-03 16:14:58 +08:00
jxxghp
71147c1d96 feat(classification): support multi-source media rules 2026-09-03 11:51:18 +08:00
jxxghp
c4d8185d8d refactor(transfer): keep planning rejection within complexity budget 2026-09-01 07:42:53 +08:00
jxxghp
94716484b7 fix(transfer): resolve durable failure recovery issues 2026-09-01 07:11:06 +08:00
jxxghp
b4b5f82511 refactor(modules): narrow package root exports 2026-08-29 21:19:00 +08:00
jxxghp
27f357b1d2 fix(transfer): create local target before remote download (#6493) 2026-08-29 10:35:24 +08:00
jxxghp
92e745fc97 refactor(architecture): split chain owners and close runtime boundaries 2026-08-28 22:26:19 +08:00
jxxghp
f134e068e7 refactor: normalize capability module paths 2026-08-27 22:20:38 +08:00
jxxghp
e82ce8447c refactor: complete durable transfer execution settlement 2026-08-27 20:27:42 +08:00
jxxghp
23bff6b2bb refactor: add durable transfer planning checkpoints 2026-08-27 13:16:33 +08:00
jxxghp
9dbe424c3d refactor(config): retire RuntimeSettingsCompat host usage 2026-08-26 15:55:21 +08:00
jxxghp
574c50586e feat(music): 完善歌词与专辑目录整理 2026-08-25 21:02:26 +08:00
jxxghp
b914e8b6e4 refactor: strengthen architecture CI gates and runtime contracts 2026-08-25 17:02:29 +08:00
InfinityPacer
f64030a074 fix(imports): use concrete modules for internal symbols (#6427) 2026-08-23 21:28:37 +08:00
jxxghp
baf4e883b2 refactor: route storage adapter settings through runtime 2026-08-23 03:25:08 +08:00
jxxghp
dd6405389c refactor: route storage module settings through runtime 2026-08-23 03:12:51 +08:00
jxxghp
5128ae9e1e refactor: 推进后端分层架构治理 2026-08-18 00:29:14 +08:00
InfinityPacer
24671f8f18 refactor(runtime): lazily activate host modules (#6331) 2026-08-16 16:07:38 +08:00
jxxghp
7d0cf76d9c fix(storage): 修复通用管理契约下存储页报未知错误
- usage 动作返回的 StorageUsage pydantic 模型无法透过
  Response[Dict[str, Any]] 开放映射校验导致 500,统一转为 dict
- support_transtype 返回值恢复 transtype 包装结构,与前端期望一致
- 空结果(无用量/无整理方式)恢复成功空结构语义,
  不再因 bool(结果) 被前端客户端当作业务失败弹窗
- dashboard 用量聚合改为 dict 取值;新增响应校验与空结果回归测试
2026-08-16 07:50:29 +08:00
jxxghp
a6dbd799d5 refactor(api): 渠道与存储管理端点通用化,端点层零目标特色
- schemas 新增公共 ManageRequest(target+action+params) 与 StorageAction 词汇表
- endpoint 层收敛为 POST /notification/manage、/storage/manage 两个通用接口,
  不再定义任何渠道/存储特定的名称、参数与响应字段,前端上送参数原样透传
- chain 层 manage_channel/manage_storage 接受字符串标识纯透明转发,
  StorageChain 移除全部特色管理方法
- FileManagerModule 新增 storage_manage 统一入口,模块返回归一化为
  {success, message, data};wechatclawbot channel_manage 同步归一化,
  路由标识兼容枚举名/值/对象
- dashboard 与 agentopsassistant 的用量查询改走 manage_storage(usage)
- 新增 10 项存储契约守护测试,通知侧补充 3 项链透传与字符串路由测试,
  API 守护测试对 ManageRequest 开放映射按设计豁免
2026-08-16 07:18:49 +08:00
jxxghp
02f0dd0b9a refactor(architecture): 修复模块依赖违规并强化架构守护
- 字幕编排上移 DownloadChain.download_site_subtitles,SubtitleModule 仅保留站点链接解析
- TransferChain.recommend_name 上移 TV episodes_info 获取,filemanager 模块不再导入 TmdbChain
- endpoint 穿透修复:WXBizMsgCrypt3 迁至 adapters/external/wechat_crypt.py;
  music/tmdb 缓存管理、listenbrainz 常量、TMDbException、WechatClawBot 辅助统一经 chain 包装
- RuleParser 与 builtin_rules 合并为 application/filter_rules.py;
  fsproxy/fsworker 迁至 adapters/system/
- chain/__init__.py 删除 qbittorrentapi/transmission_rpc 导入,消除后端协议类型泄漏
- 架构守护测试新增三项检查:模块间隔离、入口层穿透、下载器 SDK 泄漏
- 文档同步:05-architecture.md 记录 DB/Oper 聚合例外与迁移文件位置,AGENTS.md 更新所有权表
2026-08-16 04:59:17 +08:00
jxxghp
96118e73e7 refactor(string): split utilities by responsibility 2026-08-15 08:03:55 +08:00
jxxghp
369d7d6448 refactor: reorganize backend module boundaries 2026-08-14 19:53:33 +08:00
jxxghp
7b3444c366 refactor backend module architecture 2026-08-14 15:45:38 +08:00
kami
626e6cb472 fix(storage): refresh 115 upload token when SecurityTokenExpired (#6296) 2026-08-13 15:23:29 +08:00
Aqr-K
eeec40cce3 fix(monitor): 消除探测饿死与重试饥饿导致的跨目录连坐 (#6291) 2026-08-13 14:00:50 +08:00
Aqr-K
a2e70b443d fix(monitor,transfer): 修复 FUSE 挂载无响应导致的监控冻死、整理链锁死与漏件 (#6276)
* wip(v3): 移植监控与整理韧性修复到 v3 基线

包含:监控看门狗隔离/挂载探测、整理队列持久化、文件系统子进程代理、
写入原子化。迁移重挂到 v3 链 8a4c7e1d2f90 -> 7f5c1d2e3a4b -> e3d9f4b7c806。
tmdb 相关测试尚未通过,待定位。

* fix(v3): 修正移植引入的 16 项测试失败

- poller.py:合并时我方保留的行仍用旧变量名 merged_snapshot,而 v3 已统一
  改名为 current_snapshot,导致 NameError 被外层 except 吞掉、快照从未保存
- smb.py:采纳 f-string 拆分写法,恢复 Python 3.11 可解析
- dispatcher 测试:历史查重由 _should_skip_by_history 统一承担,mock 点随之调整
- tmdb 缓存测试:补充 v3 新增的 media_source/media_id 字段
- tmdb 重试测试:为 fake 补充 match_multi/async_match_multi

尚余 3 项与 v3 识别流程的连接失败处理有关,待单独判断。

* fix(v3): 测试适配 v3 的 media_source/media_id 重构

v3 将媒体标识从 tmdbid 统一重构为 media_source + media_id,recognize_media
的 tmdbid 参数已被 **kwargs 静默吞掉——传了也不生效,流程会误降级到名称搜索。
tmdb 重试用例改用新参数后恢复正确路径。

同时修正 fake 的 match_multi 语义:真实实现(tmdbapi.match_multi)吞掉所有
异常并返回 None,连接失败与「未找到」在该路径上本就不可区分,fake 需保持一致。

至此移植引入的 19 项失败全部清零。

---------

Co-authored-by: Aqr-K <Aqr-K@users.noreply.github.com>
2026-08-13 08:19:54 +08:00
jxxghp
baf8850d63 refactor(api): standardize responses and restore media config contracts 2026-08-12 23:15:13 +08:00