Skip to content

H-6487: Add AI assistant to Petrinaut + demo website#8750

Merged
CiaranMn merged 21 commits into
mainfrom
cm/petrinaut-ai-assistant-mvp
May 26, 2026
Merged

H-6487: Add AI assistant to Petrinaut + demo website#8750
CiaranMn merged 21 commits into
mainfrom
cm/petrinaut-ai-assistant-mvp

Conversation

@CiaranMn
Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

  1. Add the Petrinaut AI assistant UI
  2. Adds the endpoint to the demo website that proxies to the AI provider (OpenAI for now)
  3. Adds a 'fractal file structure' skill (since I made the AI part of @hashintel/petrinaut organised in this way)

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

🛡 What tests cover this?

  • Some new added ones.

❓ How to test this?

  1. Open the preview deployment
  2. For local testing, turbo run dev in petrinaut-website after copying .env.example to .env and setting an OPENAI_API_KEY. If you want simulation mode to work – it doesn't when running the website in dev mode – you need to use npx vercel dev instead (which will build the site and serve it, as well as serving the chat API endpoint)

@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

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

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment May 25, 2026 5:17pm
petrinaut Ready Ready Preview, Comment May 25, 2026 5:17pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hashdotdesign-tokens Ignored Ignored Preview May 25, 2026 5:17pm

@cursor
Copy link
Copy Markdown

cursor Bot commented May 25, 2026

PR Summary

High Risk
Introduces an authenticated chat proxy with rate limiting and broad AI-driven document mutations; the instance API break (mutations/commands, no mutate) affects all consumers.

Overview
Adds an AI assistant to Petrinaut: optional aiAssistant on <Petrinaut> (Vercel AI SDK chat + tool loop), a bottom-bar toggle, and expanded core AI tools (read net/title, compilation diagnostics, rename, applyAutoLayout) with richer schema descriptions and a longer system prompt.

Core API refactor: Petrinaut drops raw mutate and top-level mutation methods in favor of instance.mutations and instance.commands (clipboard paste, ELK auto-layout moved from UI into core with elkjs). React uses usePetrinautMutations / usePetrinautCommands with read-only guards; MutationProvider is removed.

Demo site: apps/petrinaut-website gains /api/chat (OpenAI streaming, IP rate limits, message validation), Vite dev middleware mirroring production fetch handlers, per-net localStorage for chat history, and Vercel function config.

Also: new DS icon (arrowsLeftRight), pulse/shimmer animations, zod 4.4.3 bumps, fractal file-structuring Claude skill, .vercel in .gitignore.

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

@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented May 25, 2026

This pull request is abnormally large and would use a significant amount of tokens to review. If you still wish to review it, comment "augment review" and we will review it.

@github-actions github-actions Bot added area/deps Relates to third-party dependencies (area) area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team type/eng > backend Owned by the @backend team area/apps area/apps > hash.design Affects the `hash.design` design site (app) labels May 25, 2026
Comment thread libs/@hashintel/petrinaut/src/ui/views/Editor/panels/ai-assistant-panel.tsx Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.83%. Comparing base (0eb9937) to head (5c79142).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8750      +/-   ##
==========================================
- Coverage   62.83%   62.83%   -0.01%     
==========================================
  Files        1368     1368              
  Lines      140845   140845              
  Branches     5859     5859              
==========================================
- Hits        88502    88501       -1     
- Misses      51412    51413       +1     
  Partials      931      931              
