Repository navigation
[PR] fix: project dsh-mnemon memory snapshots to durable/mnemon-memory (#4495 part A) - #4497
ranxianglei wants to merge 1 commit into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.9842-pr.4497.fcff393This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr4497.tgz
npm install -g packageInstall instructions are refreshed on each push. |
6998998 to
543fc9f
Compare
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。 本 PR 是 #4495 Part A(折叠半边)的交付;按 mnemon / durable / truncate 检索全部 issue 与 PR(含已关闭),无同机制的其他条目。截断半边(Part B)仍在 #4495 线程里等你拍板,未另立项。 标签:bug、dsh、scope/kernel、p2(dsh 车道折叠判定面的缺陷修复 PR;仅长会话触发,能用但有明显问题,非数据丢失/缓存泄露类)。 审核结论(独立审了这份 diff,未复用 #4495 侧表述)代码(
测试(tests/issue4495-mnemon-durable.test.ts,4 例):断言有牙——e2e 用真实 server rig 执行真 compress,区间按位置同时盖住两份快照,断言最新一份存活、被取代的那份折掉、区间内填充消息消失;没有这个修复该断言直接失败,是真回归钉。负向对照齐备(散文不含头行 / 仅内部标签 / skill-catalog 区分 / 非 text / 缺 text / assistant 回显 / 未注册 lane 全折)。本地定向验证:本套件 + durable-tool-identity + issue2446 + issue2766 共 28/28 全绿。 CI 红排查(重点):首推 head 上 10 个 test 分片红了 7 个,但每个分片恰好只挂 1 条,且各不相同,集中在存储域两个时序敏感用例—— 已做的动作:把 PR 分支 rebase 到当前 master(无冲突,单 commit 重放 → 543fc9f)并推回分支,CI 正在合并树上重跑。 八问
判定代码与测试通过审核;CI 红为 master 既有 flake(证据如上),rebase 后重跑转绿即可合入。Part B(紧急截断不看保护标记)仍等你拍板:B-narrow(kernel 加 mnemon 专属 excludeIds)/ B-general(截断跳过一切当前受保护消息,我推荐)/ 折中(只跳 text 通道 durable/* 身份)——定了我在 #4495 线程开独立 kernel PR。A 本身闭环,不依赖 B,可先行合入。 |
543fc9f to
ef5f141
Compare
(ai: vllm-qwen/qwen3.8-27b) CI 重跑结果 + 完整取证(rebase 后 head 543fc9f,run 40079560367): 主 CI 仍红,但 6 个红分片已逐一取日志核实——全部失败都是 master 既有的存储域时序 flake,与本 PR 零关系:
交叉证据:① master 自身红 run 与本轮红分片集合高度重合、not-ok 行全部落在上述三条内,无任何非存储域失败;② 本 PR 新套件 tests/issue4495-mnemon-durable.test.ts 在 CI 上全绿(ubuntu 22-2 分片 ok 1305/1306/1307/1308,该分片 0 失败);③ 两个主要 flaky 文件在本 head 本地 8/8 过。另:rebase 时顺带把分支从 fe5ba59 基线提到了当前 master(02f544da0),无冲突、单 commit 重放。 八问(本轮增量;完整版见上一条回复,各项结论未变)
判定代码与测试通过审核,CI 红为 master 既有存储域 flake(证据链见上 + #4489 线程)。建议路径:先合 #4502 消掉最高频签名,等本 PR 一次自然绿 run 后合入;若你认可取证结论也可直接合。合并动作照旧由你执行。Part B(紧急截断不看保护)仍等你在 #4495 拍板 narrow / general(我推荐)/ 折中。 |
ef5f141 to
d8b2fbf
Compare
…d cannot misfire on cache-restored test legs The #4360 pretest cache restores kernel/dist byte-exact (marker-verified) with the SAVED mtimes, while the freshly checked-out sources are newer. On the merge ref (which carries bff4d6d's mtime guard), every leg whose shard runs tests/golden-storage-render.test.ts or tests/storage-engine-proofs.test.ts then fails its first chat-wire drive with 'node_modules/acp-kernel/dist is older than kernel/src (#3325)' on perfectly correct bytes — 6/8 shards red on PR #4497 head 2c56f42 (run 40087540317) and on master itself. A marker-verified HIT proves the bytes are correct for this source hash, so the timestamp is refreshed to now on that branch only: the guard keeps its teeth on genuinely stale workspaces (they still miss and rebuild), and no rebuild is skipped that wasn't already proven correct.
05d9764 to
104a547
Compare
…d cannot misfire on cache-restored test legs The #4360 pretest cache restores kernel/dist byte-exact (marker-verified) with the SAVED mtimes, while the freshly checked-out sources are newer. On the merge ref (which carries bff4d6d's mtime guard), every leg whose shard runs tests/golden-storage-render.test.ts or tests/storage-engine-proofs.test.ts then fails its first chat-wire drive with 'node_modules/acp-kernel/dist is older than kernel/src (#3325)' on perfectly correct bytes — 6/8 shards red on PR #4497 head 2c56f42 (run 40087540317) and on master itself. A marker-verified HIT proves the bytes are correct for this source hash, so the timestamp is refreshed to now on that branch only: the guard keeps its teeth on genuinely stale workspaces (they still miss and rebuild), and no rebuild is skipped that wasn't already proven correct.
104a547 to
9b00d0a
Compare
…d cannot misfire on cache-restored test legs The #4360 pretest cache restores kernel/dist byte-exact (marker-verified) with the SAVED mtimes, while the freshly checked-out sources are newer. On the merge ref (which carries bff4d6d's mtime guard), every leg whose shard runs tests/golden-storage-render.test.ts or tests/storage-engine-proofs.test.ts then fails its first chat-wire drive with 'node_modules/acp-kernel/dist is older than kernel/src (#3325)' on perfectly correct bytes — 6/8 shards red on PR #4497 head 2c56f42 (run 40087540317) and on master itself. A marker-verified HIT proves the bytes are correct for this source hash, so the timestamp is refreshed to now on that branch only: the guard keeps its teeth on genuinely stale workspaces (they still miss and rebuild), and no rebuild is skipped that wasn't already proven correct.
(ai: vllm-qwen/qwen3.8-27b) CI 自动修复最终回合(2/2)。分支已更新到 失败分解(run 40096789570)
本回合动作与验证
八问
判定(auto-fix lane 终止):剩余唯一红(epoch-confirm)需要「代码 vs 测试期望」的语义决策,不属于小修范畴,且已有 #4555 + 在途 PR #4569 承接——按 lane 规则停在此处。#4569 合入后对本 PR 任意一次 re-run/push 即可全绿,届时可直接合并。 |
9b00d0a to
02e2340
Compare
…d cannot misfire on cache-restored test legs The #4360 pretest cache restores kernel/dist byte-exact (marker-verified) with the SAVED mtimes, while the freshly checked-out sources are newer. On the merge ref (which carries bff4d6d's mtime guard), every leg whose shard runs tests/golden-storage-render.test.ts or tests/storage-engine-proofs.test.ts then fails its first chat-wire drive with 'node_modules/acp-kernel/dist is older than kernel/src (#3325)' on perfectly correct bytes — 6/8 shards red on PR #4497 head 2c56f42 (run 40087540317) and on master itself. A marker-verified HIT proves the bytes are correct for this source hash, so the timestamp is refreshed to now on that branch only: the guard keeps its teeth on genuinely stale workspaces (they still miss and rebuild), and no rebuild is skipped that wasn't already proven correct.
02e2340 to
822052a
Compare
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 冲突已解、PR 已收敛为纯功能改动。本轮处理如下: 做了什么
当前状态
八问
遗留说明:master 的 结论:冲突已解、PR 已收敛为纯功能、本地验证过;等 CI 全量绿 + 人工 approve 即可合并。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 状态更新(完整八问报告见上一条):
结论不变:冲突已解、PR 收敛为纯功能、本地验证过;等 CI 全量绿 + 人工 approve 即可合并。 |
[ework] CI fix verified green ✓ |
1 similar comment
[ework] CI fix verified green ✓ |
Related: #4495 (part A — the folding half; the truncate half (B) awaits the owner decision requested in that thread).
What
dsh-mnemon injects its runtime memory snapshot — the user profile (USER.md) + working reference (MEMORY.md), the one piece of context that should be ALWAYS present — as an ordinary user/text message starting with "MNEMON RUNTIME MEMORY SNAPSHOT". It matched none of the four durable classifiers, so once it left the recent zone it was ordinary foldable history. The plugin re-injects only when the rendered text CHANGES (injectedMemoryText equality gate), so a stable profile is injected ONCE and never again: one fold silently killed the session's persona for the rest of the session.
Change
src/durable-message-guards.ts: newdshMnemonMemoryPathclassifier — non-assistant text messages carrying the header line "MNEMON RUNTIME MEMORY SNAPSHOT" project todurable/mnemon-memory; wired into the dsh chain as the fifth evidence-backed carrier (KDD release v0.1.2 #9: author-reported shape verified against a live session in [dsh] mnemon runtime memory snapshot lacks a durable/* classifier; user profiles get swallowed by folding; emergency tru | [dsh] mnemon 运行时记忆快照缺少 durable/* 分类器,用户画像会被折叠吞掉;紧急截断不看保护标记 #4495; fingerprint-gated re-injection contract like 开启 bili 后「规矩与 skill 好像没被使用」? #2419/compress 增加按内容标记的硬排除(protectedContentMarkers),保护会话的基础设施注入免于折叠 #2446; marker matched on the header line so layout changes below it cannot disarm it; durable 身份接管缺口:classifier 无角色边界,模型回声可夺取 durable/* latest 身份 #2766 role gate — assistant echoes never project).withDurableProtectionalready defaultsdurable/*to latest-per-identity protection, so exactly the NEWEST snapshot is pinned while superseded snapshots stay foldable. Protected messages get BLOCKED_REF at assignment time, so no compress range can ever target them — the exemption is structural, not a convention.Behavior change (disclosure)
dsh-lane messages matching the mnemon snapshot header: foldable → protected (latest instance pinned per identity; older superseded instances remain foldable). All other lanes and all other messages are untouched. User takeover of the durable policy (any
durablepattern in protectedTools/protectedLatestTools) still wins verbatim.Tests
New
tests/issue4495-mnemon-durable.test.ts(4 tests): unit projection (positive / negative / role-gate / lane registry stays dsh-only); e2e fold executed through/__bili/plugin/toolwhose range positionally covers BOTH snapshots — newest survives, superseded folds away (the reported bug); unregistered-lane negative control (both fold away); BLOCKED-ref stamping witnessed at assignment time on turn one. Sibling suites green locally: durable-tool-identity, issue2446-dsh-mcp-catalog, issue2766-durable-role-gate (24 tests). Full-suite verdict = CI on this head.Not included
Part B (emergency truncate honoring protection) — kernel-side, both variants await the owner's narrow/general choice requested in #4495.
Fixes #4495
(孤儿认领:标题本已指向 #4495,补上关闭关键字 —— 第三批清理)