Skip to content

SRE-588: own stale approval logic and detect manual conflict resolutions#8577

Open
lunelson wants to merge 14 commits intomainfrom
ln/sre-588-stale-approvals-logic
Open

SRE-588: own stale approval logic and detect manual conflict resolutions#8577
lunelson wants to merge 14 commits intomainfrom
ln/sre-588-stale-approvals-logic

Conversation

@lunelson
Copy link
Contributor

@lunelson lunelson commented Mar 25, 2026

🌟 What is the purpose of this PR?

This PR closes the stale-approval gap described in SRE-588 by moving the workflow logic into this repo and teaching it to treat manual merge-conflict resolutions as approval-invalidating changes.

The original workflow depended on a forked action that only compared feature-commit ranges with git range-diff, so merge commits with hand-resolved conflicts could change code after approval without dismissing reviews. This version keeps the existing range-diff behavior for stacked-PR safety, adds a git merge-tree check for merge commits after the latest approval, and now fails safe if artifact lookup, approval lookup, or merge-resolution checking itself errors.

🔗 Related links

🚫 Blocked by

  • Nothing

🔍 What does this change?

  • Replaces the external turnage/dismiss-stale-approvals dependency with a repo-owned composite action under .github/actions/dismiss-stale-approvals
  • Vendors the previous-run artifact lookup so the existing git range-diff dismissal behavior is preserved, while selecting the newest matching artifact deterministically
  • Adds a merge-resolution checker that walks merge commits after the latest approval and uses git merge-tree to detect manual conflict resolution
  • Resolves the latest approval SHA from paginated reviews by submission time rather than response order
  • Hardens the decision flow so artifact lookup, approval lookup, and merge-check failures are treated conservatively as stale rather than silently weakening approval protection
  • Restores the documented dry-run behavior by commenting on the PR instead of only logging locally
  • Shares the range-diff stale parser between the action and self-test so the harness no longer reimplements that rule separately
  • Records the reason this remains repo-owned: the maintained Graphite-lineage action we evaluated still describes itself as a git range-diff-only check and does not address post-approval merge-commit conflict-resolution changes

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:

  • do not affect the execution graph

⚠️ Known issues

  • This change is exercised by direct shell-level verification and YAML validation, but there is not yet a dedicated repo-wide CI harness for GitHub Action behavior simulation.
  • The remaining self-test gap is that a few wiring checks still assert action.yml text directly rather than executing those paths through a runtime harness. That is a test-maintainability risk more than a stale-approval logic risk, and I wanted to leave it visible for reviewer judgment instead of widening this PR further without feedback.

🐾 Next steps

  • Watch the first CI runs of the new local action to confirm GitHub runner behavior matches the local characterization of both the conflict and clean-merge cases
  • If reviewers think it is worth it, follow up by replacing the remaining YAML-text assertions in self-test.sh with a more executable harness for action wiring

🛡 What tests cover this?

  • npm run test:stale-approvals
  • bash .github/actions/dismiss-stale-approvals/self-test.sh
  • bash -n .github/actions/dismiss-stale-approvals/self-test.sh .github/actions/dismiss-stale-approvals/decide_stale_approvals.sh .github/actions/dismiss-stale-approvals/latest_approval_sha.sh .github/actions/dismiss-stale-approvals/check-manual-merge-resolutions.sh .github/actions/dismiss-stale-approvals/latest_artifact.sh .github/actions/dismiss-stale-approvals/dismiss-reviews.sh .github/actions/dismiss-stale-approvals/range_diff_stale.sh
  • shellcheck .github/actions/dismiss-stale-approvals/self-test.sh .github/actions/dismiss-stale-approvals/decide_stale_approvals.sh .github/actions/dismiss-stale-approvals/latest_approval_sha.sh .github/actions/dismiss-stale-approvals/check-manual-merge-resolutions.sh .github/actions/dismiss-stale-approvals/latest_artifact.sh .github/actions/dismiss-stale-approvals/dismiss-reviews.sh .github/actions/dismiss-stale-approvals/range_diff_stale.sh
  • yq '.' .github/workflows/dismiss-stale-approvals.yml >/dev/null && yq '.' .github/actions/dismiss-stale-approvals/action.yml >/dev/null
  • git diff --check

