You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deferred MINOR findings from the v0.1.190 release review (#2581) #2602
Deferred MINOR findings from the v0.1.190 release review
Follow-up tracker for the non-blocking MINOR findings from the release review of #2581 (v0.1.190). The six actionable fixes landed in the release branch; the three below were deliberately deferred (either test-pinned behavior or informational) so they can be handled with their own regression coverage.
1. Ledger floor never decays + cap<1024 surrender (src/prompt-cache/budget.ts:243)
The prompt-cache budget ledger holds a permanent floor: once a floor is learned it never decays, so a client that stops using prompt caching still pays the reserved floor forever. Additionally, when the effective context cap drops below 1024 tokens the ledger surrenders (return — no budget enforcement at all). Both behaviors look deliberate (the surrender is pinned by tests) but undocumented. Suggested: document the intent at the site, and if the floor is meant to be sticky, add a session-scoped decay probe.
addStaticHosts filters ""-hosts via a truthiness guard that is unreachable with today's config shapes (every caller resolves hosts before it reaches here). Latent only: a future caller passing an unresolved host list would silently drop entries instead of failing loudly. Suggested: tighten to an explicit validation with a warn log, or drop the guard if the invariant is structural.
3. Transport trio (informational, no action required today)
Truncation re-fetch reuses the original roundBody bytes (src/loop/core.ts:726-729) — correct today because the retry re-issues the same logical request, but worth a comment pinning the invariant.
opencode-v2 stale manifest: the conditional-tool manifest is cached without cache-busting, so a stale CDN edge can hold back tool registration until retry. Informational.
Activity
fix(#2581): address the six actionable release-review MINORs
ranxianglei commentedon Oct 10, 2026
[bot] 🏷 三条 deferred MINOR 已处理完毕 → PR #2603(纯注释/文档变更,零行为改动)。
路径勘误(第 1 条):issue 写的
src/prompt-cache/budget.ts:243在本仓库历史中不存在(git log --all -- 'src/prompt-cache/*'为空)。实际位置是src/server/budget.ts(review 评论自己的引用也是它)——这是 #2490 的 dsh compaction-refused ledger floor,与 prompt cache 无关。issue 正文把机制描述串了("client stops using prompt caching"),实际机制是:dsh 原生压缩被 #1729/#1835 guard 拒绝时,guard 把 replay 包体大小以高水位记到 session metadata,output clamp 用它做 planning 下限。1. Ledger floor 不衰减 + cap<1024 surrender —— 审核结论:两个行为都是有意设计,且「加衰减」是错误方向:
clampOutputBudget()、dshLedgerFloorTokens()、handle.ts 写入点三处文档化意图与生命周期(metadata eviction 为止)。tests/issue2490-ledger-floor-doomed-probe.test.ts)。allowDshCompaction后 checkpoint 可落地、ledger 会缩小,但 floor 保持旧高水位直到 evict(fail-closed 方向的过紧,接受)。2.
addStaticHosts空 host guard —— 选择保留 guard + 文档化不变量,不走 issue 给的两个选项:八个调用方全部先解析 host(常量表或nonEmpty()门控),该分支结构性不可达;删掉 guard 会让未来的未解析列表把""推进 SNI 白名单(比跳过更糟);warn log 不适合这个纯 discovery helper(无日志通道、分支按构造不可达)。docstring 现在写明了这两个事实。3. Transport trio —— 按要求在 truncation re-fetch 处(
src/loop/core.ts)加了注释,pin 住roundBody字节不变量(retry 重发同一逻辑请求,重建 body 会移动 prompt-cache leading-edge marker、破坏前缀缓存复用)。另两项(retry 目标携带 leading-* marker、opencode-v2 stale manifest)按 issue 标注 informational,未动。结构化八问:
issue2490-ledger-floor-doomed-probe(恰好 pin 本次文档化的两个行为)+discover(launcher 差分 harness)36/36 通过;全量交 CI。判定:可合并(docs-only,CI 绿即收工)。PR:#2603
fix(#2581): address the six actionable release-review MINORs
ranxianglei commentedon Oct 10, 2026
[bot] 🏷 补充:PR #2603 CI 已全绿(27/27 check runs success)。
过程中
codex accepts CODEX_HOME overlay + registers bili MCP一度红过,排查结论是 Windows runner 瞬时超时而非本 PR 引入:not ok 32 - #2196 real win32 ... wrapper --help exited null (Error: spawnSync node.exe ETIMEDOUT)——该测试在 CI runner 上 spawn 真实 codex wrapper 跑--help,runner 负载下超时;本 PR diff 全部为注释行,不触碰任何 codex/win32/spawn 路径。佐证:同一 job 在 master 最近 6 个提交上全绿;仅重跑失败 job 后即通过。未另行立项(单次瞬时 runner 抖动,无复现证据链)。状态:等合并(human-only merge):#2603
Merge pull request #2603 from ranxianglei/2026-10-10_deferred-minor-f…
docs(ranxianglei#2602): pin ranxianglei#2490 ledger-floor stickiness …
docs(ranxianglei#2602): document addStaticHosts empty-host backstop i…
docs(ranxianglei#2602): pin truncation-retry roundBody byte-invariance