Skip to content

fix(panel): preserve CRAG 3.1.4 behavior and correct remaining request handling - #1162

Merged
dofastted merged 7 commits into
mainfrom
fix/panel-pr1160-followups
Nov 16, 2026
Merged

dofastted merged 7 commits into
mainfrom
fix/panel-pr1160-followups

Conversation

@dofastted

@dofastted dofastted commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

替代 #1116、#1123、#1128、#1129 及 #1087 尚未覆盖的配额等待返回码。保留 3.1.4 的内联工具和合法缓存标记,不重复引入旧版补丁;仅对可信结构化的未提交 cache policy 拒绝停止换槽。已有 CRAG 槽限额就地收敛,物理槽变化仍按空闲重载。Environment 不新增相邻的非空 system。配额等待只在有明确窗口证据时返回 429。\n\n本地定向回归通过;不涉及发布、部署或变更运行中槽位。


Note

Medium Risk
Changes affect outbound message shaping (cache-sensitive), kernel slot config convergence, and how 429s/policy blocks are classified—incorrect behavior could break prefix caching, overload accounts, or mis-report quota waits.

Overview
Persona / cache: Mid-conversation and Environment injection now go through insertSystemAfterUser, which places content after the anchor user turn and merges into an existing non-empty system turn instead of always adding another adjacent system message—preserving directive-only turns and stable cache prefixes across multi-turn history.

CRAG kernel: CRAG v2 session_slots is capped to slots_per_worker and can be repaired via kernel config convergence even when the worker slot count is already correct (fixes over-high session_slots in kernel.json). Watchdog/supervisor pass requested session capacity from routing/VM policy.

Upstream / pool: Structured, uncommitted CRAG cache-policy rejects (CRAG_CACHE_CONTROL) are surfaced as a non-retryable crag_policy_blocked response without private kernel diagnostics; classification stays request-scoped and does not penalize accounts. Request-scoped failures (including this and existing opaque CRAG 429) skip throttled /usage probes on 429. When a pinned VM is waiting only on quota-window cooldowns, scheduling snapshots use pool_rate_limited (429 with retry timing) instead of generic “all accounts busy.”

Protocol: Third-party tool_addition / tool_removal blocks with tool_reference names are renamed consistently with other tool scrubbing (e.g. mcp__ prefix) in unofficial traffic.

Reviewed by Cursor Bugbot for commit 628032c. Configure here.

@cursor

cursor Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot 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: 319ef7cc-7f93-4200-aa60-c8fb2262c5fb)

@cursor

cursor Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot 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: daef9133-6635-448c-912f-38e2fabe3499)

# Conflicts:
#	src/lib/transport/rust-kernel-supervisor.mjs
@cursor

cursor Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot 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: 5020c54a-d6a7-4452-ad9f-78866ab1c69c)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant