Skip to content

FE-1525: Establish the runbook-to-workpiece control and expose the construction gap - #9405

Merged
lunelson merged 22 commits into
mainfrom
ln/fe-1525-headless-runbook-pn
Sep 3, 2026
Merged

FE-1525: Establish the runbook-to-workpiece control and expose the construction gap#9405
lunelson merged 22 commits into
mainfrom
ln/fe-1525-headless-runbook-pn

Conversation

@lunelson

@lunelson lunelson commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

🌟 What is the purpose of this PR?

Brunch could elicit a useful runbook through its production Flue agent, but its construction proof treated parser acceptance as success even when the resulting Petri net was empty. That made the evidence look stronger than the behavior and left reviewers without a trustworthy control for later runbook redesign.

This PR establishes the runbook-to-workpiece control, proves non-empty hermetic construction, and preserves the real-model construction failure as design evidence. Elicitation and workpiece recovery are established; semantic real-model Petri-net construction remains explicitly unproven and moves to successor work.


🔗 Related links

🚫 Blocked by

  • No external blocker. The branch is now based directly on main; required CI and review remain.

🔍 What does this change?

The implementation follows one production throughline from skill activation and interview turns to a recoverable workpiece and bounded construction. The changes below are the concrete review surface.

This branch also intentionally retires the completed issue/PR legibility migration package during documentation weeding. That package is unrelated to FE-1525 behavior, has no live consumer, and remains recoverable from the durable main ancestor f897a699c55c9e41666fe1dbaf2db74fd85a4546; it is not being restored or replaced with a live-tree tombstone here.

  • Mounts one sdcpn-modelling skill on the production ChatAgent, with a concise router and four packaged Markdown resources for elicitation, workpiece structure, PN construction, and checks.
  • Adds a headless createFlueClient → send → wait → history() drive through the built application and recovers the final runbook-ir workpiece from canonical Flue history.
  • Adds a bounded construct-only mode using Petrinaut's canonical mutation schemas and validates a non-empty hermetic net while keeping construction tools absent from ordinary /api/chat conversations.
  • Records two real-model runbook passes, one paid validated-construction attempt, independent workpiece grading, and the schema-bridge failure without laundering the empty parser result into success.
  • Reorganizes the evaluation corpus into legacy, prospective, and runbook-headless evidence and freezes the first elicitation-to-IR oracle.
  • Reparents the complete 15-commit Mission 3 history onto the merged consolidation on main, preserving the merged idempotency, history-projection, build-cache, and CI-pruning fixes.
  • Carries forward the late review observation on FE-1406, FE-1431, FE-1504, FE-1506, FE-1505, FE-1431, FE-1507, FE-1521, FE-1522, FE-1524: Consolidate the Brunch harness mission stack #9463: Brunch test fixtures are now explicit Turbo task dependencies, and the bespoke REQUESTED_DEPENDENCIES prune exception is removed.
  • Registers the three Mission 3 substrate-facing tests in the reviewed hermetic-entry-point inventory.
🏗️ Agent notes

Branch mission

Imperative: Prove that one production Flue ChatAgent can use a structurally typed runbook to conduct or replay an interview, maintain a structured Markdown workpiece, and use it to construct Petri-net JSON Petrinaut accepts. Recover the useful teaching from the slow typed-capture path without restoring that kernel or joining Mission 2's capture ledger.

Throughline: createFlueClient → initial modelling request → ChatAgent activates sdcpn-modelling and reads phase resources → driver send/wait/history across interview turns → recover runbook-ir → construct-from-IR request → read construction/check resources → validated mutation tools or PN output → Petrinaut parse/validate.

Proof: One mounted skill and concise router; packaged resources readable from the built app; universal and SDCPN teaching separated from scenario facts; expert-vocabulary interviewing; recoverable Markdown workpiece with unknowns, assumptions, conflicts, and omissions; construction consuming that workpiece; losses named; no interviewer sweep tool or capture-store write. This proof does not establish a final heading catalogue, typed capture/IR, panel canvas tools, session-as-net, two brains, or an automated repertoire compiler.

Constraints: Use Flue's skill/resource and JS-client paths rather than a custom loader or runner; one agent and one skill; keep elicitation and construction in separate information regions; keep reusable resources at target-formalism level; do not restore closed kinds/slots/fold/completion machinery; do not join the workpiece to the capture store; keep construction tools off ordinary panel conversations; use Petrinaut's canonical validation contracts rather than copied payload types.

Fog-line: Exact heading catalogue; resource split; activation router; workpiece recovery shape; construction-discovered return to elicitation; sufficiency of parseSDCPNFile; universal-versus-SDCPN editorial migration; production packaging; model and latency behavior.

