Skip to content

[PR] docs: align dshTimeContextPath comment with code fact (#5352 finding 2) - #5353

Closed
ranxianglei wants to merge 1 commit into
masterfrom
2026-10-31_fix-5352-dsh-timecontext-comment
Closed

ranxianglei wants to merge 1 commit into
masterfrom
2026-10-31_fix-5352-dsh-timecontext-comment

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

What

Corrects the dshTimeContextPath doc comment in src/durable-message-guards.ts, which contradicted the code (discovered during the v0.1.209→master full-window regression review behind #5352).

  • Before: the comment claimed the dsh time-context carrier "stays OUT of dshDurableToolPath / kernel protection."
  • Fact: dshDurableToolPath DOES route it (?? dshTimeContextPath(msg)), so its virtual path IS assigned — required for kernel Rule 3 last-user-anchor refusal and one-shot retirement accounting. What keeps it foldable / never-pinned is that its returned path is oneshot/*, which deliberately misses the durable/* latest-per-identity protection that withDurableProtection applies to the four durable carriers.
  • After: reworded to classified, never pinned — accurate to both classifier membership and protection-pattern behavior.

Scope

Comment-only. Zero behavior change — no logic, wire shape, config, persistence, or test touched.

Issue linkage

Part of #5352 (Finding 2 — the p3 one-line comment fix). Finding 1 (the statusLine plugin-mode disposition, options A/B) is a pending owner decision; once settled, that change lands on this same branch/PR.

The doc comment claimed the dsh time-context carrier 'stays OUT of
dshDurableToolPath / kernel protection'. That is wrong: dshDurableToolPath
DOES route it (?? dshTimeContextPath(msg)), so its virtual path is assigned
for Rule 3 last-user-anchor refusal and one-shot accounting. What keeps it
foldable (never pinned) is that its returned path is oneshot/*, which misses
the durable/* latest-per-identity protection withDurableProtection applies to
the four durable carriers. Reworded to say classified-but-never-pinned.
Comment-only; no behavior change.
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-31_fix-5352-dsh-timecontext-comment (73ff0e1)

Latest build — install this exact version

npm install -g billion-context@0.0.7525-pr.5353.311879e

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
73ff0e1 billion-context@0.0.7525-pr.5353.311879e build

Download artifact

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

查重:不重复。本分支 2026-10-31_fix-5352-dsh-timecontext-comment 只对应一个 PR #5353(head 73ff0e1c3),issue #5354 是它的镜像,无并列重复 PR。

这是一条带 ework-agent-pr 标记的已完成工作,按协议我没有重做,而是拉分支核对代码 + 查 CI + 报结论。

我独立核对了新注释的每一条事实断言(读真实代码,不只读 diff):

  • dshTimeContextPath 返回 "oneshot/time-context" —— 确为 oneshot/* 路径(src/durable-message-guards.ts:190)✓
  • dshDurableToolPath 末尾 ?? dshTimeContextPath(msg) —— 确实路由它,虚拟路径被赋值(src/durable-message-guards.ts:255)✓
  • withDurableProtection 只对 durable/* 做 latest-per-identity pin —— oneshot/* 故意漏掉这层保护(src/durable-message-guards.ts:290)✓
  • 「Rule 3 last-user-anchor refusal」是真实内核机制:kernel/src/recommend.ts:137(Rule 3)+ kernel/src/protected.ts:329 lastUserAnchor() ✓
  • one-shot accounting 成立:oneShotCarrierPaths.dsh 含 dshTimeContextPath(src/durable-message-guards.ts:~305)✓

旧注释「stays OUT of dshDurableToolPath / kernel protection」与代码相悖;新表述 classified, never pinned 对分类器成员资格和保护模式两者都准确。

回归面:纯注释改动。git show --stat 确认只动 src/durable-message-guards.ts(6+/3-,全部落在 doc-comment 块内),未触碰任何逻辑 / wire shape / config / persistence / test → 零回归可能。

CI(head 73ff0e1c3):全部 static/guard gate 已绿(static-gates、kernel-guard、pi-subagents-guard、config-surface-guard、version-guard、lock-sync、docs-sync、build-artifact 等均 success);完整 test 分片仍在跑(in_progress/queued,无失败);real-client e2e 分片按设计 skip(env 门控)。当前无红项。

判定:代码正确、零回归、无红项。test 分片跑完转绿后即可合并——合并是人工操作,我不代合。(纯注释改动,test 分片出现失败的风险极低。)

另:issue 正文提到的 Finding 1(statusLine plugin-mode 处置 A/B)是 #5352 下另一个待你拍板的决策,不在本 PR 范围;本 PR 只落地 Finding 2 这一行注释修正。

@ranxianglei ranxianglei left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Verdict: APPROVE (posted as a comment review — GitHub refuses the approve event on a PR by the same account; treat this as the approval record). Comment-only fix; every factual claim independently re-verified against the code at head 73ff0e1c3; CI fully green (30 checks: 18 success / 12 skipped by design / 0 failed, mirror cache @ 12:40Z).

Independent verification (re-read the code myself, did not copy the issue-side analysis):

  • Old text "stays OUT of dshDurableToolPath / kernel protection" was wrong on both counts: dshDurableToolPath DOES route it (?? dshTimeContextPath(msg), src/durable-message-guards.ts:249-257), and its virtual path reaches the kernel via messagePathOf (wired at src/session.ts:798-799 & 810-811, src/server/handle.ts:2442-2443), where lastUserAnchor skips any virtual-path message (kernel/src/protected.ts:329-343, Rule 3 at kernel/src/recommend.ts:137-152).
  • New text "classified, never pinned" is accurate on both axes: the returned path is oneshot/time-context (src/durable-message-guards.ts:190), which deliberately misses the durable/* latest-per-identity pattern withDurableProtection adds to protectedLatestTools (src/durable-message-guards.ts:284-291).
  • Non-blocking wording note: the parenthetical "...assigned for Rule 3 last-user-anchor refusal and one-shot accounting" bundles two consumers — one-shot accounting actually rides the sibling classifier oneShotCarrierPaths (src/fold-reconcile.ts:1786), not dshDurableToolPath itself. Both return the same path string and the very next sentences of the same comment attribute each consumer precisely ("oneShotCarrierPaths accounts that retirement as EXPECTED"; "The path still matters beyond accounting: kernel Rule 3 refuses..."), so the comment as a whole reads correctly. Not worth rewording churn on a p3 docs fix.

Regression audit (existing behaviors carried by the touched path):

  • Touched surface: exactly one doc-comment block in src/durable-message-guards.ts (git show --stat: 1 file, +6/-3, all inside the /** */ block). Single commit, no version/lockfile/test/wire changes.
  • Preserved individually: carrier classification outputs, durable/* pinning policy, Rule 3 anchor scan, fold-reconcile expected-rebase accounting, persistence format, config surface — zero code lines touched.
  • High-risk patterns (semantic drift while fixing, fail-fast→swallow, threshold/timing/output-format drift): none present in a comment-only diff.
  • Finding 1 (statusLine A/B) is correctly NOT in this PR — matches the PR body's scoping statement.

八问:

  1. 是什么问题: dshTimeContextPath 的注释声称该载体"不进 dshDurableToolPath / 内核保护",与代码事实相反——代码确实把它路由进了分类器。
  2. 什么原因导致的: 注释停留在早期设计阶段,后续把它纳入分类器时(#5109/#5142 演进)没有同步更新。
  3. 影响范围与严重程度: 仅文档误导,无外部行为影响;风险是读者误以为该载体完全不受内核分类(Rule 3 锚点拒绝被误读为不适用)。
  4. 怎么修复的: 注释改为与代码一致的一句话定性——"classified, never pinned":虚拟路径被分配(服务 Rule 3 锚点拒绝与一次性退役记账),但其 oneshot/* 路径故意不命中 durable/* latest-per-identity pin。
  5. 是否有回归: 不涉及——纯注释、零逻辑行;该文件承担的既有行为已逐项清点(见上),全部保持。
  6. 是否破坏缓存: 不涉及。
  7. 是否改了设计方向: 不涉及。
  8. 是否引入新配置: 不涉及。

可合并判定:干净、零行为变更、CI 全绿,可以合并(合并操作留给人工)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

Review 完成:PR #5353(head 73ff0e1c3)判定 APPROVE——已作为 comment review 贴到 PR(#5353)上(GitHub 禁止同账号 approve 自己的 PR,故以评论形式留审批记录)。结论:纯注释改动、新注释每条事实断言已独立对照代码核实成立、CI 全绿(30 checks / 0 failed)、零行为回归;待人工合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: sglang-gpu0/qwen3.8-27b)
本 PR 要改的 src/durable-message-guards.ts 注释,master 已在后续提交里按同一意图重写(描述同一机制,措辞更新)。再合本 PR 会用旧词覆盖新词,故不随 #5918 带入,此 PR 关闭。

@ranxianglei ranxianglei closed this Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant