219 Commits

Author SHA1 Message Date
Estrella Pan
b129c4437a chore(release): 准备 4.0.0
- 部署文档、升级指南与 README 改为正式版说法:latest = 4.0,3.3 固定为 3.3.7
- docs/changelog/4.0.md 新增 4.0.0 汇总(升级前必读、破坏性变更、新功能、主要修复),链接改为绝对地址
- 文档站与插件市场改为从 main 发布,插件上架 PR 的目标分支改为 main
- 文档站页脚版本 v4.0.0;en/ja README 的 star history 地址
2026-10-24 11:46:50 +02:00
Estrella Pan
bfc7209491 fix(ci): setup-uv 固定到 v10.3.0,折叠面板补上 region 语义
- astral-sh/setup-uv 没有 v10 主版本标签,CI 无法解析 action
- ab-fold-panel 改用 NCollapse 后,标题按钮的父元素不再是整个面板,e2e 用 '..' 找不到面板内的字段。正文改为以标题命名的 region,按钮补上 aria-controls;e2e 改用 getByRole('region')
2026-10-20 13:50:27 +02:00
Estrella Pan
124b156b7a fix: 修复 4.0 工具链升级审查问题
- ab-plugin new 与示例插件的 requires-python 改为 >=3.14,与 SDK 0.6.0 一致
- 示例插件 ntfy-notifier / webhook-on-event 改用 httpx2
- openai / anthropic / google-genai 下限改为实际需要的大版本
- 插件 MCP 工具的 input_schema 无效时计入熔断
- 复制 RSS 链接在 HTTP 部署下回退到 execCommand(useClipboard legacy)
- CI 步骤名、PLAYWRIGHT_VERSION、README 徽章与 e2e 指南改为 Python 3.14 / Playwright 1.64.1
2026-10-20 12:12:58 +02:00
Estrella Pan
a7a3143683 Merge branch 'feat/4.0-toolchain-webui' into feat/4.0-toolchain 2026-10-20 11:49:15 +02:00
Estrella Pan
9b874acec0 chore(ci): 后端 CI 增加 ruff format 检查并登记 blame 忽略清单 2026-10-20 11:42:49 +02:00
Estrella Pan
0f2af080af chore(deps): 后端工具链升级到 Python 3.14,路由统一鉴权并清理 black/urllib3/dict 垫片 2026-10-20 10:43:24 +02:00
Estrella Pan
02e0c3ea63 chore(deps): CI 运行时升级到 Node 24 / pnpm 12,并移除未用依赖
- Node 24、pnpm 12.14.0、pnpm/action-setup@v6,@types/node ^24
- .npmrc 的 public-hoist-pattern 迁入 pnpm-workspace.yaml,新增 allowBuilds
- docs 同步迁移 pnpm 12
- 删除 @vueuse/components、radash、generate-pwa-assets 脚本、失效的 coverage 配置、app AutoImport 的 vitest 预设与 Components dirs
2026-10-20 10:41:07 +02:00
Estrella Pan
d664122af8 fix(plugins): 按 Codex 审查加固插件市场流水线
- 拒绝符号链接形式的条目;PR 检查纳入类型变更(T)
- PR 头部先解析为固定 SHA,作者代码不能借 FETCH_HEAD 换掉被检查的 commit
- 使用已发布的 catalog 前先验签,篡改的 release 资源不会被重新签名
- 全部下架时签发空目录
2026-10-09 10:31:55 +02:00
Estrella Pan
c77f437fc7 fix(plugins): 插件市场流水线按审查意见加固
- 插件公钥移入 module/plugin/,随在线更新包分发,旧镜像更新后也能验签目录
- 合并后每个插件在独立的 job 中构建;签名 job 自己下载复用的 zip 并校验
  sha256,逐个核对新 zip 的 id 与来源,单个插件的构建篡改不到别的插件
