Skip to content

SRE-1010: Move Brunch architecture checks out of core unit tests - #9625

Merged
lunelson merged 10 commits into
mainfrom
ln/sre-1010-move-brunch-checks
Sep 10, 2026
Merged

SRE-1010: Move Brunch architecture checks out of core unit tests#9625
lunelson merged 10 commits into
mainfrom
ln/sre-1010-move-brunch-checks

Conversation

@lunelson

@lunelson lunelson commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

  • ln/sre-1010-move-brunch-checks 👈
  • main

Stack generated by Git Town

🌟 What is the purpose of this PR?

Remove Brunch architecture source walkers from unit tests and put each surviving contract at its native enforcement point. Authored import boundaries remain in package-local Oxlint configuration, manifest boundaries remain in Yarn constraints, and behavioral tests prove emitted behavior.

This removes the reverse libs → apps task relationship introduced by the SRE-1007 hotfix without replacing it with another cross-workspace scanner. Core and app unit-test tasks now own only files and behavior inside their packages.

🔗 Related links

🚫 Blocked by

None.

🔍 What does this change?

  • Deletes family-wide Vitest checks that scanned source files and mirrored package metadata, import rules, schema allowlists, filenames, task scripts, and reviewer-maintained inventories.
  • Removes the temporary architecture-test workspace and the subsequent repo-chores checker/CI task; no parallel static-policy surface remains.
  • Deletes the app-local source walker. Agent registration remains covered by the emitted-bundle test, now using ChatAgent.agentName directly instead of rediscovering agents with a filesystem regex.
  • Keeps existing package-local Oxlint import restrictions and the Yarn transport-boundary constraint as the native static enforcement.
  • Moves the Linear graph utility into core, where its tests use static imports and never skip based on checkout shape.
  • Deletes the open-gaps stderr ledger and its shape tests, which tracked review state through Vitest rather than proving behavior.
  • Removes app, sibling-package, and context-root inputs from core unit tests and removes the corresponding prune exceptions.
🏗️ Agent notes

Inductive diagnosis

The review comments were a sample of one larger defect pattern: static policy had accumulated as filesystem-scanning unit tests. Those tests duplicated source code, package manifests, linter rules, file layout, and review decisions, then required custom ignore behavior and cross-workspace task inputs to remain runnable.

The rework applies one ownership rule:

authored import policy → package-local Oxlint
manifest policy → Yarn constraints
emitted/runtime behavior → behavioral tests
source or review mirrors with no independent oracle → delete

Mission contract

Imperative. Remove static-policy source walkers from Brunch unit tests and let existing enforcement mechanisms own the contracts they can actually prove.

Proof.

  1. Core has no app, sibling-package, or context-root unit-test inputs and a core prune adds no downstream Brunch workspaces.
  2. Package-local Oxlint and Yarn constraints pass; their existing policies remain unchanged.
  3. The app build and emitted-bundle test prove the chat agent is registered under its source-of-truth identity.
  4. The Linear graph tests use a normal static import from core and run unconditionally.
  5. Searches find no architecture checker workspace, repo-chores checker, custom source walker, open-gap test ledger, or skip-on-file-existence guard.

Constraints.

  • Do not duplicate Oxlint or Yarn policy in tests or repo-chores.
  • Keep behavioral tests that can fail while source and manifests remain unchanged.
  • Do not replace hard-coded mirrors with a new checker abstraction.

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:

  • affected the execution graph, and the turbo.json's have been updated to reflect this

⚠️ Known issues

None known.

🐾 Next steps

The reviewer identified similar pre-existing tautological assertions in core naming and authored-skill tests. They are non-blocking for SRE-1010 and are intentionally left for a separate product-test cleanup.

🛡 What tests cover this?

  • @hashintel/brunch-agent: 10 files and 94 tests; build, lint, and typecheck pass.
  • @apps/brunch-agent: 23 files and 166 tests; build, lint, and typecheck pass.
  • Emitted-bundle suite: 10 behavioral assertions pass.
  • Linear graph suite: 10 tests pass through a static core import.
  • Prune repository fixtures: 8 tests pass.
  • Yarn constraints, immutable install, task-dependency generation, and repository formatting pass.

