Skip to content

FE-1580: Reconcile Voice turn behavior on the shared Brunch conversation - #9531

Open
kostandinang wants to merge 65 commits into
graphite-base/9531from
kostandin/fe-1580-harden-voice-safety-and-ux-on-the-unified-flue-route
Open

FE-1580: Reconcile Voice turn behavior on the shared Brunch conversation#9531
kostandinang wants to merge 65 commits into
graphite-base/9531from
kostandin/fe-1580-harden-voice-safety-and-ux-on-the-unified-flue-route

Conversation

@kostandinang

@kostandinang kostandinang commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🌟 What is the purpose of this PR?

This PR builds on #9528's unified Flue conversation route and restores the Voice safety and UX behavior needed on top of it.

A completed spoken transcript follows the same path as typed input:

Voice → shared panel useChat → browser Flue transport → /agents/chat/:instanceId

The response shown in the panel is the canonical Brunch text passed unchanged to TTS. Initial speech may start from a durably completed, submission-correlated canonical segment while the rest of the Flue submission continues; settlement still gates replay and the next input turn.

This PR does not restore Brunch /api/chat, add a direct Voice FlueClient.send() path, rewrite responses with a simplifier, mount brunch_ask, or add Petri-net generation.

🔗 Related links

🚫 Blocked by

🔍 What does this change?

  • Makes completed gpt-4o-transcribe output the sole authoritative spoken answer; provisional, stale, duplicate, failed, unavailable, and over-limit transcripts never submit.
  • Preserves stable Flue admission identity and surfaces rejected, conflicting, ambiguous, and locally aborted outcomes without automatic retry.
  • Implements acknowledged half-duplex ownership: canonical speech closes capture, Your turn cancels playback, and fresh capture opens only after provider cancellation acknowledgement and Brunch settlement.
  • Correlates queued and active speech by speechRequestId and responseId, including terminal-before-playback, cancellation-before-output, late-stop, and output-buffer-clear races.
  • Reuses an in-flight cancellation barrier and only requests paused cancellation for owned speech, preventing repeated Voice state updates from entering a React update loop.
  • Adds exact Read full response replay and exact Repeat question replay. Questions are identified by the hidden, non-interactive brunch_mark_question server tool and a durable data marker; missing or unmatched markers fail closed.
  • Keeps local playback cancellation distinct from durable Flue Stop.
  • Preserves supported client-tool Voice provenance across projection, hydration, sibling failure, and reopen.
  • Keeps finalized spoken turns live in the transcript; initial-modal Voice uses a compact setup dock, composer Voice remains expanded, and collapsed live content stays mounted.
  • Preserves full Flue and browser-tool failures through persistent, copyable notifications and inline tool errors.
  • Keeps dormant brunch_ask source unmounted and unrecognized by canonical speech.
  • Prebuilds both Brunch server and Petrinaut website dependency graphs for local Brunch startup.

Acceptance ledger

  1. Proof 1 — transcript authority and ownership: implemented and automated. Session, bridge, controller, and production-preview tests cover completed keyed transcripts, current-turn boundaries, rejection states, canonical-request invalidation, closed capture, and fresh post-handoff input.
  2. Proof 2 — idempotent admission: implemented and automated. Deduplication and 409 conflicts converge on the original submissionId; ambiguity and local abort do not retry or invoke durable abort.
  3. Proof 3 — cancellation and Stop: implemented and automated. Input/output acknowledgements, targeted response terminals, settlement, queued ownership, mute preference, and local-versus-durable cancellation are covered. Parent-owned Stop races remain FE-1574: Let Voice speak through canonical Brunch conversations #9528's authority.
  4. Proof 4 — committed speech and exact replay: implemented and automated. Only finalized, correlated canonical segments are queued; stable ids deduplicate continuation speech; settlement and audio terminality gate exact replay.
  5. Proof 5 — Voice provenance: partially implemented. Persisted client-tool-result signals preserve multiple successful Voice origins through sibling failure, projection, hydration, and reopen. Direct spoken-user attribution remains blocked on a supported Flue metadata seam.
  6. Proof 6 — dormant ask: implemented exclusion. Production Brunch supplies no ask tool; canonical speech ignores brunch_ask. brunch_mark_question annotates prose only and never suspends for an answer.
  7. Proof 7 — real witness: incomplete. Automated coverage exists, but the retained microphone/handoff/unsettled-Stop/reload/network artifact bundle has not been produced.
  8. Proof 8 — comparative latency: incomplete. A single before/after diagnostic exists, but it is not the required controlled 10+10 sample.
  9. Proof 9 — verification, docs, and package release: implemented locally. The seven-workspace gate, architecture validation, user/operator docs, mission evidence, and one Petrinaut patch changeset are present. Fresh CI is pending after the restack.

