Skip to content

BE-467: Remove Default impl from QueryTemporalAxesUnresolved#8900

Merged
TimDiekmann merged 2 commits into
mainfrom
t/be-467-remove-default-impl-from-querytemporalaxesunresolved
Jun 24, 2026
Merged

BE-467: Remove Default impl from QueryTemporalAxesUnresolved#8900
TimDiekmann merged 2 commits into
mainfrom
t/be-467-remove-default-impl-from-querytemporalaxesunresolved

Conversation

@TimDiekmann

@TimDiekmann TimDiekmann commented Jun 24, 2026

Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

QueryTemporalAxesUnresolved implemented Default, which silently resolved to the "find all entities, including archived" axes (DecisionTime { pinned: None, variable: [Unbounded, now] }). default() communicated no intent, so reviewers (and automated review tools) couldn't tell whether a given call site deliberately wanted "find all" or had accidentally picked the wrong axes — this was flagged repeatedly during the BE-460 deletion review.

This PR removes the Default impl and replaces it with two intent-revealing named constructors, then routes every call site through them.

🔗 Related links

  • BE-467 (internal)
  • Originated from the BE-460 deletion review (internal)

🔍 What does this change?

  • Remove impl Default for QueryTemporalAxesUnresolved.
  • Add two documented constructors on QueryTemporalAxesUnresolved:
    • all() — pins transaction time at the resolution timestamp, decision time unbounded up to it → reaches all entities incl. archived. For any archived-inclusive read (history-aware queries, erase-all / resetGraph), not only removal.
    • live_only() — pins both axes at the resolution timestamp → only currently-live entities (the conventional "current snapshot" query).
  • Consolidate every call site onto the constructors (net −305 LOC (+214 −519)):
    • 36 QueryTemporalAxesUnresolved::default() calls → all().
    • 23 inline copies of the "find all" axes → all() (incl. the production user_deletion.rs site that triggered BE-460's review confusion).
    • 37 inline copies of the decision-time "current" axes → live_only().
  • Remove the deletion-test helpers live_only_axes() and find_all_axes(), inlining their ~64 call sites onto live_only() / all(). live_only_axes() previously pinned the transaction-time axis; switching it to the decision-time live_only() finds the same live entities — verified by the suites below. axes_at_decision_time() (parameterised) is kept.

Every replacement of default()/inline axes is byte-identical to the code it replaces; the only behavioral change is the deletion-test helper's axis, which the tests confirm is equivalent.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

⚠️ Known issues

None.

🐾 Next steps

None.

🛡 What tests cover this?

Existing test suites, all green:

  • hash-graph-postgres-store unit tests — 136/136 passed (incl. the select.rs SQL-compilation tests that resolve all()).
  • Deletion + principals + integration DB suites — 364/364 passed (1 skipped), exercising all() and live_only() in real queries.
  • clippy --all-features --all-targets clean across store, postgres-store, type-fetcher, integration, benches, api.

No new tests added — behavior is unchanged, so existing coverage applies.

❓ How to test this?

  1. cargo clippy --all-features --all-targets -p hash-graph-store -p hash-graph-postgres-store -p hash-graph-type-fetcher -p hash-graph-integration -p hash-graph-benches -p hash-graph-api
  2. cargo nextest run -p hash-graph-postgres-store -p hash-graph-integration --all-features (against a freshly-migrated, unseeded graph DB)

Replace the implicit `Default` (which silently meant "find all entities,
including archived") with two intent-revealing constructors, `all()` and
`live_only()`, and consolidate the ~96 inline/`default()` call sites onto them.
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment Jun 24, 2026 10:32am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
hashdotdesign-tokens Ignored Ignored Preview Jun 24, 2026 10:32am
petrinaut Skipped Skipped Jun 24, 2026 10:32am

@github-actions github-actions Bot added area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team area/tests New or updated tests labels Jun 24, 2026
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.11111% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.27%. Comparing base (da532c2) to head (46c4519).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...s/@local/graph/store/src/subgraph/temporal_axes.rs 0.00% 7 Missing ⚠️
...local/graph/postgres-store/src/store/validation.rs 0.00% 5 Missing ⚠️
...s-store/src/store/postgres/knowledge/entity/mod.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8900      +/-   ##
==========================================
+ Coverage   59.25%   59.27%   +0.01%     
==========================================
  Files        1347     1347              
  Lines      131082   131052      -30     
  Branches     5946     5944       -2     
==========================================
  Hits        77677    77677              
+ Misses      52499    52469      -30     
  Partials      906      906              
Flag Coverage Δ
apps.hash-ai-worker-ts 1.39% <ø> (ø)
apps.hash-api 0.00% <ø> (ø)
local.hash-backend-utils 2.82% <ø> (ø)
local.hash-graph-sdk 9.63% <ø> (ø)
local.hash-isomorphic-utils 0.00% <ø> (ø)
rust.hash-graph-api 2.52% <ø> (ø)
rust.hash-graph-postgres-store 29.02% <84.21%> (+0.05%) ⬆️
rust.hash-graph-store 37.99% <0.00%> (-0.05%) ⬇️
rust.hash-graph-validation 83.43% <ø> (ø)
rust.hashql-compiletest 28.24% <ø> (ø)
rust.hashql-eval 75.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Drop the deletion-test `live_only_axes()` / `find_all_axes()` wrappers in favour
of direct `QueryTemporalAxesUnresolved::live_only()` / `::all()` calls.

`live_only_axes()` previously pinned the *transaction-time* axis; the decision-time
`live_only()` finds the same live entities — verified by running the deletion and
integration suites (364 passed) against a clean DB. Also clarify the `all()` doc:
it serves any archived-inclusive read, not only removal.
@vercel vercel Bot temporarily deployed to Preview – petrinaut June 24, 2026 10:23 Inactive
@TimDiekmann TimDiekmann marked this pull request as ready for review June 24, 2026 10:52
Copilot AI review requested due to automatic review settings June 24, 2026 10:52
@cursor

cursor Bot commented Jun 24, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches many query, permission, validation, and deletion paths; wrong constructor choice could change which entities/types are visible, though replacements are intended to be behavior-preserving except documented deletion-test helper alignment.

Overview
Removes Default on QueryTemporalAxesUnresolved so call sites can’t silently mean “include archived / all temporal versions.” Adds all() (unbounded decision time — history, erase-all, user deletion) and live_only() (current snapshot only).

Every former default(), inline DecisionTime { … } block, and deletion-test helpers live_only_axes() / find_all_axes() is switched to all() or live_only() across postgres store, validation, type-fetcher, user deletion, benches, and integration tests. Imports of pinned/variable axis builders are trimmed where no longer needed.

Reviewed by Cursor Bugbot for commit 46c4519. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI 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.

Pull request overview

This PR removes the Default implementation from QueryTemporalAxesUnresolved (which previously implied an unbounded “find all, including archived” query) and replaces it with two explicit, intent-revealing constructors: all() and live_only(). It then updates call sites across the store, Postgres store, integration tests, and benchmarks to use the new constructors, making temporal intent explicit and reviewable.

Changes:

  • Removed impl Default for QueryTemporalAxesUnresolved and introduced QueryTemporalAxesUnresolved::all() / QueryTemporalAxesUnresolved::live_only().
  • Replaced previous default() and inline temporal-axes literals at call sites with the appropriate named constructor.
  • Simplified imports throughout tests/benches and removed deletion test helper functions that duplicated axes construction.

Reviewed changes

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

Show a summary per file
File Description
tests/graph/integration/postgres/sorting.rs Switches entity query axes to live_only() and simplifies temporal axes imports.
tests/graph/integration/postgres/property_type.rs Uses all() for property type queries and removes now-unused temporal bound/axis imports.
tests/graph/integration/postgres/partial_updates.rs Replaces inline “current snapshot” decision-time axes with live_only().
tests/graph/integration/postgres/multi_type.rs Replaces inline “current snapshot” decision-time axes with live_only().
tests/graph/integration/postgres/links.rs Uses all() / live_only() as appropriate; simplifies temporal axes imports.
tests/graph/integration/postgres/entity.rs Uses all() for “find everything” reads and live_only() for current snapshot reads.
tests/graph/integration/postgres/entity_type.rs Uses all() for entity type queries; simplifies imports.
tests/graph/integration/postgres/email_filter_protection.rs Updates helper to return QueryTemporalAxesUnresolved::all().
tests/graph/integration/postgres/data_type.rs Uses all() for data type queries; simplifies imports.
tests/graph/benches/representative_read/ontology/entity_type.rs Uses all() in ontology read benchmark setup.
tests/graph/benches/representative_read/knowledge/entity.rs Uses live_only() / all() to make benchmark query intent explicit.
tests/graph/benches/read_scaling/knowledge/linkless/entity.rs Uses all() in scaling benchmark query.
tests/graph/benches/read_scaling/knowledge/complete/entity.rs Uses all() in scaling benchmark query.
tests/graph/benches/graph/scenario/stages/reset_db.rs Replaces default() with all() for reset/erase stage.
tests/graph/benches/graph/scenario/stages/entity_type.rs Replaces default() with all() for registry build stage.
tests/graph/benches/graph/scenario/stages/entity_queries.rs Replaces default() with all() for scenario query stage.
libs/@local/graph/type-fetcher/src/store.rs Uses live_only() for type fetcher “current snapshot” reads and simplifies imports.
libs/@local/graph/store/src/user_deletion.rs Uses all() for deletion queries intended to include archived/history; simplifies imports.
libs/@local/graph/store/src/subgraph/temporal_axes.rs Removes Default and introduces all() / live_only() constructors with docs.
libs/@local/graph/postgres-store/tests/deletion/validation.rs Updates deletion tests to use QueryTemporalAxesUnresolved::live_only().
libs/@local/graph/postgres-store/tests/deletion/purge.rs Updates deletion tests/helpers to use QueryTemporalAxesUnresolved::live_only().
libs/@local/graph/postgres-store/tests/deletion/main.rs Removes live_only_axes() / find_all_axes() helpers and routes callers to constructors.
libs/@local/graph/postgres-store/tests/deletion/links.rs Updates deletion tests to use live_only() / all() and refreshes commentary accordingly.
libs/@local/graph/postgres-store/tests/deletion/erase.rs Updates erase tests to use QueryTemporalAxesUnresolved::live_only().
libs/@local/graph/postgres-store/tests/deletion/drafts.rs Updates drafts-related deletion tests to use QueryTemporalAxesUnresolved::live_only().
libs/@local/graph/postgres-store/src/store/validation.rs Uses live_only().resolve() for validation reads and simplifies imports.
libs/@local/graph/postgres-store/src/store/postgres/query/statement/select.rs Updates SQL compilation tests to use all() instead of default().
libs/@local/graph/postgres-store/src/store/postgres/query/expression/where_clause.rs Updates where-clause transpilation test to use all() instead of default().
libs/@local/graph/postgres-store/src/store/postgres/ontology/property_type.rs Uses live_only().resolve() for permission checks and simplifies imports.
libs/@local/graph/postgres-store/src/store/postgres/ontology/entity_type.rs Replaces default() with all() where behavior depended on old default; uses live_only() where appropriate.
libs/@local/graph/postgres-store/src/store/postgres/ontology/data_type.rs Uses live_only().resolve() for permission checks and simplifies imports.
libs/@local/graph/postgres-store/src/store/postgres/knowledge/entity/mod.rs Replaces inline “current snapshot” axes with live_only().

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

@TimDiekmann TimDiekmann requested a review from a team June 24, 2026 11:39
@TimDiekmann TimDiekmann enabled auto-merge June 24, 2026 11:39
@github-actions

Copy link
Copy Markdown
Contributor

Benchmark results

@rust/hash-graph-benches – Integrations

policy_resolution_large

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2002 $$20.7 \mathrm{ms} \pm 127 \mathrm{μs}\left({\color{gray}2.84 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.70 \mathrm{ms} \pm 18.0 \mathrm{μs}\left({\color{gray}2.33 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$10.7 \mathrm{ms} \pm 83.8 \mathrm{μs}\left({\color{red}8.34 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$34.4 \mathrm{ms} \pm 209 \mathrm{μs}\left({\color{gray}1.13 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$11.7 \mathrm{ms} \pm 94.6 \mathrm{μs}\left({\color{gray}4.56 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$20.0 \mathrm{ms} \pm 119 \mathrm{μs}\left({\color{gray}2.53 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$21.5 \mathrm{ms} \pm 136 \mathrm{μs}\left({\color{gray}2.68 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.93 \mathrm{ms} \pm 15.0 \mathrm{μs}\left({\color{gray}1.66 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$12.0 \mathrm{ms} \pm 76.9 \mathrm{μs}\left({\color{red}5.72 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.01 \mathrm{ms} \pm 20.1 \mathrm{μs}\left({\color{gray}4.55 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.37 \mathrm{ms} \pm 13.6 \mathrm{μs}\left({\color{gray}2.96 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$2.66 \mathrm{ms} \pm 14.4 \mathrm{μs}\left({\color{gray}2.76 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$4.10 \mathrm{ms} \pm 26.8 \mathrm{μs}\left({\color{gray}3.76 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.85 \mathrm{ms} \pm 14.6 \mathrm{μs}\left({\color{gray}2.78 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$3.31 \mathrm{ms} \pm 20.3 \mathrm{μs}\left({\color{gray}4.74 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$3.41 \mathrm{ms} \pm 18.0 \mathrm{μs}\left({\color{gray}1.54 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.70 \mathrm{ms} \pm 22.6 \mathrm{μs}\left({\color{gray}1.82 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$3.18 \mathrm{ms} \pm 19.6 \mathrm{μs}\left({\color{gray}2.31 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.01 \mathrm{ms} \pm 9.96 \mathrm{μs}\left({\color{gray}-3.787 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$1.97 \mathrm{ms} \pm 14.4 \mathrm{μs}\left({\color{gray}0.431 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.00 \mathrm{ms} \pm 11.2 \mathrm{μs}\left({\color{gray}-3.406 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.21 \mathrm{ms} \pm 10.7 \mathrm{μs}\left({\color{gray}-3.112 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.07 \mathrm{ms} \pm 13.1 \mathrm{μs}\left({\color{gray}-1.952 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.28 \mathrm{ms} \pm 15.1 \mathrm{μs}\left({\color{gray}1.17 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$2.35 \mathrm{ms} \pm 11.7 \mathrm{μs}\left({\color{gray}1.58 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.14 \mathrm{ms} \pm 13.8 \mathrm{μs}\left({\color{gray}2.14 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$2.31 \mathrm{ms} \pm 11.1 \mathrm{μs}\left({\color{gray}0.883 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$2.62 \mathrm{ms} \pm 11.9 \mathrm{μs}\left({\color{gray}-0.029 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.29 \mathrm{ms} \pm 10.8 \mathrm{μs}\left({\color{gray}-0.160 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$2.54 \mathrm{ms} \pm 11.4 \mathrm{μs}\left({\color{gray}-0.158 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$2.57 \mathrm{ms} \pm 12.9 \mathrm{μs}\left({\color{gray}0.750 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.31 \mathrm{ms} \pm 12.6 \mathrm{μs}\left({\color{gray}2.61 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$2.56 \mathrm{ms} \pm 11.9 \mathrm{μs}\left({\color{gray}0.837 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$32.7 \mathrm{ms} \pm 157 \mathrm{μs}\left({\color{gray}-0.849 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$25.5 \mathrm{ms} \pm 141 \mathrm{μs}\left({\color{gray}-2.553 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$28.9 \mathrm{ms} \pm 164 \mathrm{μs}\left({\color{gray}4.86 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$27.2 \mathrm{ms} \pm 705 \mathrm{μs}\left({\color{red}9.45 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$34.2 \mathrm{ms} \pm 199 \mathrm{μs}\left({\color{gray}-1.945 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$38.9 \mathrm{ms} \pm 175 \mathrm{μs}\left({\color{gray}2.36 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$30.9 \mathrm{ms} \pm 185 \mathrm{μs}\left({\color{gray}-1.300 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$70.4 \mathrm{ms} \pm 359 \mathrm{μs}\left({\color{gray}0.147 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$25.9 \mathrm{ms} \pm 159 \mathrm{μs}\left({\color{gray}0.752 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$240 \mathrm{ms} \pm 1.47 \mathrm{ms}\left({\color{red}9.94 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$8.04 \mathrm{ms} \pm 40.2 \mathrm{μs}\left({\color{gray}-2.939 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$8.19 \mathrm{ms} \pm 51.3 \mathrm{μs}\left({\color{gray}-3.793 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$8.07 \mathrm{ms} \pm 42.3 \mathrm{μs}\left({\color{gray}-4.893 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$8.08 \mathrm{ms} \pm 38.3 \mathrm{μs}\left({\color{gray}-3.153 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$8.16 \mathrm{ms} \pm 34.8 \mathrm{μs}\left({\color{gray}-2.671 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$7.92 \mathrm{ms} \pm 30.8 \mathrm{μs}\left({\color{gray}-4.160 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$8.06 \mathrm{ms} \pm 51.1 \mathrm{μs}\left({\color{gray}-4.540 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$8.02 \mathrm{ms} \pm 39.2 \mathrm{μs}\left({\color{lightgreen}-5.362 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$8.09 \mathrm{ms} \pm 47.8 \mathrm{μs}\left({\color{gray}-3.724 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$8.11 \mathrm{ms} \pm 37.6 \mathrm{μs}\left({\color{gray}-4.600 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity

Function Value Mean Flame graphs
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1 $$8.42 \mathrm{ms} \pm 40.9 \mathrm{μs}\left({\color{gray}-1.640 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$8.41 \mathrm{ms} \pm 40.4 \mathrm{μs}\left({\color{gray}-2.838 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$8.42 \mathrm{ms} \pm 44.4 \mathrm{μs}\left({\color{gray}-1.556 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$8.44 \mathrm{ms} \pm 51.2 \mathrm{μs}\left({\color{gray}-0.879 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$8.34 \mathrm{ms} \pm 34.8 \mathrm{μs}\left({\color{gray}-1.856 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$8.49 \mathrm{ms} \pm 67.2 \mathrm{μs}\left({\color{gray}-0.253 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$8.44 \mathrm{ms} \pm 34.0 \mathrm{μs}\left({\color{gray}-1.759 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$8.48 \mathrm{ms} \pm 53.5 \mathrm{μs}\left({\color{gray}-4.719 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$8.38 \mathrm{ms} \pm 44.6 \mathrm{μs}\left({\color{gray}-2.818 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity_type

Function Value Mean Flame graphs
get_entity_type_by_id Account ID: bf5a9ef5-dc3b-43cf-a291-6210c0321eba $$6.59 \mathrm{ms} \pm 50.3 \mathrm{μs}\left({\color{gray}-0.247 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$46.7 \mathrm{ms} \pm 296 \mathrm{μs}\left({\color{gray}0.771 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$84.2 \mathrm{ms} \pm 396 \mathrm{μs}\left({\color{gray}-2.197 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$51.2 \mathrm{ms} \pm 370 \mathrm{μs}\left({\color{gray}0.121 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$58.6 \mathrm{ms} \pm 466 \mathrm{μs}\left({\color{gray}0.194 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$63.8 \mathrm{ms} \pm 405 \mathrm{μs}\left({\color{gray}-2.974 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$67.6 \mathrm{ms} \pm 353 \mathrm{μs}\left({\color{gray}-4.784 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$35.2 \mathrm{ms} \pm 164 \mathrm{μs}\left({\color{gray}0.380 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$58.9 \mathrm{ms} \pm 231 \mathrm{μs}\left({\color{gray}1.95 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$41.4 \mathrm{ms} \pm 231 \mathrm{μs}\left({\color{gray}0.123 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$48.6 \mathrm{ms} \pm 326 \mathrm{μs}\left({\color{gray}-0.211 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$49.3 \mathrm{ms} \pm 213 \mathrm{μs}\left({\color{gray}0.258 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$49.4 \mathrm{ms} \pm 212 \mathrm{μs}\left({\color{gray}-0.637 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$96.1 \mathrm{ms} \pm 303 \mathrm{μs}\left({\color{gray}-3.432 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$104 \mathrm{ms} \pm 383 \mathrm{μs}\left({\color{gray}-4.256 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$14.9 \mathrm{ms} \pm 69.6 \mathrm{μs}\left({\color{gray}3.20 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$434 \mathrm{ms} \pm 656 \mathrm{μs}\left({\color{gray}2.44 \mathrm{\%}}\right) $$ Flame Graph

@TimDiekmann TimDiekmann added this pull request to the merge queue Jun 24, 2026
Merged via the queue into main with commit fd129ea Jun 24, 2026
105 checks passed
@TimDiekmann TimDiekmann deleted the t/be-467-remove-default-impl-from-querytemporalaxesunresolved branch June 24, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/libs Relates to first-party libraries/crates/packages (area) area/tests New or updated tests type/eng > backend Owned by the @backend team

Development

Successfully merging this pull request may close these issues.

3 participants