Skip to content

Comments

Omit deps from query field results during indexing#4037

Merged
habdelra merged 2 commits intomainfrom
cs-10219-do-not-track-query-field-results-as-deps
Feb 20, 2026
Merged

Omit deps from query field results during indexing#4037
habdelra merged 2 commits intomainfrom
cs-10219-do-not-track-query-field-results-as-deps

Conversation

@habdelra
Copy link
Contributor

This PR omits capturing dependencies for relationships that originate from query fields. This allows us to have a consistent invalidation story while we figure out how we want to handle query field invalidations.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR modifies the indexing system to exclude query-backed relationships from dependency tracking. Query-backed relationships (identified by the presence of a links.search property) populate their results dynamically through queries rather than explicit relationships, making traditional dependency tracking inappropriate. The PR introduces helper methods to identify and skip these relationships during dependency extraction, ensuring a consistent invalidation story until a proper query field invalidation strategy is implemented.

Changes:

  • Added methods to detect and filter out query-backed relationships during dependency extraction
  • Modified all relationship dependency extraction methods to skip query field paths
  • Removed processing of included resources in serialized relationships since they can contain query results
  • Added comprehensive test coverage for both linksTo and linksToMany query-backed relationships

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/runtime-common/index-runner/dependency-resolver.ts Core implementation: Added query field detection methods and modified all dependency extraction methods to skip query-backed relationships
packages/runtime-common/index-runner/card-indexer.ts Updated card indexer to extract and pass query field paths to search doc dependency extraction
packages/realm-server/tests/indexing-test.ts Added test verifying that query-backed relationship targets are not tracked as dependencies
AGENTS.md Added documentation for lint:fix commands (unrelated documentation improvement)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@habdelra habdelra requested a review from a team February 20, 2026 16:19
@github-actions
Copy link

Host Test Results

    1 files  ±0      1 suites  ±0   1h 44m 15s ⏱️ + 3m 44s
1 856 tests ±0  1 842 ✅ ±0  14 💤 ±0  0 ❌ ±0 
1 871 runs  ±0  1 857 ✅ ±0  14 💤 ±0  0 ❌ ±0 

Results for commit 11771cb. ± Comparison against base commit a700abb.

@habdelra habdelra merged commit 371901a into main Feb 20, 2026
100 checks passed
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.

2 participants