Timing evidence qualification

The existing before/after values came from one author-observed real microphone-to-audible turn per side. Raw samples and a reproducible artifact bundle were not retained, so these numbers are diagnostic only and are not acceptance evidence. The required 10+10 controlled comparison remains open.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

  • Modifies @hashintel/petrinaut and includes one patch changeset in this PR's delta.

📜 Does this require documentation changes?

  • Operator, user, mission, blocker, and verification documents are updated.

🕸️ Does this require a Turbo graph change?

  • No Turbo execution-graph change is required.

⚠️ Known issues

  • Direct user-message Voice attribution cannot survive canonical Flue hydration because Flue 2.0.3 does not project caller metadata or idempotency keys onto canonical user messages. No unsupported workaround is included.
  • The full human witness and comparative latency gate remain incomplete.
  • Parent-owned FE-1574: Let Voice speak through canonical Brunch conversations #9528 behavior remains outside this PR's ownership.
  • Local cold-cache startup may take longer; dependency libraries are built once at startup and are not continuously watched.

🛡 What tests cover this?

At implementation head b66869f393, the current 72-file delta against #9528 head 58f758408047 passes:

  • NODE_OPTIONS=--no-experimental-webstorage mise exec -- yarn exec turbo run lint:tsc lint:eslint test:unit build ...
  • 39/39 tasks and 1,216/1,216 tests across seven workspaces:
    • Brunch app: 80/80
    • Brunch core: 86/86
    • Flue binding: 18/18
    • SDCPN plugin: 8/8
    • AI SDK transport: 32/32
    • Petrinaut: 673/673
    • Petrinaut website: 319/319
  • Voice turn controller: 52/52, including the repeated paused-cancellation regression.
  • Voice interview control: 17/17 with no Maximum update depth exceeded error.
  • Architecture docs: 70 layers, 356 edges, 725 files, 71 generated pages, 38 authored pages.
  • yarn lint:format: all 5,586 matched files accepted.
  • git diff --check: pass.

ESLint reports zero errors; the website retains one non-failing React effect warning. The current pushed head adds evidence-only Markdown updates after the validated implementation head. Fresh GitHub checks are pending after the force-pushed restack.

❓ How to test this?

  1. Run yarn dev:brunch and select the Brunch preview.
  2. Start Voice and submit a spoken answer; confirm exactly one completed transcript appears in the shared conversation and exact canonical speech may begin before the remaining Flue submission settles.
  3. During playback, press Your turn; confirm capture begins only after cancellation and settlement complete.
  4. Exercise Read full response, Repeat question, and durable Stop.
  5. Collapse the live session; confirm only the Voice dock remains and ending Voice closes the AI panel. In an expanded session, ending Voice returns to the composer.
  6. Trigger an assistant or tool failure; confirm complete detail is visible, copyable, persistent until closed, and shown inline on the failed tool card.
  7. Hard-reload the same conversation; confirm no resubmission or automatic replay.

📹 Demo

The complete retained browser/microphone/handoff/Stop/reload witness remains pending; this description intentionally makes no completed demo claim.

@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
petrinaut Ready Ready Preview Sep 7, 2026 12:38pm UTC
petrinaut-docs Ready Ready Preview Sep 7, 2026 12:38pm UTC
2 Skipped Deployments
Project Deployment Actions Updated
hash Ignored Ignored Preview Sep 7, 2026 12:38pm UTC
hashdotdesign-tokens Ignored Ignored Preview Sep 7, 2026 12:38pm 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 labels Sep 3, 2026
@github-actions github-actions Bot added area/tests New or updated tests area/apps labels Sep 3, 2026

