mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-11-07 06:19:43 -10:00
docs(managed-agent): note the private CSI receipt exception and correct lease wording (#16000)
The artifacts.enabled row said committed tool receipts are always recorded for projection. Sessions created through the private CSI lane (csi-session) are the exception: ManagedSessionStore records receipts only when the commit has no CSI original, and the projection claim skips csi_guard Sessions as well. The automation.lease row now counts the lease from the claim of each definition rather than from a scanner tick, matching the scanner-threads row. The AutomationLedgerStore Javadoc no longer says an expired lease alone stops a writer: its writes check owner and fence, so they are refused only once another writer claims the definition.
This commit is contained in:
1 parent
1886aa7221
commit
43415ed8a4
4 files changed
+12
-10
No files matched your search
@@ -52,7 +52,7 @@ Projection of Hosted Shell tool results into public tool results and downloadabl
|
||||
|
||||
| Property | Variable | Type | Default | Description |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `enabled` | — | boolean | `false` | Whether tool results are projected into public tool results and artifacts, and whether the artifact read API is served. Reads answer not found unless `qwen.managed-agent.tool-publication.enabled` is also true, and they require an authenticated actor. Even while it is false, committed tool receipts are still recorded for projection, so turning it on later also projects the tool results recorded while it was off. |
|
||||
| `enabled` | — | boolean | `false` | Whether tool results are projected into public tool results and artifacts, and whether the artifact read API is served. Reads answer not found unless `qwen.managed-agent.tool-publication.enabled` is also true, and they require an authenticated actor. Even while it is false, committed tool receipts are still recorded for projection, so turning it on later also projects the tool results recorded while it was off. Sessions created through the private CSI lane (the `csi-session` admin command) are the exception: their receipts are never recorded, so their tool results are never projected. |
|
||||
| `max-concurrent-reads` | — | integer | `4` | How many artifact content downloads this server process serves at once; a download beyond that gets HTTP 429 `artifact_read_limit` with `Retry-After: 1`. Must be at least 1 (startup refusal). |
|
||||
| `projection-interval` | — | duration | `1000` | How often the tool-result projection pass runs; each pass projects up to 8 pending tool results into public tool results and artifacts. A plain number is milliseconds; a value with a unit such as `1s` is also accepted. The pass does nothing unless `qwen.managed-agent.artifacts.enabled` is true. |
|
||||
| `publish-original` | — | boolean | `false` | Whether projection publishes the sealed stdout and stderr streams of a tool result as downloadable artifacts, and whether an actor who can read the Session may download them. Requires `qwen.managed-agent.artifacts.enabled`. |
|
||||
@@ -81,7 +81,7 @@ The automation runtime: the scanner that fires scheduled automation definitions,
|
||||
| `concurrency` | — | integer | `4` | How many unfinished runs one automation definition with overlap policy `allow` may hold at once; a further due slot is recorded `skipped` with reason `count_limit`. Startup refuses a value below 1 when `qwen.managed-agent.automation.enabled` is true. |
|
||||
| `enabled` | `QWEN_MANAGED_AGENT_AUTOMATION_ENABLED` | boolean | `false` | Whether the automation scanner runs and the automation create, update, retire and run routes are admitted; while off, those routes answer `409 automation_unavailable` and the read routes still answer. Those routes also need `qwen.managed-agent.session-store.enabled`. When on, startup refuses non-positive automation counts and durations. |
|
||||
| `late-tolerance` | `QWEN_MANAGED_AGENT_AUTOMATION_LATE_TOLERANCE` | duration | `5m` | How late a due slot may be when the scanner sees it and still fire as scheduled. An older slot follows the definition's catch-up policy (`none`, `latest` or `bounded`) and is otherwise recorded missed. Startup refuses a non-positive value when automation is enabled. A plain number is milliseconds. |
|
||||
| `lease` | `QWEN_MANAGED_AGENT_AUTOMATION_LEASE` | duration | `60s` | How long a scanner tick or a manual run holds an automation definition's lease, counted from its claim; once it lapses another node may claim the definition, and from that claim on the earlier holder's writes to it are refused. Startup refuses a non-positive value when automation is enabled. A plain number is milliseconds. |
|
||||
| `lease` | `QWEN_MANAGED_AGENT_AUTOMATION_LEASE` | duration | `60s` | How long a scanner or a manual run holds an automation definition's lease, counted from its claim of that definition; once it lapses another node may claim the definition, and from that claim on the earlier holder's writes to it are refused. Startup refuses a non-positive value when automation is enabled. A plain number is milliseconds. |
|
||||
| `lookback` | `QWEN_MANAGED_AGENT_AUTOMATION_LOOKBACK` | duration | `24h` | How far back the scanner derives a definition's due slots; slots older than this, or older than the definition's arming, are neither fired nor recorded, which bounds every catch-up. Startup refuses a non-positive value when automation is enabled. A plain number is milliseconds. |
|
||||
| `max-slots-per-tick` | — | integer | `1000` | How many due slots the scanner keeps per definition in one tick; when the lookback window holds more, the oldest are cut and a warning is logged. The limit does not shorten the scan itself: the scanner still checks every minute from where its previous tick for the definition stopped, up to the whole lookback window. Startup refuses a value below 1 when `qwen.managed-agent.automation.enabled` is true. |
|
||||
| `scan-delay` | `QWEN_MANAGED_AGENT_AUTOMATION_SCAN_DELAY` | duration | `10s` | How long the automation scanner waits between the end of one tick and the start of the next. Startup refuses a non-positive value when automation is enabled. A plain number is milliseconds. |
|
||||
|
||||
@@ -52,7 +52,7 @@ Managed Agent 服务端的顶层设置:内置 agent 的修订号、存储的 A
|
||||
|
||||
| 属性 | 环境变量 | 类型 | 默认值 | 说明 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `enabled` | — | 布尔 | `false` | 是否将工具结果投影为公开工具结果和制品,以及是否提供制品读取 API。除非同时开启 `qwen.managed-agent.tool-publication.enabled`,否则读取返回未找到;读取还要求已认证的 actor。即使为 false,已提交的工具回执仍会被记录下来等待投影,因此之后开启时,关闭期间记录的工具结果也会被投影。 |
|
||||
| `enabled` | — | 布尔 | `false` | 是否将工具结果投影为公开工具结果和制品,以及是否提供制品读取 API。除非同时开启 `qwen.managed-agent.tool-publication.enabled`,否则读取返回未找到;读取还要求已认证的 actor。即使为 false,已提交的工具回执仍会被记录下来等待投影,因此之后开启时,关闭期间记录的工具结果也会被投影。私有 CSI 通道创建的 Session(`csi-session` 管理命令)例外:它们的回执从不记录,因此其工具结果从不投影。 |
|
||||
| `max-concurrent-reads` | — | 整数 | `4` | 本服务进程可同时提供的制品内容下载数;超出的下载返回 HTTP 429 `artifact_read_limit` 并带 `Retry-After: 1`。至少为 `1`(否则启动时拒绝)。 |
|
||||
| `projection-interval` | — | 时长 | `1000` | 工具结果投影任务的运行间隔;每次最多将 8 个待处理的工具结果投影为公开工具结果和制品。纯数字按毫秒解析,也可使用带单位的值如 `1s`。`qwen.managed-agent.artifacts.enabled` 不为 true 时该任务不做任何事。 |
|
||||
| `publish-original` | — | 布尔 | `false` | 投影时是否将工具结果中已封存的 stdout 和 stderr 流发布为可下载制品,以及可读取该 Session 的 actor 是否可以下载它们。需要开启 `qwen.managed-agent.artifacts.enabled`。 |
|
||||
@@ -81,7 +81,7 @@ Managed Agent 服务端的顶层设置:内置 agent 的修订号、存储的 A
|
||||
| `concurrency` | — | 整数 | `4` | 重叠策略为 `allow` 的单个自动化定义可同时持有的未结束运行数;超出后,再到期的槽位记为 `skipped`,原因为 `count_limit`。`qwen.managed-agent.automation.enabled` 为 true 时,小于 1 的值启动时拒绝。 |
|
||||
| `enabled` | `QWEN_MANAGED_AGENT_AUTOMATION_ENABLED` | 布尔 | `false` | 是否运行自动化扫描器,并受理自动化的创建、修改、退役与手动运行路由;关闭时这些路由返回 `409 automation_unavailable`,读取路由照常应答。这些路由还要求开启 `qwen.managed-agent.session-store.enabled`。开启后,自动化的计数或时长若不为正,启动时拒绝。 |
|
||||
| `late-tolerance` | `QWEN_MANAGED_AGENT_AUTOMATION_LATE_TOLERANCE` | 时长 | `5m` | 扫描器发现到期槽位时,允许其迟到多久仍按计划触发。更迟的槽位按定义的补跑策略(`none`、`latest` 或 `bounded`)处理,未被补跑的记为错过。开启自动化时,非正值启动时拒绝。不带单位的数字按毫秒计。 |
|
||||
| `lease` | `QWEN_MANAGED_AGENT_AUTOMATION_LEASE` | 时长 | `60s` | 扫描轮次或手动运行持有自动化定义租约的时长,从认领时起算;租约过期后其他节点即可认领该定义,自该认领起,原持有者对它的写入都会被拒绝。开启自动化时,非正值启动时拒绝。不带单位的数字按毫秒计。 |
|
||||
| `lease` | `QWEN_MANAGED_AGENT_AUTOMATION_LEASE` | 时长 | `60s` | 扫描器或手动运行持有自动化定义租约的时长,从认领该定义时起算;租约过期后其他节点即可认领该定义,自该认领起,原持有者对它的写入都会被拒绝。开启自动化时,非正值启动时拒绝。不带单位的数字按毫秒计。 |
|
||||
| `lookback` | `QWEN_MANAGED_AGENT_AUTOMATION_LOOKBACK` | 时长 | `24h` | 扫描器为定义推导到期槽位时最多回看的时长;早于该窗口(或早于定义启用时刻)的槽位既不触发也不记录,从而限定所有补跑的范围。开启自动化时,非正值启动时拒绝。不带单位的数字按毫秒计。 |
|
||||
| `max-slots-per-tick` | — | 整数 | `1000` | 单个扫描轮次中每个定义最多保留的到期槽位数;回看窗口内超出时,最旧的槽位被截去并记录一条警告。该上限不会缩短扫描本身:扫描器仍会从该定义上一轮扫描停下的位置起逐分钟检查,最多覆盖整个回看窗口。`qwen.managed-agent.automation.enabled` 为 true 时,小于 1 的值启动时拒绝。 |
|
||||
| `scan-delay` | `QWEN_MANAGED_AGENT_AUTOMATION_SCAN_DELAY` | 时长 | `10s` | 自动化扫描器从一轮扫描结束到下一轮开始之间等待的时长。开启自动化时,非正值启动时拒绝。不带单位的数字按毫秒计。 |
|
||||
|
||||
@@ -79,8 +79,8 @@
|
||||
"zh": "内置 `qwen-code` agent 的修订号标签,会固定在使用它的每个 Session 上;请求中指定 `qwen-code` 的其他修订号会被拒绝。长度必须为 1 到 128 个字符(否则启动时拒绝)。"
|
||||
},
|
||||
"qwen.managed-agent.artifacts.enabled": {
|
||||
"en": "Whether tool results are projected into public tool results and artifacts, and whether the artifact read API is served. Reads answer not found unless `qwen.managed-agent.tool-publication.enabled` is also true, and they require an authenticated actor. Even while it is false, committed tool receipts are still recorded for projection, so turning it on later also projects the tool results recorded while it was off.",
|
||||
"zh": "是否将工具结果投影为公开工具结果和制品,以及是否提供制品读取 API。除非同时开启 `qwen.managed-agent.tool-publication.enabled`,否则读取返回未找到;读取还要求已认证的 actor。即使为 false,已提交的工具回执仍会被记录下来等待投影,因此之后开启时,关闭期间记录的工具结果也会被投影。"
|
||||
"en": "Whether tool results are projected into public tool results and artifacts, and whether the artifact read API is served. Reads answer not found unless `qwen.managed-agent.tool-publication.enabled` is also true, and they require an authenticated actor. Even while it is false, committed tool receipts are still recorded for projection, so turning it on later also projects the tool results recorded while it was off. Sessions created through the private CSI lane (the `csi-session` admin command) are the exception: their receipts are never recorded, so their tool results are never projected.",
|
||||
"zh": "是否将工具结果投影为公开工具结果和制品,以及是否提供制品读取 API。除非同时开启 `qwen.managed-agent.tool-publication.enabled`,否则读取返回未找到;读取还要求已认证的 actor。即使为 false,已提交的工具回执仍会被记录下来等待投影,因此之后开启时,关闭期间记录的工具结果也会被投影。私有 CSI 通道创建的 Session(`csi-session` 管理命令)例外:它们的回执从不记录,因此其工具结果从不投影。"
|
||||
},
|
||||
"qwen.managed-agent.artifacts.max-concurrent-reads": {
|
||||
"en": "How many artifact content downloads this server process serves at once; a download beyond that gets HTTP 429 `artifact_read_limit` with `Retry-After: 1`. Must be at least 1 (startup refusal).",
|
||||
@@ -141,8 +141,8 @@
|
||||
"zh": "扫描器发现到期槽位时,允许其迟到多久仍按计划触发。更迟的槽位按定义的补跑策略(`none`、`latest` 或 `bounded`)处理,未被补跑的记为错过。开启自动化时,非正值启动时拒绝。不带单位的数字按毫秒计。"
|
||||
},
|
||||
"qwen.managed-agent.automation.lease": {
|
||||
"en": "How long a scanner tick or a manual run holds an automation definition's lease, counted from its claim; once it lapses another node may claim the definition, and from that claim on the earlier holder's writes to it are refused. Startup refuses a non-positive value when automation is enabled. A plain number is milliseconds.",
|
||||
"zh": "扫描轮次或手动运行持有自动化定义租约的时长,从认领时起算;租约过期后其他节点即可认领该定义,自该认领起,原持有者对它的写入都会被拒绝。开启自动化时,非正值启动时拒绝。不带单位的数字按毫秒计。"
|
||||
"en": "How long a scanner or a manual run holds an automation definition's lease, counted from its claim of that definition; once it lapses another node may claim the definition, and from that claim on the earlier holder's writes to it are refused. Startup refuses a non-positive value when automation is enabled. A plain number is milliseconds.",
|
||||
"zh": "扫描器或手动运行持有自动化定义租约的时长,从认领该定义时起算;租约过期后其他节点即可认领该定义,自该认领起,原持有者对它的写入都会被拒绝。开启自动化时,非正值启动时拒绝。不带单位的数字按毫秒计。"
|
||||
},
|
||||
"qwen.managed-agent.automation.lookback": {
|
||||
"en": "How far back the scanner derives a definition's due slots; slots older than this, or older than the definition's arming, are neither fired nor recorded, which bounds every catch-up. Startup refuses a non-positive value when automation is enabled. A plain number is milliseconds.",
|
||||
|
||||
+4
-2
@@ -35,8 +35,10 @@ import java.util.Set;
|
||||
* projected in the same transaction as their journal commit.
|
||||
*
|
||||
* <p>Every occurrence write names the lease its writer holds: the insert selects its row from the
|
||||
* definition row the holder leases, and each settle is conditioned on that same holder and fence,
|
||||
* so a scanner whose lease expired under it cannot record or settle a decision.
|
||||
* definition row the holder leases, and each settle is conditioned on that same holder and fence.
|
||||
* Neither checks the lease's expiry: a writer whose lease lapsed can still write until another
|
||||
* claims the definition, and that claim moves the fence, so from then on the earlier holder cannot
|
||||
* record or settle a decision.
|
||||
*/
|
||||
@Repository
|
||||
public class AutomationLedgerStore
|
||||
|
||||
Reference in new issue
Block a user