Flag Coverage Δ
apps.hash-ai-worker-ts 1.41% <ø> (ø)
apps.hash-api 0.00% <ø> (ø)
blockprotocol.type-system 40.84% <ø> (ø)
local.claude-hooks 0.00% <ø> (ø)
local.harpc-client 51.24% <ø> (ø)
local.hash-backend-utils 2.81% <ø> (ø)
local.hash-graph-sdk 9.63% <ø> (ø)
local.hash-isomorphic-utils 0.00% <ø> (ø)
rust.antsi 0.00% <ø> (ø)
rust.error-stack 90.87% <ø> (ø)
rust.harpc-codec 84.70% <ø> (ø)
rust.harpc-net 96.18% <ø> (-0.02%) ⬇️
rust.harpc-tower 67.03% <ø> (ø)
rust.harpc-types 0.00% <ø> (ø)
rust.harpc-wire-protocol 92.23% <ø> (ø)
rust.hash-codec 72.76% <ø> (ø)
rust.hash-graph-api 2.52% <ø> (ø)
rust.hash-graph-authorization 62.34% <ø> (ø)
rust.hash-graph-postgres-store 26.81% <ø> (ø)
rust.hash-graph-store 37.76% <ø> (ø)
rust.hash-graph-temporal-versioning 47.95% <ø> (ø)
rust.hash-graph-types 0.00% <ø> (ø)
rust.hash-graph-validation 83.45% <ø> (ø)
rust.hashql-ast 87.23% <ø> (ø)
rust.hashql-compiletest 29.63% <ø> (ø)
rust.hashql-core 82.17% <ø> (ø)
rust.hashql-diagnostics 72.53% <ø> (ø)
rust.hashql-eval 81.08% <ø> (ø)
rust.hashql-hir 89.06% <ø> (ø)
rust.hashql-mir 91.58% <ø> (ø)
rust.hashql-syntax-jexpr 94.06% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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.

Comment thread apps/petrinaut-website/api/chat.ts
Comment thread apps/petrinaut-website/api/chat.ts Dismissed
Comment thread apps/petrinaut-website/api/chat.ts Dismissed
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 25, 2026

Merging this PR will not alter performance

✅ 80 untouched benchmarks


Comparing cm/petrinaut-ai-assistant-mvp (67ba2f0) with main (ae5c317)

Open in CodSpeed

Copy link
Copy Markdown

@cursor cursor Bot left a comment

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.

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 bee10aa. Configure here.