Stop or reorient: Stop if the system prompt absorbs the runbook, another agent/skill/loader/workflow appears without observed pressure, construction vocabulary leaks into ordinary interviewing, scenario facts enter reusable teaching, the workpiece requires transcript rereading, the typed kernel or capture join returns, canvas tools reach the interviewer, or ordinary teaching turns return to minute-scale latency.

Observed proof

  • Proof items 1–5 and 8 are established through the real production agent path.
  • The workpiece names consequential losses and uncertainty, establishing item 7 as an explicitly partial artifact.
  • Hermetic construction packages and executes the canonical six-tool subset, rejects and corrects a zero-weight arc, and parses a non-empty net.
  • Real-model construction remains falsified: nine malformed addType.elements calls were rejected, no net elements were constructed, and the resulting empty file passed parseSDCPNFile only vacuously. Proof item 6 therefore remains open for semantic fidelity.
  • The prospective control contains three paid invocations: one invalid runtime member and two recoverable independently graded workpieces. Valid members tripped no hard gates; omniscient scores span 66.3–80.0/100 and cold utility spans 3.3–3.5/4.

Fog-line answers

  • The first heading tree was sufficient for a construction-ready workpiece; opening overload, not heading insufficiency, was the observed interview smell.
  • Four phase resources worked and kept PN construction material out of ordinary interview framing.
  • sdcpn-modelling plus a six-line router activated reliably in real runs.
  • The last runbook-ir fence in assistant history is a sufficient recovery seam; no new persistence surface was needed.
  • Construction-discovered return to elicitation remains unexercised.
  • parseSDCPNFile is strict enough for file shape but insufficient as sole evidence of semantic construction; non-empty and semantic inspection are required.
  • Provenance tags keep universal and SDCPN teaching legible; no automated migration was earned.
  • Source-relative defineSkill packaging failed from the built app. A bare static SKILL.md import packages the complete directory and works from dist/app.mjs.
  • Ordinary interview turns stayed around 5–23 seconds. Large construct emissions took 162 and 271 seconds; the old minute-scale cost did not return to ordinary teaching turns.

Reparent and CI reconciliation

The 15 Mission 3 commits were replayed onto current main. The only rebase conflicts were in the emitted-bundle assertion and Petrinaut-chat integration test. Resolution retained main's precise route assertions, idempotency/result-signal accounting, and pending-client-tool projection while preserving Mission 3's built-app loader and appTransport capture-history path.

Tim Diekmann's late observation on #9463 is carried forward: @hashintel/brunch-agent#test:unit now declares task dependencies on the app and both plugin builds. Main's task-aware affectedTasks selection and prune-scopes.sh therefore retain these test fixtures through the normal Turbo graph. The bespoke requested-scope exception and its special-case tests are removed.

FE-1563 remains untouched and is intentionally marked as needing restack until its local work is ready.

Carried flags

  • A shape-preserving provider schema bridge for Petrinaut's nested mutation inputs is Mission 5 work; do not extend the open-object carrier or copy canonical fields into a second schema.
  • Construction-discovered return to elicitation needs a real throughline.
  • Host continuity, typed Petrinaut read/write, capture improvement, and any capture/runbook convergence remain separate successor missions.

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

The affected Brunch workspaces are private.

📜 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

The mission archive, implementation proof, runbook specification, evaluation protocols, evidence, research synthesis, and successor concerns are updated together.

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

  • Real-model semantic PN construction failed on the provider-visible nested schema. The parser accepted the empty resulting document, so parser success alone is not a construction oracle.
  • Construction-discovered return to elicitation was not exercised.
  • The paid construction budget recorded by Mission 3 is spent; there is no further paid rerun in this PR.

🐾 Next steps

  • Mission 4 owns host continuity and the redesign of the runbook/workpiece boundary.
  • Mission 5 owns typed Petrinaut read/write and the provider-schema bridge, including non-empty semantic construction criteria.
  • Mission 6 owns capture improvement. Any join between capture and runbook workpieces must be separately earned.
  • Rebase FE-1563 onto this rewritten branch only after its local work is committed or otherwise safely parked.

🛡 What tests cover this?

  • apps/brunch-agent/test/runbook-headless.test.ts and runbook-headless.integration.ts drive the built application through the packaged skill and headless client.
  • apps/brunch-agent/test/petrinaut-construction-tools.test.ts and headless-petrinaut-client.test.ts cover canonical mutation validation and client callback behavior.
  • apps/brunch-agent/test/petrinaut-chat.test.ts keeps the ordinary panel path free of construction tools while preserving the merged retry, history, ownership, and capture-sweep proofs.
  • Core architecture tests inventory every reviewed substrate-facing test and enforce package topology.
  • The exact CI-pruned core run passes 18 test files and 198 tests (197 passed, one skipped), with the app and both plugins reached through Turbo task dependencies.

