fix(plugin): archive idle low-eta skills - #2209
Conversation
🤖 Open Code ReviewTarget: PR #2209 🔍 OpenCodeReview found 7 issue(s) in this PR. 1.
|
|
Addressed the actionable Open Code Review findings in c5c0d0c:
I did not add cursor pagination for finding 3: the repository query already returns only rows satisfying the archive predicate, and synchronous I also retained the direct Verification:
|
Remove MemTensor#2208 changes after maintainers retargeted MemTensor#2209 from main to dev-v2.0.29.
|
The PR was retargeted from Fresh verification from the new base composition:
|
✅ Automated Test Results: PASSEDAll tests passed (67/67 executed). memos_local_plugin/unit: 67/67. Duration: 9s [advisory, non-gating] AI-generated tests on branch test/auto-gen-83c5b20bcb739226-20260804233503: 40/40 passed — these do NOT affect the PR verdict; review the branch manually. Branch: |
|
Addressed the latest Open Code Review finding in 0ff0a72. The idle-archive loop now processes at most 10 batches per lifecycle tick (5,000 Skills at the existing 500-row batch size). Reaching the cap emits The regression test first demonstrated the old behavior by archiving all 5,001 rows, then verifies the bounded behavior: 5,000 archived and 1 deferred after the first tick, followed by all 5,001 archived after the second tick. Verification:
|
✅ Automated Test Results: PASSEDAll tests passed (68/68 executed). memos_local_plugin/unit: 68/68. Duration: 18s [advisory, non-gating] AI-generated tests on branch test/auto-gen-d48df831a127afae-20260805003545: 56/56 passed — these do NOT affect the PR verdict; review the branch manually. Branch: |
✅ Automated Test Results: PASSEDAll tests passed (68/68 executed). memos_local_plugin/unit: 68/68. Duration: 18s [advisory, non-gating] AI-generated tests on branch test/auto-gen-6f2c3f5ab4b293a2-20260806234138: 64/64 passed — these do NOT affect the PR verdict; review the branch manually. Branch: |
|
Addressed the actionable concurrency findings in
Verification on the final branch composition:
The current GitHub Actions red jobs are failing during |
|
Follow-up
I reviewed the remaining OCR advisories. The batch-limit warning is reachable inside the 10th loop body and is covered by the 5,001-row regression. A full zero-change batch means concurrent writers invalidated the conditional updates; re-querying a full page is intentional so later valid candidates are not abandoned (the 501-row concurrency regression covers this). Lifecycle errors continue to propagate to the orchestrator instead of making a failed flush appear successful. Final local verification: 18/18 focused tests, 1306 unit tests passed with 1 skipped, 5/5 integration tests, TypeScript lint, production build, and |
✅ Automated Test Results: PASSEDAll tests passed (69/69 executed). memos_local_plugin/unit: 69/69. Duration: 17s [advisory, non-gating] AI-generated tests on branch test/auto-gen-54ae872c8776d8d7-20260807004733: 1/84 passed, 83 failed — these do NOT affect the PR verdict; review the branch manually. Branch: |
Description
Archive active Skills that remain below the retrieval ETA threshold after a configurable period of retrieval inactivity.
This change:
algorithm.skill.idleArchiveMs(30 days by default);lastUsedAt ?? createdAtas the idle baseline;shouldArchiveIdleAPI;No new dependencies.
Related Issue (Required): Fixes #2144
Type of change
How Has This Been Tested?
Commands and results:
apps/memos-local-pluginlayout and could not resolve repository-level workflow files.tsc --noEmit: passed.tsc -p tsconfig.build.json: passed.git diff --check: passed.Additional verification:
recordUsepersistence.make formatcould not start locally because Poetry is unavailable. This change is confined to the TypeScript plugin and does not modify Python files.Checklist
Reviewer Checklist