Skip to content

[PR] merge: tier-3 rework train — #4443/#4445/#4430 reworked on master + #4510 content (CI red was a stale-dist mtime guard) - #4558

Merged
ranxianglei merged 8 commits into
masterfrom
2026-10-24_tier3-rework
Oct 24, 2026
Merged

ranxianglei merged 8 commits into
masterfrom
2026-10-24_tier3-rework

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

这是什么

第三列车:4 个延后票在当前 master 上重做(非 cherry-pick 直挑,冲突按语义织合并带测试修正)。合并方式请选 Merge commit。

车上清单

原 PR 修的 issue 重做要点
#4443 Closes #4383 stale-small 锚降级,与 master 的 cycle-stale(#4551 带入)双守卫并集;测试适配 #4340 新增的第二个内核读者(uncoveredHistoryRuns)——两个读者都看到降级估值,seen/nudges 预期更新,14/14
#4445 Closes #3635 外部摘要器长度预算子句提取为共享 helper + 零上限省略语义 + caps 可配;与 master #4487 的 targetKey 字段并集,3 commits
#4430 Closes #4429 重叠转发的 pending 证据隔离(AsyncLocalStorage capture);与 #4053(#4043 证据剥离)正交并集——一个管「存哪」一个管「算什么」,各自测试全绿(16/16 + cache-ledger 族)
#4510 Closes #4501 原 CI 红查明为 #3325 stale-kernel-dist 守卫的 mtime 误判(非内容问题),内容随本车落地;原 PR 建议关闭

验证

后续

ci-check and others added 8 commits October 24, 2026 21:40
Path-style lane requests (POST /v1/messages straight at the proxy's default
upstream — no /bili/ tunnel, no absolute form, non-MITM) get no route back
from resolveUpstream(), so every providers.* lookup keyed on
route?.rewrittenUrl silently missed: models.<model>.output/.context never
applied, the #3438 mid-band collapse rescue stayed unarmed, and its "NO known
output ceiling" warn could not be silenced by declaring the model's max output.

Reconstruct the full destination URL (opts.upstream + path) once in handle()
as providerDestUrl and use it as the single config-matching basis for the
output ceiling, context limit, operator window tuning, registry host,
passthrough routing, and per-provider compress settings. Also stop firing the
#3438 mid-band warn when a ceiling IS known (value >= ceiling is a healthy
state, not a missing-ceiling gap).

Tests: unit coverage of the warn gate in side-request-isolation.test.ts plus
end-to-end proof in the new issue4501-pathstyle-config.test.ts that a
path-style dsh-lane request now resolves the declared output ceiling and
restores a collapsed mid-band budget up to it.

(cherry picked from commit d31a7b2)
…use providerDestUrl for the #3211 pairing

Review follow-up on #4501/#4510 — two small cleanups on top of the new single
config-matching basis; no behavior change beyond the log text:

- the #661 route-passthrough log line still masked route?.rewrittenUrl, which is
  undefined for path-style matches. Now that #4501 makes those matches possible,
  the line would have logged an empty URL; it names providerDestUrl instead.
- the #3211 calibration pairing recomputed the full destination URL inline; it
  now reuses providerDestUrl (identical value) so the single matching basis stays single.

(cherry picked from commit 1f5d023)
…rates it

- tools/gen-config-docs.mjs: drop the stale backtick ban on desc_en/desc_zh (these fields render only into markdown tables, where backticks are valid inline code); add optional default_zh for zh-localized default cells.

- website/config-reference/rollout.yaml: add the rollout.features.pluginLaneServerHistory entry reproducing #4491's committed row byte-exactly (EN+ZH).

- Regenerate CONFIGURATION.md / CONFIGURATION.zh-CN.md (param-ref row + env-map row).

(cherry picked from commit 6a5b94b)
…e in baseline readers (#4383)

A tiny but real usage-grade sample under the session id (title-gen/probe sidecar) settled into lastUsageGradeTokens blinded every input-baseline reader: the kernel growth reference is a low-water mark (#1595) and rode down to it, so growth stayed 0 and auto-folding was disabled for hours until an unrelated external event. statusInputBaseline and effectiveTokenCount now share one guard: an anchor below 25% of the billing-caliber local estimate of the current outbound send AND superseded by a later main send (contextTokensSource="estimate") is demoted to that estimate — #1595's promised local-estimate fallback. The freshness gate keeps fresh small samples authoritative (#1820 B); anchors above the estimate keep their #1839 precedence; sessions without an estimate or freshness stamp behave byte-identically.

(cherry picked from commit 8e0d8a9)
…ame rejections, make the caps settable

External summaries longer than compress.maxSummaryLength were rejected whole after paying full latency, with the only trace a bare invalid_summary outcome - and the cap was accepted nowhere: the panel PUT dropped it, file edits never reached the resolved config, and the model-tool compress path never told its summarizer the number its validator enforces (the preflight path has since #1775).

- state the exact enforced cap in the compress-path summarizer prompt (shared clause helper, byte-identical to preflight's)
- name the rejection reason on each invalid_summary attempt and log it (describeExternalSummaryFailure moved next to its data type; re-exported from preflight for historical importers)
- accept maxSummaryLength/minSummaryLength through parse/merge/apply so panel PUT and file edits reach the resolved kernel config
- document both fields (CONFIGURATION en+zh, website seeds)

Closes #3635

(cherry picked from commit 006b683)
…e floor disabled

Review follow-up on this branch: summaryLengthBudgetClause documented
"<= 0 / Infinity" as omitted but only gated on budget < minChars, so cap 0 +
floor 0 rendered "AT MOST 0 characters" to the summarizer. Zero means
unbounded; omit it. Pinned by a new assertion in
tests/issue3635-summary-length-cap.test.ts.

(cherry picked from commit aa84e55)
…c passes

Review follow-up: the summary-length rows were hand-written into CONFIGURATION.md / CONFIGURATION.zh-CN.md with wording that drifted from website/config-reference/compress.yaml, and website/docs/index.html + website/main.js were never regenerated, so the docs-sync artifact-drift gate went red. Regenerated all four derived files from the seed (node tools/gen-config-docs.mjs generate); the seed wording is the canonical one.

(cherry picked from commit d475598)
@ranxianglei ranxianglei changed the title merge: tier-3 rework train — #4443/#4445/#4430 reworked on master + #4510 content (CI red was a stale-dist mtime guard) [PR] merge: tier-3 rework train — #4443/#4445/#4430 reworked on master + #4510 content (CI red was a stale-dist mtime guard) Oct 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-24_tier3-rework (95da2eb)

Latest build — install this exact version

npm install -g billion-context@0.0.5509-pr.4558.3000d51

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Recent builds (commit → version)

commit version build
95da2eb billion-context@0.0.5509-pr.4558.3000d51 build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr4558.tgz
npm install -g package

Install instructions are refreshed on each push.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.821-master.ba5ab0b (rolling master tag).

npm install -g billion-context@0.0.821-master.ba5ab0b  # this exact build
npm install -g billion-context@master  # always the newest merged build

npm view billion-context@master prints the current version at any time.

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