fix: thread resolved project through synthesize operations#156
Merged
Conversation
The synthesize command declared --project and imported ResolvesProject but never used either — every scroll/search/upsert/updateFields call fell back to the 'default' collection. Since entries are stored in per-project collections, the nightly digest/dedupe/archive has been running against a collection where no new entries land: 'Digest Created: No' every night with exit 0. All eight Qdrant call sites now receive the resolved project, test expectations pin the project argument, and a regression test drives --project through every operation.
There was a problem hiding this comment.
Ship it.
- All Qdrant calls now receive the resolved $project (8 sites).
- Tests pin the trailing argument so regression is impossible without test breakage.
- New scoping test exercises --project=homelab end-to-end.
- PHPStan/Pint/Pest clean on changed files.
No blocking issues. Ready to merge.
📊 Coverage Report
Files Below Threshold
🏆 Synapse Sentinel Gate |
🔧 Synapse Sentinel: 1 check need attentionThe following issues must be resolved before this PR can be merged: Security AuditReview the output and fix any issues.Quick Reference:
🤖 Generated by Synapse Sentinel - View Run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
synthesizedeclared--projectand importedResolvesProjectbut never called it. Every internal Qdrant operation (scroll,search,upsert,updateFields) fell back to thedefaultcollection while real entries land in per-project collections (knowledge_jordan, etc.).Net effect: the nightly cron has been a no-op for months —
Digest Created: No, 0 duplicates, 0 archived, exit 0, every night. Verified live on odin: entries added hours earlier with validated status + 95% confidence were invisible tosynthesize --digest.The fix
handle()resolves the project once and threads it through all three operations (8 call sites)project scopingtest drives--project=homelabthrough every Qdrant operationVerification
master— from the feat: migrate embeddings from Gunicorn to the-shit/vector EmbeddingClient #147 embeddings migration, untouched here)Not addressed (deliberate)
App runs in UTC so the 23:00 MST cron generates a digest dated tomorrow — deployment-side
APP_TIMEZONEfix, separate concern.