❓ How to test this?

  1. Review .github/workflows/dismiss-stale-approvals.yml and confirm it uses ./.github/actions/dismiss-stale-approvals
  2. Run npm run test:stale-approvals
  3. Confirm the harness passes, including the stale decision paths for paginated approvals, approval lookup failures, artifact selection, merge-conflict detection, rewritten history, and shared range-diff parsing
  4. Optionally run bash .github/actions/dismiss-stale-approvals/self-test.sh directly to confirm the package script is only a repo-visible entrypoint for the same harness
  5. Optionally inspect .github/actions/dismiss-stale-approvals/ to confirm the policy is repo-owned and split into focused helpers rather than an external forked action

📹 Demo

  • N/A

@vercel
Copy link

vercel bot commented Mar 25, 2026

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

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment Mar 26, 2026 3:53pm
hashdotdesign Ready Ready Preview, Comment Mar 26, 2026 3:53pm
hashdotdesign-tokens Ready Ready Preview, Comment Mar 26, 2026 3:53pm
petrinaut Ready Ready Preview Mar 26, 2026 3:53pm

@github-actions github-actions bot added the area/infra Relates to version control, CI, CD or IaC (area) label Mar 25, 2026
Copy link
Contributor Author

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

@lunelson lunelson marked this pull request as ready for review March 25, 2026 11:31
@lunelson lunelson changed the title feat: dismiss stale approvals after manual merge conflict resolution SRE-588: own stale approval logic and detect manual conflict resolutions Mar 25, 2026
@cursor
Copy link

cursor bot commented Mar 25, 2026

PR Summary

Medium Risk
Changes the PR-approval dismissal workflow and introduces new git/gh-based logic that can automatically dismiss reviews; mistakes could cause unnecessary dismissals or missed stale approvals.

Overview
Moves stale-approval dismissal logic in-repo by replacing the external turnage/dismiss-stale-approvals dependency with a new composite action at .github/actions/dismiss-stale-approvals.

The action now persists previous run SHAs via artifacts to keep git range-diff detection, adds a new git merge-tree check to flag manual conflict resolutions in merge commits after the latest approval, and determines the latest approval commit via paginated review history. It also fails safe (treats approvals as stale) when critical checks error, and supports dry-run by commenting instead of dismissing.

Updates the workflow to run the real dismissal only on pull_request_target with the action checked out from main, while running a dry-run on pull_request, and adds npm run test:stale-approvals to execute a shell self-test harness for the new helpers.

Written by Cursor Bugbot for commit 1c9ff7e. This will update automatically on new commits. Configure here.

@augmentcode
Copy link

augmentcode bot commented Mar 25, 2026

🤖 Augment PR Summary

Summary: Moves stale-approval dismissal logic in-repo and expands it to detect manual merge-conflict resolutions that can change code after an approval.

Changes:

  • Adds a composite action at .github/actions/dismiss-stale-approvals and switches the workflow to use it instead of turnage/dismiss-stale-approvals
  • Persists previous head/base SHAs via an artifact to preserve the existing git range-diff-based behavior
  • Fetches PR history into a bare repo and runs range-diff to detect code changes across stacked/rewritten commits
  • Finds the most recent approval commit (paginated) by submitted_at via the GitHub API
  • Adds a git merge-tree-based scan of merge commits after the latest approval to catch manual conflict resolutions
  • Fails closed when helper steps error (artifact/approval lookup, range-diff, or merge-tree checks), and supports dry-run via PR comments

Technical Notes: Includes a bash self-test harness and a new npm run test:stale-approvals entrypoint to validate the helpers and key decision paths.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 25, 2026

Merging this PR will not alter performance

✅ 80 untouched benchmarks


Comparing ln/sre-588-stale-approvals-logic (1c9ff7e) with main (82b4650)

Open in CodSpeed

@codecov
Copy link

codecov bot commented Mar 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.49%. Comparing base (8df3d38) to head (1c9ff7e).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8577   +/-   ##
=======================================
  Coverage   62.49%   62.49%           
=======================================
  Files        1318     1318           
  Lines      134209   134209           
  Branches     5517     5517           
