Skip to content

FE-866: Update Petrinaut + refractive toolchain#8863

Open
kube wants to merge 5 commits into
mainfrom
cf/petrinaut-setup-updates-june
Open

FE-866: Update Petrinaut + refractive toolchain#8863
kube wants to merge 5 commits into
mainfrom
cf/petrinaut-setup-updates-june

Conversation

@kube

@kube kube commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Purpose

Toolchain and dependency sweep for the Petrinaut packages: @hashintel/petrinaut, @hashintel/petrinaut-core, @hashintel/refractive, @apps/petrinaut-website.

What changed

Toolchain (all 4 packages)

  • Vite 8.0.12 → 8.0.16, rolldown 1.0.3 (pinned to Vite's internal version), @vitejs/plugin-react 6.0.2
  • @typescript/native-preview (tsgo) 20260511 → 20260610 (nightly; 5-day age gate applied)
  • rolldown-plugin-dts 0.25.2, @rolldown/plugin-babel 0.2.3
  • Storybook 10.4.3, vitest 4.1.8
  • oxlint 1.69.0 + oxlint-tsgolint 0.23.0
  • @babel/core added explicitly (undeclared peer of the React Compiler babel setup)

React and types

  • react/react-dom 19.2.6 → 19.2.7 (monorepo-wide — root resolutions pin forces a single copy)
  • @types/react 19.2.17

petrinaut-core

  • typescript 5.9.3 → 6.0.3: this is the in-browser LSP language service bundled into the worker, not the monorepo type-checker (which stays on tsgo)

Runtime deps (petrinaut-scope-only)

  • @ai-sdk/react 3.0.201, @xyflow/react 12.11.0, react-resizable-panels 4.11.2, @babel/standalone 7.29.7
  • react-icons 5.6.0, @whatwg-node/server 0.11.0 (website devDep)

Accessibility fixes surfaced by oxlint 1.69.0

5 aria-label additions in petrinaut — the new oxlint version fires jsx-a11y/control-has-associated-label on elements the previous version missed:

  • Spreadsheet cell editor (type="number")
  • Search panel input
  • Simulation timeline range scrubber
  • Scenario/metric description textareas (false-positives: both have a properly wired htmlFor/id pair, but oxlint can't verify template-literal equality statically)

Why the dts enforce: "pre" remap stays

Tested the upstream-recommended oxc: { exclude } alternative (rolldown-plugin-dts#201) with vite 8.0.16 + rolldown-plugin-dts 0.25.2 — it produces silent broken output: petrinaut's main.d.ts comes out as a bare re-export stub, and petrinaut-core's index.d.d.ts is not emitted at all. The existing enforce: "pre" remap works correctly. Both vite configs now have a comment documenting the test.

React Compiler stays on Babel

The Rust port is vendored in oxc 0.135 but rolldown's integration PR (rolldown#9671) is still a draft; stable Vite pins rolldown 1.0.3 anyway.

Skipped / out of scope

Package Reason
vscode-languageserver-types 3.18.0 Breaking: Diagnostic.message widened to string | MarkupContent; needs code changes in Monaco/JSX layers first
immer 10→11, @mantine/hooks 8→9 Major version bumps, also used by hash-frontend/ds-components/hash-api
ai, @ai-sdk/openai, @sentry/react, elkjs Also in hash-frontend — constraint conflict
@ark-ui/react, @tanstack/react-form, @pandacss/dev Also in ds-components — constraint conflict
@monaco-editor/react On next tag (4.8.0-rc.3); stable 4.7.0 would be a downgrade
vitest 4.1.9, storybook 10.4.4+, rolldown 1.1.x Don't clear the 5-day age gate

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
  • modifies an npm-publishable library and I have added a changeset file(s)

📜 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

Tests

turbo run build test:unit lint:tsc lint:eslint for all 4 packages — green. Storybook --smoke-test passes on petrinaut and refractive.

Copilot AI review requested due to automatic review settings June 12, 2026 13:31
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
hash Error Error Jun 16, 2026 10:36am
hashdotdesign-tokens Ready Ready Preview, Comment Jun 16, 2026 10:36am
petrinaut Error Error Comment Jun 16, 2026 10:36am

@cursor

cursor Bot commented Jun 12, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
TypeScript 6 and widespread rootDir/base tsconfig changes can surface new compile or declaration emit issues across many packages; publishable Petrinaut libraries also change bundled/runtime TypeScript for the LSP worker.

Overview
This PR upgrades the monorepo from TypeScript 5.9.3 to 6.0.3 across apps, libs, and tests, and pins React/React DOM to 19.2.7 via root resolutions. Shared tsconfig.build.json files now set explicit rootDir (and the legacy base config adds ignoreDeprecations: "6.0", default types: ["node"], and drops a blanket outDir).

Petrinaut, petrinaut-core, refractive, and petrinaut-website get a coordinated toolchain bump: Vite 8.0.16, rolldown / rolldown-plugin-dts, Storybook 10.4.3, oxlint 1.69, tsgo nightly, and related dev deps. petrinaut-core keeps typescript 6.0.3 as a runtime dependency for the in-browser LSP worker. Vite configs document why rolldown-plugin-dts still needs the enforce: "pre" remap (the oxc: { exclude } path breaks emitted .d.ts).

Petrinaut UI adds five aria-label attributes to satisfy stricter oxlint a11y rules. yarn.config.cjs ignores version alignment for @types/react and jsdom where Petrinaut stacks differ from the rest of the repo.

Reviewed by Cursor Bugbot for commit 9d0a45e. 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 > 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 Jun 12, 2026

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

Updates the Petrinaut (and related) frontend toolchain dependency set, aligning the monorepo on React 19.2.7 and moving Petrinaut build/test tooling forward (Vite 8.0.16, Storybook 10.4.2, rolldown 1.0.3, jsdom 29.1.1, and tsgo via @typescript/native-preview 20260607).

Changes:

  • Bump React / React DOM from 19.2.6 → 19.2.7 across the repo (including root resolutions).
  • Upgrade Petrinaut / Petrinaut Core / Petrinaut Website toolchain deps (Vite/Vitest, Storybook, rolldown + dts plugin, jsdom, @typescript/native-preview) and add explicit @babel/core for the React Compiler Babel pass.
  • Extend Yarn constraints ignore list for Petrinaut-ahead dependencies and add comments documenting the continued need for the enforce: "pre" DTS remap in Vite 8.

Reviewed changes

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

Show a summary per file
File Description
yarn.lock Locks updated versions for React 19.2.7 and the Petrinaut toolchain bumps (Vite/Vitest/Storybook/rolldown/jsdom/TS).
yarn.config.cjs Extends constraints ignore list for Petrinaut-ahead dependencies (rolldown-plugin-dts, native-preview, @types/react, typescript, jsdom, etc.).
package.json Updates root resolutions for react/react-dom to 19.2.7.
libs/@local/hash-isomorphic-utils/package.json Bumps React to 19.2.7.
libs/@local/advanced-types/package.json Bumps React to 19.2.7.
libs/@hashintel/type-editor/package.json Bumps React/React DOM to 19.2.7.
libs/@hashintel/query-editor/package.json Bumps React/React DOM to 19.2.7.
libs/@hashintel/petrinaut/vite.config.ts Adds documentation about why the enforce: "pre" DTS remap must remain under Vite 8.
libs/@hashintel/petrinaut/package.json Updates Petrinaut toolchain deps (Vite/Vitest/Storybook/rolldown/jsdom/native-preview) and adds @babel/core.
libs/@hashintel/petrinaut-core/vite.config.ts Adds documentation about why the enforce: "pre" DTS remap must remain under Vite 8.
libs/@hashintel/petrinaut-core/package.json Updates Petrinaut Core toolchain deps and bumps TypeScript to 6.0.3 for the in-browser LSP runtime.
libs/@hashintel/ds-components/package.json Bumps React/React DOM to 19.2.7.
libs/@hashintel/design-system/package.json Bumps React/React DOM to 19.2.7.
libs/@hashintel/block-design-system/package.json Bumps React/React DOM to 19.2.7.
libs/@blockprotocol/type-system/typescript/package.json Bumps React to 19.2.7.
apps/plugin-browser/package.json Bumps React/React DOM to 19.2.7.
apps/petrinaut-website/package.json Updates Petrinaut Website deps (React + Vite/plugin-react/native-preview) and adds @babel/core.
apps/hash-frontend/package.json Bumps React/React DOM to 19.2.7.

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

@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.22%. Comparing base (f416092) to head (9d0a45e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8863   +/-   ##
=======================================
  Coverage   59.22%   59.22%           
=======================================
  Files        1346     1346           
  Lines      130200   130200           
  Branches     5883     5883           
=======================================
  Hits        77115    77115           
  Misses      52180    52180           
  Partials      905      905           
Flag Coverage Δ
blockprotocol.type-system 40.84% <ø> (ø)
local.claude-hooks 0.00% <ø> (ø)
local.harpc-client 51.49% <ø> (ø)
rust.antsi 0.00% <ø> (ø)
rust.error-stack 90.87% <ø> (ø)
rust.harpc-codec 84.70% <ø> (ø)
rust.harpc-net 96.18% <ø> (ø)
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.78% <ø> (ø)
rust.hash-graph-store 37.76% <ø> (ø)
rust.hash-graph-temporal-versioning 47.95% <ø> (ø)
rust.hash-graph-types 0.00% <ø> (ø)
rust.hash-graph-validation 83.43% <ø> (ø)
rust.hashql-ast 87.23% <ø> (ø)
rust.hashql-compiletest 28.24% <ø> (ø)
rust.hashql-core 79.80% <ø> (ø)
rust.hashql-diagnostics 72.31% <ø> (ø)
rust.hashql-eval 75.69% <ø> (ø)
rust.hashql-hir 89.06% <ø> (ø)
rust.hashql-mir 87.05% <ø> (ø)
rust.hashql-syntax-jexpr 94.04% <ø> (ø)

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.

@codspeed-hq

codspeed-hq Bot commented Jun 12, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 80 untouched benchmarks


Comparing cf/petrinaut-setup-updates-june (9d0a45e) with main (f416092)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (acf5df0) during the generation of this report, so f416092 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

- Bump vite, @vitejs/plugin-react, storybook, rolldown 1.0.3 (matches
  vite's internal pin), rolldown-plugin-dts 0.25.2, @rolldown/plugin-babel
  and @typescript/native-preview across @hashintel/petrinaut,
  @hashintel/petrinaut-core, @apps/petrinaut-website and
  @hashintel/refractive; vitest 4.1.8 + jsdom 29 where tests exist
- typescript 5.9.3 -> 6.0.3 for the petrinaut-core in-browser LSP runtime
- react/react-dom 19.2.6 -> 19.2.7 monorepo-wide (required by the root
  resolutions pin that guarantees a single React copy)
- Add explicit @babel/core devDep for the React Compiler babel pass
- yarn constraints: ignore @types/react, typescript and jsdom forks
  (refractive was aligned instead of ignored for the toolchain packages)
- Document why the dts fake-js `enforce: "pre"` remap must stay: the
  upstream-recommended `oxc.exclude` setup (rolldown-plugin-dts#201)
  emits dts chunks without their local declarations

React Compiler stays on babel-plugin-react-compiler: the Rust port is in
oxc 0.135 but not yet shipped in rolldown (rolldown#9671 still draft) nor
reachable from stable Vite.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
kube and others added 2 commits June 15, 2026 12:24
….69.0

- @typescript/native-preview 20260607.1 -> 20260610.1 (all 4 packages)
- storybook + @storybook/react-vite 10.4.2 -> 10.4.3 (petrinaut + refractive)
- oxlint 1.63.0 -> 1.69.0 (all 4 packages)
- oxlint-tsgolint 0.22.1 -> 0.23.0 (all 4 packages)

oxlint 1.69.0 newly fires jsx-a11y(control-has-associated-label) on 5
elements: add aria-label to the spreadsheet cell editor, search input and
simulation timeline range input (genuine missing labels), and to the
scenario/metric description textareas (oxlint false-positives: both have
a properly wired htmlFor/id pair, but the linter can't verify template
literal equality statically).

vitest 4.1.9, storybook 10.4.4/10.4.5 and rolldown 1.1.1 don't clear the
5-day age gate yet.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Packages that are petrinaut-scope-only (no constraint conflicts):
- @ai-sdk/react 3.0.184 -> 3.0.201
- @xyflow/react 12.10.1 -> 12.11.0
- @babel/standalone 7.28.5 -> 7.29.7
- react-resizable-panels 4.6.5 -> 4.11.2
- react-icons 5.5.0 -> 5.6.0 (petrinaut-website)
- @whatwg-node/server 0.10.18 -> 0.11.0 (petrinaut-website devDep)

Reverted/skipped with rationale:
- vscode-languageserver-types 3.17.5 -> 3.18.0: 3.18.0 changed
  Diagnostic.message from string to string | MarkupContent, which
  breaks Monaco marker assignment and JSX rendering in petrinaut
- @types/node 22.18.13 -> 22.19.20: monorepo-wide constraint
- immer 10 -> 11, @mantine/hooks 8 -> 9: both major, both used by
  hash-frontend/ds-components/hash-api — out of scope
- ai 6.0.199, @ai-sdk/openai 3.0.69: also in hash-frontend —
  constraint conflict; gate also not yet cleared for latest stable
- @ark-ui/react 5.37.2, @tanstack/react-form 1.33.0,
  @pandacss/dev 1.11.3, @sentry/react 10.57.0, elkjs 0.11.1:
  each appears in ds-components or hash-frontend

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 15, 2026 11:46

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 24 out of 25 changed files in this pull request and generated 4 comments.

"@tanstack/react-form": "1.29.0",
"@xyflow/react": "12.10.1",
"@xyflow/react": "12.11.0",
"ai": "6.0.182",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Agreed

@@ -24,22 +24,23 @@
"@sentry/react": "10.54.0",
"ai": "6.0.182",

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

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 6ff32bd. Configure here.

"@monaco-editor/react": "4.8.0-rc.3",
"@tanstack/react-form": "1.29.0",
"@xyflow/react": "12.10.1",
"@xyflow/react": "12.11.0",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Split ai package versions

Medium Severity

Bumping @ai-sdk/react to 3.0.201 pulls in ai@6.0.199, but the package still declares ai@6.0.182, so the workspace installs two ai copies. The AI assistant passes lastAssistantMessageIsCompleteWithToolCalls from the older copy into useChat, which can break automatic follow-up sends after tool calls if those patch releases diverge.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 6ff32bd. Configure here.

@kube kube changed the title Update Petrinaut toolchain: Vite 8.0.16, tsgo 20260607, React 19.2.7 Update Petrinaut + refractive toolchain (June 2026) Jun 15, 2026
@kube kube requested review from CiaranMn and alex-e-leon June 15, 2026 13:36
@kube kube changed the title Update Petrinaut + refractive toolchain (June 2026) FE-866: Update Petrinaut + refractive toolchain (June 2026) Jun 15, 2026
@kube kube changed the title FE-866: Update Petrinaut + refractive toolchain (June 2026) FE-866: Update Petrinaut + refractive toolchain Jun 15, 2026
@kube kube enabled auto-merge June 15, 2026 13:43
Comment thread yarn.config.cjs
Comment on lines +35 to +40
// Petrinaut + refractive use @types/react 19.2.17; other workspaces are on 19.2.14
"@types/react",
// petrinaut-core bundles TypeScript 6 into its LSP worker; the rest of the repo is on 5.9
"typescript",
// Petrinaut tests run on jsdom 29; hash-ai-worker-ts is still on 24
"jsdom",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why can't the other workspaces also be upgraded?

Adding things to this array is a very blunt instrument which means we don't get any linting against packages ending up on different versions, we should only use it if there is some real difficulty in just upgrading everything else at the same time.

@kube kube Jun 15, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Because it would be a lot of work (for TypeScript) to make sure that all packages still pass the linting, and update them without worrying that we wouldn't break things.

For Petrinaut, it's just a runtime dependency.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

And for the others? And what is the motivation for upgrading Petrinaut to TypeScript 6?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There should be really good reasons for just giving up on version consistency for packages

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

  • Petrinaut lints User Code with TypeScript
  • Other packages lint their own code with TypeScript

So I think it's safe to assume they are not the same version, and make sure that new user-code is linted with latest language.

"@tanstack/react-form": "1.29.0",
"@xyflow/react": "12.10.1",
"@xyflow/react": "12.11.0",
"ai": "6.0.182",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Agreed

@kube kube requested a review from CiaranMn June 15, 2026 16:43
@alex-e-leon

Copy link
Copy Markdown
Contributor

@kube - I'm super comfortable for you to update any deps/dev deps in ds-components any time you like. The only 2 danger zone dependencies in ds-components in my view are ark-ui + panda-css. The risk of breaking things with any of the other deps is close to none.

Bump all packages from typescript 5.9.3 → 6.0.3 and remove the
ignoredDependencies entry in yarn.config.cjs that kept petrinaut-core
ahead of the rest of the monorepo.

TS6 migration changes to legacy-base-tsconfig-to-refactor.json:
- Add `"ignoreDeprecations": "6.0"` to suppress deprecation warnings
  for `moduleResolution: node` and `baseUrl` (the config is named
  "legacy" intentionally; these will be migrated separately)
- Add `"types": ["node"]` to restore the TS5 behavior of auto-including
  @types/node globals; TS6 defaults types to [] so Node.js globals like
  URL, URLSearchParams and process were no longer available
- Remove `"outDir": "./dist"` from the base config; with TS6's new
  rootDir default of `.`, having outDir in the base caused TS6059
  errors when cross-package paths (configured via `paths`) resolved
  files outside the tsconfig directory. outDir belongs only in
  tsconfig.build.json, not in the base type-check config

Per-file TS6 migration:
- libs/@local/eslint/tsconfig.build.json: add rootDir:"src"
- libs/@local/internal-api-client/typescript/tsconfig.json: add
  types:["node"] (this package uses URL/URLSearchParams as globals)
- libs/@local/internal-api-client/typescript/tsconfig.build.json:
  add rootDir:"."
- libs/@local/status/typescript/tsconfig.build.json: add rootDir:"."
  (includes both src/ and type-defs/ so rootDir must be ".")
- All other tsconfig.build.json files with outDir:dist but no rootDir:
  add rootDir:"src" (previously inferred by TS5, now required explicitly)

References:
- https://devblogs.microsoft.com/typescript/announcing-typescript-6-0/
- https://www.typescriptlang.org/docs/handbook/release-notes/typescript-6-0.html

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 16, 2026 10:32
@github-actions github-actions Bot added area/apps > hash-api Affects the HASH API (app) area/tests New or updated tests area/tests > integration New or updated integration tests area/tests > playwright New or updated Playwright tests labels Jun 16, 2026

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.

⚠️ Not ready to approve

A dependency-version mismatch within @hashintel/petrinaut introduces dual ai versions in the same workspace, and tests/hash-backend-load/tsconfig.build.json is currently inconsistent with its inherited include set.

Copilot's findings
  • Files reviewed: 66/67 changed files
  • Comments generated: 2

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.

"@tanstack/react-form": "1.29.0",
"@xyflow/react": "12.10.1",
"@xyflow/react": "12.11.0",
"ai": "6.0.182",
"outDir": "dist",
"paths": {}
"paths": {},
"rootDir": "src"
@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 $$27.2 \mathrm{ms} \pm 151 \mathrm{μs}\left({\color{gray}-1.034 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.56 \mathrm{ms} \pm 18.6 \mathrm{μs}\left({\color{gray}-2.165 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$13.4 \mathrm{ms} \pm 96.9 \mathrm{μs}\left({\color{red}6.48 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$44.3 \mathrm{ms} \pm 397 \mathrm{μs}\left({\color{gray}-0.950 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$15.3 \mathrm{ms} \pm 193 \mathrm{μs}\left({\color{gray}1.86 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$24.8 \mathrm{ms} \pm 181 \mathrm{μs}\left({\color{gray}-1.846 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$28.8 \mathrm{ms} \pm 208 \mathrm{μs}\left({\color{gray}-2.802 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.97 \mathrm{ms} \pm 31.2 \mathrm{μs}\left({\color{gray}-0.881 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$14.4 \mathrm{ms} \pm 98.4 \mathrm{μs}\left({\color{lightgreen}-5.246 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.92 \mathrm{ms} \pm 36.3 \mathrm{μs}\left({\color{gray}2.48 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.02 \mathrm{ms} \pm 21.9 \mathrm{μs}\left({\color{gray}-1.125 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.43 \mathrm{ms} \pm 24.5 \mathrm{μs}\left({\color{gray}0.414 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.22 \mathrm{ms} \pm 31.3 \mathrm{μs}\left({\color{gray}-1.758 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.59 \mathrm{ms} \pm 21.7 \mathrm{μs}\left({\color{gray}1.92 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$4.17 \mathrm{ms} \pm 30.2 \mathrm{μs}\left({\color{gray}-0.444 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.43 \mathrm{ms} \pm 30.7 \mathrm{μs}\left({\color{gray}-1.024 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.54 \mathrm{ms} \pm 22.2 \mathrm{μs}\left({\color{gray}1.16 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.17 \mathrm{ms} \pm 32.7 \mathrm{μs}\left({\color{gray}-0.163 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.67 \mathrm{ms} \pm 16.0 \mathrm{μs}\left({\color{gray}2.23 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.55 \mathrm{ms} \pm 15.0 \mathrm{μs}\left({\color{gray}0.173 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.67 \mathrm{ms} \pm 21.8 \mathrm{μs}\left({\color{gray}3.51 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.98 \mathrm{ms} \pm 19.3 \mathrm{μs}\left({\color{gray}3.42 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.76 \mathrm{ms} \pm 17.3 \mathrm{μs}\left({\color{gray}4.57 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.95 \mathrm{ms} \pm 18.6 \mathrm{μs}\left({\color{gray}4.90 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.02 \mathrm{ms} \pm 16.1 \mathrm{μs}\left({\color{gray}-1.385 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.74 \mathrm{ms} \pm 16.6 \mathrm{μs}\left({\color{gray}-1.089 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$2.96 \mathrm{ms} \pm 17.5 \mathrm{μs}\left({\color{gray}-2.320 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.44 \mathrm{ms} \pm 29.2 \mathrm{μs}\left({\color{gray}-1.678 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.97 \mathrm{ms} \pm 19.7 \mathrm{μs}\left({\color{gray}-0.996 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.29 \mathrm{ms} \pm 21.3 \mathrm{μs}\left({\color{gray}-1.038 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.34 \mathrm{ms} \pm 24.0 \mathrm{μs}\left({\color{gray}-0.511 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.97 \mathrm{ms} \pm 23.1 \mathrm{μs}\left({\color{gray}-0.259 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.38 \mathrm{ms} \pm 22.9 \mathrm{μs}\left({\color{gray}-0.032 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$55.9 \mathrm{ms} \pm 361 \mathrm{μs}\left({\color{gray}2.77 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$47.2 \mathrm{ms} \pm 251 \mathrm{μs}\left({\color{gray}-1.576 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$52.5 \mathrm{ms} \pm 434 \mathrm{μs}\left({\color{gray}1.75 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$46.3 \mathrm{ms} \pm 262 \mathrm{μs}\left({\color{gray}3.58 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$64.7 \mathrm{ms} \pm 601 \mathrm{μs}\left({\color{gray}2.27 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$63.1 \mathrm{ms} \pm 439 \mathrm{μs}\left({\color{gray}1.45 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$58.3 \mathrm{ms} \pm 438 \mathrm{μs}\left({\color{gray}3.41 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$106 \mathrm{ms} \pm 563 \mathrm{μs}\left({\color{gray}-0.632 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$47.4 \mathrm{ms} \pm 256 \mathrm{μs}\left({\color{gray}-0.346 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$279 \mathrm{ms} \pm 1.30 \mathrm{ms}\left({\color{lightgreen}-5.904 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$19.9 \mathrm{ms} \pm 142 \mathrm{μs}\left({\color{gray}-3.461 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$20.7 \mathrm{ms} \pm 132 \mathrm{μs}\left({\color{gray}-2.863 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$20.6 \mathrm{ms} \pm 161 \mathrm{μs}\left({\color{gray}-2.486 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$19.6 \mathrm{ms} \pm 143 \mathrm{μs}\left({\color{gray}1.20 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$25.6 \mathrm{ms} \pm 215 \mathrm{μs}\left({\color{gray}-4.260 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$19.7 \mathrm{ms} \pm 171 \mathrm{μs}\left({\color{gray}-3.918 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$19.6 \mathrm{ms} \pm 118 \mathrm{μs}\left({\color{gray}-3.514 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$19.9 \mathrm{ms} \pm 146 \mathrm{μs}\left({\color{lightgreen}-5.875 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$20.4 \mathrm{ms} \pm 126 \mathrm{μs}\left({\color{gray}-2.816 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$26.8 \mathrm{ms} \pm 220 \mathrm{μs}\left({\color{gray}-2.464 \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 $$36.7 \mathrm{ms} \pm 388 \mathrm{μs}\left({\color{gray}1.42 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$34.9 \mathrm{ms} \pm 342 \mathrm{μs}\left({\color{gray}-2.113 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$35.6 \mathrm{ms} \pm 322 \mathrm{μs}\left({\color{gray}2.47 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$36.0 \mathrm{ms} \pm 435 \mathrm{μs}\left({\color{gray}1.02 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$35.0 \mathrm{ms} \pm 330 \mathrm{μs}\left({\color{gray}0.642 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$36.7 \mathrm{ms} \pm 323 \mathrm{μs}\left({\color{gray}3.04 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$37.2 \mathrm{ms} \pm 330 \mathrm{μs}\left({\color{gray}1.88 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$36.1 \mathrm{ms} \pm 325 \mathrm{μs}\left({\color{gray}-0.451 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$36.4 \mathrm{ms} \pm 377 \mathrm{μs}\left({\color{gray}1.93 \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.76 \mathrm{ms} \pm 72.5 \mathrm{μs}\left({\color{gray}0.503 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$94.9 \mathrm{ms} \pm 647 \mathrm{μs}\left({\color{gray}1.42 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$153 \mathrm{ms} \pm 728 \mathrm{μs}\left({\color{gray}1.69 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$104 \mathrm{ms} \pm 674 \mathrm{μs}\left({\color{gray}2.54 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$116 \mathrm{ms} \pm 676 \mathrm{μs}\left({\color{gray}2.25 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$126 \mathrm{ms} \pm 790 \mathrm{μs}\left({\color{red}5.13 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$131 \mathrm{ms} \pm 801 \mathrm{μs}\left({\color{gray}2.11 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$105 \mathrm{ms} \pm 448 \mathrm{μs}\left({\color{gray}-1.166 \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 $$136 \mathrm{ms} \pm 655 \mathrm{μs}\left({\color{gray}-1.776 \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 $$113 \mathrm{ms} \pm 561 \mathrm{μs}\left({\color{gray}-0.541 \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 $$123 \mathrm{ms} \pm 623 \mathrm{μs}\left({\color{gray}-0.170 \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 $$124 \mathrm{ms} \pm 786 \mathrm{μs}\left({\color{gray}-0.119 \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 $$124 \mathrm{ms} \pm 700 \mathrm{μs}\left({\color{gray}-0.958 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$175 \mathrm{ms} \pm 1.06 \mathrm{ms}\left({\color{gray}-4.778 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$140 \mathrm{ms} \pm 648 \mathrm{μs}\left({\color{lightgreen}-28.117 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$40.8 \mathrm{ms} \pm 205 \mathrm{μs}\left({\color{gray}-3.385 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$539 \mathrm{ms} \pm 1.37 \mathrm{ms}\left({\color{lightgreen}-8.000 \mathrm{\%}}\right) $$ Flame Graph

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 > hash* Affects HASH (a `hash-*` app) area/apps > hash-api Affects the HASH API (app) area/apps area/deps Relates to third-party dependencies (area) area/libs Relates to first-party libraries/crates/packages (area) area/tests > integration New or updated integration tests area/tests > playwright New or updated Playwright tests area/tests New or updated tests 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.

4 participants