Skip to content

fix: promote untouched L2 candidates that meet thresholds#1994

Draft
RerankerGuo wants to merge 1 commit into
MemTensor:mainfrom
RerankerGuo:fix/promote-untouched-l2-candidates
Draft

fix: promote untouched L2 candidates that meet thresholds#1994
RerankerGuo wants to merge 1 commit into
MemTensor:mainfrom
RerankerGuo:fix/promote-untouched-l2-candidates

Conversation

@RerankerGuo

Copy link
Copy Markdown

Summary

Fixes #1932.

  • Re-check untouched candidate policies after the normal L2 touched-policy gain pass.
  • Promote candidates whose stored support/gain already satisfy thresholds, even when the current episode did not associate any trace with them.
  • Emit the usual l2.policy.updated event and include the promoted candidate in touchedPolicyIds.

Validation

  • npm run lint

Attempted but blocked by the local environment:

  • npm test -- --run tests/unit/memory/l2/l2.integration.test.ts -t "untouched candidate"

The targeted test fails before assertions because this environment lacks a usable better-sqlite3 native binding. Rebuilding the binding is blocked here by Node 18 and a compiler that rejects -std=c++20.

@Memtensor-AI Memtensor-AI changed the base branch from main to dev-v2.0.22 July 1, 2026 13:14
@Memtensor-AI

Copy link
Copy Markdown
Collaborator

Automated Test Results: FAILED

Cloud test-engine full-audit rerun against dev-v2.0.22 failed after clearing the cloud workspace disk.

  • Run: tr-2482a03a-cc8 on cloud test-engine 10011

  • Verdict: fail_code_bug

  • Summary: Tests failed. Failed cases:

  • No executable phase result recorded.

Do not merge until this is fixed and cloud tests pass.

@Memtensor-AI

Copy link
Copy Markdown
Collaborator

Automated Test Results: ENVIRONMENT RETRY

The previous cloud test-engine run against dev-v2.0.22 did not produce executable test phases because environment preparation failed during npm install (npm install ETIMEDOUT during env prep). This is being treated as a cloud environment/network failure, not a confirmed code failure.

  • Previous run was superseded by retry: tr-d505739a-e76 on cloud test-engine 10011
  • Branch tested: refs/pull/1994/head

I will post the final pass/fail result when this retry completes.

@Memtensor-AI

Copy link
Copy Markdown
Collaborator

Automated Test Results: PASSED

Cloud test-engine rerun against dev-v2.0.22 completed successfully.

  • Run: tr-d505739a-e76 on cloud test-engine 10011
  • memos_local_plugin/unit: 9 passed, 0 failed, 0 skipped

Manual code review is still required before merge.

@CarltonXiang CarltonXiang deleted the branch MemTensor:main July 3, 2026 07:25
@syzsunshine219 syzsunshine219 reopened this Jul 3, 2026
@syzsunshine219 syzsunshine219 added the needs-audit Requires manual audit before merge label Jul 3, 2026
@syzsunshine219 syzsunshine219 changed the base branch from dev-v2.0.22 to main July 3, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-audit Requires manual audit before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: L2 Candidate Policy stuck in candidate forever (nextStatus never called for untouched policies)

4 participants