Skip to content

BE-537, BE-537: hgraph: REST /hashql endpoint with E2E tests#8827

Open
indietyp wants to merge 10 commits into
bm/be-592-hashql-remove-old-eval-graph-path-and-core-value-typesfrom
bm/be-537-hashql-remove-old-backend-wire-up-hashql-in-the-api
Open

BE-537, BE-537: hgraph: REST /hashql endpoint with E2E tests#8827
indietyp wants to merge 10 commits into
bm/be-592-hashql-remove-old-eval-graph-path-and-core-value-typesfrom
bm/be-537-hashql-remove-old-backend-wire-up-hashql-in-the-api

Conversation

@indietyp

@indietyp indietyp commented Jun 4, 2026

Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

Add first-class /hashql POST endpoint. HashQlResource with OpenApi integration. CompilerContext with HeapPool/ScratchPool for memory management. CLI-configurable pool sizes via CompilerConfig with PoolSize newtype. PostgresStorePool extraction pattern. Interactive and Json-Compat header support. E2E tests via httpYac.

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

Copilot AI review requested due to automatic review settings June 4, 2026 16:33
@vercel

vercel Bot commented Jun 4, 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 23, 2026 9:59am
petrinaut Ready Ready Preview, Comment Jun 23, 2026 9:59am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hashdotdesign-tokens Ignored Ignored Preview Jun 23, 2026 9:59am

@cursor

cursor Bot commented Jun 4, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Introduces a new arbitrary-query execution surface against Postgres with configurable resource pools; mitigated by empty-only inputs for now and structured error handling, but still expands attack and load exposure on the graph API.

Overview
Adds a POST /hashql route on the graph REST API so clients can submit a JSON HashQL query, run it through the full compiler (JExpr parse → AST/HIR/MIR → Postgres codegen), execute via the existing orchestrator against Postgres, and get structured results or diagnostics.

Server wiring: Startup builds a shared CompilerContext (bounded or unbounded heap/scratch pools plus a LocalPoolHandle for !Send compile/run on pinned threads). New CLI flags CompilerConfig / PoolSize control memory and exec pool sizes. The REST router now receives both the fetching store pool and a cloned PostgresStorePool for DB acquisition, plus the compiler extension. OpenAPI documents HashQlRequest and the endpoint.

HTTP behavior: Optional Interactive (HTML error rendering) and Json-Compat (plain JSON values) headers mirror existing patterns. Request inputs must be an empty array until inputs ship. Compilation errors map to 400 with span pointers; infrastructure failures to 500.

Supporting changes: PostgresStore exposes AsRef<Client> for the eval path; sym::main is registered for the query entrypoint; empty Temporal host strings are treated as disabled. httpYac E2E coverage exercises success, parse errors, validation, json-compat, and interactive HTML.

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

@github-actions github-actions Bot added area/deps Relates to third-party dependencies (area) area/apps > hash* Affects HASH (a `hash-*` app) area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team area/tests New or updated tests area/apps area/apps > hash-graph labels Jun 4, 2026
@indietyp indietyp marked this pull request as draft June 4, 2026 16:34
@indietyp indietyp force-pushed the bm/be-537-hashql-remove-old-backend-wire-up-hashql-in-the-api branch from 93fb60f to 77443ca Compare June 9, 2026 07:32
@indietyp indietyp force-pushed the bm/be-592-hashql-remove-old-eval-graph-path-and-core-value-types branch from 37f6a80 to ffd1eee Compare June 9, 2026 07:32
@vercel vercel Bot temporarily deployed to Preview – petrinaut June 9, 2026 07:35 Inactive

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

Copilot reviewed 14 out of 16 changed files in this pull request and generated 2 comments.