=======================================
+ Hits        83876    83880    +4     
+ Misses      49418    49414    -4     
  Partials      915      915           
Flag Coverage Δ
apps.hash-ai-worker-ts 1.40% <ø> (ø)
apps.hash-api 0.00% <ø> (ø)
blockprotocol.type-system 40.84% <ø> (ø)
local.claude-hooks 0.00% <ø> (ø)
local.harpc-client 51.24% <ø> (ø)
local.hash-graph-sdk 9.63% <ø> (ø)
local.hash-isomorphic-utils 0.00% <ø> (ø)
rust.antsi 0.00% <ø> (ø)
rust.error-stack 90.88% <ø> (ø)
rust.harpc-codec 84.70% <ø> (ø)
rust.harpc-net 96.21% <ø> (+0.06%) ⬆️
rust.harpc-tower 66.80% <ø> (ø)
rust.harpc-types 0.00% <ø> (ø)
rust.harpc-wire-protocol 92.23% <ø> (ø)
rust.hash-codec 72.76% <ø> (ø)
rust.hash-graph-api 2.52% <ø> (ø)
rust.hash-graph-authorization 62.34% <ø> (ø)
rust.hash-graph-postgres-store 26.39% <ø> (ø)
rust.hash-graph-store 37.76% <ø> (ø)
rust.hash-graph-temporal-versioning 47.95% <ø> (ø)
rust.hash-graph-types 0.00% <ø> (ø)
rust.hash-graph-validation 83.45% <ø> (ø)
rust.hashql-ast 87.23% <ø> (ø)
rust.hashql-compiletest 29.69% <ø> (ø)
rust.hashql-core 82.29% <ø> (ø)
rust.hashql-diagnostics 72.43% <ø> (ø)
rust.hashql-eval 69.13% <ø> (ø)
rust.hashql-hir 89.06% <ø> (ø)
rust.hashql-mir 92.64% <ø> (ø)
rust.hashql-syntax-jexpr 94.05% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

Copy link
Contributor Author

@TimDiekmann after thinking about this vendorizing approach, it turns out there's withgraphite/dismiss-stale-approvals, which might be a better option

Copy link
Member

@TimDiekmann TimDiekmann left a comment

Choose a reason for hiding this comment

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

Conceptually, this looks all good, thank you!
I have a few mechanical things, which should be quick to fix.

it turns out there's withgraphite/dismiss-stale-approvals, which might be a better option

We currently use a fork of that which has lead to this ticket. In particular withgraphite/dismiss-stale-approvals#8 is not getting any attention and the workflow does not properly detect merge-commit changes.

Copy link
Contributor Author

Ah... OK then no. Codex agrees anyway, with the following reasons stated:

  • Its own README still describes the action as a git range-diff checker, not a merge-conflict-resolution detector: README
  • The action implementation only downloads prior SHAs, runs git range-diff, and dismisses approvals if that diff changed; there is no latest-approval lookup and no git merge-tree-style check for manual conflict resolutions after approval: action.yml
  • That means it does not close the specific hole we scoped for this PR: code changed inside a post-approval merge commit after a manual conflict resolution
  • It would also drop some hardening we added here, like explicit latest-approval handling, rewritten-history detection, and our newer artifact-selection fixes in latest_artifact.sh

@lunelson
Copy link
Contributor Author

@TimDiekmann thanks for the very careful review, I think all points are now addressed

Copy link

