Fix #2362: [Bug] attachSkillSubscriber wired with bgLlm, not bgReflectLlm — skillEvolver de - #2365
Open
Memtensor-AI wants to merge 1 commit into
Conversation
`attachSkillSubscriber` in core/pipeline/deps.ts was wired with `llm: bgLlm` (the main model), never `bgReflectLlm` (the dedicated client built from the `skillEvolver.*` config block). As a result: - Operators configuring a distinct `skillEvolver.provider` / `skillEvolver.model` were silently ignored — skill crystallization / evolution ran on the main model regardless. - `overview.skillEvolver.lastOkAt` was pinned to `null` because the dedicated client was never invoked, making it useless as a liveness signal. Change: `llm: bgReflectLlm ?? bgLlm`. Fallback preserves current behaviour for installs without a distinct `skillEvolver` block. Guarded by a new dedicated regression test (`tests/unit/pipeline/skill-reflect-llm-wiring.test.ts`, 2 cases) mirroring the pattern of `capture-reflect-llm-wiring.test.ts` (the sibling fix MemTensor#2148, opposite-direction wiring bug in captureRunner). Fixes MemTensor#2362
3 tasks
Collaborator
Author
🤖 Open Code ReviewTarget: PR #2365 ✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s). Generated by cloud-assistant via Open Code Review. |
Collaborator
Author
✅ Automated Test Results: PASSEDAll tests passed (74/74 executed, 5 skipped). memos_github_open_source/smoke: 1/1, memos_local_plugin/unit: 2/2, memos_python_core/changed-repo-python: 71 passed, 5 skipped. Duration: 21s Branch: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #2362 —
attachSkillSubscriberinapps/memos-local-plugin/core/pipeline/deps.tswas wired withllm: bgLlm(the main model) instead ofbgReflectLlm(the dedicated client built from theskillEvolver.*config block). As a result, operators configuring a distinctskillEvolver.provider/skillEvolver.modelwere silently ignored — skill crystallization and evolution ran on the main model regardless — andoverview.skillEvolver.lastOkAtwas pinned tonullbecause the dedicated client was never invoked. This is a distinct instance of the wiring-bug class fixed in #2148 (opposite direction: that fix correctedcaptureRunner's slot; this one corrects the skill subscriber's slot). Verified viagit log -Lin the issue: this call site has never been wired tobgReflectLlmsince the v2.0 Reflect2Evolve rewrite.Change is a single line at
deps.ts:339:llm: bgReflectLlm ?? bgLlm. The??fallback preserves existing behaviour for installs without a distinctskillEvolverconfig block.Guarded by a new dedicated regression test
apps/memos-local-plugin/tests/unit/pipeline/skill-reflect-llm-wiring.test.ts(2 cases) mirroring the pattern ofcapture-reflect-llm-wiring.test.ts(the sibling #2148 guard). RED was reproduced before the fix (expected 'main-llm' to be 'skill-evolver-llm'); GREEN confirmed after. Full pipeline + skill-subscriber suite: 14 files / 92 tests pass, including the siblingcapture-reflect-llm-wiringandhealth-model-displayneighbours.npm run lint(tsc --noEmit) clean.Path classification: Bug quick-fix — one-line DI correction, no openspec artifacts required. Task file archived to sibling specs repo (memos-autodev-specs / main, commit
ff25a7f). Reviewer: @WeiminLee.Related Issue (Required): Fixes #2362
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Not run; documentation-only change.
Checklist
@WeiminLee please review this PR.
Reviewer Checklist