Skip to content

[PR] fix: propagate system removal in native incremental turns - #3797

Merged
ranxianglei merged 6 commits into
ranxianglei:masterfrom
yanhuojiyusheng:2026-10-19_incremental-system-clear
Oct 20, 2026
Merged

ranxianglei merged 6 commits into
ranxianglei:masterfrom
yanhuojiyusheng:2026-10-19_incremental-system-clear

Conversation

@yanhuojiyusheng

Copy link
Copy Markdown
Contributor

When a complete native host request removes its system prompt, the incremental client now sends the existing system: null tombstone. Previously it omitted the field, so the server retained and forwarded the old instruction; a system-only deletion was skipped entirely.

Handle absence in every system comparison and seed without a system explicitly, including fresh-client reseeding into a live server session. Once acknowledged, unchanged absence is omitted from subsequent deltas. The direct incremental endpoint keeps its existing omitted-field sticky semantics.

Fixes #3796

Validation on Node 24.20.0:

  • Five real proxy/upstream regression cases failed before the fix and pass afterward: append, system-only, edited history, forced resync, and fresh-client reseed. Each also verifies the following acknowledged delta.
  • Targeted tests/incremental-lane.test.ts system/helper selection — 7 passed, including existing sticky keep/replace behavior.
  • tests/incremental-client-recovery.test.ts and tests/omp-native-incremental.test.ts — 8 cases passed.
  • npm run typecheck, npm run build, and git diff --check passed.

Limited to the opt-in plugin incremental lane (default rollout 0%). No new configuration or schema. Full regression is the GitHub Actions test lanes on this PR head.

@ranxianglei ranxianglei changed the title fix: propagate system removal in native incremental turns [PR] fix: propagate system removal in native incremental turns Oct 19, 2026
@yanhuojiyusheng

Copy link
Copy Markdown
Contributor Author

(ai: magpie/group/sol)

CI status: the build artifact and static gates passed, but test (windows-latest, 22, 2) failed:
https://github.com/ranxianglei/billion-context/actions/runs/39216151614/job/117940471340

The other submitted fix has the same failing shard, but the available check annotation only reports Process completed with exit code 1. The current MCP tool set exposes check results without Actions logs, and the unauthenticated log endpoint returns 403; I cannot identify the failed test or classify it as unrelated from that evidence. The local targeted regressions, typecheck and build recorded above passed. Please treat the full-suite result as red pending log review.

@ranxianglei

Copy link
Copy Markdown
Owner

ework接单拿

awork added 4 commits October 20, 2026 01:20
… red on master)

The function is only referenced inside log-mask.ts itself (maskUrlsForPublish);
the leading export tripped scripts/check-unused-exports.mjs on every PR since
it landed.
…nc gate red on master)

CONFIGURATION.md/zh-CN.md still carried a pre-ranxianglei#3818 storage.unified row
(shadow default) and an older sqliteAutoDownload row missing the ranxianglei#3788
cooldown text; the website/config-reference seed is already deduped, so the
committed docs were simply stale relative to it.
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

查重: 不重复 —— 本失败签名与已关闭的 #3665(Windows CI 假红家族)一致,属该家族的又一次实例而非新问题;排查中另发现一个独立阻塞项(master 静态门禁红风暴),已单独立项 #3870 + 修复 PR #3871。
标签: bug + pr + p3 + scope/wiring(本 PR 修真实缺陷、属协议接线层;增量 lane 为 opt-in 且默认 0% 放量,故 p3)。

日志已用认证 API 拉取并逐段核对(即你给的 job 链接)。

