Skip to content

[PR] ci(test): Minor CI/test signal fixes, Part 2 — dispatch guard blind-spot coverage + golden snapshot encapsulation + base | ci(test): CI/test 信号小修合集第二辑 —— dispatch 守卫补盲 + 黄金快照封闭化 + 基线注释更正 - #5859

Merged
ranxianglei merged 8 commits into
masterfrom
2026-11-07_ci-test-signal-batch
Nov 8, 2026

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

这一辑收什么

CI/test 信号小修三件 —— 都是“让 CI 的红绿更可信、少假红少漂移”的方向,全部已评审通过(✅可合),合并到一次送人审:

本 PR 里的提交 来源 PR 解决的问题
fix(test): pin BILI_MESSAGE_TIMESTAMPS in the storage goldens… #5434(外部贡献者 @Louie0806,作者身份保留在提交与署名中) storage-render 黄金快照套件不封闭:#5434 原文明量对比「裸跑 1过/4挂;加 pin 5过/0;CI preload 链 5过/0」。这次在干净 master 上复测同样成立——不 pin 时 8 个黄金测试在本机全红(nudge/tsStamps 两个时间戳键漂移),pin 之后 17/17 全绿。Closes #5402
ci: run boundary guards on workflow_dispatch too #4428 发版路径守卫盲区:release-ci-gate 用 workflow_dispatch 触发 CI 时,version-guard/kernel-guard 等边界守卫全部跳过(PR-only if:),发版分支漏了一道人类闸门之外的机器校验。补齐后守卫同时覆盖 dispatch,且只对 owner 手动触发的 dispatch 豁免 PR-body 声明检查(dispatch 没有 PR body,人工闸门已在带外发生)
docs(tests): correct stale storage-default comment… #4374 基线 preload 脚本里一条过期的 storage 默认值注释(+10/-7,纯注释)

冲突处理(一处,意图并集)

#4428 与当前 master 在 ci.yml 冲突:master 其后给各守卫加了 timeout-minutes: 20,并把 kernel-guard 的 Rule 1 演进成豁免 lockfile 抖动(#4828)。按双方意图合并:保留 timeout、保留 lockfile 豁免,dispatch 时只跳过 PR-body 声明检查、版本纪律规则照跑。YAML 解析校验通过。

本地预检(master 295ba58)

明确不带进来的(附理由)

贡献者身份说明

#5434 来自外部贡献者 @Louie0806,以 cherry-pick 方式保留其原始作者信息(name/email)并附 Co-authored-by;其余两件均为仓库自有分支拾取。

Closes #5402

CI 修正补记(第二轮,2026-11-07 下午)

test 矩阵四线全红不是本辑代码问题,是上游漂移:master 在本分支 base(295ba58)之后合入 #5860(幻影压力守卫,kernel 0.0.184,新增 requireUsageSampleForPressure)+ #5842/#5862,改变了黄金快照会话的持久化形状。CI 跑 merge-ref(HEAD×最新 master)→ 旧快照过期。本机同环境 A/B 实证(各树独立 node_modules + 重建 kernel dist):base 树全绿;master df0a402 精确复现这 4 个失败、digest 与 CI 报错逐字节一致;wire 正文(turns sha)零变化,只有 stateDigest/metadata 段动。已按仓库规矩用自带脚本重生成并提交(b5b3d36,提交正文含完整证据链),本地 17/17 + 31/31 绿。注意:master 自身此刻也埋着同一颗雷(其定时 CI 最后一次运行早于 #5860)——已拆成独立的单提交 PR #5868(Closes #5867)送审,本辑不再携带该快照提交,保持一范围一 PR。

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-07_ci-test-signal-batch (07e04d0)

Latest build — install this exact version