@cursor cursor bot left a comment

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.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@github-actions
Copy link
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 $$28.0 \mathrm{ms} \pm 166 \mathrm{μs}\left({\color{gray}1.09 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.43 \mathrm{ms} \pm 21.8 \mathrm{μs}\left({\color{gray}2.27 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$13.2 \mathrm{ms} \pm 100 \mathrm{μs}\left({\color{gray}1.78 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$42.8 \mathrm{ms} \pm 342 \mathrm{μs}\left({\color{gray}-2.033 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$14.4 \mathrm{ms} \pm 107 \mathrm{μs}\left({\color{gray}2.06 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$25.2 \mathrm{ms} \pm 234 \mathrm{μs}\left({\color{gray}3.40 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$28.4 \mathrm{ms} \pm 184 \mathrm{μs}\left({\color{gray}-1.519 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.68 \mathrm{ms} \pm 16.3 \mathrm{μs}\left({\color{gray}0.936 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$13.3 \mathrm{ms} \pm 91.6 \mathrm{μs}\left({\color{gray}-2.760 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.80 \mathrm{ms} \pm 22.7 \mathrm{μs}\left({\color{gray}-2.608 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.95 \mathrm{ms} \pm 12.3 \mathrm{μs}\left({\color{gray}-3.852 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.30 \mathrm{ms} \pm 14.8 \mathrm{μs}\left({\color{gray}-3.664 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.24 \mathrm{ms} \pm 29.0 \mathrm{μs}\left({\color{gray}-4.224 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.56 \mathrm{ms} \pm 19.7 \mathrm{μs}\left({\color{gray}-2.372 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$4.21 \mathrm{ms} \pm 22.3 \mathrm{μs}\left({\color{gray}-1.210 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.46 \mathrm{ms} \pm 32.5 \mathrm{μs}\left({\color{gray}-3.474 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.36 \mathrm{ms} \pm 18.5 \mathrm{μs}\left({\color{lightgreen}-5.298 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.03 \mathrm{ms} \pm 19.8 \mathrm{μs}\left({\color{lightgreen}-5.530 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.71 \mathrm{ms} \pm 22.7 \mathrm{μs}\left({\color{gray}-2.027 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.63 \mathrm{ms} \pm 12.9 \mathrm{μs}\left({\color{gray}-3.784 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.78 \mathrm{ms} \pm 15.4 \mathrm{μs}\left({\color{gray}-1.242 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$3.02 \mathrm{ms} \pm 19.0 \mathrm{μs}\left({\color{gray}-4.391 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.81 \mathrm{ms} \pm 20.2 \mathrm{μs}\left({\color{gray}-4.249 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.10 \mathrm{ms} \pm 15.0 \mathrm{μs}\left({\color{gray}-4.702 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.07 \mathrm{ms} \pm 16.6 \mathrm{μs}\left({\color{gray}-3.119 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.76 \mathrm{ms} \pm 16.4 \mathrm{μs}\left({\color{gray}-3.965 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$2.94 \mathrm{ms} \pm 19.4 \mathrm{μs}\left({\color{gray}-3.299 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.48 \mathrm{ms} \pm 24.7 \mathrm{μs}\left({\color{gray}-4.461 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.00 \mathrm{ms} \pm 13.8 \mathrm{μs}\left({\color{gray}-4.668 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.31 \mathrm{ms} \pm 20.8 \mathrm{μs}\left({\color{lightgreen}-5.025 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.43 \mathrm{ms} \pm 15.6 \mathrm{μs}\left({\color{gray}-3.638 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.01 \mathrm{ms} \pm 18.9 \mathrm{μs}\left({\color{gray}-4.216 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.34 \mathrm{ms} \pm 21.4 \mathrm{μs}\left({\color{gray}-2.567 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$44.7 \mathrm{ms} \pm 199 \mathrm{μs}\left({\color{gray}0.958 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$83.1 \mathrm{ms} \pm 392 \mathrm{μs}\left({\color{lightgreen}-5.259 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$48.7 \mathrm{ms} \pm 207 \mathrm{μs}\left({\color{lightgreen}-7.749 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$53.0 \mathrm{ms} \pm 382 \mathrm{μs}\left({\color{gray}1.76 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$61.4 \mathrm{ms} \pm 384 \mathrm{μs}\left({\color{gray}-4.007 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$47.3 \mathrm{ms} \pm 203 \mathrm{μs}\left({\color{gray}-2.950 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$434 \mathrm{ms} \pm 924 \mathrm{μs}\left({\color{gray}-0.180 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$103 \mathrm{ms} \pm 496 \mathrm{μs}\left({\color{gray}-2.498 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$90.9 \mathrm{ms} \pm 374 \mathrm{μs}\left({\color{gray}-3.036 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$290 \mathrm{ms} \pm 658 \mathrm{μs}\left({\color{gray}-3.671 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$19.2 \mathrm{ms} \pm 92.3 \mathrm{μs}\left({\color{lightgreen}-6.005 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$20.0 \mathrm{ms} \pm 82.8 \mathrm{μs}\left({\color{gray}-3.083 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$20.2 \mathrm{ms} \pm 135 \mathrm{μs}\left({\color{gray}-4.668 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$20.0 \mathrm{ms} \pm 114 \mathrm{μs}\left({\color{gray}-4.326 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$24.3 \mathrm{ms} \pm 114 \mathrm{μs}\left({\color{gray}-4.973 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$19.2 \mathrm{ms} \pm 127 \mathrm{μs}\left({\color{gray}-4.628 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$19.3 \mathrm{ms} \pm 114 \mathrm{μs}\left({\color{lightgreen}-6.383 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$19.4 \mathrm{ms} \pm 115 \mathrm{μs}\left({\color{gray}-4.593 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$19.9 \mathrm{ms} \pm 128 \mathrm{μs}\left({\color{lightgreen}-5.608 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$26.4 \mathrm{ms} \pm 239 \mathrm{μs}\left({\color{lightgreen}-5.998 \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 $$33.0 \mathrm{ms} \pm 276 \mathrm{μs}\left({\color{gray}-3.630 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$35.3 \mathrm{ms} \pm 298 \mathrm{μs}\left({\color{gray}1.58 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$32.8 \mathrm{ms} \pm 283 \mathrm{μs}\left({\color{gray}-4.144 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$35.0 \mathrm{ms} \pm 290 \mathrm{μs}\left({\color{gray}-2.351 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$33.9 \mathrm{ms} \pm 294 \mathrm{μs}\left({\color{gray}-0.988 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$34.9 \mathrm{ms} \pm 293 \mathrm{μs}\left({\color{gray}-1.952 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$34.4 \mathrm{ms} \pm 280 \mathrm{μs}\left({\color{gray}-0.085 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$35.2 \mathrm{ms} \pm 302 \mathrm{μs}\left({\color{gray}-0.165 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$34.5 \mathrm{ms} \pm 278 \mathrm{μs}\left({\color{gray}-2.611 \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.27 \mathrm{ms} \pm 34.4 \mathrm{μs}\left({\color{gray}-0.709 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$93.6 \mathrm{ms} \pm 583 \mathrm{μs}\left({\color{lightgreen}-6.903 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$146 \mathrm{ms} \pm 763 \mathrm{μs}\left({\color{gray}-4.816 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$103 \mathrm{ms} \pm 592 \mathrm{μs}\left({\color{gray}-4.804 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$111 \mathrm{ms} \pm 601 \mathrm{μs}\left({\color{lightgreen}-5.515 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$122 \mathrm{ms} \pm 810 \mathrm{μs}\left({\color{gray}-2.707 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$126 \mathrm{ms} \pm 744 \mathrm{μs}\left({\color{gray}-3.983 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$103 \mathrm{ms} \pm 658 \mathrm{μs}\left({\color{gray}-3.106 \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 $$130 \mathrm{ms} \pm 545 \mathrm{μs}\left({\color{gray}-3.496 \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 $$109 \mathrm{ms} \pm 607 \mathrm{μs}\left({\color{gray}-4.011 \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 $$118 \mathrm{ms} \pm 518 \mathrm{μs}\left({\color{gray}-3.477 \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 $$119 \mathrm{ms} \pm 517 \mathrm{μs}\left({\color{gray}-4.086 \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 $$120 \mathrm{ms} \pm 498 \mathrm{μs}\left({\color{gray}-3.351 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$139 \mathrm{ms} \pm 475 \mathrm{μs}\left({\color{gray}-4.040 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$150 \mathrm{ms} \pm 501 \mathrm{μs}\left({\color{gray}-1.132 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$46.2 \mathrm{ms} \pm 1.65 \mathrm{ms}\left({\color{lightgreen}-56.704 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$558 \mathrm{ms} \pm 1.11 \mathrm{ms}\left({\color{gray}-3.120 \mathrm{\%}}\right) $$ Flame Graph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/infra Relates to version control, CI, CD or IaC (area)

Development

Successfully merging this pull request may close these issues.

2 participants