Skip to content

[PR] (ai: anthropic/claude-opus-4-6) Settings panel pack editor: guided form (per-field descriptions + base template loading) | (ai: anthropic/claude-opus-4-6) 设置面板 pack 编辑器:引导式表单(逐字段说明+底本载入)+ AI 辅助提示词生成,原始 JSON 降为高级页签 - #5345

Merged
ranxianglei merged 2 commits into
masterfrom
2026-10-31_pack_editor
Oct 31, 2026

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

(ai: anthropic/claude-opus-4-6)

What & Why

#5344:pack 编辑原来是一个裸 JSON textarea——没有字段说明、没有样例,普通用户不知道该填什么。本 PR 把编辑对话框改成三个页签:

  1. 表单填写(默认页签):philosophy / howToCompress 两个字段各带大白话说明与示例;「起稿底本」下拉可一键载入 系统默认 / chat / lean 的现行文案再改;留空字段不写入包文件,运行时自动沿用系统默认。
  2. AI 辅助:用一两句话描述使用场景 → 点「生成提示词」→ 复制整段提示词丢给任意大模型执行 → 把返回的 JSON 粘回页面 → 「解析并填入表单」。提示词约束模型只输出符合 bili-pack.json 的单个 JSON 对象(无围栏无解释),模型多给的顶层字段保留进 JSON 页签随包保存。
  3. 高级(JSON):原有原始文本编辑原样保留,给需要完整控制的用户。