- 发布只从 4.0-dev 运行;PR 检查使用 base 分支的脚本与 ab_sdk
- 复用判断加入 path,手动触发可全部重新打包
- 打包前拒绝符号链接;摘要转义作者控制的输出;单个条目出错不影响整份摘要
- 已上架版本以已发布的 catalog 为准,不再拉取旧 commit
- 修复 git diff 把提交范围当作路径的问题
2026-10-09 10:22:55 +02:00
Estrella Pan
eb1598c21e feat(plugins): 插件市场索引与签名发布流水线
- plugins/registry/<id>.toml 指向作者仓库的固定 commit(repo、commit、path)
- scripts/plugin_registry.py:check 在 PR 上校验改动的条目、运行作者测试、
  从 web-src/ 构建前端并写审查摘要;build 在合并后增量打包(commit 未变的
  条目复用已发布的 zip)
- plugin-registry.yml:check / build 不读 secret,sign 只用 PLUGIN_SIGNING_KEY
  签名,不运行作者代码;发布到 release plugins 并删除下架的资源
- 插件目录改用独立的插件公钥 ab_plugin_pubkey.pem,与在线更新密钥分开
- catalog 条目新增 authors、permissions、has_web、repo、commit、readme
- 6 个示例插件上架;上架文档(中 / 英 / 日)、PR 模板与 CODEOWNERS
2026-10-09 10:13:30 +02:00
Estrella Pan
fcf573ae25 Merge refactor/4.0-final into docs/4.0-site 2026-10-08 17:41:10 +02:00
Estrella Pan
4102d77b88 ci(docs): 改用 GitHub Pages 部署文档站,侧边栏加入 4.0 新页面
- 新增 docs.yml:*-dev 分支推送 docs/** 时构建并部署到 GitHub Pages
- 新增 public/CNAME(www.autobangumi.org),删除 vercel.json
- VitePress 排除 plans/、superpowers/,生成 sitemap
- 中英日侧边栏加入升级指南、4.0 更新日志、插件/多下载器/硬链接、插件设置、获取 SDK、数据库与 E2E 指南
2026-10-08 17:36:53 +02:00
Estrella Pan
88950d30a8 fix(4.0): 在线更新包带上 ab_sdk 并要求 4.0 镜像
- build.yml:bundle 打入 backend/src/ab_sdk,min_image_version 设为 4.0.0-beta.1。
  已发布的 3.3 镜像在 beta 通道会选中最新预发布,靠该下限拒绝 4.x bundle。
- boot_overlay:已验签 bundle 必须同时带 module 与 ab_sdk,先换 /app/ab_sdk 再换 /app/module。
- 测试:覆盖层替换 ab_sdk、缺 ab_sdk 时不应用;3.3.6 镜像拒绝 min_image_version
  为 4.0.0-beta.1 的 bundle 且不留存 bundle;build.yml 的 bundle 步骤。
2026-10-08 15:16:33 +02:00
Estrella Pan
3aff767c99 ci(4.0-P7): CI 运行示例插件测试,release 附带 SDK 轮子与插件作者 skill
- test 作业新增示例插件步骤
- release 作业构建 autobangumi-sdk 轮子并压缩 skills/autobangumi-plugin,随 beta 与稳定版一起上传
- 新增 skills/autobangumi-plugin:插件作者 agent skill
- beta tag 原本就创建预发布 release,分类脚本与 Docker 标签不变,新增测试固定该行为
2026-10-08 14:51:00 +02:00
Claude
8ccacb6060 refactor(4.0-P0): 清理死代码与 3.x 兼容层
- 4.0 只支持从 3.3.x 升级:version_check 改为完整 semver 比较,数据低于 3.3
  或残留 2.x data.json 时抛 UnsupportedUpgradeError 中止启动;删除 3.0→3.2
  跨版本迁移、data.json 迁移和 Database.migrate()
- 删除 3.2 兼容的 GET 控制端点与 GET /auth/refresh_token
- 删除旧 JWT 与内存会话实现,密码哈希移到 security/password.py
- 删除 experimental_openai 配置节、通知单 provider 旧字段、3.1 配置字段改名迁移
  与 DEFAULT_SETTINGS;normal 重命名方式迁移为 none
- 删除约 70 处无调用方的函数、方法、模型及未使用的 qB API 封装
- CI 新增 vulture 死代码检查(配置见 pyproject.toml 与 vulture_whitelist.py)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EoBUPFw7Ty1epuPESdELs1
2026-10-08 04:19:53 +00:00
Estrella Pan
76b8cfbb6a ci: add hermetic e2e lanes 2026-07-10 13:51:35 +02:00
Estrella Pan
582144b209 fix: make release classification deterministic 2026-07-10 12:05:02 +02:00
Estrella Pan
122cf68eac fix(ci): release only from manually pushed tags, never from merged PRs
Merging PR #1063 ("Doc update", 3.3-dev -> main) triggered the stable
release path, which fell back to the raw PR title as the version string
and shipped a Docker image tagged Doc-update as :latest — every
container pulling latest then crashed on SemVer parsing (#1065).

The release trigger is now explicit:
- bare X.Y.Z tag -> stable release, refused unless the tagged commit is
  an ancestor of main
- tag containing alpha/beta -> pre-release (unchanged)
- PR merges only run tests and a docker build test

Also pass head.ref through an env var instead of inlining it in the
script (injection hardening), and take release notes solely from the
changelog file since tag pushes carry no PR body.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jejs2dffkscAbhZkcjZ1oK
2026-07-08 16:25:09 +02:00
Estrella Pan
27c04f5f5d feat(update): sign update bundles (ed25519) and stop root uv sync (P1)
Closes the update-chain trust gap: the sha256 came from the same GitHub
release as the bundle (integrity, not authenticity), and the boot overlay
re-applied ab-writable content as root — including uv sync on an
attacker-controllable lockfile.

- signing: new module/update/signing.py verifies an ed25519 signature;
  public key embedded in the image at /app/ab_update_pubkey.pem (outside
  the overlay-replaceable tree, so it is the trust root). Private key lives
  only in CI (UPDATE_SIGNING_KEY secret).
- updater: discover the .zip.sig asset, verify the signature after the
  sha256 check, reject any release without a signature, retain the verified
  bundle.zip+.sig for boot re-verification, and swap them on rollback.
- boot_overlay: re-verify the signed bundle at every boot and extract the
  module tree / webui dist FROM the verified zip — never from the
  ab-writable current/ tree; read the version from the zip manifest, not
  the ab-writable applied.json; drop to the ab user before any fallback
  uv sync so lockfile build hooks can't run as root; zip-slip guard uses
  is_relative_to (also fixed in updater._safe_extract).
- CI: build.yml signs the bundle with UPDATE_SIGNING_KEY and publishes the
  .zip.sig; the build fails if the secret is unset.
- deps: cryptography made an explicit dependency.

Tests cover bad-signature reject, unsigned-release reject, legacy overlay
without a signed bundle reject, verified-bundle retention, and boot-overlay
signature verification. Full backend suite: 1079 passed.

Ops: run `gh secret set UPDATE_SIGNING_KEY < ~/.autobangumi/update-signing-key.pem`
before the 3.3 release.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FAxVyRwrY7z5NotTtgnwVs
2026-07-03 11:15:03 +02:00
Estrella Pan
b34fa62403 feat(update): in-app auto-update via volume-backed overlay
Adds one-click update from the settings page so routine updates no
longer require pulling a new Docker image.

- CI attaches update-bundle-<version>.zip (+ .sha256) to each release:
  backend module tree, built webui, and a manifest; the image bakes
  /app/IMAGE_VERSION as the baseline
- boot_overlay.py (shipped in the image, outside /app/module so it can
  never overwrite its own deciding logic) runs from entrypoint before
  the app starts: if a persisted overlay in /app/config/updates is
  newer than the image it tree-replaces /app/module and /app/dist and
  runs `uv sync` when the lockfile changed; if the image is newer it
  clears the stale overlay. Applied via the config volume, so updates
  survive container recreate; a newer pulled image always wins
- GET/POST /api/v1/update/{check,apply,rollback} (auth-gated, repo
  pinned to EstrellaXD/Auto_Bangumi): check queries GitHub releases
  with a stable/beta channel; apply downloads, verifies sha256, stages,
  promotes current->backup, then exits the process so Docker restarts
  into the overlay; rollback swaps the backup back. Progress streams
  over the existing SSE channel
- Settings card (Log page) shows current/latest, release notes, channel
  toggle, update + rollback, with a restart:unless-stopped requirement
  note; compose examples updated

Requires restart: unless-stopped for self-restart (documented; no
Docker-socket fallback). 1043 backend tests, mypy 0, ruff clean; 135
frontend tests, vue-tsc clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GTnuEgR78cBk32bLNKar3z
2026-07-03 09:22:34 +02:00
Estrella Pan
66dea1af0f chore(types): add mypy to CI and fix ~20 bugs it surfaced
Add mypy>=2.1.0 as a dev dependency with a check_untyped_defs baseline
config and per-module ignore overrides (module.__version__, httpx_socks,
aiohttp, test.* method-assign), and run it in CI right after ruff.

Convert positional Field(value, ...) defaults to Field(default=value, ...)
across models/config.py so pydantic v2 stops treating aliased fields as
required constructor args. Fix real bugs the sweep surfaced: unguarded
None bangumi_id in TorrentManager.refind_poster, RSSAnalyser.torrent_to_data
silently returning None past its declared type, missing __aenter__ guards
on RequestURL/downloader clients, database/engine.py's sync sessionmaker
on an AsyncEngine, and RequestContent.post_json shadowing RequestURL.post_json
(renamed to post_form_json). Remove a dead, type-unsafe str_to_list() helper
in api/bangumi.py.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GTnuEgR78cBk32bLNKar3z
2026-07-02 19:00:37 +02:00
Estrella Pan
c2261ece0a docs(ci): make release changelog lookup version-aware, add 3.3 changelog, fix docker-compose PGID/PUID
Derive the release changelog path from the release version instead of
hardcoding 3.2.md, so the workflow keeps working after 3.3 ships. Add
docs/changelog/3.3.md summarizing the 3.3.0 section of CHANGELOG.md.
Fix docker-compose.yml's PGID/PUID falling back to shell substitution
that never runs in a compose file, using numeric defaults instead, and
drop the obsolete top-level 'version' key. Fix README's Python badge to
3.13 to match backend/pyproject.toml's requires-python.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GTnuEgR78cBk32bLNKar3z
2026-07-02 17:39:49 +02:00
Estrella Pan
42418d5b18 ci: restore release build fix, gate dev-branch PRs, mock the live TMDB test
- Apply the docker-actions/cache fix from 4a513df so 3.3 releases build; fix buildx outputs typo
- Run CI on PRs targeting 3.*-dev; add ruff + frontend lint/vitest steps
- .dockerignore excludes tests and __pycache__ from the image
- test_tmdb mocks the HTTP layer (was hitting the live TMDB API in the default suite)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014w1Z6Nxy6XTRgkFXqPr9Zh
2026-07-02 17:05:50 +02:00
Estrella Pan
07522ae284 ci(release): include pyproject.toml / uv.lock / requirements.txt (#994, #1015)
The release artifact only zipped backend/src, omitting pyproject.toml and
uv.lock, so local deployments couldn't install dependencies. #994 also
reported the missing requirements.txt after the uv migration in 3.2.0.

Install uv in the release job and generate a production-only
requirements.txt via `uv export --no-dev`, then bundle all three alongside
src in the app zip.

Closes #994
Closes #1015
2026-04-19 13:01:27 +02:00
EstrellaXD
e0cca519b5 fix(ci): extract version number from PR title
The workflow was using the full PR title (e.g., 'Release 3.2.1') as the
version string, causing Docker tags and release creation to fail.

Now extracts just the version number (X.Y.Z or X.Y.Z-suffix) from the
PR title, handling formats like 'Release 3.2.1', 'v3.2.1', or '3.2.1'.
2026-01-27 10:59:21 +01:00
EstrellaXD
7b5c8d9ac5 chore: upgrade Python version to 3.13
- Update requires-python to >=3.13 in pyproject.toml
- Update ruff and black target versions to py313
- Update Dockerfile to use python:3.13-alpine
- Add explicit Python 3.13 setup in CI workflow
- Regenerate uv.lock for Python 3.13

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 16:30:25 +01:00
Estrella Pan
82c641aba8 ci: use changelog file as release body for pre-releases
Tag pushes (beta/alpha) don't have a PR body, so fall back to reading
docs/changelog/3.2.md for the release notes.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-24 06:55:26 +01:00
Estrella Pan
938cd265aa ci: remove arm/v7 platform from Docker build
The uv builder image (ghcr.io/astral-sh/uv:0.5-python3.12-alpine) only
supports amd64 and arm64, not arm/v7.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-24 06:31:42 +01:00
Estrella Pan
b28f1b4431 ci: upgrade actions/upload-artifact and download-artifact to v4
v3 is deprecated and GitHub now rejects it, causing build-webui to fail.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-24 06:27:37 +01:00
Estrella Pan
e25d4f08a1 ci: run build-webui and build-docker on open PRs from dev branches
Previously the build pipeline only ran after a PR was merged to main.
Now it also runs as a test build (push: false) when a PR is opened or
updated from a *-dev branch, allowing build verification before merge.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-01-24 06:25:45 +01:00
EstrellaXD
9c5474d8e9 feat: migrate backend to uv package manager
Replace pip + requirements.txt with uv for dependency management.

- Multi-stage Dockerfile using ghcr.io/astral-sh/uv builder image
- CI updated to use astral-sh/setup-uv@v4
- Ruff config moved to [tool.ruff.lint] (fixes deprecation)
- Transitive deps removed, missing direct deps added (requests, PySocks, urllib3)
- Database layer migrated to async (AsyncSession + aiosqlite)
- Tests updated to match async database interface

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 12:56:23 +01:00
Rewrite0
7913061f45 ci: modify process 2024-05-31 16:37:22 +08:00
Rewrite0
8e05b5ed19 ci: add webui build test 2024-05-31 16:13:26 +08:00
Rewrite0
b0eef9e8d2 fix: ci pnpm version 2024-05-31 16:05:52 +08:00
EstrellaXD
004b1cefeb fix: error in build webui 2024-04-10 15:58:53 +08:00
DDSDerek
6396c42062 feat: Local deployment files are provided requirements.txt 2023-10-13 23:58:53 +08:00
DDSRem
08e47fdbbc feat: add version number to app file 2023-10-04 19:38:57 +08:00
DDSRem
3acee793e4 feat: provide complete program installation package 2023-10-04 19:23:20 +08:00
EstrellaXD
6b63ed1c2a fix: ci 2023-10-03 23:00:31 +08:00
EstrellaXD
b35fdf1da9 docs: update rss. ci 2023-10-02 16:40:46 +08:00
EstrellaXD
2380e21868 docs: adjust ci, and adjust index icon. 2023-10-02 16:37:17 +08:00
EstrellaXD
cb628cfe8c docs: update index, update ci. 2023-10-02 15:46:45 +08:00
EstrellaXD
9c48ff5051 docs: update ci. update 3.1 docs. 2023-10-02 15:43:37 +08:00
EstrellaXD
4cb2f685f6 fix: version tag problem. 2023-09-24 14:50:58 +08:00
EstrellaXD
8d48d682be fix: version tag problem. 2023-09-24 14:43:36 +08:00
EstrellaXD
a07557f564 fix: version tag problem. 2023-09-24 14:39:17 +08:00
EstrellaXD
f936bd8a2e fix: remove create tag action 2023-09-24 14:24:35 +08:00
EstrellaXD
b7c2eb8435 fix: ci problem. 2023-09-24 14:11:13 +08:00
EstrellaXD
0a6538a541 fix: ci problem. 2023-09-24 14:10:38 +08:00
EstrellaXD
50031d41c0 fix: ci problem. 2023-09-24 14:09:47 +08:00