Skip to content

BE-853: Add the initial problematic crate - #9683

Merged
TimDiekmann merged 6 commits into
mainfrom
t/be-853-add-the-initial-problematic-crate
Sep 16, 2026
Merged

TimDiekmann merged 6 commits into
mainfrom
t/be-853-add-the-initial-problematic-crate

Conversation

@TimDiekmann

@TimDiekmann TimDiekmann commented Sep 11, 2026

Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

Add problematic as the shared Rust data model for HTTP Problem Details in the public Graph API. Applications can define reusable problem metadata and serialize individual occurrences with typed extension members. Invalid extension shapes and collisions with standard member names return a Serde error.

🔗 Related links

🚫 Blocked by

No prerequisites.

🔍 What does this change?

  • Add public ProblemType metadata, ProblemDetails<'a, E>, and NoExtensions. Re-export http::StatusCode for problem definitions.
  • Use Cow for problem strings. Deserialization borrows unescaped strings from string or byte-slice input and owns strings when borrowing is unavailable.
  • Flatten extension members into the document. The serializer rejects non-object extensions and top-level type, title, status, detail, or instance members. These names remain valid in nested objects. The object check also rejects serde_json::Number when arbitrary_precision is enabled.
  • Provide independent, optional serde and schemars features, with no default features. Generated schemas include field descriptions, examples, URI-reference annotations, and the about:blank default for an omitted type.
  • Organize the crate under libs/problematic/rust with integration tests, JSON snapshot files, licenses, Rustdoc, and Cargo/Turborepo configuration. Enable http/std in the workspace dependency and remove redundant per-crate declarations.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • modifies a Cargo-publishable library, but it is not yet ready to publish

📜 Does this require a change to the docs?

The changes in this PR:

  • require changes to docs which are made as part of this PR

🕸️ 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

The crate uses the existing lint:clippy and test:unit tasks, with generated workspace wiring and task-dependency documentation.

⚠️ Known issues

The crate is an initial draft at version 0.0.0 and is not ready for publication.

🐾 Next steps

Implement HTTP responses, handler and middleware integration, and OpenAPI registration under BE-353.

🛡 What tests cover this?

With both features enabled, 29 integration tests cover typed extension roundtrips, borrowed and owned strings, omitted and invalid fields, extension validation, map-key serialization, and error propagation. The tests enable serde_json/arbitrary_precision to exercise its number representation, including numbers inside valid extension objects. JSON snapshots cover the base schema and a schema with typed extensions; a separate test checks the required members for serialization and deserialization. A doc-test covers static problem metadata.

❓ How to test this?

cargo check --package problematic --no-default-features
cargo nextest run --package problematic --features serde
cargo nextest run --package problematic --features schemars
cargo nextest run --package problematic --all-features
cargo test --package problematic --all-features --doc
cargo clippy --package problematic --all-features --all-targets --no-deps
cargo doc --package problematic --all-features --no-deps

📹 Demo

The generated schemas are available as .snap.json files under libs/problematic/rust/tests/snapshots.

@vercel

vercel Bot commented Sep 11, 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 16, 2026 10:10am UTC
hashdotdesign-tokens Ready Ready Preview Sep 16, 2026 10:10am UTC
petrinaut Ready Ready Preview Sep 16, 2026 10:10am UTC
petrinaut-docs Ready Ready Preview Sep 16, 2026 10:10am 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) area/tests New or updated tests type/legal Owned by the @legal team labels Sep 11, 2026
@TimDiekmann TimDiekmann self-assigned this Sep 11, 2026
@github-advanced-security

Copy link
Copy Markdown
Contributor

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.05221% with 92 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.89%. Comparing base (fb728e4) to head (adf0444).
⚠️ Report is 70 commits behind head on main.

Files with missing lines Patch % Lines
...bs/problematic/rust/src/serde/serialization/key.rs 27.27% 72 Missing ⚠️
...bs/problematic/rust/src/serde/serialization/mod.rs 85.91% 20 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9683      +/-   ##
==========================================
- Coverage   65.90%   65.89%   -0.01%     
==========================================
  Files        1887     1891       +4     
  Lines      198443   198692     +249     
  Branches     8248     8249       +1     
