Skip to content

[PR] fix: recognize externalSummary in COMPRESS_SETTING_FIELDS so misplaced placement warns | 配置识别集合补上 externalSummary——放错位置终于有提示 - #3880

Closed
ranxianglei wants to merge 2 commits into
masterfrom
2026-10-20_compress-fields-external-summary
Closed

ranxianglei wants to merge 2 commits into
masterfrom
2026-10-20_compress-fields-external-summary

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Closes #3876

What / why

parseCompressSettings accepts externalSummary, but the recognition set COMPRESS_SETTING_FIELDS (whose comment claims it stays in sync with that parser) did not contain it. Cross-checked every field parseCompressSettings accepts against the set: externalSummary is the ONLY gap. Consequences:

Fix: one line — add externalSummary to the set. Plus the website seed entry the config-surface guard requires (below), plus a regression test pinning the new hint.

config surface

New website seed entry compress.externalSummary in website/config-reference/compress.yaml. Required because the config-surface guard (#2643) derives compress.* leaves from this exact set — adding the member makes the leaf mandatory. The entry documents an EXISTING, already-shipped field (fully documented in CONFIGURATION.md en/zh today); no new config shape is introduced. Seed wording is open to adjustment at review.

Behavior change (old -> new)

Verification

Targeted suites green locally on the rebased head (master 39fb841): issue1815 + named-provider-bind + external-summary-settings = 59/59 pass; config-surface guard green (153 leaves incl. the new seed). Full-suite verdict = CI on this head.

Note: git egress from this environment failed mid-task (connection resets on all git protocol attempts while plain HTTPS worked), so the branch was created through the GitHub Git Data API instead of git push; the pushed tree is byte-identical to the locally verified files listed above.

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-20_compress-fields-external-summary (f6835f4)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.4610-pr.3880.a381aad

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

Option B — Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

查重:不重复。本 PR 关闭的源 issue #3876 已做过完整查重——#3675/#3680 是「放错位置的 compress 键静默无效且无告警」的机制,本条是「那条告警的识别集合漏登记了一个字段」,同症状家族、不同缺陷;近期也没有其它 PR 往该集合加字段。

独立审核(我重读了权威 diff、base 代码与 head/base 两侧 CI,不是照抄 issue 结论):

标签:bug / p3 / scope/other(与本 PR 关闭的 #3876 分类一致)。

八问

  1. 是什么问题:parseCompressSettings 接受 externalSummary,但生成归属提示用的识别集合 COMPRESS_SETTING_FIELDS(注释自称与 parser 同步)漏了它 → 顶层裸写 externalSummary 只拿到通用 "unknown top-level key" 警告,拿不到「belongs under compress」提示。
  2. 什么原因:识别集合与 parser 接受面失步,少登记了一个合法字段(逐字段比对后确认它是唯一漏网项)。
  3. 影响范围/严重程度:体验级、单点。只影响「把 externalSummary 写在顶层」这一种放错位置场景的提示文案;不丢数据、不改解析/运行时行为。p3。
  4. 怎么修的:一行往集合加 "externalSummary";外加 config-surface 守卫(对现有配置文件的形态进行盘查,需要增加特殊ci专门屏蔽违规添加的配置 #2643)强制要求的 website 种子条目(记录的是已上线字段,非新配置面)+ 一条钉住新提示的回归测试。
  5. 回归风险:无。改动只作用于 warn-only 的提示文案生成(warnUnknownTopLevelKeys,src/config.ts:2057),不触碰解析/wire/持久化/缓存·重试·去重。逐项过高危模式:无语义漂移、无 fail-fast 变吞错、无阈值/时序变化;唯一输出变化是告警行末尾追加一段 hint(已在 PR「Behavior change」披露 old→new)。
  6. 缓存:不涉及(未触及任何缓存/游标/去重键逻辑)。
  7. 设计方向:不变,纯补登记。
  8. 新配置:无新配置键。website 种子是给既有字段 compress.externalSummary 补文档镜像(CONFIGURATION.md en/zh 早已完整记录);config-surface-guard 因叶子取自该集合而要求这条种子。

代码/测试核对

CI(关键):head 51cfbba 上 34 项 = 18 success / 14 skipped / 2 failure:docs-sync、unused-exports。这两个红是 master 既有,非本 PR 引入:base 提交 39fb841d 上同样这两项全红(多次 run 均 failure);且本 diff(+23/-1,仅 Set 字符串成员 + test + yaml 种子)不可能触发 unused-exports(scripts/check-unused-exports.mjs 只查 export function/class/const… 声明)。与本 PR 直接相关的门全绿:config-surface-guard ✓ kernel-guard ✓ lane-guard ✓ build-artifact ✓ lock-sync ✓ version-guard ✓ pi-subagents-guard ✓ docs-coverage ✓。

判定:PR 本身正确、最小、带回归测试、无回归,可合;当前无法显示全绿 CI 的唯一原因是 master 自身在 docs-sync / unused-exports 上红(与本 PR 无关)。建议待 master 这两个既有红修复后再合;若分支保护不强制这两项,现在也可合。我未改 PR(本身没问题),也未为这两个 master 既有红另开 issue——它们超出本 PR 范围且需先确认是否已被跟踪再立项,避免重复;需要我去查/立这俩红的 issue 说一声即可。

@ranxianglei ranxianglei added bug Something isn't working p3 scope/other labels Oct 19, 2026
ranxianglei added a commit that referenced this pull request Oct 19, 2026
Commit 66219d4 added externalSummary to COMPRESS_SETTING_FIELDS on this
branch; the config-surface guard then fails HERE (leaf compress.externalSummary
lacks a seed entry) until #3880's seed lands on master - i.e. merge order
mattered: merging this PR first would have put a NEW red on master's own
config-surface-guard. This mirrors #3880's exact seed entry (byte-identical,
so either PR may merge first and the duplicate is a clean no-op) plus the
generator output for it (5 added lines, 0 removed), making this branch
self-contained green for both config-surface-guard and docs-sync once the
pre-existing master static-gate red (#3870/#3871) clears.
ranxianglei added a commit that referenced this pull request Oct 19, 2026
Commit 66219d4 added externalSummary to COMPRESS_SETTING_FIELDS on this
branch; the config-surface guard then fails HERE (leaf compress.externalSummary
lacks a seed entry) until #3880's seed lands on master - i.e. merge order
mattered: merging this PR first would have put a NEW red on master's own
config-surface-guard. This mirrors #3880's exact seed entry (byte-identical,
so either PR may merge first and the duplicate is a clean no-op) plus the
generator output for it (5 added lines, 0 removed), making this branch
self-contained green for both config-surface-guard and docs-sync once the
pre-existing master static-gate red (#3870/#3871) clears.
@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: zhipuai-lb/glm-5.3)

已并入 #4590。关单收尾;误判请 reopen。

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

Labels

bug Something isn't working p3 scope/other

Projects

None yet

1 participant