feat(memos-local): auto-promote candidate skills without trial#1943
Open
a844810597 wants to merge 3 commits into
Open
feat(memos-local): auto-promote candidate skills without trial#1943a844810597 wants to merge 3 commits into
a844810597 wants to merge 3 commits into
Conversation
… recheck A candidate policy whose support/gain already satisfy the promotion thresholds (support >= minSupport && gain >= minGain) but is no longer cosine-matched by any trace in subsequent episodes will never enter 'touched' and therefore nextStatus() is never executed. Add Step 5 after Step 4 to scan all candidate policies and promote any whose stored support/gain already meet the thresholds. Fixes MemTensor#1932
…el__ The keepalive thread closure in _start_bridge_keepalive captured self directly, creating a reference cycle that prevented GC from collecting the provider. Combined with the missing __del__, a leaked provider would leave its bridge subprocess (Popen) and keepalive thread alive indefinitely. Two complementary fixes: 1. weakref — break the reference cycle so GC can collect the provider when all external references are dropped. 2. __del__ — safety net that calls shutdown() during GC when the caller forgot to invoke it explicitly (e.g. model/routing change paths that assign self.agent = None without calling shutdown). Both are required: weakref enables GC collection, __del__ ensures cleanup happens when collection occurs.
Non-repair candidate skills whose eta already satisfies the retrieval threshold may skip the trial loop and become active immediately. The eta value encodes the gain/support of the source policies, carried forward from crystallisation and kept current by reward drift — no additional quality gate needed. Adds: - lifecycle.shouldPromoteCandidate() — pure decision function - subscriber.lifecycleTick() — scans candidates each flush - orchestrator.flush() — calls lifecycleTick after skills.flush() Repair-origin skills still require a trial pass before promotion. Closes #
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.
Summary
Closes #1941
Non-repair candidate skills whose eta already satisfies the retrieval threshold may skip the trial loop and become active immediately. The eta value encodes the gain/support of the source policies, carried forward from crystallisation and kept current by reward drift — no additional quality gate needed.
Changes
core/skill/lifecycle.tscore/skill/subscriber.tscore/pipeline/orchestrator.tsWhy
Candidate skills require agent calls (memos_skill_get + reward.updated) to accumulate trials and promote. In practice, Hermes agents rarely call memos_skill_get → skills get stuck in candidate forever with 0 trials.
What stays the same