❓ How to test this?

  1. Run yarn install --immutable && yarn constraints.
  2. Run yarn workspace @hashintel/brunch-agent build, lint:tsc, lint:eslint, and test:unit.
  3. Run yarn workspace @apps/brunch-agent build, lint:tsc, lint:eslint, and test:unit.
  4. Run python3 .github/actions/prune-repository/prune_test.py.
  5. Inspect yarn exec turbo run test:unit --filter @hashintel/brunch-agent --dry=json and confirm no app, sibling-package, or context-root Brunch inputs.

📹 Demo

Not applicable — this changes static-policy ownership and CI task selection only.

Copilot AI balanced review requested due to automatic review settings September 9, 2026 11:39
@lunelson
lunelson requested a review from a team as a code owner September 9, 2026 11:39
@vercel

vercel Bot commented Sep 9, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
hash Ready Ready Preview Sep 10, 2026 6:12am UTC
hashdotdesign-tokens Ready Ready Preview Sep 10, 2026 6:12am UTC
petrinaut Ready Ready Preview Sep 10, 2026 6:12am UTC
petrinaut-docs Ready Ready Preview Sep 10, 2026 6:12am UTC

Request Review

@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 area/tests New or updated tests area/apps labels Sep 9, 2026
@cursor

cursor Bot commented Sep 9, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Large deletion of static architecture tests shifts boundary enforcement to lint/constraints; misconfiguration could slip through until lint or behavioral suites fail. Turbo and prune graph changes affect CI closure for Brunch jobs.

Overview
Moves Brunch architecture enforcement out of Vitest source walkers and back to Oxlint, Yarn constraints, and behavioral tests, fixing the reverse libs → apps Turbo/prune edge from the SRE-1007 hotfix.

