hash icon indicating copy to clipboard operation
hash copied to clipboard

[H-5837] (ad-hoc DX) Add temp/scratch/holding directory ignore patterns,

Open lunelson opened this issue 2 months ago • 5 comments

🌟 What is the purpose of this PR?

This PR makes small additions to the root .gitignore and the .dockerignore to allow placement of directories matching _temp/, _trash/, _scratch/ or _holding/ anywhere in the file tree to have their contents ignored. This is just a DX improvement.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • [x] 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:

  • [x] are internal and do not require a docs change

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • [x] do not affect the execution graph

lunelson avatar Dec 12 '25 16:12 lunelson

PR Summary

Add ignore rules for personal scratch directories and Jujutsu repo metadata to both .gitignore and .dockerignore.

  • Ignore rules:
    • Add personal scratch directories to both .gitignore and .dockerignore: **/_temp/, **/_trash/, **/_scratch/, **/_holding/.
    • Add Jujutsu repo metadata to both: .jj/.

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

cursor[bot] avatar Dec 12 '25 16:12 cursor[bot]

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 58.13%. Comparing base (0f10d66) to head (27a1a30). :warning: Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8180      +/-   ##
==========================================
- Coverage   58.13%   58.13%   -0.01%     
==========================================
  Files        1176     1176              
  Lines      110781   110781              
  Branches     4994     4994              
==========================================
- Hits        64398    64397       -1     
- Misses      45631    45632       +1     
  Partials      752      752              
Flag Coverage Δ
apps.hash-ai-worker-ts 1.32% <ø> (ø)
apps.hash-api 0.00% <ø> (ø)
blockprotocol.type-system 40.84% <ø> (ø)
local.claude-hooks 0.00% <ø> (ø)
local.harpc-client 51.24% <ø> (ø)
local.hash-graph-sdk 10.88% <ø> (ø)
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.02%) :arrow_down:
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.89% <ø> (ø)
rust.hash-graph-authorization 62.47% <ø> (ø)
rust.hash-graph-postgres-store 25.61% <ø> (ø)
rust.hash-graph-store 30.59% <ø> (ø)
rust.hash-graph-temporal-versioning 47.95% <ø> (ø)
rust.hash-graph-types 0.00% <ø> (ø)
rust.hash-graph-validation 83.45% <ø> (ø)
rust.hashql-ast 87.24% <ø> (ø)
rust.hashql-compiletest 46.65% <ø> (ø)
rust.hashql-core 82.40% <ø> (ø)
rust.hashql-diagnostics 72.43% <ø> (ø)
rust.hashql-eval 68.54% <ø> (ø)
rust.hashql-hir 89.10% <ø> (ø)
rust.hashql-mir 83.93% <ø> (ø)
rust.hashql-syntax-jexpr 94.04% <ø> (ø)

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Dec 12 '25 16:12 codecov[bot]

@hashintel/devops ...could this change be causing the terraform action to fail 🤔 😬 ?

lunelson avatar Dec 12 '25 17:12 lunelson

No worries, the issue with Terraform is that it tries to downgrade Postgres from 18 to 17 again (A change I did today morning), but we don't have auto-apply enabled currently. But better flagging that than having a silent infra-issue 😅

TimDiekmann avatar Dec 12 '25 17:12 TimDiekmann

Put a .gitignore with * in it in these folders

@TimDiekmann Oh 🤯 huh I never thought of that, nice one!

I do have these configured as a global ignore on my system... but the issue I'm finding is that LLMs which try to "follow .gitignore rules", don't pick up the global config and then are scanning those folders for context and @-references etc.

lunelson avatar Dec 15 '25 09:12 lunelson

I thought that LLMs (or at least the tool around them) would use commands which actually respect the .gitignore. such as rg instead of grep, or git grep, but I might be wrong. But at least I've seen the LLM itself trying to use find and explicitly excluding folders such as node_modules/ or target/ (it should know how to use the correct tools, though).

TimDiekmann avatar Dec 15 '25 09:12 TimDiekmann

@TimDiekmann they do tend to correctly see the local .gitignore file they just don't seem to look at whatever you might have globally configured—and IIRC having a file at ~/.gitignore isn't actually a standard convention, i.e. it won't take effect automatically you have to declare global ignore file on your system (and technically you could name it anything AFAIK?)

lunelson avatar Dec 15 '25 09:12 lunelson

Benchmark results

@rust/hash-graph-benches – Integrations

