Repository navigation
fix(DEVS-145): resolve three post-merge Codex findings on PR #78 - #80
Conversation
Codex posted three review threads on #78 seconds before it merged, so the /pr-resolve pass never saw them. - Shared embed cooldown in both directions (P1). EmbeddingBudget.before_batch checked only its own last batch, so a transcript batch could start right after a memory embed. It now also honors EmbedThrottle.remaining(). A memory embed queued on mlx-embed behind a transcript batch could also start at once; _embed_after_cooldown now calls EmbedThrottle.wait_blocking() on mlx-embed and stamps the throttle there. - No vector search under another model (P2). vector_search re-reads the stored memory model and raises MemoryModelMismatch instead of querying Milvus; same-size vectors from another model would otherwise match. MemoryService already answers from FTS when the vector channel fails. - CLI audit project inventory (P2). memory_cli audit passes memory_service.project_inventory() (memory.project, else tag, from each known root's .claude/project.json), so unknown projects are reported. The report carries inventory_checked, and the CLI says when the check could not run instead of printing a clean result. Tests: 9 new (3 throttle, 2 index, 1 service, 3 CLI), written first and failing before the fix. Full suite 725 passed, 0 skipped with the test DSNs set; ruff clean; Vale clean on the changed docs.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | ✅ 33 (≤ 100 complexity) |
| Duplication | ✅ 4 (≤ 5 duplication) |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 611254d759
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex review on #80: _embed_after_cooldown stamps the throttle on mlx-embed, and leaving EmbedThrottle.batch() stamped it again on the event loop. A transcript batch already sleeping out the first stamp could then be denied on add_turns' single retry, and the watcher advances the transcript offset anyway, so those turns were skipped. EmbedThrottle.batch takes stamp=False; embed_for_index uses it, so the only stamp is the one on mlx-embed. Tests: batch(stamp=False) leaves no stamp, and one memory embed stamps exactly once, off the event loop thread. Full suite 727 passed, 0 skipped; ruff clean.
Codex posted three review threads on #78 seconds before it merged, so the
/pr-resolvepass did not see them. This PR fixes all three. Tracked under DEVS-145 (CLOSE-8); it gates the E.3 deploy.Fixes
embedding_control.py,memory_index.py)EmbeddingBudget.before_batchalso honorsEmbedThrottle.remaining(), so a transcript batch waits out a memory embed's cooldown.mlx-embedbehind a transcript batch callsEmbedThrottle.wait_blocking()on that thread before it embeds, and stamps the throttle there.memory_index.py)vector_searchre-reads the stored memory model and raisesMemoryModelMismatchbefore it queries Milvus.MemoryServicealready drops a failed vector channel and answers from FTS; a new test pins that for this error.memory_service.py,memory_cli.py)memory_service.project_inventory()readsmemory.project(elsetag) from each known root's.claude/project.json, sharing the lookup withresolve_project_roots.memory_cli auditpasses it, so unknown projects are reported.inventory_checked; when it is false, the CLI says the check was skipped instead of printing a clean result.Tests
SESSIONFLOW_TEST_PG_DSNand the restore DSN set.ruff check .clean; Vale clean onREADME.md,AGENTS.md,CLAUDE.md.test_memory_embeds_run_on_mlx_embed_behind_the_throttleis unchanged:wait_blockingis optional throughgetattr, asbatchalready is.