kostandinang commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@kostandinang kostandinang changed the title FE-1580: Harden Voice safety and UX on the unified Flue route FE-1580: Make Voice turns reliable in the shared Brunch conversation Sep 4, 2026
@kostandinang kostandinang changed the title FE-1580: Make Voice turns reliable in the shared Brunch conversation FE-1580: Reconcile Voice turn behavior on the shared Brunch conversation Sep 4, 2026
@lunelson
lunelson changed the base branch from ln/fe-1574-direct-voice-flue to graphite-base/9531 September 4, 2026 09:38
@kostandinang
kostandinang force-pushed the kostandin/fe-1580-harden-voice-safety-and-ux-on-the-unified-flue-route branch from 2a2b9d0 to 60d41c5 Compare September 4, 2026 09:52
@kostandinang
kostandinang changed the base branch from graphite-base/9531 to ln/fe-1574-direct-voice-flue September 4, 2026 09:52
kostandinang and others added 18 commits September 7, 2026 11:02
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>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@kostandinang
kostandinang force-pushed the kostandin/fe-1580-harden-voice-safety-and-ux-on-the-unified-flue-route branch from b53b100 to be56a18 Compare September 7, 2026 09:07
@kostandinang
kostandinang requested a review from kube September 7, 2026 09:08

@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 2 potential issues.

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

Co-authored-by: Cursor <cursoragent@cursor.com>
@kostandinang

kostandinang commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Mission 6b reconciliation: status

#9564 integrates #9531’s Voice work with Mission 6’s resumable browser mutations. It preserves #9531’s core contract: completed transcript → shared useChat/Flue route → canonical Brunch text → TTS, with stable admission identity, half-duplex ownership, and Your turn cancelling speech separately from Stop.

Combined testing found and fixed several integration bugs: browser work running after local Stop, textless tool failures appearing ready, lost client-tool Voice origins after history folding, unstable delivery payload ordering, missing stopped metadata, and cleanup/conversation-switch/late-speech races.

Current automated evidence: 39/39 uncached tasks and 1,318 tests in 167 files. This is stronger integration coverage, not Mission 6b acceptance.

Remaining acceptance gaps

  1. Stop is not reload-safe. If Flue has completed a step but its browser tool is still pending, Stop can withhold that work only in the current tab. Reopening may recover and execute it. Durable Flue abortion and metadata.stopped cover genuinely aborted submissions, not this case. We need either durable cancellation or an explicitly narrower Stop contract with truthful UI and tests.
  2. Repeat question is currently broken on the reconciled path. The question marker and matching prose can be stored in separate assistant messages, but canonical speech requires them in the same message. Resolve or invalidate the review finding.
  3. Two targeted tests remain: Stop while output insertion is held, and output-insertion rejection through the combined production host.
  4. The real browser/microphone witness remains: typed and spoken mutation, Your turn, separate Stop, coherent workpiece settlement, fresh-tab continuation, no duplicate mutation or autoplay, and usable compact/expanded/error states.
  5. Direct spoken-user Voice attribution still does not survive reopen. Client-tool Voice origins do survive. The reopened user-message Voice chip needs upstream metadata support or explicit deferral.
  6. The latency gate remains: 10 donor and 10 candidate trials under comparable conditions, with no median regression and less than 20% p95 regression. No paid run is authorized.
  7. Explicit owner acceptance remains required. Restacking does not accept Mission 6b, retire FE-1580: Reconcile Voice turn behavior on the shared Brunch conversation #9531, or transfer these obligations to Mission 7.

@github-actions