服务端仅新增一个只读端点 GET /__bili/packs/templates(返回 default/chat/lean 三个可解析包的 philosophy/howToCompress 原文;用户/项目覆盖优先,与运行时同一解析链)。创建/读取/删除走既有 __bili/packs/user/* 端点不变。客户端零依赖(原生 DOM),中英文 i18n 全部补齐,CONFIGURATION.md 与 zh-CN 成对更新。

Kernel Boundary (in-repo acp-kernel, #2092)

未触碰 kernel/**:模板文本经 acp-kernel 已导出的 defaultPrompts + resolveCompressSurfaceDetailed(host 侧现有解析链)组装,只读使用。

Config surface

无新增配置字段;新增 1 个只读管理端点(沿用 __bili/* 既有 loopback/origin 门控)。

Compression modes reasoning

Proxy 模式与 plugin 模式都不受影响:本 PR 只改设置面板 UI 与一个只读端点,不改任何 wire 注入、prompt 装配或压缩执行路径(templates 端点的 tri-state 解析刻意复刻 buildCompressSystemPrompt 的回落语义,仅为展示底本)。

Tests

  • tests/web-user-packs.test.ts:新增 /__bili/packs/templates 断言(default=kernel 原文、chat=shipped 逐字一致、lean≠default)
  • web-pack-picker / chat-pack / admin-probe 回归通过(9/9)
  • typecheck clean,build OK

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-31_pack_editor (d2bc4fc)

Latest build — install this exact version

npm install -g billion-context@0.0.7542-pr.5345.362f4e6

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
d2bc4fc billion-context@0.0.7542-pr.5345.362f4e6 build
b844b75 billion-context@0.0.7526-pr.5345.877c013 build
f91534f billion-context@0.0.7518-pr.5345.7984663 build
8d4c046 billion-context@0.0.7516-pr.5345.9a97fa6 build
f9fada5 billion-context@0.0.7510-pr.5345.45568f8 build
b457d9a billion-context@0.0.7497-pr.5345.4f659f3 build

Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title (ai: anthropic/claude-opus-4-6) 设置面板 pack 编辑器:引导式表单(逐字段说明+底本载入)+ AI 辅助提示词生成,原始 JSON 降为高级页签 [PR] (ai: anthropic/claude-opus-4-6) Settings panel pack editor: guided form (per-field descriptions + base template loading) | (ai: anthropic/claude-opus-4-6) 设置面板 pack 编辑器:引导式表单(逐字段说明+底本载入)+ AI 辅助提示词生成,原始 JSON 降为高级页签 Oct 31, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重:不重复。 open/closed issue 与近期 PR 全量检索(关键词 pack editor / templates / philosophy / howToCompress / 设置面板)无同题项。本 PR 与 pack 家族在途/已合并工作相邻但各自独立闭环:#5340(CLI bili pack install|remove|list)、#5325(web-pack-picker)、#5331(web-user-packs,__bili/packs/user/* 端点)——本 PR 是在它们之上改设置面板的编辑对话框 UI + 新增一个只读 /__bili/packs/templates 端点,不重复实现任何已有能力。原始需求为 GitHub #5344(pack 编辑裸 JSON textarea 无字段说明)。

标签:pr, scope/ui, p3(设置面板 UX 引导式表单,功能增强非缺陷;无特定宿主车道)

开始按 PR Review 规范审:原 issue 方向 → 回归清单 → 代码 → 测试有效性 → diff 整洁度。分支 2026-10-31_pack_editor @ b457d9a 已拉取,base 即当前 master(无落后)。结论稍后以八问体例给出。

ranxianglei pushed a commit that referenced this pull request Oct 31, 2026
…of rebuilding it

Review fix for #5345 (#5344): the guided-form save path built a fresh
{description?, promptSections:{philosophy?,howToCompress?}} object, so any
pack carrying fields beyond those two — toolPrompts (the lean one-liner
tool descriptions), nudgeSections, prompts, adapters, version, or the other
six promptSections keys — was silently dropped on the first form-tab save.
The shipped chat pack itself carries adapters.pi.promptSections, so the
PR's own 'load chat as base then tweak' workflow hit this immediately.

Form values now merge onto the raw JSON the dialog already carries
(edit-load / AI-apply / manual JSON-tab edits): tri-state per covered key
(empty = delete), everything else round-trips untouched. An unparseable
raw box now refuses the form save with the same bad-JSON error as the
JSON tab instead of clobbering it.
ranxianglei pushed a commit that referenced this pull request Oct 31, 2026
Review fix for #5345 (#5344): PackTemplate declared an optional
description and the form tab's base-load reads it, but the endpoint never
populated it, so 'load base text' left the description field blank for
chat/lean. SurfaceResolution now carries the pack-declared description
(additive field, identity default pack has none) and the template
includes it; test pins chat = shipped text verbatim and default absent.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

PR #5345 独立审核结论:方向正确、实现质量达标;审核发现 2 处缺陷 + 1 条门禁命中,已直接在分支修掉并推送(新 head 8d4c04680),本地守卫全绿,等新 head CI。

审核中做了什么(全部是 PR 分支上的增量 commit,未替换原作者贡献):

  1. 缺陷修复——表单保存静默丢字段(cfc2ada79,数据丢失级):原实现的「表单填写」保存是从零构造 {description?, promptSections:{philosophy?, howToCompress?}}。而 pack 文件格式远比这两个字段丰富(kernel PromptPackFile:toolPrompts / nudgeSections / prompts / adapters / version + 8 个 promptSections 键),从表单页签保存一次就会把这些全部抹掉。shipped chat pack 本身就带 adapters.pi.promptSections——按本 PR 自己主推的「载入 chat 底本 → 改两句话 → 保存」流程,第一次保存就触发。修复:表单值改为合并进对话框已有的原始 JSON(编辑载入/AI 填入/JSON 页签手改的内容),覆盖键按 tri-state(留空=删除该键),其余字段原样往返;原始 JSON 解析失败时拒绝表单保存(与 JSON 页签同一报错),防止把坏内容盖掉。
  2. 死字段修复(f9fada539):PackTemplate 声明了 description?、客户端「载入底本」也读它,但服务端从未填值——载入 chat/lean 底本时用途说明栏永远空白。现由 SurfaceResolution 透传 pack 自带 description(纯增量可选字段,identity default pack 无值不受影响),测试钉住 chat=shipped 原文逐字一致、default=缺失。
  3. 门禁命中——本 PR 自带(8d4c04680):src/web/api.ts: PackTemplate 导出但无模块边界引用 → unused-exports INTERNAL_ONLY。按门禁自身处方去 export(全仓 grep 确认仅 api.ts 内部使用)。
  4. 继承红处置(94f7b4a3f):旧 head 的 docs-sync/unused-exports 两条红均为 master 在档继承红(CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 floors 716–724,哨兵已收敛进 ci-fixes)。已 merge origin/ci-fixes(带入 CodexWindowSource 修复与 promptPack 种子 "chat" 对齐);本地复跑 docs-sync 零漂移、unused-exports/lifecycle-ledger/tsc 全绿、定向四套(web-user-packs/web-pack-picker/chat-pack/admin-probe)9/9。已在 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 留一行记录。

结构化八问:

  1. 是什么问题:pack 编辑器原来是裸 JSON textarea,没有字段说明、样例和底本入口,普通用户不知道该填什么((ai: anthropic/claude-opus-4-6) The pack editor is too crude: just a plain JSON text box, no field descriptions, no exam | (ai: anthropic/claude-opus-4-6) pack 编辑器太粗暴:纯 JSON 文本框,无字段说明、无样例,请改成引导式表单 + AI 辅助 #5344);本 PR 改成三页签——表单填写 / AI 辅助 / 高级(JSON)。
  2. 什么原因导致的:非 bug,是 UX 缺口——pack 文件格式比用户实际需要填的两个字段丰富得多,编辑面只暴露原始文本,缺解释层与「从现行文案起稿」的入口。
  3. 影响范围与严重程度:纯设置面板 UI + 一个新增只读端点;不触 wire 注入、prompt 装配、压缩执行、存储与持久化格式。修前普通用户能改包但成本高、易错;非可用性缺陷,故 p3。
  4. 怎么修复的:客户端原生 DOM 建三页签(零依赖,全程 createElement+textContent,无 innerHTML,XSS 面安全;WEB_CLIENT 嵌入规则——无 backtick 字面量、charCode 构造围栏——均遵守);服务端 GET /__bili/packs/templates 走既有 resolveCompressSurfaceDetailed 解析链(project > user > shipped > builtin,用户/项目覆盖优先),tri-state 组装 default/chat/lean 现行文案(null→空串、缺失→kernel defaultPrompts 原文),与运行时回落语义一致,仅作展示底本。AI 辅助页生成自包含提示词→任意模型执行→粘回 JSON 自动剥围栏解析填表,多给字段保留进 JSON 页签随包保存。
  5. 是否有回归问题:逐项审过既有行为——① 原始 JSON 保存路径(peSave)逻辑不变(仅抽出共享 packNameForSave helper,charCode 语义逐字相同);② picker/新建/删除端点未触碰;③ 新端点只读、位于既有 loopback/trusted-origin 门之后(admin.ts 分发前统一把关);④ SurfaceResolution 增一个可选字段,纯增量,既有调用方零影响;⑤ i18n 中英 33 对成对补齐,语言规范达标。有意的行为变更(披露):编辑对话框默认视图从「裸 JSON」变为「表单页签」,JSON 原样保留为第三页签——这正是 (ai: anthropic/claude-opus-4-6) The pack editor is too crude: just a plain JSON text box, no field descriptions, no exam | (ai: anthropic/claude-opus-4-6) pack 编辑器太粗暴:纯 JSON 文本框,无字段说明、无样例,请改成引导式表单 + AI 辅助 #5344 的目标,旧值→新值如上。另我新增的表单保存合并语义把「表单保存会丢其他字段」变为「保留其他字段」,属缺陷修复而非漂移。
  6. 是否破坏缓存:不涉及——无缓存/重试/增量游标/去重键路径。
  7. 是否改了设计方向:不涉及。kernel/** 零触碰(模板文本经 acp-kernel 已导出的 defaultPrompts + host 现有解析链只读组装,符合 Kernel Boundary)。
  8. 是否引入新配置:无新配置项/env/CLI flag;新增 1 个只读管理端点 /__bili/packs/templates(沿用 __bili/* 门控,CONFIGURATION.md en/zh 各加一句文档说明)。

测试有效性:tests/web-user-packs.test.ts 的 templates 断言有牙——chat 两段文案与 src/chat-pack.ts 常量逐字比对、default 长度>100 钉住 kernel 回落、lean≠default;我又补了 chat.description 逐字、default.description 缺失两条。客户端合并逻辑在本仓无 DOM 测试基建,以代码走查 + typecheck/build 验证(CI 会跑全套)。Gate-test 双向纪律(#3617)不适用:本 PR 无抑制/降级类 gate。

CI 状态:旧 head 两条静态门红均为继承性失败(分账见上第 4 条与 #4599);新 head 8d4c04680 等远程重跑(静态门转绿后 test 矩阵才会开跑,旧 run 里 skipped 即此因)。

判定:可合——待新 head CI 全绿后由 owner 合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI 状态更新(紧接上一条审核结论):新 head 8d4c04680 的远程 run 已开跑——旧 head 的两条红(docs-sync、unused-exports)在新 head 上已转绿,docs-coverage / lock-sync / build-artifact 亦绿;其余静态门(kernel-guard / lane-guard / lifecycle-ledger-guard / config-surface-guard / test-import-graph 等)运行中,当前零失败。test 矩阵(ubuntu/windows × node 22/24 × 3 shards)按 ci.yml 设计要等全部静态门通过后才开跑,故本轮 run 里显示 skipped 属正常。

结论不变:审核完成、2 处缺陷 + 1 条门禁命中已在分支修复并钉测试,新 head CI 全绿后即可合并。若 test 矩阵出现红,签名属 #4599 在档继承家族则再 merge 一次 ci-fixes 即可(已在 #4599 留痕)。

ranxianglei pushed a commit that referenced this pull request Oct 31, 2026
…cfc2ada)

The #5345 review fix (form save merges onto the carried raw JSON instead of
rebuilding) shipped no test - the logic sat inline in a DOM click handler,
unreachable from node tests. Extract it as pure exported helper
mergePackFormIntoRaw (same single-implementation pattern as the #3572 JSONC
helpers: TS module + toString() inline into the browser IIFE) and pin:
round-trip of uncovered fields, tri-state empty=delete, promptSections
creation / malformed-shape replacement, bad-json and non-object refusal.
Handler behavior unchanged (same i18n keys, same 2-space PUT body).
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Verification pass for this PR (working #5349) — end-to-end checks plus three fixes landed on the branch:

Verified working (live smoke, isolated env, real server on port 0)

  • GET /__bili/packs/templates: default = kernel defaultPrompts verbatim (philosophy 530ch / howToCompress 5856ch); chat = shipped CHAT_COMPRESS_PHILOSOPHY/CHAT_HOW_TO_COMPRESS verbatim (+ description since f9fada5); lean = howToCompress only — philosophy null by design (LEAN_PROMPT_SECTIONS, kernel/src/packs.ts:299), template faithfully mirrors runtime.
  • Served /__bili/?embed=1 inline script compiles standalone (vm.Script) — WEB_CLIENT template literal intact.
  • Form-tab save shape accepted by the PUT endpoint, round-trips, DELETE ok.

Latent defects found during verification — hidden because ci.yml fail-fast tiering skips the test layer while a static gate is red:

  1. f91534f78 — en cfg.q_pack_ai_p1 lacked the {need} placeholder (zh had it): in en UI mode the user's scenario text was silently dropped from the generated AI prompt. Both locales now render identically.
  2. f91534f78 — base-select options and packSectionField passed i18n keys indirectly (array-of-pairs / helper params), which the web-i18n dead-key detector cannot see — six keys would be flagged dead. Now direct t() references.
  3. c640c01d2 — cfc2ada's merge-save fix shipped no regression test (logic sat inline in a DOM click handler, unreachable from node tests). Extracted it as pure exported helper mergePackFormIntoRaw (same single-implementation pattern as the JSONC doc examples vs bare JSON.parse loader — copying the docs silently drops the config | 文档示例是 JSONC(含 // 注释),loader 却用裸 JSON.parse——照文档抄配置会静默失效 #3572 JSONC helpers: TS module + toString() inline into the browser IIFE) and pinned four behaviors: uncovered-field round-trip, tri-state empty=delete, promptSections creation / malformed-shape replacement, bad-json / non-object refusal. Handler behavior unchanged (same i18n keys, same 2-space PUT body).

Reconciliation notes (concurrent commits on this branch): my initial PackTemplate de-export duplicated 8d4c046 → dropped mine. My initial q_pack_ai_extra wording fix ("extras saved only from the Advanced tab") was superseded by cfc2ada's merge-save — extras now survive form-tab saves too, so the original message is accurate again → dropped mine rather than push a contradicting string.

Local state: targeted suites 21/21 (web-i18n, web-user-packs, web-pack-picker, chat-pack), unused-exports gate clean, docs-sync zero drift (ci-fixes merged), typecheck clean. Awaiting CI on c640c01.

…, AI-assist prompt, raw JSON kept as Advanced tab

Closes #5344

The pack Edit dialog was a bare JSON textarea with no field docs and no
samples. Replace the default view with three tabs:
1. Guided form: philosophy + howToCompress fields with plain-language help;
   one-click base text loaded from the resolvable default/chat/lean packs
   (new read-only GET /__bili/packs/templates, tri-state-resolved like
   buildCompressSystemPrompt); empty fields are omitted so runtime falls
   back to system defaults.
2. AI assist: describe the scenario in one sentence -> generates a ready-to-copy
   prompt for any LLM constrained to bili-pack.json shape -> paste the
   returned JSON back -> parsed into the form (extra top-level keys are kept
   in the JSON tab and saved with the pack).
3. Advanced (JSON): the previous raw-text editing, unchanged.

Docs: CONFIGURATION.md / CONFIGURATION.zh-CN.md updated (paired).
@ranxianglei
ranxianglei force-pushed the 2026-10-31_pack_editor branch from c640c01 to b844b75 Compare October 31, 2026 12:15
Internal-only type in src/web/api.ts; drop the leading export so the
unused-exports CI gate stops flagging PR #5345.
@ranxianglei
ranxianglei merged commit 79fe3b8 into master Oct 31, 2026
46 of 50 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.965-master.79fe3b8 (rolling master tag).

npm install -g billion-context@0.0.965-master.79fe3b8  # 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.

Louie0806 added a commit to Louie0806/billion-context that referenced this pull request Oct 31, 2026
…18n dead-key gate two live call shapes

Both are master-red required-check failures introduced by the guided pack
editor (b844b75, ranxianglei#5345); neither is this lane's regression. Reproduced on a
pristine upstream/master worktree before touching anything:

    node --import ./tests/preload-test-env.mjs --import tsx --test tests/web-i18n.test.ts
    not ok 1 - ranxianglei#1024: catalog parity — every placeholder mismatch for "cfg.q_pack_ai_p1"
    not ok 4 - ranxianglei#1024: every referenced key exists in both locales and no catalog key is dead
               catalog key never referenced anywhere: cfg.q_pack_base_blank
    # pass 8 / # fail 2

1. src/web/i18n.ts: the en value of `cfg.q_pack_ai_p1` lost the `{need}`
   placeholder that the zh-CN value still has. The test asserts placeholder
   parity between locales, and client.ts:4273 interpolates it via
   `t("cfg.q_pack_ai_p1", { need })` — so the English AI-assist prompt was
   silently rendering with the user's requirement text dropped.
2. tests/web-i18n.test.ts: `collectRefs()` only knew `t("literal")`,
   `data-i18n="literal"`, `zh("literal")` and `tr(x, "literal")`. The pack
   editor uses two more forms, and both read as "never referenced":
     - a `[value, key]` pair table: `[["", "cfg.q_pack_base_blank"],
       ["default", "cfg.q_pack_base_default"], …].forEach(p => t(p[1]))` in
       client.ts:4129;
     - a key passed as an ARGUMENT: `packSectionField("cfg.q_pack_phil",
       "cfg.q_pack_phil_help", 5)` in client.ts:4168.
   Rather than enumerate yet more call shapes (which is how this gate fell
   behind), collect every `cfg.*` literal in the three web sources: `cfg.` is
   this catalog's namespace, so such a string is always a reference. Verified
   the gate still fires on both directions:

   - added `"cfg.zz_dead_probe"` to BOTH catalogs, kept no consumer
     -> `catalog never referenced anywhere: cfg.zz_dead_probe`, pass 9 / fail 1
   - dropped `{need}` from the en value -> `placeholder mismatch for
     "cfg.q_pack_ai_p1"`, pass 9 / fail 1
   - restored both -> pass 10 / fail 0

`npx tsc --noEmit` clean; `gen-config-docs generate` is a fixed point (0 artifact
diffs); `check-test-import-graph` exit 0.
ranxianglei pushed a commit that referenced this pull request Oct 31, 2026
…refs (#5345 fallout)

Master has been red since #5345 (guided pack editor): every PR's test shards
fail both #1024 catalog checks. (a) en cfg.q_pack_ai_p1 lost its {need}
placeholder vs zh — restored, text aligned. (b) the base-selector option
labels are referenced through a pair array (t(pair[1])), which the literal
t("key") scanner cannot see, so all four cfg.q_pack_base_* keys report as
dead. collectRefs now also accepts dot-qualified identifiers quoted verbatim
in page/client/report sources (catalog keys are namespaced; plain quoted
words like "billion-context" lack a dot and are unaffected).

tests/web-i18n.test.ts 10/10 locally; unblocks #5196's matrix.
Louie0806 pushed a commit to Louie0806/billion-context that referenced this pull request Oct 31, 2026
…ption keys visible to the ranxianglei#1024 dead-key guard

The guided pack editor (ranxianglei#5345) broke the i18n parity tests on master push CI:
1) en cfg.q_pack_ai_p1 was missing the {need} placeholder its zh twin has
   (client.ts interpolates t("cfg.q_pack_ai_p1", { need })).
2) Four catalog keys were passed as bare strings through helper parameters
   (option array / packSectionField), which the ranxianglei#1024 reference scanner
   (literal t(\"key\") only) cannot see — flagged as dead keys. Labels are now
   translated at the call sites so every key has a scannable literal reference.

Verified locally at origin/master (44fcbe4): tests/web-i18n.test.ts +
web-user-packs.test.ts 11/11 (was 9/11); all web/pack/i18n suites 257/257;
tsc --noEmit clean.
@github-actions github-actions Bot mentioned this pull request Oct 31, 2026
ranxianglei pushed a commit to El1mir/billion-context that referenced this pull request Nov 9, 2026
tests/web-i18n.test.ts (ranxianglei#1024 'every referenced key exists in both locales')
scans src/notices.ts for quoted dot-qualified identifiers and treats each as
a catalog-key reference (the ranxianglei#5345 verbatim-acceptance design). The new
iot-incompat notice probe carried the path literals "package.json" and
"config.json" inside that scanned file, so the gate failed deterministically
on every platform/shard ('referenced key missing from zh catalog:
package.json'; 'config.json' was next in line).

Relocated probeDshIotThinking + dshIotThinkingActive to src/dsh-channel.ts,
next to the dshProfileDirs/resolveDshHome helpers they exclusively use;
behavior is byte-identical, zero logic change. The iot-incompat test now
imports them from their new home.

Verified locally: web-i18n + iot-incompat-notice + notice-registry suites
21/21 pass; unused-export gate clean; tsc --noEmit clean.
ranxianglei pushed a commit to El1mir/billion-context that referenced this pull request Nov 9, 2026
… as catalog keys

PR ranxianglei#6015 red CI (shards ubuntu/24/3, ubuntu/22/3, windows/22/4, all the same
subtest): ranxianglei#1024 'every referenced key exists in both locales' failed with
'referenced key missing from zh catalog: package.json'.

collectRefs()'s lenient bare-string rule (ranxianglei#5345) accepts any dot-quoted token
as a live i18n reference; the new notices.ts probe writes the literals
"package.json" / "config.json", which the rule misreads as keys. Drop
tokens whose final segment is a file extension from that rule only — explicit
t()/tr()/data-i18n references stay authoritative, and the two segments already
proven to be key suffixes (summary.key, det.log) are kept out of the exclusion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant