From 821d7301ded57be7a2ecc56e05049af92949208f Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sat, 5 Sep 2026 18:29:07 +0800 Subject: [PATCH] fix(subscribe): synchronize queue contracts --- app/db/adapters/subscriptionsearch.py | 2 +- docs/architecture/agent-api-surface-audit.json | 6 +++--- docs/architecture/agent-api-surface-audit.md | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/db/adapters/subscriptionsearch.py b/app/db/adapters/subscriptionsearch.py index 087313d63..d30b63019 100644 --- a/app/db/adapters/subscriptionsearch.py +++ b/app/db/adapters/subscriptionsearch.py @@ -131,7 +131,7 @@ class TransactionalSubscriptionSearchRepository: async with self._async_session_factory() as session: unit_of_work = SqlAlchemyAsyncUnitOfWork(session) try: - result = await session.run_sync( + result: T = await session.run_sync( lambda sync_session: operation(SubscriptionSearchOper(sync_session)) ) await unit_of_work.commit() diff --git a/docs/architecture/agent-api-surface-audit.json b/docs/architecture/agent-api-surface-audit.json index 4f834c3bb..e15ae5c79 100644 --- a/docs/architecture/agent-api-surface-audit.json +++ b/docs/architecture/agent-api-surface-audit.json @@ -3546,7 +3546,7 @@ "owner": "host-ui", "path": "/api/v1/subscribe/execution/batches", "reason": "Background subscription execution status and cancellation are owned by the authenticated frontend workflow; they are not yet a stable Agent gateway contract.", - "summary": "查询订阅搜索批次状态", + "summary": "查看订阅搜索进度", "tags": [ "subscribe" ] @@ -3558,7 +3558,7 @@ "owner": "host-ui", "path": "/api/v1/subscribe/execution/batches/{batch_id}", "reason": "Background subscription execution status and cancellation are owned by the authenticated frontend workflow; they are not yet a stable Agent gateway contract.", - "summary": "查询订阅搜索批次", + "summary": "查看一次订阅搜索", "tags": [ "subscribe" ] @@ -3570,7 +3570,7 @@ "owner": "host-ui", "path": "/api/v1/subscribe/execution/batches/{batch_id}/cancel", "reason": "Background subscription execution status and cancellation are owned by the authenticated frontend workflow; they are not yet a stable Agent gateway contract.", - "summary": "取消订阅搜索批次", + "summary": "停止一次订阅搜索", "tags": [ "subscribe" ] diff --git a/docs/architecture/agent-api-surface-audit.md b/docs/architecture/agent-api-surface-audit.md index 33af87440..aefc15821 100644 --- a/docs/architecture/agent-api-surface-audit.md +++ b/docs/architecture/agent-api-surface-audit.md @@ -305,9 +305,9 @@ | `POST` | `/api/v1/subscribe/` | subscribe | `gateway` | subscription.add | 新增订阅 | | `PUT` | `/api/v1/subscribe/` | subscribe | `gateway` | subscription.update | 更新订阅 | | `POST` | `/api/v1/subscribe/check` | subscribe | `gateway` | subscription.metadata.refresh | 刷新订阅 TMDB 信息 | -| `GET` | `/api/v1/subscribe/execution/batches` | subscribe | `ui_presentation` | host-ui | 查询订阅搜索批次状态 | -| `GET` | `/api/v1/subscribe/execution/batches/{batch_id}` | subscribe | `ui_presentation` | host-ui | 查询订阅搜索批次 | -| `PUT` | `/api/v1/subscribe/execution/batches/{batch_id}/cancel` | subscribe | `ui_presentation` | host-ui | 取消订阅搜索批次 | +| `GET` | `/api/v1/subscribe/execution/batches` | subscribe | `ui_presentation` | host-ui | 查看订阅搜索进度 | +| `GET` | `/api/v1/subscribe/execution/batches/{batch_id}` | subscribe | `ui_presentation` | host-ui | 查看一次订阅搜索 | +| `PUT` | `/api/v1/subscribe/execution/batches/{batch_id}/cancel` | subscribe | `ui_presentation` | host-ui | 停止一次订阅搜索 | | `GET` | `/api/v1/subscribe/files/{subscribe_id}` | subscribe | `gateway` | subscription.files | 订阅相关文件信息 | | `DELETE` | `/api/v1/subscribe/follow` | subscribe | `gateway` | subscription.follow.delete | 取消Follow订阅分享人 | | `GET` | `/api/v1/subscribe/follow` | subscribe | `gateway` | subscription.follow.list | 查询已Follow的订阅分享人 |