Repository navigation
[PR] fix: dsh lane — protect instruction-file revision notices from folds (#4921) - #4927
ranxianglei wants to merge 1 commit into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.9259-pr.4927.f4d4923This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr4927.tgz
npm install -g packageInstall instructions are refreshed on each push. |
…ts (#4921) Review pass-by fix for PR #4927: the new durable/agents-md-update/<path> identities were missing from the config-surface field docs. Without them a user who takes over the durable policy with exactly "durable/agents-md" silently leaves every revision notice foldable — the same failure mode #4921 fixes. Doc-only, zero behavior change.
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) CI 状态补报(限流窗口已过):新 head |
305f61b to
20da083
Compare
…ts (#4921) Review pass-by fix for PR #4927: the new durable/agents-md-update/<path> identities were missing from the config-surface field docs. Without them a user who takes over the durable policy with exactly "durable/agents-md" silently leaves every revision notice foldable — the same failure mode #4921 fixes. Doc-only, zero behavior change.
|
(ai: vllm-qwen/qwen3.8-27b) Merge-guard sync: rebased this branch onto current master |
…ce, v9 migration stamp) onto PR #4927 Inherited-failure stopgap per CI coordination policy (owner 2026-10-24): the three red test shards (win22/4, ubu22/3, ubu24/3) are the pre-existing #5140 cold-tail fork family (tests/plugin-fork.test.ts:1473, 409 SNAPSHOT_UNAVAILABLE) which fails on pristine master and has zero intersection with this PR's diff (src/durable-message-guards.ts + dsh-instruction tests). #5140 is escalated to owner in #4599 (floor 535) and is NOT yet converged into ci-fixes, so this merge converges the 5 guard-lane docs/config reds + the #4666 v9 stamp and advances the base; it does not self-fix the master-level #5140 fork defect.
Resolve additive conflict in src/durable-message-guards.ts: union of #4921 workspace-instructions revision-notices classifier and #5109 dsh time-context injection. Disjoint message families; dshDurableToolPath chain keeps both (revision-notices checked before the shared baseline, time-context last).
|
(ai: vllm-qwen/qwen3.8-27b) |
(ai: vllm-qwen/qwen3.8-27b) Superseding my sync note above (that was my own merge-guard report): I've since merged further master advances — this branch is now at |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
Verdict: APPROVE / 可合. (Posted as a comment-review: GitHub forbids the author identity from issuing a formal Approve on its own PR, so this carries the full review + verdict here.) Reviewed end-to-end independently (PR body, linked issue #4921, full diff, full src/durable-message-guards.ts at head) and re-ran the targeted suites plus a negative control locally. Structured conclusion:
-
What problem: On the dsh lane bili protected only the uppercase workspace-instructions baseline (
Instructions from:) from compression folds. DSH delivers later rule edits as separate per-file notices (Updated/Additional instructions from: <path>,Instructions removed: <path>) that were ordinary foldable history — so after one fold the model kept executing changed/removed rules while the stale baseline stayed pinned. Field evidence in #4921: 11 real update carriers, 9 folded. -
Root cause:
src/durable-message-guards.tsmatched only the exact uppercase baseline label; the three lowercase revision shapes had no classifier, so they projected to no durable identity and were foldable. A missing classifier for the revision carrier family — not a threshold/policy bug. -
Blast radius / severity: dsh-lane plugin-native users who edit instruction files mid-session AND hit a compression covering the notice. Silent behavior corruption — the model executes stale/removed rules against a confident-looking pinned baseline (worse than losing both). p2 functional defect with a real user-visible failure mode (matches issue triage).
-
How fixed: New classifier
dshWorkspaceInstructionsRevisionPathprojects each revision to its OWN per-path identitydurable/agents-md-update/<path>, ordered BEFORE the shared baseline in the lane chain — an update body can quote the literalInstructions from:label (real traffic seq=2346) and must land in its per-path group, not the shared baseline. Per-path (not shared) identity is load-bearing: under default latest-per-path (durable/*) one shared identity would demote the OLDER instance (the multi-file baseline) to foldable — a net loss. Removed notices ride the same group so newest-event-per-file wins. -
Regressions audited: Baseline classifier byte-identical (still case-sensitive
durable/agents-md) — unit + e2e pinned. Role gate (#2766 assistant echoes never project), content-type guard, and KDD#9 allowlist discipline (Object.keys(durableMessageToolPaths) === ["dsh"]) preserved and pinned.src/config.tsdiff is comments-only (zero behavior change). No high-risk pattern hit: no fail-fast→swallow, no threshold/timing/output-format drift. One intentional, DISCLOSED behavior change: the three revision shapes now project + are protected latest-per-path under the defaultdurable/*policy (old: foldable → new: newest-per-file pinned); footprint bounded by distinct files revised. -
Cache impact: None. Protection only affects which refs render BLOCKED-vs-foldable; it does not alter prefix-cache keys, retry, incremental cursors, or dedup. Pinned notices are turn-stable (same path+content), so they help prefix stability rather than hurt it.
-
Design direction: No shift. Extends the existing #1947 "project client dialects to canonical virtual paths, govern by pattern" principle to one more evidence-backed dsh carrier family — same translation-layer / policy-split design, host-side only. No
kernel/change, nokernel-changedeclaration. -
New config: None. Reuses existing
protectedTools/protectedLatestToolsmachinery + defaultdurable/*; no new env var / config key / CLI flag. User durable-policy takeover configs keep working verbatim.
Tests: real, not tautological. Local run: new file 5/5; modified issue2447 + durable-tool-identity + issue2766 role-gate + issue5142 lockstep = 36/36. Negative control proven: removing the classifier from the lane chain makes both e2e pins fail with THE BUG: … RULE_V2 … must survive the fold — the test reproduces the original defect. Full-suite verdict = CI on this head (green).
Non-blocking note (left untouched, no issue filed): the new classifier is intentionally absent from the oneShotCarrierPaths / dshCarrierRawMarkers drift-accounting surface (#5142); a superseded older revision that folds would count as drift rather than expected-rebase. This is pre-existing (revisions were unclassified before → strictly more folded then) and this PR improves, not regresses, that surface; it is a different failure domain than #4921's protection concern, so out of scope here. Flagged for awareness only.
可合 / merge-ready: host-side-only fix, correct mechanism, real regression test with verified negative control, behavior change disclosed, clean on-topic diff, up-to-date with master.
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) PR #4927 (dsh lane: protect instruction-file revision notices from folds) — review complete, verdict: APPROVE / 可合 (merge-ready). What I did:
GitHub review posted (as a comment-review — a formal Approve is blocked because the token identity is the PR author): #4927 (review) |
…4921) Rebuild on current master to resolve the merge conflict: the PR branch had drifted onto an old master line, so a plain merge produced 99 file conflicts. The net #4921 contribution is exactly 4 files, re-applied as pure additions on top of current master (which already carries the #5109/#4313/#5173/#5142/ #6021 classifiers the PR head lacked). Re-applies the original fix commits 95a6062 (guard classifier + tests) and 20da083 (config.ts docs) verbatim: - src/durable-message-guards.ts: new dshWorkspaceInstructionsRevisionPath classifier (per-path durable/agents-md-update/<path> identity) inserted before the baseline classifier in the dsh lane chain. - tests/issue4921-dsh-instructions-revision.test.ts: new unit + real-fold e2e. - tests/issue2447-dsh-workspace-instructions.test.ts: lane-chain assertion. - src/config.ts: doc-only notes on the revision identities. Closes #4921
50f6c94 to
4aec140
Compare
(ai: vllm-qwen/qwen3.8-27b) Merge conflict resolved — PR branch rebuilt on current master and force-pushed (new head 七问 summary (this run):
End state: PR branch is a clean rebuild on current master, merges cleanly with |
(ai: vllm-qwen/qwen3.8-27b) No new action needed — the conflict resolution from my previous comment is already complete and verified live just now: remote head |
[ework] CI fix verified green ✓ |
1 similar comment
[ework] CI fix verified green ✓ |
Closes #4921
What & why
The dsh-lane durable guard (
src/durable-message-guards.ts) matched ONLY the uppercase baseline labelInstructions from:. @deepseek-ai/dsh-agent-instructions re-emits that baseline only whenbaselineIdentity(projectRoot + discovery/budget config, NOT file contents) changes — content edits arrive instead as separate per-file notices:Updated instructions from: <path>(file edited),Additional instructions from: <path>(file discovered after the baseline),Instructions removed: <path>(file deleted/disabled). All three were ordinary foldable history while the STALE baseline stayed BLOCKED, so after one fold the model kept executing changed/removed rules and the correction died with the block (field evidence in the issue: 11 real update carriers, 9 folded).Fix: a dedicated classifier
dshWorkspaceInstructionsRevisionPathprojects each notice to its own per-path identitydurable/agents-md-update/<path>, ordered BEFORE the shared baseline in the lane chain (an update body can quote the literalInstructions from:label — real traffic seq=2346 in the report — and must land in its per-path group). Markers are matched at line start on their exact evidenced shapes (wrapper-independent per the #2419 marker-over-wrapper discipline; no case folding — the three shapes are distinct DSH strings and widening only grows false-positive surface). #2766 role gate applies (assistant echoes never project).Why per-path identities, not one shared revision identity
The default policy is latest-per-PATH (
protectedLatestTools: ["durable/*"], kernelcollectLatestProtectedkeeps the last instance per exact virtual path). Sharing one identity for all revisions would demote the OLDER instance to foldable — i.e. the baseline itself in multi-file sessions — a net loss. Per-path grouping keeps the baseline plus the newest notice of every changed file live, bounded by the number of distinct files revised; the removed notice rides the same group so the newest event per file wins (add → remove leaves the invalidation visible).Behavior change (disclosed)
Instructions from:label projected (todurable/agents-md);Updated/Additional instructions from:andInstructions removed:messages were foldable and died with their block.durable/agents-md-update/<path>and are protected latest-per-path under the default policy — the newest notice per file stays visible across folds (bounded footprint = number of distinct files revised).kernel/change), user durable-policy takeover configs (any user-configureddurable*pattern decides, as before), unregistered lanes (still fold everything — allowlist discipline KDD release v0.1.2 #9), other lanes/classifiers.Config surface
No change. No new env var / config key / CLI flag; the existing
protectedTools/protectedLatestToolsmachinery and the defaultdurable/*policy cover the new identities without any schema addition.Tests
tests/issue4921-dsh-instructions-revision.test.ts: unit (three evidenced shapes → per-path ids; distinct paths → distinct ids; mid-line/case/role/content-type negatives; lane-chain precedence over the quoted-baseline case; baseline classifier pinned byte-identical) + real folds through/__bili/plugin/tool(baseline AND revision survive a positionally-covering fold; per-path latest — superseded older notice folds while newest stays pinned; unregistered-lane negative).tests/issue2447-dsh-workspace-instructions.test.ts: itsCHANGE_MSGfixture assertion now pins the new lane-chain projection (durable/agents-md-update/AGENTS.md) instead of "stays consumable history".