Repository navigation
fix(pool): give license_invalid and crag_prompt_replace_empty_unsupported a schedule-state row - #2449
Merged
Merged
Conversation
…rted a schedule-state row ## 变更摘要 - 改前:`src/lib/pool/upstream-error-policy.mjs` 会发出两个调度原因 `license_invalid`(单槽 resync + 退避重试后仍答 `license_invalid`、尚未提交,换槽重试且不冷却)和 `crag_prompt_replace_empty_unsupported`(旧 CRAG 不支持空 prompt replace,换槽重试且不冷却),但 `src/lib/pool/schedule-state.mjs` 的原因表里没有这两行。`test/unit/schedule-state.test.mjs` 的“every emitted reason has exactly one row in the table”因此在 `origin/dev` 基线上一直失败(`add these reasons to schedule-state.mjs: crag_prompt_replace_empty_unsupported, license_invalid`)。该文件不在 `test:ci` 固定集合里,平时没人发现;任何改到它的 PR(例如 #2441)CI 都会因它变红。 - 改后:两个原因归入 `STATELESS`(“不改变槽位状态”:它们都经 `continueWithoutCooldown` 发出,语义是换槽重试而不是冷却或摘除),并加进测试里已有的“不改变槽位状态”断言列表。 - 未改 / 延后:不改 `upstream-error-policy.mjs` 的发出逻辑,不改任何其它原因的归类,不动面板文案。 ## 验收记录(Run) - 本机(Node 24)`schedule-state` 12/12(修复前 11/12);Node 22.23.5 容器 + 真实 `kin-scheduler` 跑引用 `schedule-state` 的 5 个测试文件(`schedule-state`、`codex-slot-pool`、`crag-zombie-guard`、`organization-disabled-probe`、`scheduler-fastpath`)76/76。`biome format` 无需修改。 ## 回退与手破验证(Broken by hand) - 3 处手破(唯一锚点,还原后 sha256 一致):整行去掉、只去掉 `license_invalid`、只去掉 `crag_prompt_replace_empty_unsupported`,各让 `schedule-state` 变红。 ## 真实使用(Real use) - 不适用:只补原因表的归类,没有真实槽位或流量;没有 `ph24`。 ## 未运行项(Not run) - 面板上这两个原因的展示文案没有看(它们归入“不改变槽位状态”,面板不为它们显示状态);`npm run test:ci` 由 GitHub `ci` 检查覆盖。
Contributor
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 2fb41b9d-8292-402e-9b95-dcee1f326148) |
Owner
Author
验收评论(head
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更摘要
src/lib/pool/upstream-error-policy.mjs会发出两个调度原因license_invalid(单槽 resync + 退避重试后仍答license_invalid、尚未提交,换槽重试且不冷却)和crag_prompt_replace_empty_unsupported(旧 CRAG 不支持空 prompt replace,换槽重试且不冷却),但src/lib/pool/schedule-state.mjs的原因表里没有这两行。test/unit/schedule-state.test.mjs的“every emitted reason has exactly one row in the table”因此在origin/dev基线上一直失败(add these reasons to schedule-state.mjs: crag_prompt_replace_empty_unsupported, license_invalid)。该文件不在test:ci固定集合里,平时没人发现;任何改到它的 PR(例如 feat(quota): add Anthropic daily VM session creation gate #2441)CI 都会因它变红。STATELESS(“不改变槽位状态”:它们都经continueWithoutCooldown发出,语义是换槽重试而不是冷却或摘除),并加进测试里已有的“不改变槽位状态”断言列表。upstream-error-policy.mjs的发出逻辑,不改任何其它原因的归类,不动面板文案。验收记录(Run)
schedule-state12/12(修复前 11/12);Node 22.23.5 容器 + 真实kin-scheduler跑引用schedule-state的 5 个测试文件(schedule-state、codex-slot-pool、crag-zombie-guard、organization-disabled-probe、scheduler-fastpath)76/76。biome format无需修改。回退与手破验证(Broken by hand)
license_invalid、只去掉crag_prompt_replace_empty_unsupported,各让schedule-state变红。真实使用(Real use)
ph24。未运行项(Not run)
npm run test:ci由 GitHubci检查覆盖。Note
Low Risk
Table-only mapping fix for two already-emitted reason codes; no scheduler or error-policy behavior changes.
Overview
Registers
license_invalidandcrag_prompt_replace_empty_unsupportedin the pool schedule-state reason table as STATELESS (slot stays on), matching their existingcontinueWithoutCooldownbehavior in upstream error policy—retry on another slot without cooling the current one.Adds both codes to the unit test list that asserts request-level / worker handoff reasons never change slot state, fixing “every emitted reason has exactly one row in the table” (previously missing rows broke CI when this file was exercised).
Reviewed by Cursor Bugbot for commit a81f6f6. Configure here.