Skip to content

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

Merged
lunelson merged 15 commits intomainfrom
ln/sre-588-stale-approvals-logic
Mar 31, 2026
Merged

SRE-588: own stale approval logic and detect manual conflict resolutions#8577
lunelson merged 15 commits intomainfrom
ln/sre-588-stale-approvals-logic

Conversation

@lunelson
Copy link
Copy Markdown
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
Copy Markdown

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 31, 2026 6:57am
hashdotdesign Ready Ready Preview, Comment Mar 31, 2026 6:57am
hashdotdesign-tokens Ready Ready Preview, Comment Mar 31, 2026 6:57am
petrinaut Ready Ready Preview Mar 31, 2026 6:57am

@github-actions github-actions bot added the area/infra Relates to version control, CI, CD or IaC (area) label Mar 25, 2026
Copy link
Copy Markdown
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
Copy Markdown

cursor bot commented Mar 25, 2026

PR Summary

Medium Risk
Changes GitHub Actions automation that can dismiss PR approvals and now fails safe on several error paths, which may increase review churn if misconfigured or if gh/fetching behaves unexpectedly.

Overview
Replaces the external turnage/dismiss-stale-approvals dependency with a repo-owned composite action (.github/actions/dismiss-stale-approvals) that persists previous-run SHAs via artifacts, computes git range-diff to detect meaningful PR diffs, and dismisses (or comments in dry-run) approved reviews with a clear reason.

Extends stale-detection by fetching the latest approval commit from PR reviews and scanning merge commits after that point using git merge-tree to detect manual conflict resolutions (and rewritten history), failing conservatively (treat as stale) when approval lookup/diff checks/merge-tree checks error. Adds a local self-test.sh harness and wires it into npm run test:stale-approvals.

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

@augmentcode
Copy link
Copy Markdown

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
Copy Markdown

@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
Copy Markdown

codspeed-hq bot commented Mar 25, 2026

Merging this PR will not alter performance

✅ 80 untouched benchmarks


Comparing ln/sre-588-stale-approvals-logic (22f2cb6) with main (f44d224)

Open in CodSpeed

@codecov
Copy link
Copy Markdown

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 (22f2cb6).
⚠️ Report is 21 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    83877    +1     
+ Misses      49418    49417    -1     
  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.16% <ø> (+0.01%) ⬆️
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
Copy Markdown

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

Copy link
Copy Markdown
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.

Looks good to me! I'd just wouldn't run the workflow for pull_request triggers if this action is not modified, but that's a minor thing.

