You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Root cause confirmed on main @ a7367d0 (identical to 2.0.20): the lightweight branch of turnStartRetrieve hard-codes the plan to {wantTier1: false, wantTier2: true, wantTier3: false} (apps/memos-local-plugin/core/retrieval/retrieve.ts:102-110). The intent-based scheduler plan would normally override this (applyPlanOverride), but the prompt-time recall path — recallTurn in apps/memos-local-plugin/core/pipeline/orchestrator.ts:1259-1273, used by the DSH bridge turn-start (adapters/deepseek-harness/bridge.ts:228 via core.searchMemory({reason: "turn_start"})) — deliberately passes plan = undefined (no intent classification), so the hard-coded base always wins and imported skills never reach the injection packet. Tier-1 itself (runTier1) is a pure storage read (FTS + vector + pattern over repos, no model calls), so arming it preserves the lightweight cost contract.
Planned fix (minimal): arm wantTier1 in the lightweight turn-start base plan, widen the default limit by tier1TopK, keep Tier-3 off, and spell out the effective lightweight retrieval plan in the algorithm.lightweightMemory schema docs (core/config/schema.ts:174-180) so the remaining gap (world models not injected) is documented.
Tests: a regression test asserting Tier-1 candidates surface in the lightweight turn-start packet (red before the fix), plus the existing retrieval/injection suites green.
Disclosure: analysis, code and tests are AI-assisted (Claude).
Branch:fix/plugin-lightweight-turnstart-tier1 @ 63baf44 (PR to follow from the contributor pipeline).
Change: the lightweight base plan in turnStartRetrieve (core/retrieval/retrieve.ts:102) now arms wantTier1 and widens the default limit by tier1TopK; Tier-3 stays off; the scheduler plan override still wins when present (e.g. personal_fact); algorithm.lightweightMemory schema docs now spell out the effective lightweight retrieval plan. Also updated tests/unit/retrieval/integration.test.ts:447-452, which had encoded the old no-skills behavior, and added a regression test reproducing the recall-path condition (no plan override) — red before the fix (plannedTiers {tier1:false}, no skill snippets), green after.
Local verification:npm run test:unit 181 files — 1590 passed / 2 skipped; npm run test:integration 6 passed; tests/e2e/v7-full-chain.e2e.test.ts 2 passed / 1 skipped; npm run lint (tsc --noEmit) clean.
PR with the fix: #2505 — arms Tier-1 in the lightweight turn-start base plan (pure storage read, no model calls), widens the default limit by tier1TopK; Tier-3 stays off, scheduler plan override priority unchanged. Regression test included; docs gap filled in the algorithm.lightweightMemory schema.
Activity
akushonkamen commentedon Oct 16, 2026
Claiming this one.
Root cause confirmed on
main@ a7367d0 (identical to 2.0.20): the lightweight branch ofturnStartRetrievehard-codes the plan to{wantTier1: false, wantTier2: true, wantTier3: false}(apps/memos-local-plugin/core/retrieval/retrieve.ts:102-110). The intent-based scheduler plan would normally override this (applyPlanOverride), but the prompt-time recall path —recallTurninapps/memos-local-plugin/core/pipeline/orchestrator.ts:1259-1273, used by the DSH bridge turn-start (adapters/deepseek-harness/bridge.ts:228viacore.searchMemory({reason: "turn_start"})) — deliberately passesplan = undefined(no intent classification), so the hard-coded base always wins and imported skills never reach the injection packet. Tier-1 itself (runTier1) is a pure storage read (FTS + vector + pattern overrepos, no model calls), so arming it preserves the lightweight cost contract.Planned fix (minimal): arm
wantTier1in the lightweight turn-start base plan, widen the default limit bytier1TopK, keep Tier-3 off, and spell out the effective lightweight retrieval plan in thealgorithm.lightweightMemoryschema docs (core/config/schema.ts:174-180) so the remaining gap (world models not injected) is documented.Tests: a regression test asserting Tier-1 candidates surface in the lightweight turn-start packet (red before the fix), plus the existing retrieval/injection suites green.
Disclosure: analysis, code and tests are AI-assisted (Claude).
akushonkamen commentedon Oct 16, 2026
Fix is committed and locally verified.
Branch:
fix/plugin-lightweight-turnstart-tier1@63baf44(PR to follow from the contributor pipeline).Change: the lightweight base plan in
turnStartRetrieve(core/retrieval/retrieve.ts:102) now armswantTier1and widens the default limit bytier1TopK; Tier-3 stays off; the scheduler plan override still wins when present (e.g.personal_fact);algorithm.lightweightMemoryschema docs now spell out the effective lightweight retrieval plan. Also updatedtests/unit/retrieval/integration.test.ts:447-452, which had encoded the old no-skills behavior, and added a regression test reproducing the recall-path condition (no plan override) — red before the fix (plannedTiers {tier1:false}, no skill snippets), green after.Local verification:
npm run test:unit181 files — 1590 passed / 2 skipped;npm run test:integration6 passed;tests/e2e/v7-full-chain.e2e.test.ts2 passed / 1 skipped;npm run lint(tsc --noEmit) clean.Disclosure: code and tests AI-assisted (Claude).
akushonkamen commentedon Oct 16, 2026
PR with the fix: #2505 — arms Tier-1 in the lightweight turn-start base plan (pure storage read, no model calls), widens the default limit by
tier1TopK; Tier-3 stays off, scheduler plan override priority unchanged. Regression test included; docs gap filled in thealgorithm.lightweightMemoryschema.MechDesign618 commentedon Oct 16, 2026
谢谢确认,和我们这边的实测一致 —— 我们是在 DSH 端看到检索统计里 plannedTiers 恒为
{"tier1": false, "tier2": true, "tier3": false} 才定位到这条的。
Tier-1 打开这件事我们本地打补丁验证过:把 retrieve.js 轻量分支的 wantTier1 改成 true 之后,
注入包里立刻出现了 tier=1、refKind=skill 的条目(同一会话、前后相隔 77 秒,唯一变量就是那次重启),
所以你们的修法方向我们这边有实测支撑。
等含这个修复的版本发出来,我们可以在真实安装上跑一遍同样的判据(api_logs 里的 plannedTiers + 注入包本身)
并把结果贴回这里。Tier-3 保持关闭、只在 schema 文档里写明,我们也接受。