github-actions Bot commented Sep 7, 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 $$27.9 \mathrm{ms} \pm 217 \mathrm{μs}\left({\color{gray}2.56 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.46 \mathrm{ms} \pm 22.0 \mathrm{μs}\left({\color{gray}0.900 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1002 $$13.4 \mathrm{ms} \pm 133 \mathrm{μs}\left({\color{red}7.88 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$45.0 \mathrm{ms} \pm 440 \mathrm{μs}\left({\color{red}5.18 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$15.0 \mathrm{ms} \pm 143 \mathrm{μs}\left({\color{red}5.00 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1527 $$25.3 \mathrm{ms} \pm 206 \mathrm{μs}\left({\color{gray}4.98 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$29.5 \mathrm{ms} \pm 235 \mathrm{μs}\left({\color{red}5.39 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.77 \mathrm{ms} \pm 27.4 \mathrm{μs}\left({\color{gray}1.47 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$14.5 \mathrm{ms} \pm 128 \mathrm{μs}\left({\color{red}9.03 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.86 \mathrm{ms} \pm 25.2 \mathrm{μs}\left({\color{gray}1.05 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.06 \mathrm{ms} \pm 24.0 \mathrm{μs}\left({\color{gray}2.49 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 52 $$3.46 \mathrm{ms} \pm 24.3 \mathrm{μs}\left({\color{gray}2.60 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.35 \mathrm{ms} \pm 49.2 \mathrm{μs}\left({\color{gray}2.63 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.51 \mathrm{ms} \pm 19.5 \mathrm{μs}\left({\color{gray}-1.188 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 108 $$4.24 \mathrm{ms} \pm 41.0 \mathrm{μs}\left({\color{gray}1.85 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.48 \mathrm{ms} \pm 39.9 \mathrm{μs}\left({\color{gray}-0.905 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.47 \mathrm{ms} \pm 32.2 \mathrm{μs}\left({\color{gray}0.964 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.20 \mathrm{ms} \pm 26.9 \mathrm{μs}\left({\color{gray}-0.313 \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 15.8 \mathrm{μs}\left({\color{gray}1.67 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.75 \mathrm{ms} \pm 24.3 \mathrm{μs}\left({\color{gray}2.69 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 2 $$2.85 \mathrm{ms} \pm 19.0 \mathrm{μs}\left({\color{gray}2.24 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$3.11 \mathrm{ms} \pm 18.1 \mathrm{μs}\left({\color{gray}2.31 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.90 \mathrm{ms} \pm 22.0 \mathrm{μs}\left({\color{gray}1.68 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.21 \mathrm{ms} \pm 21.4 \mathrm{μs}\left({\color{gray}2.16 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.10 \mathrm{ms} \pm 20.3 \mathrm{μs}\left({\color{gray}-0.287 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.81 \mathrm{ms} \pm 17.8 \mathrm{μs}\left({\color{gray}0.501 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 26 $$2.95 \mathrm{ms} \pm 19.4 \mathrm{μs}\left({\color{gray}-0.227 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.54 \mathrm{ms} \pm 27.0 \mathrm{μs}\left({\color{gray}-0.097 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.10 \mathrm{ms} \pm 24.1 \mathrm{μs}\left({\color{gray}1.77 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 27 $$3.31 \mathrm{ms} \pm 23.0 \mathrm{μs}\left({\color{gray}0.794 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.64 \mathrm{ms} \pm 37.8 \mathrm{μs}\left({\color{gray}4.21 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.10 \mathrm{ms} \pm 21.7 \mathrm{μs}\left({\color{gray}2.15 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.51 \mathrm{ms} \pm 35.2 \mathrm{μs}\left({\color{gray}4.37 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$32.4 \mathrm{ms} \pm 188 \mathrm{μs}\left({\color{gray}2.22 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$72.1 \mathrm{ms} \pm 521 \mathrm{μs}\left({\color{gray}2.40 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$36.3 \mathrm{ms} \pm 238 \mathrm{μs}\left({\color{gray}3.25 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$40.5 \mathrm{ms} \pm 261 \mathrm{μs}\left({\color{gray}3.85 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$43.8 \mathrm{ms} \pm 283 \mathrm{μs}\left({\color{gray}4.76 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$34.3 \mathrm{ms} \pm 197 \mathrm{μs}\left({\color{gray}3.47 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$423 \mathrm{ms} \pm 1.24 \mathrm{ms}\left({\color{gray}1.53 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$87.4 \mathrm{ms} \pm 557 \mathrm{μs}\left({\color{gray}2.71 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$80.6 \mathrm{ms} \pm 575 \mathrm{μs}\left({\color{gray}3.05 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$280 \mathrm{ms} \pm 1.23 \mathrm{ms}\left({\color{gray}2.05 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$10.6 \mathrm{ms} \pm 83.7 \mathrm{μs}\left({\color{gray}2.78 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$10.8 \mathrm{ms} \pm 80.0 \mathrm{μs}\left({\color{gray}4.46 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$11.2 \mathrm{ms} \pm 73.5 \mathrm{μs}\left({\color{red}6.89 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$10.8 \mathrm{ms} \pm 82.5 \mathrm{μs}\left({\color{gray}3.69 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$10.6 \mathrm{ms} \pm 70.1 \mathrm{μs}\left({\color{gray}1.67 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$10.3 \mathrm{ms} \pm 69.1 \mathrm{μs}\left({\color{gray}0.762 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$10.3 \mathrm{ms} \pm 75.5 \mathrm{μs}\left({\color{gray}0.102 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$10.3 \mathrm{ms} \pm 58.4 \mathrm{μs}\left({\color{gray}0.539 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$10.3 \mathrm{ms} \pm 68.9 \mathrm{μs}\left({\color{gray}0.446 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$10.5 \mathrm{ms} \pm 59.8 \mathrm{μs}\left({\color{gray}-0.609 \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 $$11.0 \mathrm{ms} \pm 85.3 \mathrm{μs}\left({\color{gray}1.44 \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 82.9 \mathrm{μs}\left({\color{gray}-1.437 \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 70.0 \mathrm{μs}\left({\color{gray}-0.044 \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 69.8 \mathrm{μs}\left({\color{gray}-1.686 \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 63.9 \mathrm{μs}\left({\color{gray}-3.550 \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 69.0 \mathrm{μs}\left({\color{gray}0.648 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$10.7 \mathrm{ms} \pm 66.8 \mathrm{μs}\left({\color{gray}-0.482 \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 66.9 \mathrm{μs}\left({\color{gray}-0.099 \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 72.4 \mathrm{μs}\left({\color{gray}-3.360 \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.95 \mathrm{ms} \pm 48.9 \mathrm{μs}\left({\color{gray}-4.486 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$56.7 \mathrm{ms} \pm 540 \mathrm{μs}\left({\color{lightgreen}-6.023 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$109 \mathrm{ms} \pm 680 \mathrm{μs}\left({\color{gray}0.789 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$62.0 \mathrm{ms} \pm 451 \mathrm{μs}\left({\color{gray}-0.441 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$71.0 \mathrm{ms} \pm 554 \mathrm{μs}\left({\color{gray}-0.617 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$81.3 \mathrm{ms} \pm 609 \mathrm{μs}\left({\color{gray}-0.032 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$86.1 \mathrm{ms} \pm 457 \mathrm{μs}\left({\color{gray}-1.487 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$45.4 \mathrm{ms} \pm 332 \mathrm{μs}\left({\color{gray}-0.085 \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 $$76.5 \mathrm{ms} \pm 506 \mathrm{μs}\left({\color{gray}3.79 \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 $$51.6 \mathrm{ms} \pm 416 \mathrm{μs}\left({\color{gray}-1.444 \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 $$62.1 \mathrm{ms} \pm 418 \mathrm{μs}\left({\color{gray}2.14 \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 $$65.8 \mathrm{ms} \pm 412 \mathrm{μs}\left({\color{gray}4.97 \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 $$66.4 \mathrm{ms} \pm 436 \mathrm{μs}\left({\color{red}8.06 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$125 \mathrm{ms} \pm 770 \mathrm{μs}\left({\color{gray}3.78 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$135 \mathrm{ms} \pm 1.04 \mathrm{ms}\left({\color{gray}3.30 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$23.6 \mathrm{ms} \pm 179 \mathrm{μs}\left({\color{gray}2.16 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$544 \mathrm{ms} \pm 1.54 \mathrm{ms}\left({\color{gray}3.33 \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 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.

1 participant