Comment thread libs/@local/graph/api/src/rest/hashql/mod.rs
Comment thread libs/@local/graph/api/src/rest/hashql/mod.rs Outdated
Copilot AI review requested due to automatic review settings June 9, 2026 09:48
@indietyp indietyp force-pushed the bm/be-592-hashql-remove-old-eval-graph-path-and-core-value-types branch from ffd1eee to c4c66ca Compare June 9, 2026 09:48
@indietyp indietyp force-pushed the bm/be-537-hashql-remove-old-backend-wire-up-hashql-in-the-api branch from 15bfd71 to 29a5989 Compare June 9, 2026 09:48
@indietyp indietyp force-pushed the bm/be-592-hashql-remove-old-eval-graph-path-and-core-value-types branch from c4c66ca to b71a649 Compare June 9, 2026 09:50

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

Copilot reviewed 14 out of 16 changed files in this pull request and generated 1 comment.

Comment thread libs/@local/graph/api/src/rest/hashql/mod.rs

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

Copilot reviewed 14 out of 16 changed files in this pull request and generated 1 comment.

Comment thread libs/@local/graph/api/src/rest/hashql/mod.rs
@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 $$26.6 \mathrm{ms} \pm 258 \mathrm{μs}\left({\color{gray}1.49 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.38 \mathrm{ms} \pm 15.4 \mathrm{μs}\left({\color{lightgreen}-6.315 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$12.9 \mathrm{ms} \pm 90.3 \mathrm{μs}\left({\color{gray}1.82 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$43.4 \mathrm{ms} \pm 370 \mathrm{μs}\left({\color{gray}-0.065 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$14.7 \mathrm{ms} \pm 99.8 \mathrm{μs}\left({\color{lightgreen}-6.061 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$24.5 \mathrm{ms} \pm 159 \mathrm{μs}\left({\color{gray}-1.791 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$26.8 \mathrm{ms} \pm 164 \mathrm{μs}\left({\color{gray}-1.081 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.75 \mathrm{ms} \pm 20.0 \mathrm{μs}\left({\color{gray}-4.900 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$14.2 \mathrm{ms} \pm 145 \mathrm{μs}\left({\color{gray}2.00 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.70 \mathrm{ms} \pm 23.4 \mathrm{μs}\left({\color{gray}-0.244 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.97 \mathrm{ms} \pm 15.2 \mathrm{μs}\left({\color{gray}-0.787 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.31 \mathrm{ms} \pm 18.5 \mathrm{μs}\left({\color{gray}-1.627 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.12 \mathrm{ms} \pm 35.0 \mathrm{μs}\left({\color{gray}-0.449 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.55 \mathrm{ms} \pm 26.1 \mathrm{μs}\left({\color{gray}0.170 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$4.06 \mathrm{ms} \pm 22.1 \mathrm{μs}\left({\color{gray}-0.879 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.32 \mathrm{ms} \pm 29.0 \mathrm{μs}\left({\color{gray}0.710 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.48 \mathrm{ms} \pm 23.2 \mathrm{μs}\left({\color{gray}0.754 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.11 \mathrm{ms} \pm 35.5 \mathrm{μs}\left({\color{gray}1.29 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.59 \mathrm{ms} \pm 18.5 \mathrm{μs}\left({\color{gray}-0.558 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.48 \mathrm{ms} \pm 12.1 \mathrm{μs}\left({\color{gray}-2.410 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.60 \mathrm{ms} \pm 24.1 \mathrm{μs}\left({\color{gray}1.55 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.85 \mathrm{ms} \pm 15.0 \mathrm{μs}\left({\color{gray}-1.140 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.63 \mathrm{ms} \pm 12.4 \mathrm{μs}\left({\color{gray}-0.164 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.85 \mathrm{ms} \pm 18.2 \mathrm{μs}\left({\color{gray}0.269 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$2.99 \mathrm{ms} \pm 19.3 \mathrm{μs}\left({\color{gray}0.411 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.71 \mathrm{ms} \pm 17.4 \mathrm{μs}\left({\color{gray}-1.209 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$2.96 \mathrm{ms} \pm 19.9 \mathrm{μs}\left({\color{gray}-0.574 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.34 \mathrm{ms} \pm 18.1 \mathrm{μs}\left({\color{gray}-0.915 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.95 \mathrm{ms} \pm 15.0 \mathrm{μs}\left({\color{gray}-1.230 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.25 \mathrm{ms} \pm 17.2 \mathrm{μs}\left({\color{gray}-0.684 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.31 \mathrm{ms} \pm 21.7 \mathrm{μs}\left({\color{gray}-0.250 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.93 \mathrm{ms} \pm 15.4 \mathrm{μs}\left({\color{gray}-0.921 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.30 \mathrm{ms} \pm 18.3 \mathrm{μs}\left({\color{gray}-0.965 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$54.1 \mathrm{ms} \pm 334 \mathrm{μs}\left({\color{gray}-2.846 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$47.0 \mathrm{ms} \pm 318 \mathrm{μs}\left({\color{gray}0.026 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$51.6 \mathrm{ms} \pm 283 \mathrm{μs}\left({\color{gray}-0.635 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$44.2 \mathrm{ms} \pm 215 \mathrm{μs}\left({\color{gray}-2.013 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$62.4 \mathrm{ms} \pm 368 \mathrm{μs}\left({\color{gray}-2.977 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$62.8 \mathrm{ms} \pm 399 \mathrm{μs}\left({\color{gray}0.384 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$57.1 \mathrm{ms} \pm 388 \mathrm{μs}\left({\color{gray}-0.720 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$105 \mathrm{ms} \pm 625 \mathrm{μs}\left({\color{gray}0.214 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$46.9 \mathrm{ms} \pm 225 \mathrm{μs}\left({\color{gray}-1.337 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$294 \mathrm{ms} \pm 870 \mathrm{μs}\left({\color{gray}0.549 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$19.1 \mathrm{ms} \pm 96.2 \mathrm{μs}\left({\color{gray}-2.617 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$20.0 \mathrm{ms} \pm 115 \mathrm{μs}\left({\color{gray}-1.585 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$20.8 \mathrm{ms} \pm 107 \mathrm{μs}\left({\color{gray}-0.221 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$19.3 \mathrm{ms} \pm 98.6 \mathrm{μs}\left({\color{gray}-4.921 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$24.6 \mathrm{ms} \pm 245 \mathrm{μs}\left({\color{gray}-4.935 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$19.1 \mathrm{ms} \pm 108 \mathrm{μs}\left({\color{gray}-1.352 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$19.7 \mathrm{ms} \pm 118 \mathrm{μs}\left({\color{gray}-0.806 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$19.6 \mathrm{ms} \pm 132 \mathrm{μs}\left({\color{gray}-0.512 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$20.4 \mathrm{ms} \pm 120 \mathrm{μs}\left({\color{gray}-0.487 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$26.5 \mathrm{ms} \pm 267 \mathrm{μs}\left({\color{gray}-2.394 \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 $$35.6 \mathrm{ms} \pm 298 \mathrm{μs}\left({\color{gray}2.28 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$35.2 \mathrm{ms} \pm 305 \mathrm{μs}\left({\color{gray}2.41 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$35.5 \mathrm{ms} \pm 296 \mathrm{μs}\left({\color{gray}2.68 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$34.4 \mathrm{ms} \pm 265 \mathrm{μs}\left({\color{gray}-2.758 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$34.8 \mathrm{ms} \pm 295 \mathrm{μs}\left({\color{gray}-3.186 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$34.7 \mathrm{ms} \pm 309 \mathrm{μs}\left({\color{gray}0.262 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$36.2 \mathrm{ms} \pm 301 \mathrm{μs}\left({\color{gray}2.27 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$35.7 \mathrm{ms} \pm 276 \mathrm{μs}\left({\color{gray}2.89 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$35.5 \mathrm{ms} \pm 259 \mathrm{μs}\left({\color{gray}0.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 $$8.42 \mathrm{ms} \pm 41.3 \mathrm{μs}\left({\color{gray}-1.378 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$92.3 \mathrm{ms} \pm 665 \mathrm{μs}\left({\color{gray}-0.301 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$148 \mathrm{ms} \pm 863 \mathrm{μs}\left({\color{gray}-0.997 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$99.7 \mathrm{ms} \pm 643 \mathrm{μs}\left({\color{gray}-0.431 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$111 \mathrm{ms} \pm 634 \mathrm{μs}\left({\color{gray}-0.299 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$117 \mathrm{ms} \pm 600 \mathrm{μs}\left({\color{gray}-1.247 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$125 \mathrm{ms} \pm 635 \mathrm{μs}\left({\color{gray}-1.635 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$103 \mathrm{ms} \pm 452 \mathrm{μs}\left({\color{gray}-0.551 \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 $$133 \mathrm{ms} \pm 636 \mathrm{μs}\left({\color{gray}-1.451 \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 $$111 \mathrm{ms} \pm 575 \mathrm{μs}\left({\color{gray}-0.228 \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 $$120 \mathrm{ms} \pm 644 \mathrm{μs}\left({\color{gray}-0.417 \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 $$122 \mathrm{ms} \pm 664 \mathrm{μs}\left({\color{gray}-0.514 \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 $$121 \mathrm{ms} \pm 606 \mathrm{μs}\left({\color{gray}-0.793 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$189 \mathrm{ms} \pm 777 \mathrm{μs}\left({\color{gray}0.133 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$150 \mathrm{ms} \pm 603 \mathrm{μs}\left({\color{gray}-3.399 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$40.5 \mathrm{ms} \pm 201 \mathrm{μs}\left({\color{gray}-2.510 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$582 \mathrm{ms} \pm 1.06 \mathrm{ms}\left({\color{gray}1.75 \mathrm{\%}}\right) $$ Flame Graph

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

Copilot reviewed 14 out of 16 changed files in this pull request and generated 2 comments.

Comment thread libs/@local/graph/api/src/rest/hashql/mod.rs
Comment thread apps/hash-graph/src/subcommand/server.rs

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

Copilot reviewed 14 out of 16 changed files in this pull request and generated 1 comment.

Comment on lines +202 to +207
/// Request body for the `/hashql` endpoint.
#[derive(serde::Deserialize, utoipa::ToSchema)]
pub(crate) struct HashQlRequest {
#[schema(value_type = serde_json::Value)]
query: Arc<RawValue>,
/// Input values for the query. Must be an empty list until input support ships.

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c469804. Configure here.

Comment thread libs/@local/graph/api/src/rest/hashql/mod.rs

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

Copilot reviewed 14 out of 16 changed files in this pull request and generated 1 comment.

Comment thread libs/@local/graph/api/src/rest/hashql/mod.rs

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

Copilot reviewed 14 out of 16 changed files in this pull request and generated 2 comments.

Comment thread libs/@local/graph/api/src/rest/hashql/mod.rs
Comment thread libs/@local/graph/api/src/rest/hashql/mod.rs

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

Copilot reviewed 14 out of 16 changed files in this pull request and generated 2 comments.

Comment on lines +125 to +138
let iter = btree_map
.iter()
.map(|(key, value)| (Self(key), Self(value)));

// If all the keys are strings we can collect a map, otherwise we must fallback
// to collecting as a sequence
if btree_map
.keys()
.all(|key| matches!(key, OwnedValue::String(_)))
{
serializer.collect_map(iter)
} else {
serializer.collect_seq(iter)
}
Comment on lines +97 to +107
let mut scratch = ctx.scratches.get();
let heap = ctx.heaps.get();

let inputs = Inputs::new(); // TODO: https://linear.app/hash/issue/BE-41/hashql-expose-input-in-graph-api

let Success {
value: compilation,
advisories,
} = Compilation::compile(&heap, &mut scratch, spans, query)?;

let context = compilation.context();

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

Copilot reviewed 14 out of 16 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash* Affects HASH (a `hash-*` app) area/apps > hash-graph area/apps area/deps Relates to third-party dependencies (area) 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