policy_resolution_large

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2002 $$25.9 \mathrm{ms} \pm 170 \mathrm{μs}\left({\color{gray}-4.767 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.21 \mathrm{ms} \pm 18.0 \mathrm{μs}\left({\color{gray}1.07 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1001 $$11.8 \mathrm{ms} \pm 75.1 \mathrm{μs}\left({\color{lightgreen}-8.630 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$41.4 \mathrm{ms} \pm 268 \mathrm{μs}\left({\color{gray}-2.481 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$13.5 \mathrm{ms} \pm 74.6 \mathrm{μs}\left({\color{lightgreen}-5.220 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1526 $$23.0 \mathrm{ms} \pm 143 \mathrm{μs}\left({\color{gray}-3.115 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$25.9 \mathrm{ms} \pm 172 \mathrm{μs}\left({\color{lightgreen}-40.011 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.53 \mathrm{ms} \pm 16.2 \mathrm{μs}\left({\color{lightgreen}-82.740 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$10.9 \mathrm{ms} \pm 64.8 \mathrm{μs}\left({\color{lightgreen}-61.589 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.59 \mathrm{ms} \pm 18.3 \mathrm{μs}\left({\color{gray}0.400 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.83 \mathrm{ms} \pm 12.3 \mathrm{μs}\left({\color{gray}0.621 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 51 $$3.14 \mathrm{ms} \pm 13.7 \mathrm{μs}\left({\color{gray}-1.234 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$4.96 \mathrm{ms} \pm 27.0 \mathrm{μs}\left({\color{gray}0.012 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.37 \mathrm{ms} \pm 13.6 \mathrm{μs}\left({\color{gray}-0.672 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 107 $$3.94 \mathrm{ms} \pm 23.0 \mathrm{μs}\left({\color{gray}-0.112 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.25 \mathrm{ms} \pm 22.8 \mathrm{μs}\left({\color{gray}0.727 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.28 \mathrm{ms} \pm 16.6 \mathrm{μs}\left({\color{gray}1.20 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$3.91 \mathrm{ms} \pm 25.0 \mathrm{μs}\left({\color{gray}1.20 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.52 \mathrm{ms} \pm 10.3 \mathrm{μs}\left({\color{red}6.23 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.46 \mathrm{ms} \pm 11.2 \mathrm{μs}\left({\color{red}5.39 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1 $$2.57 \mathrm{ms} \pm 10.6 \mathrm{μs}\left({\color{red}6.41 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.75 \mathrm{ms} \pm 11.4 \mathrm{μs}\left({\color{red}5.22 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.64 \mathrm{ms} \pm 12.8 \mathrm{μs}\left({\color{red}5.93 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.84 \mathrm{ms} \pm 14.3 \mathrm{μs}\left({\color{red}6.92 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$2.87 \mathrm{ms} \pm 11.4 \mathrm{μs}\left({\color{red}6.31 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.58 \mathrm{ms} \pm 9.84 \mathrm{μs}\left({\color{red}8.20 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 25 $$2.77 \mathrm{ms} \pm 17.1 \mathrm{μs}\left({\color{red}8.57 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.20 \mathrm{ms} \pm 17.4 \mathrm{μs}\left({\color{red}5.54 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.81 \mathrm{ms} \pm 16.0 \mathrm{μs}\left({\color{red}8.39 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 26 $$3.04 \mathrm{ms} \pm 17.2 \mathrm{μs}\left({\color{red}7.30 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.12 \mathrm{ms} \pm 12.8 \mathrm{μs}\left({\color{gray}4.23 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.80 \mathrm{ms} \pm 14.2 \mathrm{μs}\left({\color{red}7.34 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$2.99 \mathrm{ms} \pm 12.4 \mathrm{μs}\left({\color{red}5.54 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$38.3 \mathrm{ms} \pm 157 \mathrm{μs}\left({\color{gray}-0.128 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$75.4 \mathrm{ms} \pm 285 \mathrm{μs}\left({\color{gray}-0.164 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$43.0 \mathrm{ms} \pm 166 \mathrm{μs}\left({\color{gray}3.15 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$44.8 \mathrm{ms} \pm 186 \mathrm{μs}\left({\color{gray}0.766 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$53.7 \mathrm{ms} \pm 287 \mathrm{μs}\left({\color{gray}3.38 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$40.0 \mathrm{ms} \pm 148 \mathrm{μs}\left({\color{gray}0.156 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$418 \mathrm{ms} \pm 719 \mathrm{μs}\left({\color{gray}-0.679 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$92.9 \mathrm{ms} \pm 470 \mathrm{μs}\left({\color{gray}4.28 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$84.1 \mathrm{ms} \pm 407 \mathrm{μs}\left({\color{gray}1.68 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$311 \mathrm{ms} \pm 596 \mathrm{μs}\left({\color{gray}0.947 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$14.5 \mathrm{ms} \pm 81.8 \mathrm{μs}\left({\color{gray}0.497 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$14.9 \mathrm{ms} \pm 74.0 \mathrm{μs}\left({\color{gray}2.71 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$15.0 \mathrm{ms} \pm 72.5 \mathrm{μs}\left({\color{gray}-0.159 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$14.7 \mathrm{ms} \pm 73.2 \mathrm{μs}\left({\color{gray}2.11 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$18.0 \mathrm{ms} \pm 106 \mathrm{μs}\left({\color{gray}3.22 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$14.5 \mathrm{ms} \pm 69.5 \mathrm{μs}\left({\color{gray}1.09 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$14.5 \mathrm{ms} \pm 63.9 \mathrm{μs}\left({\color{gray}2.16 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$14.5 \mathrm{ms} \pm 72.1 \mathrm{μs}\left({\color{gray}2.11 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$15.0 \mathrm{ms} \pm 62.7 \mathrm{μs}\left({\color{gray}0.217 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$22.0 \mathrm{ms} \pm 133 \mathrm{μs}\left({\color{gray}1.17 \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 $$29.1 \mathrm{ms} \pm 228 \mathrm{μs}\left({\color{gray}-1.381 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$30.1 \mathrm{ms} \pm 256 \mathrm{μs}\left({\color{gray}3.60 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$29.6 \mathrm{ms} \pm 303 \mathrm{μs}\left({\color{gray}1.70 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$29.5 \mathrm{ms} \pm 292 \mathrm{μs}\left({\color{red}5.14 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$30.1 \mathrm{ms} \pm 280 \mathrm{μs}\left({\color{gray}2.26 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$29.3 \mathrm{ms} \pm 267 \mathrm{μs}\left({\color{gray}-1.738 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$29.3 \mathrm{ms} \pm 268 \mathrm{μs}\left({\color{gray}0.415 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$29.5 \mathrm{ms} \pm 254 \mathrm{μs}\left({\color{gray}1.70 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$28.6 \mathrm{ms} \pm 249 \mathrm{μs}\left({\color{gray}-4.686 \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.91 \mathrm{ms} \pm 35.9 \mathrm{μs}\left({\color{gray}0.558 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$46.1 \mathrm{ms} \pm 240 \mathrm{μs}\left({\color{gray}2.15 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$92.8 \mathrm{ms} \pm 353 \mathrm{μs}\left({\color{gray}0.662 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$51.4 \mathrm{ms} \pm 287 \mathrm{μs}\left({\color{gray}0.885 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$59.6 \mathrm{ms} \pm 332 \mathrm{μs}\left({\color{gray}0.592 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$67.8 \mathrm{ms} \pm 337 \mathrm{μs}\left({\color{gray}0.366 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$74.0 \mathrm{ms} \pm 419 \mathrm{μs}\left({\color{gray}0.653 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$48.7 \mathrm{ms} \pm 230 \mathrm{μs}\left({\color{gray}0.749 \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 $$75.8 \mathrm{ms} \pm 383 \mathrm{μs}\left({\color{gray}0.788 \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 $$55.7 \mathrm{ms} \pm 275 \mathrm{μs}\left({\color{gray}-0.028 \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.7 \mathrm{ms} \pm 329 \mathrm{μs}\left({\color{gray}0.396 \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.5 \mathrm{ms} \pm 365 \mathrm{μs}\left({\color{gray}1.56 \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 $$65.3 \mathrm{ms} \pm 406 \mathrm{μs}\left({\color{gray}1.33 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$138 \mathrm{ms} \pm 691 \mathrm{μs}\left({\color{red}6.15 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$133 \mathrm{ms} \pm 635 \mathrm{μs}\left({\color{gray}1.15 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$39.4 \mathrm{ms} \pm 205 \mathrm{μs}\left({\color{lightgreen}-62.389 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$590 \mathrm{ms} \pm 1.10 \mathrm{ms}\left({\color{gray}-4.722 \mathrm{\%}}\right) $$ Flame Graph

github-actions[bot] avatar Dec 15 '25 17:12 github-actions[bot]