Repository navigation
[PR] fix: recognize dsh 0.2.2-rc.3 reworded runtime-context snapshot (#7085) - #7087
Conversation
dsh 0.2.2-rc.3 reworded the runtime-context snapshot: it no longer contains 'Current runtime context' but opens with 'The following information describes your current session:' wrapped in a <system-reminder> envelope. The dshRuntimeContextPath classifier only matched the old literal, so the snapshot silently lost its durable protection (31/31 new-form snapshots unclassified on the reporter's machine; old form 18/18). Fix all three consumer sites of the shared literal: - dshRuntimeContextPath: also match the new lead-in (old literal kept for cross-form transition sessions and the cleared form). - dshCarrierRawMarkers: add the new lead-in (14 -> 15 markers). - AUTO_INJECTED_NOTIFICATION_PREFIXES: add the <system-reminder> envelope prefix so deriveTitle skips the reworded snapshot. Regression tests: classifier unit (new form projects), e2e fold (new form survives a positional fold), lockstep (15 markers), title-derive (new form is an auto-injected notification and does not become the title). Closes #7085
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.10689-pr.7087.ae1522aThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr7087.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) PR #7087 审核结论 已拉取分支 代码核对:三处消费点全部覆盖,无遗漏——
master 侧尚未包含新 lead-in( CI 状态:进行中(27 success / 11 in_progress / 43 cancelled / 19 skipped)。cancelled 是先前 run 被新 run 取代,正常。
八问
判定:代码正确,定向测试全过,fix 对当前 master 有效。建议 rebase 到当前 master 后合并。 |
… colon (#7085) The reworded snapshot's lead-in has two continuations in the dsh emitter (packages/core/agent-loop/src/runtime-context.ts): the FIRST snapshot ends "The following information describes your current session:" while every re-send after a context change continues it with ". It replaces earlier versions of this context, including any retained in conversation summaries." The colon-terminated marker from the previous commit only matches the first-snapshot form, so all state-change re-sends (approval policy flips, cwd changes — exactly the snapshots whose loss makes the model act on stale permission premises) would stay unclassified. The marker is now the shared prefix WITHOUT the trailing colon, in both consumers (dshRuntimeContextPath + dshCarrierRawMarkers). Regression: classifier + lane-entry + positional-fold e2e cases for the re-send form.
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.1228-master.10b0c2b # this exact build
npm install -g billion-context@master # always the newest merged build
|
…lict at 0.0.200 Master advanced past the PR base again (batch11 wave11 #6827, lean-compress receipt #7105, wire-client-sidecars #7083, p1 batch b2/b3, #7087, #7101 -> kernel 0.0.199, storage-render goldens regenerated for #6775 persisted fields, 400 files). Content hunks auto-merged (kernel/src/compress.ts, kernel/src/types.ts, all four storage-render goldens); the only conflicts were the three kernel version lines, resolved at 0.0.200 = master's 0.0.199 + this PR's kernel/src change, per the CI-enforced kernel version discipline. Targeted local verification: tests/golden-storage-render.test.ts 5/5, tests/storage-state-fields.test.ts 2/2, kernel issue6116/issue3769/ hide-consumed suites 27/27.
Summary
dsh 0.2.2-rc.3 reworded the runtime-context snapshot: it no longer contains "Current runtime context" but opens with "The following information describes your current session:" wrapped in a
<system-reminder>envelope. ThedshRuntimeContextPathclassifier only matched the old literal, so the snapshot silently lost its durable protection (31/31 new-form snapshots unclassified on the reporter's machine; old form 18/18).Fix
All three consumer sites of the shared literal "Current runtime context":
dshRuntimeContextPath(src/durable-message-guards.ts): also match the new lead-in. Old literal kept for cross-form transition sessions and the cleared form.dshCarrierRawMarkers(src/durable-message-guards.ts): add the new lead-in (14 to 15 markers).AUTO_INJECTED_NOTIFICATION_PREFIXES(src/server.ts): add the<system-reminder>envelope prefix soderiveTitleskips the reworded snapshot.Behavior change
AUTO_INJECTED_NOTIFICATION_PREFIXESgains a 4th prefix:<system-reminder>. Any message starting with<system-reminder>(after trim) is now skipped inderiveTitle. Previously only 3 specific prefixes were skipped. This is intentional: the<system-reminder>envelope wraps dsh host-injected messages (runtime-context, skill-catalog, workspace-instructions), all of which are correctly skipped in title derivation.Tests
tests/issue2481-dsh-runtime-context.test.ts: classifier unit (new form projects todurable/runtime-context), e2e fold (new form survives a positional fold), lane entry assertion.tests/issue5142-expected-rebase.test.ts: lockstep test (15 markers).tests/title-derive.test.ts:isAutoInjectedNotification(new form recognized),deriveTitle(new form does not become the title).All 40 targeted tests pass.
Closes #7085