Focused verification passes for @apps/brunch-agent and @hashintel/brunch-agent: build dependencies, unit tests, Oxlint, and TypeScript. The prune-action Python suite passes 5/5 tests.

❓ How to test this?

  1. Run mise exec -- turbo run test:unit lint:eslint lint:tsc --env-mode=loose --filter '@apps/brunch-agent' --filter '@hashintel/brunch-agent' from the HASH root.
  2. Run cd .github/actions/prune-repository && python3 -m unittest prune_test.py.
  3. Run .github/scripts/prune-scopes.sh '@hashintel/brunch-agent' under the repository's mise environment and confirm it includes the app, binding, transport, both plugins, and core.
  4. Inspect the frozen evidence rather than rerunning the paid model calls. For the no-cost production path, apps/brunch-agent/test/runbook-headless.test.ts must activate the packaged skill, read its resources, recover the workpiece, execute validated construction, and parse a non-empty net.

📹 Demo

No new recording accompanies the reparent. The production-path tests and committed run/evaluation artifacts are the durable proof; the paid construction failure is intentionally retained as evidence rather than replayed.

@vercel

vercel Bot commented Aug 28, 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 3, 2026 2:40pm UTC
hashdotdesign-tokens Ready Ready Preview Sep 3, 2026 2:40pm UTC
petrinaut Ready Ready Preview Sep 3, 2026 2:40pm UTC
petrinaut-docs Ready Ready Preview Sep 3, 2026 2:40pm UTC

Request Review

