Skip to content

fix(knowledge): deflake projection integration tests by ranking vector assertions exactly - #8289

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/deflake-knowledge-projection-sync
Sep 25, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/deflake-knowledge-projection-sync

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • knowledge-projection and unfilled-projection-source integration tests intermittently got [] from the vector leg for chunks the access predicate admits
  • Cause: the vector assertions used permitted: { kind: 'unbounded', broad: true }, which walks the shared HNSW graph. The files sharing the CI database fill it with degenerate vectors ([1, 0, …], constant rows), so a fixture chunk can be pruned from every neighbour list and becomes unreachable however far the iterative scan goes. The one-hot fixture vector from fix(cli): strip endpoint trailing slashes in linear time, deflake projection test #8285 avoided ties, but not this
  • Switch the vector assertions to broad: false. With no per-source index, this ranks the sliced sources exactly, under the same on-row visibility predicate the walk applies, so what the tests assert (revoke/grant/unfilled visibility) no longer depends on ANN recall

Type of Change

  • Bug fix

Testing

  • Reproduced the unreachable-row behaviour on pgvector 0.8.6: with a crowd of duplicate [1, 0, …] rows, an iterative walk with a 100k tuple cap returned 3 of 5 rows sitting at distance 0
  • Ran the full CI shard (25 files, 255 tests) locally 5x on the fix: all green
  • bun run lint, check:audits, docs-manifest:check pass

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 25, 2026 3:46am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium risk] Changes vector search ranking behavior in integration tests.

The PR appears safe to merge, with a non-blocking gap in broad vector-path integration coverage.

Findings

  1. P2 Broad-path coverage is lost ▶

Summary

The PR changes vector assertions in two projection integration suites from a shared approximate graph walk to exact per-source ranking, avoiding flaky recall-dependent results.

  • The visibility assertions remain in place for grants, revocations, and unfilled projection rows.
  • The change leaves the broad graph-walk path without database-backed integration assertions.

Reviews (1) · Last reviewed commit: "fix(knowledge): deflake projection integ..."

@waleedlatif1
waleedlatif1 merged commit f6035de into staging Sep 25, 2026
35 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/deflake-knowledge-projection-sync branch September 25, 2026 03:52

This branch was previously deployed

1 inactive deployment
Preview — 725bfbd3 Deployed Sep 25, 2026 by vercel[bot]
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