结论:这次红是已知的 Windows CI 假红(#3665 家族),与本 PR 代码无关。

证据:

  1. TAP 汇总 tests 4084 / pass 4054 / fail 0 / cancelled 9——零断言失败。9 个取消全在 tests/pi-omp-fork-adopt.test.ts:首例挂死无响应(full chain: omp lane adopts behind its own identity register,60s 超时),其余 8 例未开始即被连带取消(cancelledByParent,"Promise resolution is still pending but the event loop has already resolved")= 事件循环提前排空。
  2. 同一份日志里有明确的 runner 机器污染信号:ENOSPC: no space left on device(07:31Z);port 47831 is held by a different process (pid 99999) 且派生进程日志 0 bytes、60s 后被杀——正是 Flaky Windows CI: issue1993-preflight-400 suite cancelled by early event-loop drain | Windows CI 偶发假红:preflight-400 测试进程提前退出致 5 例取消 #3665 记录的根因形态(泄漏进程占端口 + 磁盘满,机器抽签抽到污染机)。
  3. 与本 PR diff 无关:PR 只改 src/agent/incremental-client.ts 与其测试文件;增量 lane 是 opt-in、默认 rollout 0%,而 pi-omp-fork-adopt 根本不经过该路径。
  4. 时序佐证:失败运行时 harness 还是 v0.1.201,旧分类把这种 drain 形态误判为「具体断言失败」而不自动重试;[PR] ci: retry a shard once on the fail-0/cancelled>0 event-loop-drain shape | Windows CI 偶发假红:零断言失败仅 cancelled 的 shard 自动重跑一次 #3710(drain 形态整 shard 自动重跑一次)已于 10-19 13:17Z 合入,晚于本次运行——之后的重跑对瞬时机器污染可自愈。

另:你提到的「另一个在途修复」同 shard 也红(2026-10-19_logger-silent-loss 分支)——我看了它的日志,是不同形态(# fail 2 真实断言失败,不是 drain),属那个分支自己的问题,需其作者自查,不并入本判定。

当前真正的阻塞:10-19 ~14:49Z 起 master 自身持续红——unused-exports + docs-sync 两个静态门禁失败,而它们在 needs 链上,导致所有 run(master 与全部 PR 分支)的测试 lane 被整体 skip(包括本 PR merge-master 后的那次运行)。我本地复现并钉死了两个根因:① #3811 引入的孤儿导出 maskUrlForPublish;② 配置文档生成块里混入的陈旧重复行(坏合并解决残留)。已立项 #3870,修复 PR #3871(两个独立标注 commit,本地两门禁均绿)。

八问:

  1. 是什么问题:windows(22,2) shard CI 红,提交方拿不到日志无法定位,请求定性。
  2. 什么原因导致的:Windows runner 池个别机器被污染(泄漏进程占端口 + 磁盘写满),使 fork-adopt 测试的事件循环提前排空、整 shard 取消;次因是当时旧版 harness 未识别该形态、未自动重试。与本 PR 变更无因果链。
  3. 影响范围与严重程度:仅影响 CI 证据链(拿不到全量回归绿),用户侧无影响;本 PR 所在 lane 默认关闭。
  4. 怎么修复的:无需改本 PR 代码——[PR] ci: retry a shard once on the fail-0/cancelled>0 event-loop-drain shape | Windows CI 偶发假红:零断言失败仅 cancelled 的 shard 自动重跑一次 #3710 的 drain 自动重试已在 master;待 [PR] fix(ci): unblock master static gates - drop orphaned export and stale duplicate doc rows #3871 合入让静态门禁转绿后,重跑 job 或推空提交触发新运行即可。
  5. 是否有回归问题:无(本 PR 代码零改动)。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:无。
  8. 是否引入了新的配置:无。

收工判定:本 PR 代码保持不动;等 #3871 合入(master 门禁转绿)后请重跑 test (windows-latest, 22, 2) 或推一个空提交——若届时仍红,测试 lane 已可正常出证据,再按真问题处理。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

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

这两条评论(CI 红请求定性、接单)我已在上一条回复里完整处理过,这里补一行状态确认,避免悬空:

@ranxianglei
ranxianglei merged commit d70c1bd into ranxianglei:master Oct 20, 2026
76 of 112 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.643-master.d70c1bd (rolling master tag).

npm install -g billion-context@0.0.643-master.d70c1bd  # 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

Labels

bug Something isn't working p3 scope/wiring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Native incremental client retains a system prompt after the host removes it

2 participants