npm install -g billion-context@0.0.8539-pr.5859.60ca878

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
07e04d0 billion-context@0.0.8539-pr.5859.60ca878 build
4a2b490 billion-context@0.0.8531-pr.5859.f584620 build
454c438 billion-context@0.0.8490-pr.5859.8e28cd7 build
d9459f1 billion-context@0.0.8478-pr.5859.a05e5be build
b5b3d36 billion-context@0.0.8475-pr.5859.c0afadb build
8613e45 billion-context@0.0.8469-pr.5859.ccf6fd4 build
9cbc4b9 billion-context@0.0.8465-pr.5859.901c32b build
64004b7 billion-context@0.0.8461-pr.5859.56f4edf build

Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title ci(test): CI/test 信号小修合集第二辑 —— dispatch 守卫补盲 + 黄金快照封闭化 + 基线注释更正 [PR] ci(test): Minor CI/test signal fixes, Part 2 — dispatch guard blind-spot coverage + golden snapshot encapsulation + base | ci(test): CI/test 信号小修合集第二辑 —— dispatch 守卫补盲 + 黄金快照封闭化 + 基线注释更正 Nov 7, 2026
ranxianglei pushed a commit that referenced this pull request Nov 7, 2026
The workflow_dispatch rewrite dropped the closing double-quote on the
kernel-change error line, so the generated step script died with
'unexpected EOF while looking for matching quote' before any guard logic
ran (kernel-guard exit 2 on PR #5859's own run). One-character fix;
all 27 run blocks re-validated with bash -n.
@ranxianglei
ranxianglei force-pushed the 2026-11-07_ci-test-signal-batch branch 2 times, most recently from 8613e45 to b5b3d36 Compare November 7, 2026 08:45
@ranxianglei
ranxianglei force-pushed the 2026-11-07_ci-test-signal-batch branch from b5b3d36 to d9459f1 Compare November 7, 2026 08:54
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

🔶 需要决策 (ai: vllm-qwen/qwen3.8-27b)

七问

  1. 是什么问题:本 PR 自身的 CI 故障早已修完(kernel-guard bash 语法错误——PR 自己重写 guard 时 echo 行丢了闭合引号——先由我修 9cbc4b9,后被并行车道更完整的修复 d9459f1 取代:补引号 + EVENT_NAME env 注入,现已绿)。当前 9 个 test shard 红全部是继承性 master born-red,与本 PR diff 无关。
  2. 什么原因导致的:master a7cbfd12fc([PR] fix(nudge): no billing sample this round → hold pressure-band injection one round (phantom-pressure guard) #5860 phantom-pressure guard)新增配置字段 compress.requireUsageSampleForPressure(默认 true)+ kernel 对 estimate-grade 读数把 pressure-band nudge 推迟一轮,但没重生成两族黄金快照、没更新 6 条既有 estimate-nudge 测试;master push 不触发 CI(owner 决定 2026-11-01),born-red 一直隐形,直到本 PR merge 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 floor 1101 显示 master 自身 schedule cron 也已全矩阵红)。三个症状面:F1 storage-render golden metadata digest 漂移 ×4(新字段进入 effectiveConfig 持久化快照);F2 wire-contract kernel.json defaultConfig pin ×1;F3 estimate-nudge 旧契约 ×6。
  3. 影响范围与严重程度:任何 merge 当前 master 的 PR 都继承这 9 个红 shard(所有在途分支 rebase 后同样被挡)。双重严重度:① CI 调度阻塞(P2);② F3 背后藏真实功能回归——推迟逻辑无状态记忆,从不交付 usage 的 fully-silent backend 上 pressure-band nudge 永久饿死,只剩 hard-overflow 兜底(P1 候选,语义需 owner 定夺)。
  4. 怎么修复的:零推送策略——分支内容正确,GitHub checkout head+base 合并树,修复落到 master/ci-fixes 后下次重跑自愈。完整签名+归因链+收敛建议已登记 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599(comment 6705536790,补充 floor 1102 的 F3 登记:补全 6 条签名、归因从「待查」钉死到 a7cbfd1 的具体机制);机械半部(两个 documented script 重生成黄金)无决策依赖可先行由哨兵收敛到 ci-fixes。
  5. 是否有回归问题:我未引入任何回归(零 commit、零 push、零分支改动)。本 PR 自身 diff 已逐项审过既有行为:ci.yml = guard dispatch 覆盖(workflow_dispatch 新增跑 4 个 guard;Rule-1 仅手动 dispatch 跳过 body 声明检查,版本纪律规则不受影响);timestamp pin = CI 下 no-op(preload-test-env.mjs:53 先行设同值);preload-storage-baseline = 纯注释——无语义漂移。
  6. 是否破坏缓存:不涉及(不触及缓存/重试/增量游标/去重键失效策略)。
  7. 是否改了设计方向 / 引入新配置:我未改方向;F3 暴露 [PR] fix(nudge): no billing sample this round → hold pressure-band injection one round (phantom-pressure guard) #5860 的设计洞需要你拍板(见下)。[PR] fix(nudge): no billing sample this round → hold pressure-band injection one round (phantom-pressure guard) #5860 自带新配置 compress.requireUsageSampleForPressure(默认 true,逃生舱 = 置 false 回 legacy)——属其自身面,非我改动。

选项(F3 语义裁决;F1/F2 黄金重生成与此选择独立)

  • A 接受饥饿:把 6 条测试改为断言「estimate 不触发 pressure nudge」。最快变绿,但把「fully-silent backend 永久失去 pressure-band nudge」固化为预期行为——那些宿主恰恰最依赖 estimate 驱动 nudge,语义最差。
  • B 有界推迟(推荐):kernel 推迟加有界性(连续 N 轮 estimate-grade 交叉后放行 / 仅在 usage sample 可能到达时推迟),再把 6 条测试对齐有界契约 + 重生成两族黄金。kernel 变更属 human-gated 层;这是唯一修复功能回归而非掩盖它的选项。
  • C revert [PR] fix(nudge): no billing sample this round → hold pressure-band injection one round (phantom-pressure guard) #5860:per-user 逃生舱已有(requireUsageSampleForPressure=false),但默认值对 silent backend 仍坏;整体放弃 phantom-pressure 防护。
  • default-if-undecided:机械半部立即推进(ci-fixes 上重生成两族黄金,F1+F2 变绿),F3 等你拍板。

本车道到此停手不再触碰该 PR;#4599 哨兵持有 ci-fixes 收敛。修复落地后重跑自愈。

ework-agent added 2 commits November 7, 2026 18:58
…ted-state shape

#5860 added compress.requireUsageSampleForPressure; the resolved Config snapshot persisted in session.metadata["effectiveConfig"] (src/session.ts cloneSafe) grew by exactly that field, so the metadata section digest drifts deterministically on every lane (F1 of the #5860 born-red wave, signatures pinned in #4599). Regenerated all four snapshots at 5af5f9f with scripts/update-storage-render-goldens.ts; state/blockContents/stats sections unchanged, no behavior change - snapshot realignment only. Verified green under the CI preload env (BILI_MESSAGE_TIMESTAMMS=0 via tests/preload-test-env.mjs).
…ract kernel.json

buildKernelGolden() serializes behavior.defaultConfig100k = defaultConfig(100_000); #5860's additive NudgeConfig field broke the canonicalized snapshot (F2 of the #5860 born-red wave). Regenerated with scripts/update-wire-contract-goldens.ts: diff is the single additive field requireUsageSampleForPressure: true in the nudge section - the ledger grows, nothing shrinks (Kernel Boundary rule 4).
ranxianglei and others added 4 commits November 7, 2026 22:19
…-baseline (#4011 review)

The header claimed the production default was still "shadow" (the interim
#2815-era value). Since #3818 the default is "full", which made the comment
mislead test authors about what the legacy baseline actually overrides.
Add the lesson from PR #4011: suites whose assertions depend on a specific
storage mode must pin BILI_STORAGE_UNIFIED themselves, because this baseline
overrides the production default in CI.

Picked up from PR #4374 for the CI/test-signal small-fixes batch.
…st files (#5402)

The storage-render goldens are byte-stable snapshots of the outbound body.
They were rendered with the #4313 display gate OFF, which is what
tests/preload-test-env.mjs pins and what CI's preload chain provides — but a
bare `node --import tsx --test tests/golden-storage-render.test.ts` has no
preload, so BILI_MESSAGE_TIMESTAMPS sits at its production default (ON) and
every digest drifts.

Measured with #5579's regenerated goldens in place (so the byte drift from
#5556 is out of the picture and only the gate is variable):

  bare                             : 1 pass / 4 fail
  bare + BILI_MESSAGE_TIMESTAMPS=0 : 5 pass / 0 fail
  CI preload chain                 : 5 pass / 0 fail

Pin the gate inside each suite so the goldens are hermetic in both run modes,
matching the regen script's Parity #3 and the CI preload chain.

Scope note: this branch carries only the two test-file self-pins. The byte
regeneration is #5579 (Closes #5578), and the regen-script Parity #3 block
already landed on master in 6d6e29e — both were dropped here so the PR is a
single focused invariant. Land #5579 first: without the regenerated bytes the
goldens are still stale and every test shard stays red in either run mode.

Co-authored-by: Louie0806 <Louie0806@users.noreply.github.com>
Picked up from PR #5434 for the CI/test-signal small-fixes batch.
…ge gap)

Picked up from PR #4428 for the CI/test-signal small-fixes batch.
Resolved against current master (post-#5801/#4828): guards keep their new timeout-minutes; kernel-guard keeps the #4828 lockfile-exemption and now also skips only the PR-body declaration check on owner-fired workflow_dispatch.
…ernel-guard Rule-1 (#4428 piece)

Follow-up to this branch's #4428 consolidation; caught by the kernel-guard job
itself on the first CI run ('unexpected EOF while looking for matching quote'):

- the ::error:: echo lost its closing double quote during the three-way
  resolution — pure syntax error, fixed by restoring it;
- the dispatch exemption referenced ${GITHUB_EVENT_NAME}, an env var GitHub
  Actions does NOT define (only the github.event_name expression context). On
  every event it expanded empty, silently re-arming the body check for
  workflow_dispatch — defeating the exemption #4428 exists for. Inject
  EVENT_NAME via the step env (same idiom as PR_BODY) and compare that.

Verified: yaml parse OK; bash -n clean on the full run script; all three Rule-1
branches simulated (dispatch+no-body passes exempt / PR without marker fails /
PR with 'kernel-change:' passes).
@ranxianglei
ranxianglei force-pushed the 2026-11-07_ci-test-signal-batch branch from 454c438 to 4a2b490 Compare November 7, 2026 14:22
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

PR #5859 的 6 个红测试分片已修复并全绿。七问:

  1. 是什么问题:全量测试矩阵 6 个分片(windows/ubuntu × node22/24)确定性失败,集中在 6 个 nudge 相关用例——fork-nudge-trigger 2 个(期望注入 nudge、出站请求末尾却没有)、silent-backend-nudge 3 个(#728A/#728C/effectiveTokenCount's text-only raw bound caps away the image term from the nudge numerator (silent-backend sessions) #1119)、issue4241-judge-render-baseline 1 个。跨平台同挂,非环境抖动。
  2. 什么原因导致的:基线落后导致的继承性红,不是本 PR 代码缺陷。本 PR 分支切自旧 master,而 master 后续合入了 [PR] Infinite Wait Issue in Stress Injection: N-Round Fallback (Side Effect Introduced by Fix #5860) | 压力注入无限等待问题:N轮兜底(修复#5860引入的副作用) #5882「压力注入无限等待 N 轮兜底」——它是 [PR] fix(nudge): no billing sample this round → hold pressure-band injection one round (phantom-pressure guard) #5860(nudge 估算压力 hold 行为)的跟进修复,给无限等待加了 maxEstimateHoldRounds 上限,并把上述测试的断言目标重钉到新行为上。分支带着 [PR] fix(nudge): no billing sample this round → hold pressure-band injection one round (phantom-pressure guard) #5860 的行为却没有 [PR] Infinite Wait Issue in Stress Injection: N-Round Fallback (Side Effect Introduced by Fix #5860) | 压力注入无限等待问题:N轮兜底(修复#5860引入的副作用) #5882 的兜底与配套测试,所以该注入 nudge 的地方被无限 hold 住,断言失败。
  3. 影响范围与严重程度:仅本 PR 的 CI 信号;线上用户不受影响([PR] fix(nudge): no billing sample this round → hold pressure-band injection one round (phantom-pressure guard) #5860/[PR] Infinite Wait Issue in Stress Injection: N-Round Fallback (Side Effect Introduced by Fix #5860) | 压力注入无限等待问题:N轮兜底(修复#5860引入的副作用) #5882 均在 master 侧演进)。严重程度:CI 阻塞合并,无产品面影响。
  4. 怎么修复的:把最新 master 同步进 PR 分支(引入 [PR] Infinite Wait Issue in Stress Injection: N-Round Fallback (Side Effect Introduced by Fix #5860) | 压力注入无限等待问题:N轮兜底(修复#5860引入的副作用) #5882 及后续)。执行中发现并行 CI 机器人已按「修复收敛到 ci-fixes」的哨兵机制完成同一同步并推送(head 07e04d0);我本地独立做的 master 合并在 rebase 时被其吸收,两者树内容逐字节一致(diff 0 行)。同步后本地定向验证:原失败 4 个测试文件 13/13 通过,typecheck、build 均绿。
  5. 是否有回归问题:无。同步后分支相对 master 的差异只剩本 PR 自己的 4 个文件(ci.yml dispatch 守卫补盲、golden 存储测试 BILI_MESSAGE_TIMESTAMPS 钉死、preload-storage-baseline 注释更正、storage-engine-proofs 钉死);其余全部与 master 对齐。远程全量 CI 实测:核心 CI run 42386371854 共 27 个 job 全 success(含全部 12 个测试分片、kernel-guard/lock-sync/config-surface-guard 等守卫、static-gates),各 e2e 车道亦全 success。
  6. 是否破坏缓存:不涉及——未触碰缓存/重试/增量游标逻辑。
  7. 是否改了设计方向 / 新配置:设计方向无变化;无新增配置(maxEstimateHoldRounds 随 [PR] Infinite Wait Issue in Stress Injection: N-Round Fallback (Side Effect Introduced by Fix #5860) | 压力注入无限等待问题:N轮兜底(修复#5860引入的副作用) #5882 来自 master 既有面,非本 PR 引入)。

结论:PR #5859 当前全部检查绿,可等待人工合并。

@ranxianglei
ranxianglei merged commit 848f59b into master Nov 8, 2026
47 checks passed
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.1095-master.848f59b (rolling master tag).

npm install -g billion-context@0.0.1095-master.848f59b  # 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

Projects

None yet

2 participants