==========================================
+ Hits       130774   130932     +158     
- Misses      66139    66230      +91     
  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.24% <ø> (+0.01%) ⬆️
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% <ø> (ø)
rust.problematic 63.05% <63.05%> (?)

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

codspeed Bot commented Sep 11, 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 t/be-853-add-the-initial-problematic-crate (5727eeb) with main (5af427b)1

Open in CodSpeed

Footnotes

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

vilkinsons
vilkinsons previously approved these changes Sep 11, 2026
@TimDiekmann
TimDiekmann marked this pull request as ready for review September 16, 2026 09:55
Copilot AI balanced review requested due to automatic review settings September 16, 2026 09:55
@TimDiekmann
TimDiekmann requested review from a team as code owners September 16, 2026 09:55
@cursor

cursor Bot commented Sep 16, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Adds a new standalone library and minor workspace http feature consolidation; no production API error paths are wired up in this PR.

Overview
Introduces the new problematic workspace crate as the shared Rust model for RFC 9457 HTTP Problem Details, aimed at the public Graph API error model.

The crate exposes ProblemType for reusable metadata and ProblemDetails<'a, E> for individual occurrences with typed, flattened extension members, plus NoExtensions and a re-export of http::StatusCode. Optional serde and schemars features (none on by default) add JSON round-trips—with Cow borrowing where possible—and JSON Schema generation with field docs and defaults such as about:blank for omitted type. Extension serialization is guarded: extensions must be objects, cannot use top-level reserved names (type, title, status, detail, instance), and invalid shapes fail at serialize time.