@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 $$26.1 \mathrm{ms} \pm 145 \mathrm{μs}\left({\color{gray}-2.250 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.31 \mathrm{ms} \pm 14.4 \mathrm{μs}\left({\color{gray}0.137 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$11.9 \mathrm{ms} \pm 93.7 \mathrm{μs}\left({\color{gray}0.754 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$41.1 \mathrm{ms} \pm 385 \mathrm{μs}\left({\color{gray}-0.307 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$13.3 \mathrm{ms} \pm 95.2 \mathrm{μs}\left({\color{gray}-1.102 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$22.5 \mathrm{ms} \pm 206 \mathrm{μs}\left({\color{gray}0.373 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$27.5 \mathrm{ms} \pm 191 \mathrm{μs}\left({\color{gray}-0.703 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.60 \mathrm{ms} \pm 25.7 \mathrm{μs}\left({\color{gray}-0.690 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$12.8 \mathrm{ms} \pm 87.6 \mathrm{μs}\left({\color{gray}-0.847 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.74 \mathrm{ms} \pm 22.6 \mathrm{μs}\left({\color{gray}0.101 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.91 \mathrm{ms} \pm 15.0 \mathrm{μs}\left({\color{gray}1.09 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.28 \mathrm{ms} \pm 18.6 \mathrm{μs}\left({\color{gray}0.432 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.10 \mathrm{ms} \pm 23.2 \mathrm{μs}\left({\color{gray}0.920 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.46 \mathrm{ms} \pm 17.7 \mathrm{μs}\left({\color{gray}0.079 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$4.03 \mathrm{ms} \pm 17.5 \mathrm{μs}\left({\color{gray}-0.729 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.38 \mathrm{ms} \pm 20.0 \mathrm{μs}\left({\color{gray}-1.033 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.34 \mathrm{ms} \pm 17.8 \mathrm{μs}\left({\color{gray}-0.751 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.03 \mathrm{ms} \pm 22.9 \mathrm{μs}\left({\color{gray}-0.021 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.64 \mathrm{ms} \pm 12.5 \mathrm{μs}\left({\color{gray}-0.884 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.60 \mathrm{ms} \pm 11.6 \mathrm{μs}\left({\color{gray}-0.575 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.67 \mathrm{ms} \pm 14.0 \mathrm{μs}\left({\color{gray}-2.736 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.97 \mathrm{ms} \pm 12.6 \mathrm{μs}\left({\color{gray}-0.422 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.75 \mathrm{ms} \pm 14.7 \mathrm{μs}\left({\color{gray}-0.902 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.07 \mathrm{ms} \pm 20.6 \mathrm{μs}\left({\color{gray}-0.696 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.01 \mathrm{ms} \pm 14.5 \mathrm{μs}\left({\color{gray}-1.040 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.72 \mathrm{ms} \pm 17.0 \mathrm{μs}\left({\color{gray}0.295 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$2.89 \mathrm{ms} \pm 15.7 \mathrm{μs}\left({\color{gray}-0.029 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.43 \mathrm{ms} \pm 23.6 \mathrm{μs}\left({\color{gray}-0.459 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.92 \mathrm{ms} \pm 17.5 \mathrm{μs}\left({\color{gray}-2.864 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.20 \mathrm{ms} \pm 19.6 \mathrm{μs}\left({\color{gray}-0.792 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.37 \mathrm{ms} \pm 19.2 \mathrm{μs}\left({\color{gray}-1.726 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.96 \mathrm{ms} \pm 14.8 \mathrm{μs}\left({\color{gray}-1.126 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.24 \mathrm{ms} \pm 18.7 \mathrm{μs}\left({\color{gray}-2.099 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$42.8 \mathrm{ms} \pm 196 \mathrm{μs}\left({\color{gray}-1.254 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$80.1 \mathrm{ms} \pm 436 \mathrm{μs}\left({\color{gray}-0.103 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$47.1 \mathrm{ms} \pm 194 \mathrm{μs}\left({\color{gray}-3.027 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$50.4 \mathrm{ms} \pm 328 \mathrm{μs}\left({\color{gray}0.644 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$58.9 \mathrm{ms} \pm 329 \mathrm{μs}\left({\color{gray}-1.566 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$45.2 \mathrm{ms} \pm 167 \mathrm{μs}\left({\color{gray}-0.055 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$418 \mathrm{ms} \pm 941 \mathrm{μs}\left({\color{gray}-0.379 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$97.7 \mathrm{ms} \pm 466 \mathrm{μs}\left({\color{gray}-0.330 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$89.7 \mathrm{ms} \pm 397 \mathrm{μs}\left({\color{gray}1.25 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$279 \mathrm{ms} \pm 853 \mathrm{μs}\left({\color{gray}0.171 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$19.2 \mathrm{ms} \pm 129 \mathrm{μs}\left({\color{gray}2.17 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$19.1 \mathrm{ms} \pm 97.3 \mathrm{μs}\left({\color{gray}-1.155 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$19.4 \mathrm{ms} \pm 123 \mathrm{μs}\left({\color{gray}0.463 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$19.2 \mathrm{ms} \pm 107 \mathrm{μs}\left({\color{gray}-0.308 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$23.6 \mathrm{ms} \pm 127 \mathrm{μs}\left({\color{gray}3.96 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$19.0 \mathrm{ms} \pm 96.3 \mathrm{μs}\left({\color{gray}2.34 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$18.7 \mathrm{ms} \pm 82.6 \mathrm{μs}\left({\color{gray}-0.610 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$18.6 \mathrm{ms} \pm 97.8 \mathrm{μs}\left({\color{gray}-1.019 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$19.2 \mathrm{ms} \pm 117 \mathrm{μs}\left({\color{gray}0.090 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$26.0 \mathrm{ms} \pm 183 \mathrm{μs}\left({\color{gray}4.05 \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 $$32.7 \mathrm{ms} \pm 280 \mathrm{μs}\left({\color{gray}-1.139 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$31.5 \mathrm{ms} \pm 256 \mathrm{μs}\left({\color{gray}-3.893 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$32.0 \mathrm{ms} \pm 277 \mathrm{μs}\left({\color{gray}-1.807 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$33.9 \mathrm{ms} \pm 334 \mathrm{μs}\left({\color{gray}2.62 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$33.0 \mathrm{ms} \pm 295 \mathrm{μs}\left({\color{gray}0.514 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$32.5 \mathrm{ms} \pm 277 \mathrm{μs}\left({\color{gray}-0.394 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$33.5 \mathrm{ms} \pm 300 \mathrm{μs}\left({\color{gray}3.79 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$32.0 \mathrm{ms} \pm 268 \mathrm{μs}\left({\color{gray}-2.314 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$32.6 \mathrm{ms} \pm 255 \mathrm{μs}\left({\color{gray}-3.248 \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.19 \mathrm{ms} \pm 38.7 \mathrm{μs}\left({\color{gray}0.020 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$88.2 \mathrm{ms} \pm 428 \mathrm{μs}\left({\color{gray}-0.305 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$138 \mathrm{ms} \pm 585 \mathrm{μs}\left({\color{gray}0.012 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$95.9 \mathrm{ms} \pm 489 \mathrm{μs}\left({\color{gray}0.068 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$103 \mathrm{ms} \pm 522 \mathrm{μs}\left({\color{gray}-0.847 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$113 \mathrm{ms} \pm 577 \mathrm{μs}\left({\color{gray}1.01 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$119 \mathrm{ms} \pm 590 \mathrm{μs}\left({\color{gray}0.678 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$97.3 \mathrm{ms} \pm 478 \mathrm{μs}\left({\color{gray}0.124 \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 $$124 \mathrm{ms} \pm 461 \mathrm{μs}\left({\color{gray}-0.149 \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 $$103 \mathrm{ms} \pm 482 \mathrm{μs}\left({\color{gray}-0.378 \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 $$112 \mathrm{ms} \pm 558 \mathrm{μs}\left({\color{gray}-0.098 \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 $$114 \mathrm{ms} \pm 470 \mathrm{μs}\left({\color{gray}0.512 \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 $$114 \mathrm{ms} \pm 539 \mathrm{μs}\left({\color{gray}0.280 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$131 \mathrm{ms} \pm 505 \mathrm{μs}\left({\color{gray}-4.932 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$142 \mathrm{ms} \pm 635 \mathrm{μs}\left({\color{gray}-3.974 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$103 \mathrm{ms} \pm 643 \mathrm{μs}\left({\color{gray}-0.472 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$572 \mathrm{ms} \pm 3.28 \mathrm{ms}\left({\color{gray}3.33 \mathrm{\%}}\right) $$ Flame Graph

@lunelson lunelson added this pull request to the merge queue Mar 31, 2026
Merged via the queue into main with commit d4832af Mar 31, 2026
181 checks passed
@lunelson lunelson deleted the ln/sre-588-stale-approvals-logic branch March 31, 2026 08:37
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.

3 participants