Skip to content

fix(memory-v3): address Codex review on #31990 (slow-lane consolidate + positive interval)#32019

Merged
velissa-ai merged 1 commit into
mainfrom
do/memory-v3-codex-followups
May 25, 2026
Merged

fix(memory-v3): address Codex review on #31990 (slow-lane consolidate + positive interval)#32019
velissa-ai merged 1 commit into
mainfrom
do/memory-v3-codex-followups

Conversation

@velissa-ai
Copy link
Copy Markdown
Collaborator

Summary

Addresses the two actionable Codex comments on #31990 (merged):

  • P1 — lane isolation: add memory_v3_consolidate to SLOW_LLM_JOB_TYPES. It hands off to a background agent for up to 15 min (like memory_v2_consolidate); in the fast lane it could starve short jobs once memory.v3.write.enabled is on. The mechanical v3 jobs (memory_v3_index_maintenance, memory_v3_edge_learning) intentionally stay fast.
  • P2 — queue flood guard: constrain memory.v3.write.consolidateIntervalMs to .positive(). 0/negative made maybeEnqueueGraphMaintenanceJobs' now - lastRun >= interval always true, enqueuing a consolidation every worker pass.

Both paths are still flag-gated (memory.v3.write.enabled defaults off), so this only matters once the v3 write path is switched on — but the guards belong in now.

Test plan

  • bun test jobs-store-job-classes + memory-v2 schema (48 pass)
  • bunx tsc --noEmit, bun run lint, prettier clean

Follow-up to #31990.

- Classify memory_v3_consolidate as a slow LLM job (it hands off to a
  background agent for up to 15 min like memory_v2_consolidate); leaving it in
  the fast lane broke lane isolation when memory.v3.write.enabled is on.
- Constrain memory.v3.write.consolidateIntervalMs to positive: 0/negative made
  the scheduler's `now - lastRun >= interval` always true, flooding the queue.
- Tests for both.
@velissa-ai velissa-ai merged commit 02ad01f into main May 25, 2026
13 checks passed
@velissa-ai velissa-ai deleted the do/memory-v3-codex-followups branch May 25, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant