Skip to content

fix: thread resolved project through synthesize operations#156

Merged
jordanpartridge merged 1 commit into
masterfrom
fix/synthesize-project-scoping
Jul 3, 2026
Merged

fix: thread resolved project through synthesize operations#156
jordanpartridge merged 1 commit into
masterfrom
fix/synthesize-project-scoping

Conversation

@jordanpartridge

Copy link
Copy Markdown
Contributor

The bug

synthesize declared --project and imported ResolvesProject but never called it. Every internal Qdrant operation (scroll, search, upsert, updateFields) fell back to the default collection 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 to synthesize --digest.

The fix

  • handle() resolves the project once and threads it through all three operations (8 call sites)
  • Existing test expectations pin the trailing project argument so the regression cannot silently return
  • New project scoping test drives --project=homelab through every Qdrant operation

Verification

Not addressed (deliberate)

App runs in UTC so the 23:00 MST cron generates a digest dated tomorrow — deployment-side APP_TIMEZONE fix, separate concern.

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.

@lexi-chief-of-staff lexi-chief-of-staff Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

📊 Coverage Report

Metric Coverage Threshold Status
Lines 100% 95%

Files Below Threshold

File Coverage Uncovered Lines
app/Enums/ObservationType.php 0% None
app/Exceptions/Qdrant/QdrantException.php 0% None
app/Mcp/Servers/KnowledgeServer.php 0% None
app/Services/AgentHealthService.php 0% None

🏆 Synapse Sentinel Gate

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

🔧 Synapse Sentinel: 1 check need attention

The following issues must be resolved before this PR can be merged:


Security Audit


Review the output and fix any issues.

Quick Reference:

  • PHPStan errors → Fix type mismatches first, then missing types
  • Test failures → Read the assertion message, trace expected vs actual
  • Style issues → Run composer format to auto-fix

🤖 Generated by Synapse Sentinel - View Run

@jordanpartridge jordanpartridge merged commit 96cd7ad into master Jul 3, 2026
1 check failed
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