The app deletes the entire test/architecture/* workspace scanner (dependency direction, Valibot bans, substrate inventories, 'use agent' rules). Agent registration stays on the emitted-bundle test, now asserting ChatAgent.agentName instead of regex-walking src/agents. Core drops the open-gaps stderr ledger and context-root skip helpers; relocates linear-project-graph into packages/core/src so unit tests use static imports and always run.

Turbo/task graphs narrow @hashintel/brunch-agent and @apps/brunch-agent test:unit inputs (docs/evaluations paths only where product tests need them), remove dafny/gherkin plugin builds from app unit deps, and drop the core-wide context-root input glob. CI prune no longer pulls the app/plugins when only core is requested and trims REQUESTED_PATHS to lint config plus the app’s real evaluation/doc fixtures; prune_test.py matches that contract.

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

@lunelson lunelson changed the title ln/sre 1010 move brunch checks SRE-1010: Move Brunch architecture checks out of core unit tests Sep 9, 2026

@TimDiekmann TimDiekmann left a comment

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.

Could you add a description and a title to the PR please?

TimDiekmann
TimDiekmann previously approved these changes Sep 9, 2026

@TimDiekmann TimDiekmann left a comment

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.

Infra ✅

Comment thread apps/brunch-agent/test/architecture/app-workspace.ts Fixed

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.

🟡 Changes recommended

Critical test skipping and an incomplete CI dependency guard must be addressed before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Moves Brunch architecture checks into a dedicated test workspace while retaining app-specific checks locally.

Changes:

  • Adds @tests/brunch-agent-architecture.
  • Narrows app/core test inputs and prune exceptions.
  • Relocates architecture helpers and regression tests.
  • Contains unresolved critical and moderate CI coverage issues.
File summaries
File Description
yarn.lock Registers the new test workspace.
tests/brunch-agent-architecture/turbo.json Configures checker tasks; its dependency-completeness guard misses undeclared workspaces in affected CI.
tests/brunch-agent-architecture/tsconfig.json Configures TypeScript checking.
tests/brunch-agent-architecture/test/architecture.test.ts Hosts family-wide architecture assertions.
tests/brunch-agent-architecture/test/architecture-workspace.ts Provides workspace introspection helpers.
tests/brunch-agent-architecture/test/architecture-workspace.test.ts Tests file partitioning.
tests/brunch-agent-architecture/package.json Defines the architecture-test workspace.
tests/brunch-agent-architecture/docs/task-dependencies.json Records task dependencies.
tests/brunch-agent-architecture/.oxlintrc.json Configures Oxlint.
libs/@hashintel/brunch-agent/packages/core/turbo.json Narrows core test inputs.
libs/@hashintel/brunch-agent/MISSION.md Documents architecture-check ownership.
apps/brunch-agent/turbo.json Restricts app test inputs.
apps/brunch-agent/test/architecture/workspace.test.ts Removes former combined helper tests.
apps/brunch-agent/test/architecture/boundaries.test.ts Removes the former suite entry point.
apps/brunch-agent/test/architecture/app-workspace.ts Adds app-local scanning helpers.
apps/brunch-agent/test/architecture/app-workspace.test.ts Tests agent-module detection.
apps/brunch-agent/test/architecture/app-boundaries.test.ts Retains app-specific registration checks.
apps/brunch-agent/docs/task-dependencies.json Updates documented task dependencies.
.github/actions/prune-repository/prune.py Narrows prune exceptions, but causes the core Linear graph suite to be skipped.
.github/actions/prune-repository/prune_test.py Updates prune behavior tests.
Review details
  • Files reviewed: 19/20 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/actions/prune-repository/prune.py Outdated
Comment thread tests/brunch-agent-architecture/turbo.json Outdated
@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.90%. Comparing base (d47c3dd) to head (84ffdfe).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9625   +/-   ##
=======================================
  Coverage   65.89%   65.90%           
=======================================
  Files        1887     1887           
  Lines      198443   198443           
  Branches     8248     8248           
=======================================
+ Hits       130773   130776    +3     
+ Misses      66140    66137    -3     
  Partials     1530     1530           
Flag Coverage Δ
apps.hash-ai-worker-ts 1.99% <ø> (ø)
apps.hash-api 15.35% <ø> (ø)
apps.hash-graph 12.54% <ø> (ø)
blockprotocol.type-system 38.15% <ø> (ø)
local.claude-hooks 0.00% <ø> (ø)
local.harpc-client 51.49% <ø> (ø)
local.hash-backend-utils 3.27% <ø> (ø)
local.hash-graph-sdk 10.02% <ø> (ø)
local.hash-isomorphic-utils 12.22% <ø> (ø)
rust.antsi 2.36% <ø> (ø)
rust.error-stack 90.81% <ø> (ø)
rust.harpc-codec 84.70% <ø> (ø)
rust.harpc-net 96.26% <ø> (+0.04%) ⬆️
rust.harpc-tower 67.03% <ø> (ø)
rust.harpc-types 0.00% <ø> (ø)
rust.harpc-wire-protocol 92.23% <ø> (ø)
rust.hash-codec 72.76% <ø> (ø)
rust.hash-config 81.14% <ø> (ø)
rust.hash-graph-api 19.71% <ø> (ø)
rust.hash-graph-atlas 80.36% <ø> (ø)
rust.hash-graph-authentication 96.02% <ø> (ø)
rust.hash-graph-authorization 63.14% <ø> (ø)
rust.hash-graph-embeddings 91.88% <ø> (ø)
rust.hash-graph-postgres-store 32.15% <ø> (ø)
rust.hash-graph-store 48.41% <ø> (ø)
rust.hash-graph-temporal-versioning 50.18% <ø> (ø)
rust.hash-graph-types 0.00% <ø> (ø)
rust.hash-graph-validation 84.71% <ø> (ø)
rust.hash-middleware 90.92% <ø> (ø)
rust.hashql-ast 89.63% <ø> (ø)
rust.hashql-compiletest 28.39% <ø> (ø)
rust.hashql-core 78.92% <ø> (ø)
rust.hashql-diagnostics 72.51% <ø> (ø)
rust.hashql-eval 79.82% <ø> (ø)
rust.hashql-hir 89.09% <ø> (ø)
rust.hashql-mir 87.92% <ø> (ø)
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.

@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 32cb88c. Configure here.

Comment thread .github/actions/prune-repository/prune.py Outdated
@codspeed-hq

codspeed-hq Bot commented Sep 9, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 6 benchmarks measured no execution time

Nothing ran under measurement, usually because the compiler removed the code under test. These results are not comparable, so they count as unchanged.

Preventing compiler optimizations

✅ 98 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
⚠️ as_constant < 1 ns < 1 ns N/A
⚠️ constant_equal < 1 ns < 1 ns N/A
⚠️ constant_not_equal < 1 ns < 1 ns N/A
⚠️ access < 1 ns < 1 ns N/A
⚠️ runtime_equal < 1 ns < 1 ns N/A
⚠️ runtime_not_equal < 1 ns < 1 ns N/A

Comparing ln/sre-1010-move-brunch-checks (84ffdfe) with main (116ce0f)1

Open in CodSpeed

Footnotes

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

lunelson and others added 10 commits September 10, 2026 07:53
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@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.7 \mathrm{ms} \pm 259 \mathrm{μs}\left({\color{gray}1.40 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.44 \mathrm{ms} \pm 22.0 \mathrm{μs}\left({\color{gray}-0.588 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1002 $$12.4 \mathrm{ms} \pm 121 \mathrm{μs}\left({\color{gray}-0.864 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$43.6 \mathrm{ms} \pm 418 \mathrm{μs}\left({\color{gray}0.369 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$14.1 \mathrm{ms} \pm 137 \mathrm{μs}\left({\color{gray}-0.483 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1527 $$24.1 \mathrm{ms} \pm 272 \mathrm{μs}\left({\color{gray}-0.052 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$28.4 \mathrm{ms} \pm 217 \mathrm{μs}\left({\color{gray}-0.450 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.71 \mathrm{ms} \pm 21.7 \mathrm{μs}\left({\color{gray}-2.387 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$13.5 \mathrm{ms} \pm 141 \mathrm{μs}\left({\color{gray}0.825 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.85 \mathrm{ms} \pm 27.9 \mathrm{μs}\left({\color{gray}0.149 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.98 \mathrm{ms} \pm 15.2 \mathrm{μs}\left({\color{gray}-0.272 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 52 $$3.36 \mathrm{ms} \pm 19.7 \mathrm{μs}\left({\color{gray}-0.616 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.27 \mathrm{ms} \pm 46.0 \mathrm{μs}\left({\color{gray}0.245 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.61 \mathrm{ms} \pm 31.9 \mathrm{μs}\left({\color{gray}1.70 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 108 $$4.21 \mathrm{ms} \pm 29.6 \mathrm{μs}\left({\color{gray}0.600 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.54 \mathrm{ms} \pm 36.6 \mathrm{μs}\left({\color{gray}0.265 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.45 \mathrm{ms} \pm 24.1 \mathrm{μs}\left({\color{gray}0.102 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.17 \mathrm{ms} \pm 29.1 \mathrm{μs}\left({\color{gray}1.26 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.75 \mathrm{ms} \pm 16.2 \mathrm{μs}\left({\color{gray}-0.196 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.71 \mathrm{ms} \pm 19.7 \mathrm{μs}\left({\color{gray}0.453 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 2 $$2.80 \mathrm{ms} \pm 17.8 \mathrm{μs}\left({\color{gray}-1.252 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$3.06 \mathrm{ms} \pm 19.8 \mathrm{μs}\left({\color{gray}0.046 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.88 \mathrm{ms} \pm 16.3 \mathrm{μs}\left({\color{gray}-0.257 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.16 \mathrm{ms} \pm 18.9 \mathrm{μs}\left({\color{gray}0.361 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.12 \mathrm{ms} \pm 20.5 \mathrm{μs}\left({\color{gray}-0.778 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.77 \mathrm{ms} \pm 14.5 \mathrm{μs}\left({\color{gray}-1.461 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 26 $$2.97 \mathrm{ms} \pm 17.3 \mathrm{μs}\left({\color{gray}-0.241 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.57 \mathrm{ms} \pm 28.9 \mathrm{μs}\left({\color{gray}0.204 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.05 \mathrm{ms} \pm 18.2 \mathrm{μs}\left({\color{gray}-1.533 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 27 $$3.34 \mathrm{ms} \pm 29.2 \mathrm{μs}\left({\color{gray}0.198 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.47 \mathrm{ms} \pm 25.4 \mathrm{μs}\left({\color{gray}-0.011 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.08 \mathrm{ms} \pm 24.3 \mathrm{μs}\left({\color{gray}0.637 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.41 \mathrm{ms} \pm 26.5 \mathrm{μs}\left({\color{gray}1.33 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$31.8 \mathrm{ms} \pm 186 \mathrm{μs}\left({\color{gray}-0.291 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$70.8 \mathrm{ms} \pm 497 \mathrm{μs}\left({\color{gray}0.012 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$35.0 \mathrm{ms} \pm 220 \mathrm{μs}\left({\color{gray}-0.577 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$38.8 \mathrm{ms} \pm 238 \mathrm{μs}\left({\color{gray}-0.555 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$41.0 \mathrm{ms} \pm 256 \mathrm{μs}\left({\color{gray}-1.008 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$33.4 \mathrm{ms} \pm 176 \mathrm{μs}\left({\color{gray}-0.169 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$422 \mathrm{ms} \pm 1.10 \mathrm{ms}\left({\color{gray}0.506 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$89.4 \mathrm{ms} \pm 549 \mathrm{μs}\left({\color{gray}-0.154 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$79.3 \mathrm{ms} \pm 456 \mathrm{μs}\left({\color{gray}0.739 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$274 \mathrm{ms} \pm 1.21 \mathrm{ms}\left({\color{lightgreen}-8.305 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$10.7 \mathrm{ms} \pm 90.2 \mathrm{μs}\left({\color{gray}4.13 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$10.9 \mathrm{ms} \pm 73.3 \mathrm{μs}\left({\color{gray}3.29 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$10.8 \mathrm{ms} \pm 70.7 \mathrm{μs}\left({\color{gray}1.53 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$10.8 \mathrm{ms} \pm 84.8 \mathrm{μs}\left({\color{gray}3.50 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$10.5 \mathrm{ms} \pm 65.3 \mathrm{μs}\left({\color{gray}-0.963 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$10.4 \mathrm{ms} \pm 71.6 \mathrm{μs}\left({\color{gray}-4.810 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$10.4 \mathrm{ms} \pm 65.7 \mathrm{μs}\left({\color{gray}-3.747 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$10.3 \mathrm{ms} \pm 57.1 \mathrm{μs}\left({\color{gray}-0.724 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$10.4 \mathrm{ms} \pm 64.1 \mathrm{μs}\left({\color{gray}-0.021 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$10.5 \mathrm{ms} \pm 62.0 \mathrm{μs}\left({\color{gray}-1.443 \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 $$10.9 \mathrm{ms} \pm 68.9 \mathrm{μs}\left({\color{gray}0.343 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$10.8 \mathrm{ms} \pm 63.2 \mathrm{μs}\left({\color{gray}-0.208 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$10.8 \mathrm{ms} \pm 71.5 \mathrm{μs}\left({\color{gray}-0.257 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$10.9 \mathrm{ms} \pm 81.7 \mathrm{μs}\left({\color{gray}-1.284 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$11.1 \mathrm{ms} \pm 95.4 \mathrm{μs}\left({\color{gray}0.945 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$10.8 \mathrm{ms} \pm 63.5 \mathrm{μs}\left({\color{gray}0.115 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$10.8 \mathrm{ms} \pm 67.1 \mathrm{μs}\left({\color{gray}-0.362 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$11.0 \mathrm{ms} \pm 95.4 \mathrm{μs}\left({\color{gray}-0.477 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$10.9 \mathrm{ms} \pm 71.0 \mathrm{μs}\left({\color{gray}0.530 \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.02 \mathrm{ms} \pm 56.0 \mathrm{μs}\left({\color{gray}0.139 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$55.9 \mathrm{ms} \pm 487 \mathrm{μs}\left({\color{gray}0.106 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$107 \mathrm{ms} \pm 670 \mathrm{μs}\left({\color{gray}-0.584 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$61.4 \mathrm{ms} \pm 571 \mathrm{μs}\left({\color{gray}-0.156 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$70.9 \mathrm{ms} \pm 628 \mathrm{μs}\left({\color{gray}0.638 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$79.8 \mathrm{ms} \pm 602 \mathrm{μs}\left({\color{gray}0.309 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$85.6 \mathrm{ms} \pm 629 \mathrm{μs}\left({\color{gray}-0.553 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$44.7 \mathrm{ms} \pm 293 \mathrm{μs}\left({\color{gray}-0.054 \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 $$71.8 \mathrm{ms} \pm 343 \mathrm{μs}\left({\color{gray}-1.288 \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 $$50.7 \mathrm{ms} \pm 443 \mathrm{μs}\left({\color{gray}-0.635 \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 $$59.5 \mathrm{ms} \pm 396 \mathrm{μs}\left({\color{gray}0.107 \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 $$61.4 \mathrm{ms} \pm 419 \mathrm{μs}\left({\color{gray}-1.010 \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 $$61.8 \mathrm{ms} \pm 420 \mathrm{μs}\left({\color{gray}0.244 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$112 \mathrm{ms} \pm 729 \mathrm{μs}\left({\color{lightgreen}-5.687 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$123 \mathrm{ms} \pm 766 \mathrm{μs}\left({\color{gray}-4.185 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$22.7 \mathrm{ms} \pm 171 \mathrm{μs}\left({\color{red}13.4 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$515 \mathrm{ms} \pm 1.34 \mathrm{ms}\left({\color{gray}-3.384 \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 area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) area/tests New or updated tests type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

5 participants