Skip to content

SRE-1061: Move the crates' package.json scripts into turbo.json commands - #9755

Draft
TimDiekmann wants to merge 1 commit into
t/sre-1060-let-turbos-task-graph-drive-pruning-and-ci-selectionfrom
t/sre-1061-move-the-crates-packagejson-scripts-into-turbojson-commands
Draft

TimDiekmann wants to merge 1 commit into
t/sre-1060-let-turbos-task-graph-drive-pruning-and-ci-selectionfrom
t/sre-1061-move-the-crates-packagejson-scripts-into-turbojson-commands

Conversation

@TimDiekmann

Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

The crates' package.json files carried hand-maintained scripts that turbo ran through a shell. With experimentalTaskCommand, each crate's turbo.json now declares the argv turbo runs for every task, and the package.json keeps only the identity and dependency wiring sync:turborepo generates. That is the shape the crates keep once they become native Cargo workspace members (SRE-984), and it is what the command criterion in affected-packages.sh (#9754) prepares for.

🔗 Related links

🚫 Blocked by

🔍 What does this change?

  • Enables experimentalTaskCommand in the root turbo.json
  • Every crate gets a turbo.json with a command per task; the twelve crates that already had one keep their dependsOn, outputs and cache settings alongside
  • The scripts sections leave the crates' package.json files
  • Chained scripts become task edges: test:unit of hash-codegen and type-system-rs depends on a new test:unit:doc; hash-graph-api#test:unit depends on lint:openapi, which diffs the checked-in spec after build:openapi
  • Environment prefixes run through env; build:wasm passes --no-pack instead of deleting the generated package.json afterwards
  • Tasks no turbo.json declared before (build:docker:dev, test:unit:bless, the manual bench and test tasks) enter the task graph and the task documents
  • AGENTS.md describes the crate wiring accordingly

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:

  • require changes to docs which are made as part of this PR

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

The changes in this PR:

  • affected the execution graph, and the turbo.json's have been updated to reflect this

⚠️ Known issues

  • turbo query's packages { tasks } does not list command-only tasks, so prune.py's own closure no longer sees the crates' task edges. turbo prune follows them itself under affectedUsingTaskInputs (SRE-1060: Let turbo's task graph drive pruning and CI selection #9754), so the pruned trees are unchanged; the extra rules in prune.py work on the package graph, which is unaffected.
  • lint:openapi runs before hash-graph-api#test:unit rather than after it, so a stale spec fails the task before the tests run. Both fail the same CI job as before.

🐾 Next steps

  • SRE-984: native Cargo workspaces, after which the crates' package.json files go away entirely

🛡 What tests cover this?

  • None automated. Verified locally: a dry run of every crate task before and after resolves the same commands except for the chained, env-prefixed and --no-pack cases; @rust/antsi#test:unit and @rust/error-stack-macros#lint:clippy run through the new definitions; sync:turborepo and fix:package-json leave the manifests unchanged; build:wasm --no-pack produces the four files the TypeScript package reads.

❓ How to test this?

  1. Checkout the branch, mise install --locked npm:turbo
  2. turbo run lint:clippy --filter @rust/error-stack-macros runs just clippy from the crate's turbo.json
  3. turbo query 'query { affectedTasks(base: "HEAD^", tasks: ["lint:clippy"]) { items { fullName command } } }' reports command for the crates' tasks

@TimDiekmann TimDiekmann self-assigned this Sep 16, 2026
@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
hash Building Building Preview Sep 19, 2026 5:45pm UTC
hashdotdesign-tokens Building Building Preview Sep 19, 2026 5:45pm UTC
petrinaut Building Building Preview Sep 19, 2026 5:45pm UTC
petrinaut-docs Building Building Preview Sep 19, 2026 5:45pm UTC

Request Review

@github-actions github-actions Bot added area/apps > hash* Affects HASH (a `hash-*` app) area/infra Relates to version control, CI, CD or IaC (area) area/libs > error-stack Affects the `error-stack` crate (library) area/libs Relates to first-party libraries/crates/packages (area) area/libs > antsi Affects the `antsi` crate (library) type/eng > backend Owned by the @backend team area/tests New or updated tests area/apps area/apps > hash-graph labels Sep 16, 2026
@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.51%. Comparing base (6a37855) to head (2bf5e1a).

Additional details and impacted files
@@                                         Coverage Diff                                         @@
##           t/sre-1060-let-turbos-task-graph-drive-pruning-and-ci-selection    #9755      +/-   ##
===================================================================================================
- Coverage                                                            66.51%   66.51%   -0.01%     
===================================================================================================
  Files                                                                 1848     1848              
  Lines                                                               195665   195665              
  Branches                                                              7963     7963              
===================================================================================================
- Hits                                                                130143   130140       -3     
- Misses                                                               63998    63999       +1     
- Partials                                                              1524     1526       +2     
Flag Coverage Δ
apps.hash-ai-worker-ts 1.99% <ø> (ø)
apps.hash-api 15.35% <ø> (ø)
apps.hash-graph 12.27% <ø> (ø)
blockprotocol.type-system 38.15% <ø> (ø)
local.claude-hooks 0.00% <ø> (ø)
local.harpc-client 51.49% <ø> (ø)
local.hash-backend-utils 3.27% <ø> (ø)
local.hash-graph-sdk 10.02% <ø> (ø)
local.hash-isomorphic-utils 12.22% <ø> (ø)
rust.antsi 2.36% <ø> (ø)
rust.error-stack 90.81% <ø> (ø)
rust.harpc-codec 84.70% <ø> (ø)
rust.harpc-net 96.21% <ø> (ø)
rust.harpc-tower 67.03% <ø> (ø)
rust.harpc-types 0.00% <ø> (ø)
rust.harpc-wire-protocol 92.23% <ø> (ø)
rust.hash-codec 72.76% <ø> (ø)
rust.hash-config 81.14% <ø> (ø)
rust.hash-graph-api 19.09% <ø> (ø)
rust.hash-graph-atlas 80.11% <ø> (-0.01%) ⬇️
rust.hash-graph-authentication 96.04% <ø> (ø)
rust.hash-graph-authorization 63.14% <ø> (ø)
rust.hash-graph-embeddings 91.88% <ø> (ø)
rust.hash-graph-postgres-store 32.15% <ø> (ø)
rust.hash-graph-store 48.41% <ø> (ø)
rust.hash-graph-temporal-versioning 50.18% <ø> (ø)
rust.hash-graph-types 0.00% <ø> (ø)
rust.hash-graph-validation 84.71% <ø> (ø)
rust.hash-middleware 92.09% <ø> (ø)
rust.hashql-ast 89.63% <ø> (ø)
rust.hashql-compiletest 28.39% <ø> (ø)
rust.hashql-core 79.03% <ø> (ø)
rust.hashql-diagnostics 72.51% <ø> (ø)
rust.hashql-eval 79.82% <ø> (ø)
rust.hashql-hir 89.09% <ø> (ø)
rust.hashql-mir 87.92% <ø> (ø)
rust.hashql-syntax-jexpr 94.04% <ø> (ø)
rust.problematic 77.80% <ø> (ø)

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@codspeed

codspeed Bot commented Sep 16, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 6 benchmarks measured no execution time

Nothing ran under measurement, usually because the compiler removed the code under test. These results are not comparable, so they count as unchanged.

Preventing compiler optimizations

✅ 98 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
⚠️ as_constant < 1 ns < 1 ns N/A
⚠️ constant_equal < 1 ns < 1 ns N/A
⚠️ constant_not_equal < 1 ns < 1 ns N/A
⚠️ access < 1 ns < 1 ns N/A
⚠️ runtime_equal < 1 ns < 1 ns N/A
⚠️ runtime_not_equal < 1 ns < 1 ns N/A

Comparing t/sre-1061-move-the-crates-packagejson-scripts-into-turbojson-commands (2bf5e1a) with t/sre-1060-let-turbos-task-graph-drive-pruning-and-ci-selection (76a7648)1

Open in CodSpeed

Footnotes

  1. No successful run was found on t/sre-1060-let-turbos-task-graph-drive-pruning-and-ci-selection (6a37855) during the generation of this report, so 938640d was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@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 $$27.3 \mathrm{ms} \pm 261 \mathrm{μs}\left({\color{gray}3.13 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.53 \mathrm{ms} \pm 22.7 \mathrm{μs}\left({\color{gray}2.57 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1002 $$14.0 \mathrm{ms} \pm 89.7 \mathrm{μs}\left({\color{red}12.4 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$44.6 \mathrm{ms} \pm 342 \mathrm{μs}\left({\color{gray}2.87 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$16.5 \mathrm{ms} \pm 297 \mathrm{μs}\left({\color{red}10.7 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1527 $$25.8 \mathrm{ms} \pm 233 \mathrm{μs}\left({\color{gray}4.24 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$28.4 \mathrm{ms} \pm 248 \mathrm{μs}\left({\color{gray}3.80 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.95 \mathrm{ms} \pm 30.5 \mathrm{μs}\left({\color{gray}4.41 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$15.6 \mathrm{ms} \pm 167 \mathrm{μs}\left({\color{red}9.78 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.93 \mathrm{ms} \pm 28.5 \mathrm{μs}\left({\color{gray}4.93 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.14 \mathrm{ms} \pm 18.9 \mathrm{μs}\left({\color{gray}3.75 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 52 $$3.50 \mathrm{ms} \pm 24.9 \mathrm{μs}\left({\color{gray}2.36 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.37 \mathrm{ms} \pm 35.0 \mathrm{μs}\left({\color{red}5.31 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.78 \mathrm{ms} \pm 23.9 \mathrm{μs}\left({\color{gray}3.18 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 108 $$4.35 \mathrm{ms} \pm 38.0 \mathrm{μs}\left({\color{gray}2.93 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.59 \mathrm{ms} \pm 30.5 \mathrm{μs}\left({\color{gray}3.10 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.57 \mathrm{ms} \pm 16.1 \mathrm{μs}\left({\color{gray}2.63 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.37 \mathrm{ms} \pm 30.1 \mathrm{μs}\left({\color{gray}2.61 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.81 \mathrm{ms} \pm 18.1 \mathrm{μs}\left({\color{gray}1.79 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.81 \mathrm{ms} \pm 17.0 \mathrm{μs}\left({\color{gray}4.59 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 2 $$2.95 \mathrm{ms} \pm 26.5 \mathrm{μs}\left({\color{gray}4.65 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$3.18 \mathrm{ms} \pm 22.3 \mathrm{μs}\left({\color{gray}3.55 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.00 \mathrm{ms} \pm 22.7 \mathrm{μs}\left({\color{gray}3.44 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$3.34 \mathrm{ms} \pm 21.4 \mathrm{μs}\left({\color{gray}3.17 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.13 \mathrm{ms} \pm 21.2 \mathrm{μs}\left({\color{gray}1.01 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.78 \mathrm{ms} \pm 11.7 \mathrm{μs}\left({\color{gray}0.289 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 26 $$2.99 \mathrm{ms} \pm 15.9 \mathrm{μs}\left({\color{gray}1.47 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.58 \mathrm{ms} \pm 27.7 \mathrm{μs}\left({\color{gray}1.36 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.16 \mathrm{ms} \pm 19.7 \mathrm{μs}\left({\color{gray}1.86 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 27 $$3.38 \mathrm{ms} \pm 22.1 \mathrm{μs}\left({\color{gray}-0.070 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.44 \mathrm{ms} \pm 27.7 \mathrm{μs}\left({\color{gray}-0.824 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.13 \mathrm{ms} \pm 16.5 \mathrm{μs}\left({\color{gray}1.77 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.40 \mathrm{ms} \pm 31.2 \mathrm{μs}\left({\color{gray}2.31 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$33.5 \mathrm{ms} \pm 185 \mathrm{μs}\left({\color{red}6.72 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$71.0 \mathrm{ms} \pm 530 \mathrm{μs}\left({\color{red}5.07 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$37.2 \mathrm{ms} \pm 247 \mathrm{μs}\left({\color{gray}4.29 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$40.4 \mathrm{ms} \pm 235 \mathrm{μs}\left({\color{red}7.48 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$44.7 \mathrm{ms} \pm 252 \mathrm{μs}\left({\color{red}5.81 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$34.9 \mathrm{ms} \pm 187 \mathrm{μs}\left({\color{red}5.34 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$396 \mathrm{ms} \pm 1.27 \mathrm{ms}\left({\color{gray}1.21 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$92.4 \mathrm{ms} \pm 641 \mathrm{μs}\left({\color{red}7.05 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$74.2 \mathrm{ms} \pm 524 \mathrm{μs}\left({\color{gray}3.90 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$280 \mathrm{ms} \pm 1.13 \mathrm{ms}\left({\color{gray}1.95 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$10.4 \mathrm{ms} \pm 60.4 \mathrm{μs}\left({\color{gray}-1.151 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$10.7 \mathrm{ms} \pm 69.9 \mathrm{μs}\left({\color{gray}2.42 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$10.9 \mathrm{ms} \pm 65.8 \mathrm{μs}\left({\color{gray}2.17 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$10.7 \mathrm{ms} \pm 80.8 \mathrm{μs}\left({\color{gray}-0.318 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$10.6 \mathrm{ms} \pm 76.0 \mathrm{μs}\left({\color{gray}0.865 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$10.4 \mathrm{ms} \pm 61.0 \mathrm{μs}\left({\color{gray}0.547 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$10.3 \mathrm{ms} \pm 74.8 \mathrm{μs}\left({\color{gray}-0.247 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$10.5 \mathrm{ms} \pm 82.7 \mathrm{μs}\left({\color{gray}1.86 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$10.7 \mathrm{ms} \pm 62.8 \mathrm{μs}\left({\color{gray}3.22 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$11.0 \mathrm{ms} \pm 85.1 \mathrm{μs}\left({\color{gray}1.86 \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.5 \mathrm{ms} \pm 85.2 \mathrm{μs}\left({\color{gray}2.47 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$11.4 \mathrm{ms} \pm 91.6 \mathrm{μs}\left({\color{gray}1.41 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$11.5 \mathrm{ms} \pm 77.9 \mathrm{μs}\left({\color{red}5.80 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$11.3 \mathrm{ms} \pm 60.1 \mathrm{μs}\left({\color{gray}3.73 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$11.6 \mathrm{ms} \pm 96.2 \mathrm{μs}\left({\color{gray}2.10 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$11.6 \mathrm{ms} \pm 117 \mathrm{μs}\left({\color{gray}2.41 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$11.0 \mathrm{ms} \pm 84.6 \mathrm{μs}\left({\color{gray}1.48 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$11.6 \mathrm{ms} \pm 115 \mathrm{μs}\left({\color{red}5.28 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$11.5 \mathrm{ms} \pm 61.6 \mathrm{μs}\left({\color{gray}0.676 \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.40 \mathrm{ms} \pm 58.9 \mathrm{μs}\left({\color{red}5.55 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$61.7 \mathrm{ms} \pm 459 \mathrm{μs}\left({\color{red}5.42 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$112 \mathrm{ms} \pm 623 \mathrm{μs}\left({\color{gray}1.40 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$69.0 \mathrm{ms} \pm 481 \mathrm{μs}\left({\color{red}6.39 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$79.0 \mathrm{ms} \pm 564 \mathrm{μs}\left({\color{red}7.25 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$85.2 \mathrm{ms} \pm 556 \mathrm{μs}\left({\color{gray}1.62 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$91.0 \mathrm{ms} \pm 499 \mathrm{μs}\left({\color{gray}2.06 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$48.0 \mathrm{ms} \pm 283 \mathrm{μs}\left({\color{gray}-0.623 \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 $$73.9 \mathrm{ms} \pm 453 \mathrm{μs}\left({\color{gray}0.706 \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 $$54.0 \mathrm{ms} \pm 338 \mathrm{μs}\left({\color{gray}-0.591 \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 $$61.2 \mathrm{ms} \pm 423 \mathrm{μs}\left({\color{gray}-1.045 \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 $$63.1 \mathrm{ms} \pm 314 \mathrm{μs}\left({\color{gray}0.680 \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 $$64.3 \mathrm{ms} \pm 432 \mathrm{μs}\left({\color{gray}2.45 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$118 \mathrm{ms} \pm 536 \mathrm{μs}\left({\color{gray}2.61 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$128 \mathrm{ms} \pm 465 \mathrm{μs}\left({\color{gray}-0.163 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$23.8 \mathrm{ms} \pm 169 \mathrm{μs}\left({\color{red}28.9 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$529 \mathrm{ms} \pm 1.24 \mathrm{ms}\left({\color{gray}-0.990 \mathrm{\%}}\right) $$ Flame Graph

Each crate's tasks now live in its `turbo.json` as the argv turbo runs, behind `experimentalTaskCommand`; the `package.json` keeps only the identity and dependency wiring `sync:turborepo` generates.

Scripts that chained commands become task edges: `test:unit` of `hash-codegen` and `type-system-rs` depends on a new `test:unit:doc`, and `hash-graph-api#test:unit` depends on `lint:openapi`, which diffs the checked-in spec after `build:openapi`. Environment prefixes run through `env`, and `build:wasm` passes `--no-pack` instead of deleting the generated `package.json` afterwards. Tasks that no `turbo.json` declared before (`build:docker:dev`, `test:unit:bless`, the manual bench and test tasks) enter the task graph and the documents.
@TimDiekmann
TimDiekmann force-pushed the t/sre-1061-move-the-crates-packagejson-scripts-into-turbojson-commands branch from 2bf5e1a to da07dbd Compare September 19, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash* Affects HASH (a `hash-*` app) area/apps > hash-graph area/apps area/infra Relates to version control, CI, CD or IaC (area) area/libs > antsi Affects the `antsi` crate (library) area/libs > error-stack Affects the `error-stack` crate (library) area/libs Relates to first-party libraries/crates/packages (area) area/tests New or updated tests type/eng > backend Owned by the @backend team

Development

Successfully merging this pull request may close these issues.

1 participant