> For the complete documentation index, see [llms.txt](https://summerain-1.gitbook.io/summerain/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://summerain-1.gitbook.io/summerain/zh-cn/fa-bu-shuo-ming/v2.0.9.md).

# V2.0.9

> 开发预发布版本。此版本从 `dev` 分支发布，可能会快速接收后续更改，不会被默认的 `latest` 镜像标签选择。

## 概述

v2.0.9 为 `GET /api/v1/uploads/recipe` 增加了客户端提示字段，让浏览器可以按服务端策略 而不是硬编码取值来确定上传流水线规模。所有既有字段的名称、类型与含义保持不变，新增键为 追加式变更，因此为旧版本编写的客户端可以照常解析该响应。

服务端仍独立校验每次请求：这些提示不会扩大服务端接受的取值范围。

## 变更内容

### 配方客户端提示

* `max_source_bytes`（默认 `15728640`，由 `V2_MAX_SOURCE_BYTES` 提供，范围 1 MiB 到 64 MiB）：浏览器在处理前接受的源文件体积上限。
* `client_pipeline_concurrency`（默认 `2`，由 `CLIENT_UPLOAD_PIPELINE_CONCURRENCY` 提供，范围 1 到 8）：浏览器上传流水线并发提示。
* `client_active_session_concurrency`（默认 `4`，由 `CLIENT_ACTIVE_SESSION_CONCURRENCY` 提供）：并发上传会话提示值；不得超过 `V2_MAX_ACTIVE_SESSIONS_PER_USER`，若部署调低了服务端上限，也必须同步调低该值。
* `client_max_native_concurrency`（默认 `2`，由 `CLIENT_MAX_NATIVE_CONCURRENCY` 提供，范围 1 到 4）：原生（Canvas/Pica）处理器并发提示。
* `supported_source_mime_types` 与配方接受的源格式保持一致。
* 四个新变量的非法取值会在连接 MySQL 之前中止启动，生效值会出现在启动摘要日志中。

### 文档

* `docs/API.md` 记录了新增键，并给出完整的配方响应示例；`docs/USAGE.md` 列出了四个新变量。 两个页面与其简体中文、日文镜像在同一变更中同步更新。

## 验证

* 后端 `go build ./...`、`go vet ./...`、`go test ./...`：通过。
* 前端 ESLint、Vite 生产构建与 Vitest（17 个测试文件、131 个测试）：通过。
* 契约测试会序列化配方响应，断言每个既有键的取值不变，同时新提示等于配置值； 另有一个处理器测试覆盖响应封装。
* 配置测试覆盖默认值、边界，以及 `CLIENT_ACTIVE_SESSION_CONCURRENCY` 与 `V2_MAX_ACTIVE_SESSIONS_PER_USER` 的关系。
* Python requirements lock 验证与 GitBook 文档验证：通过。

## 安装

必须显式拉取开发镜像：

```bash
docker pull jaykserks/summerain:dev-v2.0.9
```

等效的精确开发标签：

```
jaykserks/summerain:dev-2.0.9
```

移动的 `dev` 标签也指向最新的成功开发构建。`latest`、`main` 和稳定的语义版本别名 不受此版本影响。

从 v2.0.8 升级不需要数据库迁移或 API 迁移。

## 已知限制

* 这些提示是建议值；本版本不修改前端，前端将在后续客户端配置阶段开始读取它们。
* 将 `V2_MAX_ACTIVE_SESSIONS_PER_USER` 调低到已配置的 `CLIENT_ACTIVE_SESSION_CONCURRENCY` 之下现在会直接导致启动失败，而不再静默忽略不一致。
* 动画图像支持仍计划在后续版本中实现。

## 相关工作

此版本实现了 `PHASES-2-8-PLAN-v2.md` 的**阶段 4**。

**下一阶段**：阶段 5（v2.0.10）让前端读取这些取值，并在服务端策略、设备能力与前端安全 上限之间取最小值。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://summerain-1.gitbook.io/summerain/zh-cn/fa-bu-shuo-ming/v2.0.9.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