Workspace wiring registers libs/problematic/rust, adds a problematic path dependency, enables http/std once at the workspace level (dropping duplicate features = ["std"] on hash-graph-authentication and hash-middleware), and includes Turborepo/@rust/problematic task metadata. The change is library-only—no handler or middleware integration yet—with broad integration tests and schema snapshots.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@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 $$25.7 \mathrm{ms} \pm 215 \mathrm{μs}\left({\color{gray}-3.367 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.48 \mathrm{ms} \pm 25.2 \mathrm{μs}\left({\color{gray}1.96 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1002 $$12.3 \mathrm{ms} \pm 106 \mathrm{μs}\left({\color{lightgreen}-10.490 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$43.8 \mathrm{ms} \pm 307 \mathrm{μs}\left({\color{gray}0.984 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$14.7 \mathrm{ms} \pm 114 \mathrm{μs}\left({\color{gray}-0.466 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1527 $$24.6 \mathrm{ms} \pm 227 \mathrm{μs}\left({\color{gray}-3.191 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$26.5 \mathrm{ms} \pm 177 \mathrm{μs}\left({\color{lightgreen}-7.042 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.72 \mathrm{ms} \pm 21.1 \mathrm{μs}\left({\color{gray}-0.548 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$13.2 \mathrm{ms} \pm 92.9 \mathrm{μs}\left({\color{lightgreen}-14.222 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.77 \mathrm{ms} \pm 25.3 \mathrm{μs}\left({\color{gray}1.31 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.98 \mathrm{ms} \pm 15.5 \mathrm{μs}\left({\color{gray}0.375 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 52 $$3.36 \mathrm{ms} \pm 22.8 \mathrm{μs}\left({\color{gray}1.85 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.12 \mathrm{ms} \pm 34.5 \mathrm{μs}\left({\color{gray}0.343 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.58 \mathrm{ms} \pm 19.1 \mathrm{μs}\left({\color{gray}0.302 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 108 $$4.16 \mathrm{ms} \pm 34.9 \mathrm{μs}\left({\color{gray}-3.189 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.44 \mathrm{ms} \pm 33.1 \mathrm{μs}\left({\color{gray}3.05 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.45 \mathrm{ms} \pm 17.0 \mathrm{μs}\left({\color{gray}1.55 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.10 \mathrm{ms} \pm 25.8 \mathrm{μs}\left({\color{gray}1.82 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.74 \mathrm{ms} \pm 23.8 \mathrm{μs}\left({\color{gray}2.52 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.65 \mathrm{ms} \pm 14.2 \mathrm{μs}\left({\color{gray}-1.443 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 2 $$2.80 \mathrm{ms} \pm 11.6 \mathrm{μs}\left({\color{gray}1.39 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$3.03 \mathrm{ms} \pm 17.6 \mathrm{μs}\left({\color{gray}-1.029 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.83 \mathrm{ms} \pm 13.3 \mathrm{μs}\left({\color{gray}-0.781 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.13 \mathrm{ms} \pm 17.7 \mathrm{μs}\left({\color{gray}-1.000 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.17 \mathrm{ms} \pm 19.1 \mathrm{μs}\left({\color{gray}3.43 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.89 \mathrm{ms} \pm 25.7 \mathrm{μs}\left({\color{gray}3.18 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 26 $$3.03 \mathrm{ms} \pm 18.8 \mathrm{μs}\left({\color{gray}1.97 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.54 \mathrm{ms} \pm 22.9 \mathrm{μs}\left({\color{gray}-1.237 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.10 \mathrm{ms} \pm 16.7 \mathrm{μs}\left({\color{gray}1.05 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 27 $$3.42 \mathrm{ms} \pm 26.6 \mathrm{μs}\left({\color{gray}2.84 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.41 \mathrm{ms} \pm 19.0 \mathrm{μs}\left({\color{gray}-0.461 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.15 \mathrm{ms} \pm 18.1 \mathrm{μs}\left({\color{gray}2.30 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.40 \mathrm{ms} \pm 27.5 \mathrm{μs}\left({\color{gray}3.25 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$32.2 \mathrm{ms} \pm 259 \mathrm{μs}\left({\color{gray}-0.977 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$68.9 \mathrm{ms} \pm 361 \mathrm{μs}\left({\color{gray}-3.338 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$34.9 \mathrm{ms} \pm 205 \mathrm{μs}\left({\color{lightgreen}-6.284 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$38.2 \mathrm{ms} \pm 243 \mathrm{μs}\left({\color{gray}-2.923 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$41.0 \mathrm{ms} \pm 240 \mathrm{μs}\left({\color{gray}-3.693 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$32.5 \mathrm{ms} \pm 190 \mathrm{μs}\left({\color{gray}-3.201 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$393 \mathrm{ms} \pm 1.16 \mathrm{ms}\left({\color{gray}-3.772 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$85.8 \mathrm{ms} \pm 618 \mathrm{μs}\left({\color{lightgreen}-7.546 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$71.6 \mathrm{ms} \pm 478 \mathrm{μs}\left({\color{gray}0.077 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$300 \mathrm{ms} \pm 1.27 \mathrm{ms}\left({\color{red}8.67 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$10.5 \mathrm{ms} \pm 128 \mathrm{μs}\left({\color{gray}-2.144 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$10.4 \mathrm{ms} \pm 53.6 \mathrm{μs}\left({\color{gray}-2.281 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$10.4 \mathrm{ms} \pm 63.5 \mathrm{μs}\left({\color{gray}-1.956 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$10.3 \mathrm{ms} \pm 69.8 \mathrm{μs}\left({\color{gray}-2.840 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$10.4 \mathrm{ms} \pm 63.0 \mathrm{μs}\left({\color{gray}-0.841 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$10.2 \mathrm{ms} \pm 76.0 \mathrm{μs}\left({\color{gray}-1.039 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$10.2 \mathrm{ms} \pm 78.2 \mathrm{μs}\left({\color{gray}-1.110 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$10.3 \mathrm{ms} \pm 85.5 \mathrm{μs}\left({\color{gray}-2.075 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$10.5 \mathrm{ms} \pm 72.2 \mathrm{μs}\left({\color{gray}0.011 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$10.7 \mathrm{ms} \pm 78.4 \mathrm{μs}\left({\color{gray}0.064 \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.7 \mathrm{ms} \pm 62.8 \mathrm{μs}\left({\color{gray}-1.327 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$10.9 \mathrm{ms} \pm 91.4 \mathrm{μs}\left({\color{gray}-2.361 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$10.7 \mathrm{ms} \pm 64.5 \mathrm{μs}\left({\color{gray}-4.311 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$10.5 \mathrm{ms} \pm 66.6 \mathrm{μs}\left({\color{lightgreen}-5.682 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$10.7 \mathrm{ms} \pm 64.2 \mathrm{μs}\left({\color{gray}-3.687 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$10.7 \mathrm{ms} \pm 97.2 \mathrm{μs}\left({\color{gray}-3.661 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$10.9 \mathrm{ms} \pm 102 \mathrm{μs}\left({\color{gray}-1.953 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$10.8 \mathrm{ms} \pm 84.2 \mathrm{μs}\left({\color{gray}-1.440 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$10.8 \mathrm{ms} \pm 81.1 \mathrm{μs}\left({\color{gray}-4.434 \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 $$7.87 \mathrm{ms} \pm 59.4 \mathrm{μs}\left({\color{gray}-3.851 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$57.7 \mathrm{ms} \pm 481 \mathrm{μs}\left({\color{lightgreen}-6.171 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$108 \mathrm{ms} \pm 961 \mathrm{μs}\left({\color{gray}-2.446 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$64.2 \mathrm{ms} \pm 462 \mathrm{μs}\left({\color{gray}-1.854 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$73.4 \mathrm{ms} \pm 888 \mathrm{μs}\left({\color{gray}-1.006 \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.9 \mathrm{ms} \pm 542 \mathrm{μs}\left({\color{gray}-3.847 \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.5 \mathrm{ms} \pm 571 \mathrm{μs}\left({\color{lightgreen}-6.052 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$45.3 \mathrm{ms} \pm 318 \mathrm{μs}\left({\color{lightgreen}-7.204 \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 $$73.7 \mathrm{ms} \pm 431 \mathrm{μs}\left({\color{gray}-2.691 \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 $$52.1 \mathrm{ms} \pm 358 \mathrm{μs}\left({\color{lightgreen}-6.061 \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 $$60.8 \mathrm{ms} \pm 474 \mathrm{μs}\left({\color{lightgreen}-5.611 \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 $$64.5 \mathrm{ms} \pm 531 \mathrm{μs}\left({\color{gray}-0.603 \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 $$62.2 \mathrm{ms} \pm 460 \mathrm{μs}\left({\color{lightgreen}-6.135 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$116 \mathrm{ms} \pm 519 \mathrm{μs}\left({\color{gray}2.53 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$127 \mathrm{ms} \pm 510 \mathrm{μs}\left({\color{gray}2.71 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$22.5 \mathrm{ms} \pm 168 \mathrm{μs}\left({\color{gray}0.074 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$528 \mathrm{ms} \pm 898 \mathrm{μs}\left({\color{gray}-2.426 \mathrm{\%}}\right) $$ Flame Graph

@TimDiekmann
TimDiekmann added this pull request to stack #9757 September 16, 2026 11:47
@TimDiekmann
TimDiekmann requested a review from a team September 16, 2026 12:31
Comment thread libs/problematic/rust/src/problem_details.rs
@TimDiekmann
TimDiekmann added this pull request to the merge queue Sep 16, 2026
Merged via the queue into main with commit e7fbdc1 Sep 16, 2026
229 of 230 checks passed
@TimDiekmann
TimDiekmann deleted the t/be-853-add-the-initial-problematic-crate branch September 16, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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) area/tests New or updated tests type/eng > backend Owned by the @backend team type/legal Owned by the @legal team

Development

Successfully merging this pull request may close these issues.

5 participants