Skip to content

[PR] feat: pi lane — show the injected nudge text verbatim in the terminal when debug is on - #6151

Merged
ranxianglei merged 7 commits into
masterfrom
nudge-debug-pi
Nov 16, 2026
Merged

ranxianglei merged 7 commits into
masterfrom
nudge-debug-pi

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

做什么

pi 车道:debug 开关打开时,代理注入 nudge 的那一刻,终端以一次性临时通知显示逐字 wire 原文——模型当轮实际读到的那条临时尾随 user 消息,一字不差。

  • 每个用户 turn 最多一次(紧急臂在同 turn 内每个 LLM 调用都会重注入,按 turn 去重),且在该轮模型回答之后才弹。
  • 模型零上下文成本:nudge 进模型是既有机制的职责;本 PR 只是给人看,通知只进终端,从不写入 session 文件,不注册任何 transcript 条目。
  • 开关:复用现有全局 debug(ACP_DEBUG=1 或配置文件 "debug": true),无新增 config 字段。
  • 局限:仅 pi inline 模式有效(spawn/attach 下代理是独立进程,看不到);覆盖 Anthropic 与 OpenAI 两条 wire 车道。

怎么实现

  • src/nudge-debug.ts:进程内 pub/sub,prepare 阶段注入点(anthropic/openai wire)emit 最终 wire 文本 + 元信息(tier/pct/emergency/topRange/turnKey)。无监听者时是 no-op。
  • src/agent/pi.ts:pi 扩展订阅总线,after_provider_response 钩子(模型已回答)里 ctx.ui.notify 显示原文;turnKey 去重;消费后清空。
  • 与官方 pi 客户端 billion-context-pi 的差异:它额外持久化一条紧凑记录行(issue Model: qwen3.8-27b — feat: codex compression-budget coordination (PR-D/E1/C/E2) #326);按 owner 评审意见,本 PR 不要记录行——临时通知就够了,功能更薄。

测试

config surface

无新增字段——复用现有 debug 开关(owner 定,初稿的 nudgeDebug 字段已移除)。

… debug is on

With the existing debug switch on (ACP_DEBUG=1 / config debug), every
compression nudge the proxy injects is mirrored into the pi transcript
as a transcript-only CustomEntry: [bili-nudge] <protocol>/<kind>
tier=… reason=… label + the final wire text the model actually read
that turn. Human-only: pi's session-context build ignores
type:"custom", so the view never enters LLM context or re-sent history.

Mechanism: the prepare stage (anthropic + openai lanes — the two pi
reaches) emits the post-wrapper text into a tiny in-process pub/sub
(src/nudge-debug.ts); in the default INLINE pi mode the extension is
the same bundle/process and mirrors each event via
pi.appendEntry("bili-nudge") + registerEntryRenderer. Emitters are
listener-less no-ops, so the prepare sites stay config-plumbing-free;
the consumer gate is a new debugEnabled() knob (src/knobs.ts) mirroring
Options.debug exactly (env ACP_DEBUG > file debug > false).

No new config fields / env vars / CLI flags — rides the existing debug
switch (owner decision; a draft nudgeDebug field from the first draft
was removed before the PR). kernel/ and pi-subagents/ untouched.
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: nudge-debug-pi (d7eefb2)

Latest build — install this exact version

npm install -g billion-context@0.0.9338-pr.6151.e19b3fa

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
d7eefb2 billion-context@0.0.9338-pr.6151.e19b3fa build
1090cd8 billion-context@0.0.9037-pr.6151.4a6e71e build
56bb583 billion-context@0.0.9032-pr.6151.b506447 build
ace5b0c billion-context@0.0.8994-pr.6151.d3481b3 build
141cfbc billion-context@0.0.8968-pr.6151.7001c2c build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr6151.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

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

查重:不重复。 open+closed 全量扫过,本主题(debug 开关下把注入的 nudge 原文逐字镜像进 pi 转录)无其他在途 PR/issue;仓库里其他 nudge 相关条目(可配置升级行、nudge surface 的 ref pair 打印等)机制与症状都不同。

当前状态(live 核实过):GitHub #6151 open,head nudge-debug-pi @ 141cfbcf,CI 红——静态门禁 unused-exports 失败(src/nudge-debug.ts 的 NudgeDebugKind 被判 INTERNAL_ONLY),下游 test/static-gates/e2e 车道因失败链被跳过、还没跑。

标签(本环境 label API 未实现,先在此记录判定):enhancement / pi / scope/wiring / p3——纯观测面新功能,默认全关零行为变化。

审核进行中,先报方向性结论:方案成立(进程内总线 + pi CustomEntry 人可见/模型不可见,复用现有 debug 开关不新增配置面,发射端 no-op 不碰配置管线),测试有牙(两条 wire 的金标断言是「总线事件文本 === 实际发往上游的尾随 user 消息」逐字节相等,wiring gate 双向断言齐)。发现 3 个小问题,按 review 纪律直接在 PR 分支上补 commit 修掉(独立标注):

  1. CI 红的根因:NudgeDebugKind 导出但只有文件内引用 → 去掉 export;
  2. src/nudge-debug.ts 头注释写 spawn/attach 局限「documented in docs/configuration.md」,实际文档在 docs/clients.md en+zh → 改对;
  3. debugEnabled() 的 file 层用 .debug === true,而 Options.debug(src/config.ts:1809)是 truthy 判断 (env.ACP_DEBUG ?? (fileConfig.debug ? "1" : "0")) === "1"——非布尔真值(如 "debug": 1)时两者判决分叉,与注释宣称的「逐字一致」不符 → 改为逐字镜像该表达式。

推完看 CI 重跑,随后给完整八问结论。

ci-check added 2 commits November 11, 2026 03:44
…eal docs

NudgeDebugKind is referenced only inside this file (by NudgeDebugEvent.kind),
so the gate classifies the export INTERNAL_ONLY — drop the leading export per
the gate's own remedy. Fixes the failed static gate on head 141cfbc.

Also correct the header comment: the spawn/attach inertness limit is documented
in docs/clients.md en+zh (Pi section), not docs/configuration.md.
Options.debug (src/config.ts) resolves as
(env.ACP_DEBUG ?? (fileConfig.debug ? "1" : "0")) === "1". The first pass
used .debug === true on the file tier, which diverges from the main debug
surface for a non-boolean truthy file value. Use the literal same expression
so the two surfaces cannot disagree on any input.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

审核完成,发现的三处小问题已在 PR 分支直接修掉并推送(commit a5a3a757 + ace5b0cfa4,新 head ace5b0cfa4)。

当前状态(live 核实):GitHub #6151 open、mergeable;新一轮 CI 全部跑完——52 个 check:38 success / 14 skipped(路径过滤不适用)/ 0 failed,包括之前红的 unused-exports ✓、test×11 shard ✓、gate×10 ✓、static-gates×2(含 typecheck)✓,以及 kernel-guard / pi-subagents-guard / config-surface-guard / architecture-docs / docs-sync / lock-sync / lane-guard / build-artifact 等全绿。

八问:

  1. 是什么问题:功能 PR,不是缺陷——debug 开启后让操作者在 pi 转录里逐字看到 nudge 注入时模型当轮实际读到的文本(此前只能事后翻代理日志,且看不出落在哪一轮、哪条注入臂)。
  2. 什么原因导致的:不涉及(feature request)。设计取向:进程内 pub/sub 总线 + pi CustomEntry 人读条目,复用现有全局 debug 开关,零新增配置面(初稿的 nudgeDebug 字段 + env 已按你的决定在提 PR 前移除)。
  3. 影响范围与严重程度:默认零行为变化(debug 关 = 无监听者、无 renderer 注册,emit 点 no-op);仅 debug 开 + pi 默认 INLINE 模式 + 宿主支持 registerEntryRenderer/appendEntry 时激活。spawn/attach 模式与旧宿主静默缺席(docs/clients.md en+zh 已写明)。严重程度:纯观测面,p3。
  4. 怎么修复的:审核发现的三处小问题直接在分支修掉——① NudgeDebugKind 导出但仅文件内引用(CI unused-exports 红的根因)→ 去掉 export;② 模块头注释把 spawn/attach 局限指向 docs/configuration.md,实际文档在 docs/clients.md → 改对;③ debugEnabled() 文件层用 .debug === true,与主 debug 面 Options.debug 的 truthy 判定(src/config.ts:1809)对非布尔真值输入分叉 → 改为字面镜像同一表达式。行为变更披露(③):配置文件里 "debug": <非布尔真值>(如 1,schema 外写法)下本开关从「关」变为「开」——旧值 off → 新值 on,原因是与主 debug 面完全对齐,正是 PR 声称的「与 Options.debug 解析逐字一致」。
  5. 是否有回归问题:逐项审过 diff 触碰路径的既有行为:wire 字节不变(两处 prepare 只是把内联表达式提为 wireText 常量,函数应用顺序逐字节一致,e2e 金标断言钉住「总线事件文本 === 上游收到的尾随 user 消息」);非 pi 宿主 / debug 关 = 零变化;thinking-family 块未触碰;无 fail-fast 变吞错(监听者异常隔离,且 emit 发生在 wire 已注入之后,管线不受影响);阈值/时序/输出格式不变。残留风险一条:debug 开时 pi 会话文件会持久化含 bili-nudge CustomEntry 的条目,旧版 pi 宿主读取这些会话文件需容忍未知 custom entry type(pi CustomEntry 机制契约,acp_delegate 通知走同一通道,[pi] 内置 billion-context-pi-subagents(acp_delegate)进 Pi lane:官方自有 subagents 支持 #2186),概率低但值得知晓。
  6. 是否破坏缓存:否。出站前缀字节不变;条目不进 LLM 上下文、不进任何重发历史;账本/去重键/游标不受影响。
  7. 是否改了设计方向:无架构转向。新增 src/nudge-debug.ts(总线)+ 注入点各 6 行 + pi.ts 消费端接线;reference/architecture.md 文件地图同步登记。kernel/ 与 pi-subagents/ 未动。
  8. 是否引入了新的配置:无新增字段/env/CLI flag(刻意复用全局 debug 开关);config 文档条目数回到 339 与 master 一致。

测试有效性:tests/nudge-debug.test.ts 断言有牙——wiring gate 双向(#3617 纪律)、两条 wire 的字节相等金标、turn-1 负向断言、坏监听者隔离;端口 listen(0) 无环境运气。

判定:可合(合并操作在你)。

- custom type acp-nudge (was bili-nudge); compact one-liner
  [ACP nudge] <pct>% · T<tier>[ EMERGENCY][ · top range a–b]
- the compact record line is ALWAYS on (no debug config needed):
  one per user turn, persistent in the session file, pi-visible /
  model-invisible (type:custom never enters LLM context)
- the verbatim wire text becomes a transient terminal notification
  (debug switch on: ACP_DEBUG / config debug), shown once per turn
  after the model answered — never persisted
- dedup per (session, turn) via a stable key of the last text user
  message (anthropic tool_result user messages skipped)
- bus events carry the record metadata (pct/tier/emergency/topRange/
  turnKey); emitters compute it from the PRE-nudge array
@ranxianglei ranxianglei changed the title [PR] feat: show the injected nudge text verbatim in the pi transcript when debug is on [PR] feat: pi lane — per-turn nudge record line (model-invisible) + verbatim nudge text in terminal when debug is on Nov 11, 2026
…otify only

Per owner review: the always-on compact record line (acp-nudge CustomEntry,
billion-context-pi #326 parity) is unnecessary — the transient verbatim
terminal notification (debug switch on) is the whole point of this feature.

- src/agent/pi.ts: no more registerEntryRenderer/appendEntry wiring; one
  after_provider_response hook shows the verbatim wire text once per user
  turn via ctx.ui.notify (consumes+clears the pending event, turnKey dedup)
- src/nudge-debug.ts: drop ACP_NUDGE_CUSTOM_TYPE + formatNudgeRecord
- tests: wiring test asserts the pi host carries exactly one extra
  after_provider_response subscription vs omp (the #3248 ack channel
  subscribes both lanes); formatNudgeRecord test removed
- docs en+zh, architecture.md: transient notify only, never persisted
@ranxianglei ranxianglei changed the title [PR] feat: pi lane — per-turn nudge record line (model-invisible) + verbatim nudge text in terminal when debug is on [PR] feat: pi lane — show the injected nudge text verbatim in the terminal when debug is on Nov 11, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Re-verified the live check state first (auto-fix lane rule): the reported red check (unused-exports on head 141cfbcf97) was already fixed by an earlier push — the branch head moved to 1090cd8764, whose run 42940399174 is fully green. No new work was needed this run; nothing pushed.

What resolved it: commit a5a3a757a6 (fix(nudge-debug): unused-exports gate red + point header comment at real docs) dropped the export keyword from NudgeDebugKind in src/nudge-debug.ts (referenced only inside that file, so the gate classifies it INTERNAL_ONLY) and corrected the header comment to point at docs/clients.md en+zh instead of docs/configuration.md. Two subsequent author commits (ace5b0cfa4, 56bb58302e, 1090cd8764) landed on top; all gates pass at the current head.

Verification detail: mirror cache showed 29/30 checks success/skipped with test (ubuntu-latest, 24, 3) still listed in_progress (cache fetch lagged ~1h); a single targeted API read of that job confirmed completed / success, so 30/30 green at head 1090cd8764.


结构化八问(中文)

  1. 是什么问题:事件报告本 PR 在 head 141cfbcf97 上 unused-exports 静态门禁红。
  2. 什么原因导致的:src/nudge-debug.ts 导出的 NudgeDebugKind 只在本文件内被引用,门禁判定为 INTERNAL_ONLY 并报错。
  3. 影响范围与严重程度:纯 CI 静态门禁问题,无运行时行为影响;仅阻塞该 PR 合并。
  4. 怎么修复的:前一轮唤醒已修(commit a5a3a757a6)——按门禁自带 remedy 去掉 export 关键字、修正头注释文档指向。本次运行未做任何代码改动,只做复核。
  5. 是否有回归问题:无。本次零改动;已合入的修复仅为去一个 export 关键字+改注释,无语义变化。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

收工判定:head 1090cd8764 全部 check 绿(30/30,含最后收尾的 ubuntu-24 shard 3),CI 侧无需再动;停止本轮工作。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Conflict resolved and pushed. (Note: this lane's process was force-restarted twice for going quiet while waiting on CI — no work was lost; this run completed the resolution and verified the result live.)

What I did:

  1. Merged origin/master into the PR branch nudge-debug-pi (head was 1090cd8764).
  2. Exactly ONE conflicted file: src/server/prepare-anthropic.ts, 3 hunks, all the same seam — master's Anthropic 400: mid-conversation system must FOLLOW a user message — heal only checks the follower, and trailing nudge/notes land after a trailing system #5432 changed the anthropic lane's ephemeral user-message injections (nudge fallback/directive/advisory) from tail-append to insertBeforeTrailingSystemRun(...), while this PR introduced a wireText local so the debug emit (emitNudgeInjected) carries the exact injected text.
  3. Resolution = union of intent: kept master's insertBeforeTrailingSystemRun placement AND the PR's wireText local, so the verbatim debug notify still references the exact bytes injected — e.g. const wireText = withMarkerIntegrityNote(...); rebuiltMessages = insertBeforeTrailingSystemRun(rebuiltMessages, [{ role: "user", content: wireText }]); (all three nudge arms).
  4. Master advanced mid-merge; merged the freshest master too (no overlap with the PR's 9 files, clean auto-merge). Pushed non-force (remote head verified unchanged first): 1090cd8764 → d7eefb24ab.

Verification (live, this run): typecheck clean; PR suite tests/nudge-debug.test.ts 7/7 pass; GitHub reports mergeable: true (dirty state cleared); all 52 check runs on head d7eefb24ab are green (38 success / 14 skipped, 0 failed) — confirmed via mirror cache plus one targeted API read since the mirror snapshot lagged.


结构化八问(中文)

  1. 是什么问题:PR 分支 nudge-debug-pi 与 master 产生合并冲突(merge state: dirty),阻塞合并。
  2. 什么原因导致的:master 侧 Anthropic 400: mid-conversation system must FOLLOW a user message — heal only checks the follower, and trailing nudge/notes land after a trailing system #5432 把 anthropic 车道的临时 user 消息注入从尾部追加改为 insertBeforeTrailingSystemRun(插到客户端尾部 system 段之前),与本 PR 在同一行区域引入 wireText 局部变量(debug 逐字回显)相撞。
  3. 影响范围与严重程度:仅本 PR 的合并阻塞,无运行时影响;不解决则 PR 无法合并。
  4. 怎么修复的:merge master 进 PR 分支,冲突按「意图并集」解——保留 master 的插入位置语义 + 保留 PR 的 wireText 局部变量(三处 nudge 注入点同模式);顺带合入更新后的 master(与本 PR 文件零重叠)。
  5. 是否有回归问题:无。冲突解法不改变任何一方语义:wire 位置跟随 master(Anthropic 400: mid-conversation system must FOLLOW a user message — heal only checks the follower, and trailing nudge/notes land after a trailing system #5432 行为不变),debug 回显跟随 PR(emit 的 text 与注入字节一致);typecheck + PR 测试 7/7 全绿,新 head 全量 CI 绿。
  6. 是否破坏缓存:不涉及——nudge 消息位置语义与 master 当前行为一致,前缀缓存锚点不受影响。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

收工判定:冲突已解、mergeable: true、head d7eefb24ab 全部 check 绿,CI 侧无需再动;等待合并即可。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Verdict: APPROVE (head d7eefb24a)

Independent re-review at the current head — the branch moved past the earlier review (ace5b0cfa4) through two author commits that changed the approach from a persistent CustomEntry to a transient terminal notify, so I re-read the whole diff rather than carry over the prior conclusion.

What I verified:

Non-blocking note (author, not a code issue): the PR body's "怎么实现的" / "模型永远看不到" / "局限" sections still describe the earlier persistent-CustomEntry approach (appendEntry + registerEntryRenderer); the head now uses a transient terminal notify with nothing persisted. Worth a body refresh before merge. (Per the review-lane restriction I may only add a kernel-change line to the body, so I'm flagging rather than editing.)


结构化八问(中文)

  1. 是什么问题:功能 PR,不是缺陷——打开全局 debug 开关后,让操作者在 pi 终端里逐字看到 nudge 注入时模型当轮实际读到的那段 wire 原文(此前只能事后翻代理日志,且看不出落在哪一轮、哪条注入臂)。
  2. 什么原因导致的:不涉及(feature request)。
  3. 影响范围与严重程度:默认零行为变化(debug 关 = 无监听者、无 hook 注册,emit 点 no-op);仅 debug 开 + pi 默认 INLINE 模式 + 宿主支持 ui.notify 时激活。spawn/attach 模式与旧宿主静默缺席(docs/clients.md en+zh 已写明)。纯观测面,p3。
  4. 怎么修复的:进程内 pub/sub 总线(src/nudge-debug.ts)+ 两条 prepare 车道各把内联 wire 表达式提为 wireText 常量后 emit + pi.ts 消费端接线(after_provider_response hook,transient terminal notify,per-turn dedup)。复用现有全局 debug 开关,零新增配置面。
  5. 是否有回归问题:逐项审过 diff 触碰路径的既有行为——wire 字节不变(两处 prepare 只把内联表达式提为常量,函数应用顺序逐字节一致,e2e 金标断言钉住「总线事件文本 === 上游收到的尾随 user 消息」);非 pi 宿主 / debug 关 = 零变化;thinking-family 块未触碰;无 fail-fast 变吞错(监听者异常隔离,emit 发生在 wire 已注入之后,管线不受影响);阈值/时序/输出格式不变。
  6. 是否破坏缓存:否。出站前缀字节不变;notify 不进 LLM 上下文、不进任何重发历史、不写 session 文件;账本/去重键/游标不受影响。
  7. 是否改了设计方向:无架构转向。新增 src/nudge-debug.ts(总线)+ 注入点各 6 行 + pi.ts 消费端接线;reference/architecture.md 文件地图同步登记。kernel/ 与 pi-subagents/ 未动。
  8. 是否引入了新的配置:无新增字段/env/CLI flag(刻意复用全局 debug 开关);config 文档条目数与 master 一致。

判定:可合(合并操作在 owner)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Review complete — verdict: APPROVE / 可合 (head d7eefb24a). Full review + 结构化八问 in the comment above.

Independent end-to-end re-review at the current head — the branch moved past the earlier review through two author commits that changed the approach from a persistent CustomEntry to a transient terminal notify, so I re-read the whole diff rather than carry over the prior conclusion.

Verified:

Outcome:

  • Nothing blocks the merge.
  • One non-blocking note for the author: the PR body's "怎么实现的" / "模型永远看不到" / "局限" sections still describe the earlier persistent-CustomEntry approach; the head now uses a transient terminal notify with nothing persisted — worth a body refresh before merge. (Per the review-lane restriction I may only add a kernel-change line to the body, so I flagged rather than edited.)
  • Kernel HARD RULE not triggered (no kernel/ changes, no kernel-change declaration) — no 🔶 需要决策 escalation needed.
  • Note: a formal GitHub APPROVE review is not possible here — the API returns 422: Can not approve your own pull request (PR author and token are the same account), so the verdict is carried in this thread.

判定:可合(合并操作在 owner)。

@ranxianglei
ranxianglei merged commit 301e1a5 into master Nov 16, 2026
52 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.1220-master.301e1a5 (rolling master tag).

npm install -g billion-context@0.0.1220-master.301e1a5  # 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 Nov 16, 2026
Master moved from 4a24c26 to 301e1a5 (PR ranxianglei#6151). Nine files: a
nudge-debug bus that mirrors the exact wire nudge text to the pi lane's
debug terminal (transient, never in LLM context), its knobs/debug wiring,
docs, and the architecture map row for src/nudge-debug.ts.

Two files overlap this branch. reference/architecture.md auto-merged:
master added the nudge-debug.ts row and this branch adds the
responses-system-sections.ts row that master's earlier ranxianglei#6922 batch left
out, and both survive. src/server/prepare-openai.ts and
src/server/prepare-anthropic.ts are master-only changes in the nudge
delivery path; this branch does not touch them.

The same merge also recalibrates the ranxianglei#2929 probe. That test pins which
upstream request index carries the ephemeral nudge (PROXY_AT and FOLD_AT)
so it can build the proxy-tool-then-compress shape, and those indices are
sensitive to any per-turn prompt-surface change. ranxianglei#4521 added an
armed-but-silent status line that shifted the schedule, and ranxianglei#6928 removed
that line, shifting it back, which left the pinned index pointing at a
request that no longer carries the nudge. Verified by bisect: the test is
green on d1ff6ea and red from 4ccccab (the ranxianglei#6928 removal) onward,
including pristine master 4a24c26 and 301e1a5. The fix does not pin a
carrier index at all: it requires that SOME pre-fold request carried the
nudge, which is the actual production precondition the probe has to
materialize. Negative control: with injectNudge disabled the relaxed
assertion still fails, so it keeps guarding the trigger.

Verified on the merged tree: kernel build clean, tsc reports only the five
pre-existing @deepseek-ai/cordis farm errors (identical on pristine master),
all five gates green including architecture-docs, config docs regenerate with
zero drift, and the key suites green (issue2929 1/0 three times, issue5175
66/0, tag-echo 79/0, issue2190-degen-close 32/0, nudge-debug 7/0).
ranxianglei pushed a commit to john08281/billion-context that referenced this pull request Nov 16, 2026
Resolve 2 import conflicts in prepare-anthropic.ts / prepare-openai.ts: keep applyDecisionReasoningPolicy (this branch's ranxianglei#5030 decide-lane function) + add master's nudge-debug.js import (emitNudgeInjected, nudgeDebugMeta from ranxianglei#6151). Drop stripDecisionReasoningFields (not used in the merged body - replaced by applyDecisionReasoningPolicy).

Verified locally: typecheck clean, build clean, 137/137 targeted decide-lane + nudge-debug tests pass.
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