@github-actions github-actions Bot added 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 Aug 28, 2026
Comment thread apps/brunch-agent/src/runbook-artifacts.ts Outdated
Comment thread apps/brunch-agent/src/runbook-artifacts.ts Fixed
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.89%. Comparing base (c16fcb3) to head (174d74a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9405   +/-   ##
=======================================
  Coverage   60.89%   60.89%           
=======================================
  Files        1461     1461           
  Lines      146725   146725           
  Branches     6744     6744           
=======================================
+ Hits        89342    89344    +2     
+ Misses      56265    56263    -2     
  Partials     1118     1118           
Flag Coverage Δ
apps.hash-ai-worker-ts 1.99% <ø> (ø)
apps.hash-api 15.41% <ø> (ø)
apps.hash-graph 13.32% <ø> (ø)
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.23% <ø> (+0.03%) ⬆️
rust.harpc-tower 67.03% <ø> (ø)
rust.harpc-types 0.00% <ø> (ø)
rust.harpc-wire-protocol 92.23% <ø> (ø)
rust.hash-codec 72.76% <ø> (ø)
rust.hash-config 74.74% <ø> (ø)
rust.hash-graph-api 19.71% <ø> (ø)
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.95% <ø> (ø)
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.

@codspeed-hq

codspeed-hq Bot commented Aug 31, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 98 untouched benchmarks


Comparing ln/fe-1525-headless-runbook-pn (174d74a) with main (c16fcb3)

Open in CodSpeed

lunelson and others added 19 commits September 3, 2026 16:18
… and evidence

One ChatAgent, one runbook skill (defineSkill + on-disk Markdown), headless
createFlueClient drive with artifact recovery from history(). Hermetic through
line green (IR recovered, parseSDCPNFile ok); two real-model runs recorded with
construct rejection documented (weight-0 exclusive arcs, malformed types/
parameters). MISSION.md stays live; acceptance is a human call. SIDE_QUEST.md
opens the validated-construction follow-up (Petrinaut-owned contracts, minimal
tool subset, reuse of run 2's IR). HANDOFF.md carries the full session state.
Package the modelling skill through Flue, prove bounded headless construction, and record the real-model schema bridge failure for Mission 5.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Lu Nelson <ln@hash.ai>
Signed-off-by: Lu Nelson <ln@hash.ai>
Keep the reviewed hermetic-entry-point inventory aligned with the runbook artifact, faux-provider, and headless integration tests added by Mission 3.
Replace the requested-scope prune exception with explicit core test task dependencies on the app and shipped plugin builds. Task-aware affected selection and pruning now carry those workspaces through the normal graph.
The app's tests read committed runbook evidence and inbox examples outside any workspace, so Turbo pruning omitted them unless the app scope copies those paths explicitly.
The only production caller recovers the fixed runbook-ir fence, so remove the unused dynamic language regex instead of accepting a pattern-bearing input.

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

Thank you for sorting the tasks!
infra ✅

@github-actions

github-actions Bot commented Sep 3, 2026

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 $$18.0 \mathrm{ms} \pm 120 \mathrm{μs}\left({\color{gray}-3.229 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.14 \mathrm{ms} \pm 10.2 \mathrm{μs}\left({\color{gray}-2.543 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1002 $$8.34 \mathrm{ms} \pm 71.4 \mathrm{μs}\left({\color{gray}-3.110 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$25.6 \mathrm{ms} \pm 234 \mathrm{μs}\left({\color{lightgreen}-6.403 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$8.13 \mathrm{ms} \pm 63.3 \mathrm{μs}\left({\color{lightgreen}-5.714 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1527 $$14.2 \mathrm{ms} \pm 113 \mathrm{μs}\left({\color{lightgreen}-6.779 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$18.8 \mathrm{ms} \pm 117 \mathrm{μs}\left({\color{lightgreen}-5.355 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.37 \mathrm{ms} \pm 13.7 \mathrm{μs}\left({\color{gray}0.967 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$8.99 \mathrm{ms} \pm 63.0 \mathrm{μs}\left({\color{gray}-2.618 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$2.39 \mathrm{ms} \pm 15.9 \mathrm{μs}\left({\color{gray}-3.211 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$1.89 \mathrm{ms} \pm 13.4 \mathrm{μs}\left({\color{gray}-3.592 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 52 $$2.13 \mathrm{ms} \pm 14.7 \mathrm{μs}\left({\color{gray}-1.110 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$3.35 \mathrm{ms} \pm 26.1 \mathrm{μs}\left({\color{gray}-1.747 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.24 \mathrm{ms} \pm 13.4 \mathrm{μs}\left({\color{gray}-1.250 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 108 $$2.69 \mathrm{ms} \pm 23.2 \mathrm{μs}\left({\color{gray}1.18 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$2.83 \mathrm{ms} \pm 21.3 \mathrm{μs}\left({\color{gray}-2.422 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.15 \mathrm{ms} \pm 11.6 \mathrm{μs}\left({\color{gray}-2.136 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$2.58 \mathrm{ms} \pm 19.6 \mathrm{μs}\left({\color{gray}-2.880 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$1.73 \mathrm{ms} \pm 7.85 \mathrm{μs}\left({\color{gray}-0.923 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$1.72 \mathrm{ms} \pm 11.4 \mathrm{μs}\left({\color{gray}-0.472 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 2 $$1.84 \mathrm{ms} \pm 13.7 \mathrm{μs}\left({\color{gray}-0.311 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$1.92 \mathrm{ms} \pm 11.5 \mathrm{μs}\left({\color{gray}-0.349 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$1.82 \mathrm{ms} \pm 12.5 \mathrm{μs}\left({\color{gray}-3.786 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.02 \mathrm{ms} \pm 27.3 \mathrm{μs}\left({\color{gray}-0.501 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$1.99 \mathrm{ms} \pm 13.5 \mathrm{μs}\left({\color{gray}-4.535 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$1.75 \mathrm{ms} \pm 7.60 \mathrm{μs}\left({\color{gray}-3.526 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 26 $$1.92 \mathrm{ms} \pm 15.6 \mathrm{μs}\left({\color{gray}-1.131 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$2.22 \mathrm{ms} \pm 15.9 \mathrm{μs}\left({\color{gray}-0.138 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$1.94 \mathrm{ms} \pm 12.6 \mathrm{μs}\left({\color{gray}-2.268 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 27 $$2.10 \mathrm{ms} \pm 14.0 \mathrm{μs}\left({\color{gray}-0.582 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$2.19 \mathrm{ms} \pm 16.4 \mathrm{μs}\left({\color{gray}0.272 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$1.98 \mathrm{ms} \pm 17.5 \mathrm{μs}\left({\color{gray}-1.018 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$2.10 \mathrm{ms} \pm 12.8 \mathrm{μs}\left({\color{gray}0.247 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$22.0 \mathrm{ms} \pm 101 \mathrm{μs}\left({\color{lightgreen}-7.055 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$46.4 \mathrm{ms} \pm 235 \mathrm{μs}\left({\color{gray}-4.288 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$23.8 \mathrm{ms} \pm 132 \mathrm{μs}\left({\color{lightgreen}-5.681 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$28.1 \mathrm{ms} \pm 459 \mathrm{μs}\left({\color{gray}-0.815 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$28.1 \mathrm{ms} \pm 178 \mathrm{μs}\left({\color{lightgreen}-6.078 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$23.4 \mathrm{ms} \pm 108 \mathrm{μs}\left({\color{gray}-3.008 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$271 \mathrm{ms} \pm 1.14 \mathrm{ms}\left({\color{gray}-0.774 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$57.5 \mathrm{ms} \pm 415 \mathrm{μs}\left({\color{gray}-0.761 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$57.3 \mathrm{ms} \pm 330 \mathrm{μs}\left({\color{gray}-3.327 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$175 \mathrm{ms} \pm 1.33 \mathrm{ms}\left({\color{gray}0.953 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$7.48 \mathrm{ms} \pm 45.3 \mathrm{μs}\left({\color{gray}2.03 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$7.52 \mathrm{ms} \pm 40.5 \mathrm{μs}\left({\color{gray}0.321 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$7.65 \mathrm{ms} \pm 54.9 \mathrm{μs}\left({\color{gray}-1.215 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$7.38 \mathrm{ms} \pm 36.1 \mathrm{μs}\left({\color{gray}-4.277 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$7.52 \mathrm{ms} \pm 39.8 \mathrm{μs}\left({\color{gray}-1.818 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$7.39 \mathrm{ms} \pm 40.0 \mathrm{μs}\left({\color{gray}1.07 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$7.66 \mathrm{ms} \pm 56.3 \mathrm{μs}\left({\color{gray}4.57 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$7.65 \mathrm{ms} \pm 42.7 \mathrm{μs}\left({\color{gray}2.26 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$8.06 \mathrm{ms} \pm 76.2 \mathrm{μs}\left({\color{red}7.64 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$8.18 \mathrm{ms} \pm 45.2 \mathrm{μs}\left({\color{red}6.77 \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 $$7.87 \mathrm{ms} \pm 88.3 \mathrm{μs}\left({\color{gray}2.35 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$7.75 \mathrm{ms} \pm 45.5 \mathrm{μs}\left({\color{gray}1.85 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$7.76 \mathrm{ms} \pm 43.6 \mathrm{μs}\left({\color{gray}-0.729 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$7.88 \mathrm{ms} \pm 48.1 \mathrm{μs}\left({\color{gray}3.38 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$7.93 \mathrm{ms} \pm 49.7 \mathrm{μs}\left({\color{red}5.28 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$7.82 \mathrm{ms} \pm 40.6 \mathrm{μs}\left({\color{gray}3.51 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$7.86 \mathrm{ms} \pm 41.2 \mathrm{μs}\left({\color{gray}2.86 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$7.83 \mathrm{ms} \pm 44.9 \mathrm{μs}\left({\color{gray}1.62 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$7.82 \mathrm{ms} \pm 42.3 \mathrm{μs}\left({\color{gray}-1.000 \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 $$5.61 \mathrm{ms} \pm 21.3 \mathrm{μs}\left({\color{gray}-1.101 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$44.1 \mathrm{ms} \pm 221 \mathrm{μs}\left({\color{gray}-1.771 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$78.1 \mathrm{ms} \pm 444 \mathrm{μs}\left({\color{gray}-2.381 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$48.5 \mathrm{ms} \pm 291 \mathrm{μs}\left({\color{gray}0.456 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$55.1 \mathrm{ms} \pm 427 \mathrm{μs}\left({\color{gray}-0.882 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$60.0 \mathrm{ms} \pm 314 \mathrm{μs}\left({\color{gray}2.06 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$65.2 \mathrm{ms} \pm 2.10 \mathrm{ms}\left({\color{gray}-0.900 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$29.8 \mathrm{ms} \pm 241 \mathrm{μs}\left({\color{gray}-4.138 \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 $$50.7 \mathrm{ms} \pm 292 \mathrm{μs}\left({\color{gray}0.600 \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 $$33.7 \mathrm{ms} \pm 226 \mathrm{μs}\left({\color{gray}-4.851 \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 $$39.5 \mathrm{ms} \pm 222 \mathrm{μs}\left({\color{lightgreen}-5.231 \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 $$41.2 \mathrm{ms} \pm 270 \mathrm{μs}\left({\color{lightgreen}-5.975 \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 $$41.1 \mathrm{ms} \pm 239 \mathrm{μs}\left({\color{lightgreen}-6.283 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$80.9 \mathrm{ms} \pm 384 \mathrm{μs}\left({\color{red}7.28 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$88.8 \mathrm{ms} \pm 1.16 \mathrm{ms}\left({\color{gray}3.95 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$12.3 \mathrm{ms} \pm 82.4 \mathrm{μs}\left({\color{lightgreen}-15.722 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$354 \mathrm{ms} \pm 1.68 \mathrm{ms}\left({\color{gray}3.07 \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