Comment thread apps/petrinaut-website/api/chat.ts
Comment thread libs/@hashintel/petrinaut-core/src/schemas/entity-schemas.ts Outdated
@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.5 \mathrm{ms} \pm 86.7 \mathrm{μs}\left({\color{red}5.48 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.70 \mathrm{ms} \pm 11.8 \mathrm{μs}\left({\color{gray}3.40 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$10.6 \mathrm{ms} \pm 90.1 \mathrm{μs}\left({\color{red}10.2 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$33.7 \mathrm{ms} \pm 204 \mathrm{μs}\left({\color{gray}1.91 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$12.2 \mathrm{ms} \pm 87.3 \mathrm{μs}\left({\color{red}9.33 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$20.4 \mathrm{ms} \pm 108 \mathrm{μs}\left({\color{red}11.0 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$21.2 \mathrm{ms} \pm 112 \mathrm{μs}\left({\color{red}5.41 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.99 \mathrm{ms} \pm 16.6 \mathrm{μs}\left({\color{red}5.14 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$12.1 \mathrm{ms} \pm 63.6 \mathrm{μs}\left({\color{red}17.3 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$2.88 \mathrm{ms} \pm 14.7 \mathrm{μs}\left({\color{gray}-0.126 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.31 \mathrm{ms} \pm 12.9 \mathrm{μs}\left({\color{gray}-0.768 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$2.56 \mathrm{ms} \pm 12.1 \mathrm{μs}\left({\color{gray}-1.498 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$3.90 \mathrm{ms} \pm 16.9 \mathrm{μs}\left({\color{gray}-2.471 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.73 \mathrm{ms} \pm 11.2 \mathrm{μs}\left({\color{gray}-1.465 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$3.19 \mathrm{ms} \pm 18.5 \mathrm{μs}\left({\color{gray}-0.614 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$3.36 \mathrm{ms} \pm 19.9 \mathrm{μs}\left({\color{gray}0.218 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.63 \mathrm{ms} \pm 10.5 \mathrm{μs}\left({\color{gray}-0.547 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$3.10 \mathrm{ms} \pm 15.2 \mathrm{μs}\left({\color{gray}-2.506 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.09 \mathrm{ms} \pm 9.10 \mathrm{μs}\left({\color{gray}-1.445 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.06 \mathrm{ms} \pm 8.23 \mathrm{μs}\left({\color{gray}-0.096 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.16 \mathrm{ms} \pm 8.02 \mathrm{μs}\left({\color{gray}-0.330 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.35 \mathrm{ms} \pm 13.7 \mathrm{μs}\left({\color{gray}-0.304 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.21 \mathrm{ms} \pm 10.1 \mathrm{μs}\left({\color{gray}-0.787 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.43 \mathrm{ms} \pm 11.5 \mathrm{μs}\left({\color{gray}0.741 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$2.37 \mathrm{ms} \pm 13.5 \mathrm{μs}\left({\color{gray}0.315 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.15 \mathrm{ms} \pm 11.4 \mathrm{μs}\left({\color{gray}-0.173 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$2.27 \mathrm{ms} \pm 10.1 \mathrm{μs}\left({\color{gray}-0.620 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$2.71 \mathrm{ms} \pm 41.4 \mathrm{μs}\left({\color{gray}0.431 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.37 \mathrm{ms} \pm 10.7 \mathrm{μs}\left({\color{gray}-0.120 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$2.55 \mathrm{ms} \pm 12.6 \mathrm{μs}\left({\color{gray}0.044 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$2.64 \mathrm{ms} \pm 14.8 \mathrm{μs}\left({\color{gray}0.598 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.33 \mathrm{ms} \pm 8.14 \mathrm{μs}\left({\color{gray}-1.752 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$2.54 \mathrm{ms} \pm 12.1 \mathrm{μs}\left({\color{gray}-0.055 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$34.9 \mathrm{ms} \pm 136 \mathrm{μs}\left({\color{gray}0.341 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$64.1 \mathrm{ms} \pm 219 \mathrm{μs}\left({\color{gray}-1.784 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$38.7 \mathrm{ms} \pm 121 \mathrm{μs}\left({\color{gray}-2.441 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$39.9 \mathrm{ms} \pm 150 \mathrm{μs}\left({\color{gray}-1.572 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$48.6 \mathrm{ms} \pm 167 \mathrm{μs}\left({\color{gray}-0.873 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$36.2 \mathrm{ms} \pm 121 \mathrm{μs}\left({\color{gray}-1.549 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$329 \mathrm{ms} \pm 629 \mathrm{μs}\left({\color{gray}4.32 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$76.1 \mathrm{ms} \pm 293 \mathrm{μs}\left({\color{lightgreen}-5.368 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$65.7 \mathrm{ms} \pm 233 \mathrm{μs}\left({\color{gray}-2.302 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$231 \mathrm{ms} \pm 555 \mathrm{μs}\left({\color{gray}-0.101 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$15.1 \mathrm{ms} \pm 70.5 \mathrm{μs}\left({\color{gray}-4.121 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$16.1 \mathrm{ms} \pm 307 \mathrm{μs}\left({\color{gray}2.97 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$16.2 \mathrm{ms} \pm 70.4 \mathrm{μs}\left({\color{gray}0.062 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$15.6 \mathrm{ms} \pm 84.8 \mathrm{μs}\left({\color{gray}-3.348 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$19.6 \mathrm{ms} \pm 80.0 \mathrm{μs}\left({\color{gray}3.05 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$15.6 \mathrm{ms} \pm 86.1 \mathrm{μs}\left({\color{gray}3.73 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$15.9 \mathrm{ms} \pm 102 \mathrm{μs}\left({\color{gray}4.74 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$15.6 \mathrm{ms} \pm 91.4 \mathrm{μs}\left({\color{gray}1.13 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$16.4 \mathrm{ms} \pm 84.8 \mathrm{μs}\left({\color{gray}1.47 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$21.3 \mathrm{ms} \pm 102 \mathrm{μs}\left({\color{gray}4.53 \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 $$28.5 \mathrm{ms} \pm 185 \mathrm{μs}\left({\color{gray}2.90 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$26.9 \mathrm{ms} \pm 220 \mathrm{μs}\left({\color{red}5.56 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$26.9 \mathrm{ms} \pm 188 \mathrm{μs}\left({\color{gray}3.43 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$26.6 \mathrm{ms} \pm 240 \mathrm{μs}\left({\color{gray}4.42 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$27.0 \mathrm{ms} \pm 211 \mathrm{μs}\left({\color{gray}4.49 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$27.1 \mathrm{ms} \pm 202 \mathrm{μs}\left({\color{gray}2.89 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$27.1 \mathrm{ms} \pm 226 \mathrm{μs}\left({\color{gray}2.77 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$27.0 \mathrm{ms} \pm 234 \mathrm{μs}\left({\color{gray}4.17 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$27.7 \mathrm{ms} \pm 233 \mathrm{μs}\left({\color{gray}1.36 \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.54 \mathrm{ms} \pm 27.5 \mathrm{μs}\left({\color{gray}1.73 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$75.0 \mathrm{ms} \pm 406 \mathrm{μs}\left({\color{red}6.25 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$116 \mathrm{ms} \pm 577 \mathrm{μs}\left({\color{gray}4.76 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$82.1 \mathrm{ms} \pm 580 \mathrm{μs}\left({\color{red}6.86 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$88.0 \mathrm{ms} \pm 362 \mathrm{μs}\left({\color{red}5.64 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$95.2 \mathrm{ms} \pm 368 \mathrm{μs}\left({\color{gray}2.71 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$99.1 \mathrm{ms} \pm 450 \mathrm{μs}\left({\color{gray}4.46 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$79.2 \mathrm{ms} \pm 343 \mathrm{μs}\left({\color{gray}1.04 \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 $$100 \mathrm{ms} \pm 383 \mathrm{μs}\left({\color{gray}0.365 \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 $$83.0 \mathrm{ms} \pm 357 \mathrm{μs}\left({\color{gray}-1.406 \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 $$90.4 \mathrm{ms} \pm 476 \mathrm{μs}\left({\color{gray}0.591 \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 $$91.7 \mathrm{ms} \pm 335 \mathrm{μs}\left({\color{gray}-0.034 \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 $$91.0 \mathrm{ms} \pm 299 \mathrm{μs}\left({\color{gray}-1.167 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$105 \mathrm{ms} \pm 350 \mathrm{μs}\left({\color{lightgreen}-6.043 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$113 \mathrm{ms} \pm 323 \mathrm{μs}\left({\color{lightgreen}-5.994 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$83.8 \mathrm{ms} \pm 326 \mathrm{μs}\left({\color{gray}-3.754 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$430 \mathrm{ms} \pm 604 \mathrm{μs}\left({\color{lightgreen}-14.004 \mathrm{\%}}\right) $$ Flame Graph

Copy link
Copy Markdown
Collaborator

@kube kube left a comment

Choose a reason for hiding this comment

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

Good job!

@CiaranMn CiaranMn added this pull request to the merge queue May 26, 2026
Merged via the queue into main with commit f9d6417 May 26, 2026
177 of 178 checks passed
@CiaranMn CiaranMn deleted the cm/petrinaut-ai-assistant-mvp branch May 26, 2026 17:11
@hash-worker hash-worker Bot mentioned this pull request May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash.design Affects the `hash.design` design site (app) area/apps area/deps Relates to third-party dependencies (area) area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

3 participants