@huluohu
76a4e33e44
fix(telegram): Rich Message 失败时保留原始错误并降级纯文本 ( #6993 )
...
* fix(telegram): Rich Message 失败时保留原始错误并降级纯文本
Telegram Rich Message 发送失败时存在三个叠加问题:
1. `__send_rich_message` 用固定文本 `RetryException("发送 Telegram Rich
Message 失败")` 包装异常,`str(e)` 里没有 Telegram 返回的 description,
日志只剩“发送失败”四个字,无法判断是内容非法、方法不存在还是格式问题。
2. 内容非法这类确定性失败(400)同样走满3 次退避重试(3s、6s),
期间同一条坏消息反复阻塞,且最终报错仍无有效信息。
3. 失败即丢失通知:Rich Message 发不出去时没有任何降级路径,
整条通知直接消失。
改动:
- 异常文本改为 f"...失败:{err}",保留 Telegram 原始 description 与错误码。
- 新增 `NonRetryableTelegramError`(继承 `ImmediateException`)与
`_is_non_retryable_api_error`,400 立即抛出以跳过 retry 退避;
5xx 与网络异常保持原有重试策略。
- `send_msg` / `edit_msg` 增加纯文本降级出口,Rich Message 失败时
用不带格式解析的纯文本重发,保证通知内容不丢失。
- 降级路径显式传 `parse_mode=""`:`TelegramBotApi._parse_mode` 在参数为
`None` 时会回落到客户端默认的 MarkdownV2,那正是 Rich Message 已经
失败过的解析路径,漏传会让降级重演同一个错误。
新增 tests/test_telegram_rich_message_fallback.py(14 项)覆盖错误信息保留、
400 免重试、5xx 仍重试、发送与编辑两条降级路径,以及 parse_mode 回落陷阱的
回归防护。
* fix(telegram): 修正 Rich Message 降级路径的 mypy 与架构基线
上一提交引入的两处门禁失败:
1. `__send_plain_fallback` 用 `**self._topic_kwargs(chat_id)` 展开参数,mypy
把 `**` 匹配到 `send_message` 第 5 个形参 `disable_web_page_preview`
(Optional[bool]),判定 `dict[str, int]` 不兼容,arg-type 由 1 增至 2。
改为显式传 `message_thread_id`,`_topic_kwargs` 只可能产出该键。
2. 新增 `app.schemas.exception` 导入带来 2 条依赖边,宿主基线由 9542 变为
9544。已用 `baseline.py --write-host` 固化,其余 3 个基线文件字节不变。
连带影响:docs/architecture-overview.md 与 docs/refactor/
optimization-checklist.md 硬编码了边数,`test_architecture_documents_
match_generated_quality_metrics` 断言两处必须与基线一致,同步为 9,544。
门禁与测试验证:
- scripts/architecture/mypy_ratchet.py exit 0(9163 个类型错误)
- scripts/architecture/baseline.py --check-host exit 0
- pytest(fallback + contract + telegram) 75 passed
---------
Co-authored-by: jxxghp <jxxghp@gmail.com >
2026-10-15 07:32:16 +08:00
flippedyizheng
3484e6a82d
fix(scheduler): skip CookieCloud schedule when credentials are missing ( #6999 )
...
定时同步仅在来源与凭据完整时注册,并在相关配置变更时重建任务;
手动同步入口保持不变。
Fixes #6995
Co-authored-by: jxxghp <jxxghp@gmail.com >
2026-10-15 07:27:22 +08:00
jxxghp
57b883d2bf
feat(music): add global local cover control
2026-10-15 07:20:44 +08:00
flippedyizheng
19f9098d68
fix(mediaserver): require unambiguous title-year match for cross-source fallback ( #6998 )
2026-10-15 07:15:06 +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
43d50c387f
fix(feishu): recover expired streaming cards with bounded retries
...
Reopen closed CardKit streams once and preserve monotonic sequences across recovery and finalization. Back off failed updates per card while retaining unsent Agent text.
Refs #6984
2026-10-14 12:54:29 +08:00
pyss56
b18833f912
fix(agent): preserve generated skill contracts and API guidance ( #6991 )
...
* feat(agent): scripted generation of agent skill docs with operation/field notes
Generate skills/moviepilot-api API docs from scripts/generate_agent_skill_docs.py
instead of hand-editing:
- surface canonical MediaType agent keys in the API contract
- add subscribeactivity table note and global operation notes
- preserve upstream search.torrents execution semantics via field notes
Co-Authored-By: pavel2 <pavelyuan468@gmail.com >
* fix(agent): preserve generated skill contracts and English guidance
---------
Co-authored-by: jxxghp <jxxghp@gmail.com >
2026-10-14 11:39:24 +08:00
jxxghp
13a58be2a6
feat(notifications): render structured results by channel capabilities
2026-10-14 08:05:41 +08:00
jxxghp
b82bbcb420
fix(webhook)!: guard unknown movie paths in transfer history
...
Recover Jellyfin deletion paths from webhook payloads or bounded server-scoped caches. Avoid querying deleted items and preserve TV season/series lookup behavior.
BREAKING CHANGE: Movie and unspecified-type history queries without a destination now return no records unless match_all_versions=True is explicitly requested.
Refs #6988
2026-10-13 23:48:10 +08:00
jxxghp
64e970215b
test(download): define blacklist state in credential fixtures
2026-10-13 22:03:05 +08:00
jxxghp
c4cd6c8ac4
fix(download): confirm tracker forms and blacklist invalid torrents
2026-10-13 21:54:37 +08:00
jxxghp
8cbba9916e
fix(subscribe): prefer complete packs for initial TV downloads
2026-10-13 21:16:22 +08:00
jxxghp
48cffca3a1
feat(transfer): aggregate successful notifications by batch ( #6981 )
2026-10-13 17:21:17 +08:00
jxxghp
98bd038623
fix(music): reconcile album completion and prevent duplicate downloads
...
Recover complete release coverage from successful local transfers and audio tags/CUE before subscription searches. Keep release-group and album boundaries, and reject completed torrent hashes before downloader submission.
2026-10-13 17:05:57 +08:00
JontyLee
a94dac60a9
fix(music): fall back to tags when cue index is broken for split albums ( #6978 )
2026-10-13 15:32:19 +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
DennyHo0917
f4cd7d02ad
feat(llm): add API Route provider ( #6972 )
...
Signed-off-by: dennyho0917 <dennyho0917@gmail.com >
Co-authored-by: jxxghp <jxxghp@gmail.com >
2026-10-13 07:25:47 +08:00
jxxghp
435703573e
fix(transfer): persist provider checkpoint planning time
...
Write planned_at atomically for provider_pending checkpoints and refresh it when host planning takes over. Cover real admission-to-execution persistence and distinguish incomplete plan fields from inconsistent execution checkpoint fields.
Refs #6973
2026-10-13 07:13:42 +08:00
jxxghp
0c640be189
fix(qqbot): reconnect when the gateway requests a new connection
2026-10-13 07:13:01 +08:00
jxxghp
04126ce63e
fix(tmdb): skip image queries for unsupported recognition sources
2026-10-13 07:00:05 +08:00
jxxghp
26185d4ad0
docs(subscribe): account for four activity modules in startup contract
2026-10-12 23:49:43 +08:00
jxxghp
86c7fccfd5
feat(subscribe): persist business activity with scoped details
2026-10-12 23:43:01 +08:00
jxxghp
6ef8408f43
fix(bangumi): merge tmdb classification metadata for aux source ( #6968 )
...
Bangumi 等主识别源缺少 original_language/origin_country 标准字段,引用这些字段的分类规则整体失效并落入未分类;TMDB 辅助补充已有 genre_ids 合并,补齐语言与国家标准字段,仅填充主来源缺失值。
2026-10-12 17:49:40 +08:00
jxxghp
c8e935fc6c
fix(agent): point capability entrypoints at canonical manager module ( #6969 )
2026-10-12 17:47:56 +08:00
jxxghp
899a0eb85b
test(subscribe): verify progress preserves persisted extra fields
2026-10-12 13:46:03 +08:00
jxxghp
de7726c6fc
fix(subscribe): reconcile partial library progress ( #6966 )
2026-10-12 13:38:24 +08:00
jxxghp
6f9c0756c1
fix(download): reuse torrent content before resolving tickets ( #6967 )
2026-10-12 13:34:41 +08:00
jxxghp
99ef7e508b
fix(indexer): support custom seeding and Unit3D bonus pages
2026-10-12 08:36:19 +08:00
jxxghp
bd1e6eb899
fix(agent): separate public API queries from bound user operations
2026-10-12 07:30:35 +08:00
jxxghp
7a853577d8
fix(subscribe): preserve original execution log content
2026-10-12 06:58:01 +08:00
jxxghp
ad4f8fbd64
test(subscribe): align regression imports with Ruff policy
2026-10-11 22:23:58 +08:00
jxxghp
391f55df40
feat(subscribe): add isolated execution logs with authorized streaming ( #6963 )
2026-10-11 22:18:37 +08:00
InfinityPacer
b174d3caf8
fix(testing): register runtime configuration in shared plugin bootstrap
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-11 20:56:48 +08:00
jxxghp
28e1cb3a2f
refactor: move site collector releases and sources to independent repository
2026-10-11 14:12:52 +08:00
jxxghp
01301b887a
fix(plugin): accept underscore IDs in instance validation ( #6962 )
2026-10-11 13:59:38 +08:00
jxxghp
453a3479aa
fix(music): keep detached audio readable on ACL mounts ( #6961 )
2026-10-11 13:24:29 +08:00
jxxghp
ec0b77e885
fix: 校验采集器草稿绑定提交以支持安全重试
2026-10-11 12:25:31 +08:00
jxxghp
c670432882
fix(transfer): preserve success on size overwrite decline ( #6960 )
2026-10-11 12:22:10 +08:00
jxxghp
54b6368340
feat: 独立发布站点采集器并按输入变化递增版本
2026-10-11 12:18:45 +08:00
jxxghp
4059877088
fix(search): preserve full collection for whole-season subscriptions
...
Retain episode targets while keeping the whole-season barrier across paging and checkpoint recovery. Full scans no longer stop at the latest episode observed on early pages.
2026-10-11 07:53:45 +08:00
jxxghp
0cbdbf9b1d
fix(search): cap paging and stop unmatched IMDb sources
2026-10-11 07:46:38 +08:00
jxxghp
5b8b16b38a
fix(workflow): restore torrent node outputs before consumption ( #6959 )
2026-10-11 07:41:15 +08:00
jxxghp
63055f84d1
fix(download): recover omitted site credentials for torrent fetch
2026-10-11 07:36:54 +08:00
InfinityPacer
d9ac4cc429
feat(plugin): expose remote entry and version on agent pets
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-11 04:08:15 +08:00
InfinityPacer
40e80f43f5
fix(plugin): advance runtime generation when a plugin is enabled or disabled
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-11 04:08:15 +08:00
InfinityPacer
ab729be4ed
docs(skills): document get_agent_pets in plugin authoring skill
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-11 04:08:15 +08:00
InfinityPacer
e97f64e777
feat(plugin): add avatar to agent pet declarations
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-11 04:08:15 +08:00
InfinityPacer
25aaf3a32b
feat(plugin): add agent pet extension contract
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-11 04:08:15 +08:00
InfinityPacer
9117ebd69c
fix(download): let labelled full-season packs compete in whole-season phase
...
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com >
2026-10-11 01:25:46 +08:00