Repository navigation
fix(core): date semantic freshness by the latest embedded note - #2064
phernandez wants to merge 2 commits into
Conversation
1.0 requires a project on every note, folder, context and schema call, so "Calls without one use the default project" was wrong. The footer now names the `project` parameter and its accepted forms, and points search at `projects` and `all_projects`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CMYVL4TcbWdXhdvAzxfqjo Signed-off-by: phernandez <paul@basicmachines.co>
semantic_index_current_as_of was the oldest last-modified time among notes whose embeddings lag. One note that never catches up (a failing embed, a stuck shard) dated the whole index back to its own edit: production's dev project has reported "current as of 2026-09-07" on every search for two months. The value is now the newest last-modified time among notes whose embeddings are current, still reported only while some note is behind. The "is anything behind" check keeps reading the partial index. When nothing is embedded yet, it falls back to the oldest note behind, since null would claim every note is current. The text note now says notes still waiting for embeddings may be missing from semantic matches, rather than notes changed after the timestamp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CMYVL4TcbWdXhdvAzxfqjo Signed-off-by: phernandez <paul@basicmachines.co>
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 736143d496
ℹ️ 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".
| return select(func.max(Entity.updated_at)).where( | ||
| Entity.project_id.in_(scope.project_ids), |
There was a problem hiding this comment.
Update cross-database aggregation for the new freshness meaning
When a search spans multiple workspace databases, mcp/tools/search.py:679 still merges these values using min(semantic_current_as_of), which matched the former oldest-behind meaning but not the new latest-embedded meaning. For example, if both databases have pending notes and their latest embedded changes are September 7 and November 6, the merged response reports September 7 despite reflecting a November 6 change. The same projects searched within one database now report November 6, so freshness depends on database placement and cross-workspace searches retain the misleading old date this change aims to fix. Update the fan-out aggregation and add a multi-database regression test alongside this semantic change.
Useful? React with 👍 / 👎.
Why
semantic_index_current_as_ofwas the oldest last-modified time among notes whose embeddings lag. A single note that never catches up dated the whole index back to its own edit. Production'sdevproject has said "Semantic results current as of 2026-09-07" on every search for two months.What changed
repository/semantic_index_freshness.py): the value is now the newestupdated_atamong markdown notes whose embeddings are current (embedded_checksum = checksumand no deferral marker). It is still reported only while some note is behind, and that check still reads the partial indexix_entity_project_embedding_not_current. When nothing is embedded yet, it falls back to the oldest note behind, because null would claim every note is current.projectparameter and its forms.Tests
test_one_stuck_note_does_not_date_the_index_back. The multi-note repository test now expects the latest embedded change.just fast-checkis clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01CMYVL4TcbWdXhdvAzxfqjo