Skip to content

BE-870: atlas: Give the fit container a writable home and working directory - #9779

Open
indietyp wants to merge 1 commit into
bm/be-866-derive-the-generations-path-from-the-atlas-s3-bucketfrom
bm/be-870-give-the-fit-container-a-writable-home-and-working-directory
Open

indietyp wants to merge 1 commit into
bm/be-866-derive-the-generations-path-from-the-atlas-s3-bucketfrom
bm/be-870-give-the-fit-container-a-writable-home-and-working-directory

Conversation

@indietyp

@indietyp indietyp commented Sep 18, 2026

Copy link
Copy Markdown
Member

🌟 What is the purpose of this PR?

  • Set writable HOME=/home/atlas and WORKDIR /app for caches and relative report output.
  • Keep the non-root atlas:hash identity and /atlas-generations storage location.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

  • are internal and do not require a docs change

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

  • do not affect the execution graph

Stack created with GitHub Stacks CLIGive Feedback 💬

@indietyp
indietyp added this pull request to stack #9781 September 18, 2026 18:31
@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
hash Ready Ready Preview Sep 18, 2026 6:41pm UTC
3 Skipped Deployments
Project Deployment Actions Updated
hashdotdesign-tokens Ignored Ignored Preview Sep 18, 2026 6:41pm UTC
petrinaut Skipped Skipped Sep 18, 2026 6:41pm UTC
petrinaut-docs Skipped Skipped Sep 18, 2026 6:41pm UTC

Request Review

@vercel
vercel Bot temporarily deployed to Preview – petrinaut September 18, 2026 18:31 Inactive
@vercel
vercel Bot temporarily deployed to Preview – petrinaut-docs September 18, 2026 18:31 Inactive
@github-actions github-actions Bot added area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team labels Sep 18, 2026
@indietyp
indietyp deployed to pull-request September 18, 2026 18:32 — with GitHub Actions Active
@codecov

codecov Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.45%. Comparing base (2d6fc7b) to head (f230da3).

Additional details and impacted files
@@                                        Coverage Diff                                         @@
##           bm/be-866-derive-the-generations-path-from-the-atlas-s3-bucket    #9779      +/-   ##
==================================================================================================
- Coverage                                                           66.45%   66.45%   -0.01%     
==================================================================================================
  Files                                                                1849     1849              
  Lines                                                              195357   195357              
  Branches                                                             7975     7975              
==================================================================================================
- Hits                                                               129823   129822       -1     
  Misses                                                              64011    64011              
- Partials                                                             1523     1524       +1     
Flag Coverage Δ
apps.hash-graph 12.27% <ø> (ø)
rust.hash-graph-atlas 80.20% <ø> (-0.01%) ⬇️

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.

@indietyp indietyp self-assigned this Sep 18, 2026
@indietyp indietyp changed the title feat: set home directory and workdir for atlas container BE-870: atlas: Give the fit container a writable home and working directory Sep 18, 2026
@indietyp
indietyp marked this pull request as ready for review September 18, 2026 18:59
@cursor

cursor Bot commented Sep 18, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Docker-only runtime layout for the Atlas fit image; no application auth or data-path logic changes beyond writable dirs for caches and relative output.

Overview
Updates the Atlas fit Docker runner image so the non-root atlas user has a real writable home and a fixed working directory instead of / as home with no app cwd.

The image now sets --home-dir /home/atlas, creates /home/atlas and /app (along with /atlas-generations) owned by 61000:60000, exports HOME=/home/atlas, and sets WORKDIR /app before switching to USER atlas:hash. Generation output still uses HASH_GRAPH_ATLAS_ROOT=/atlas-generations.

Reviewed by Cursor Bugbot for commit f230da3. Bugbot is set up for automated code reviews on this repo. Configure here.

@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 $$15.1 \mathrm{ms} \pm 131 \mathrm{μs}\left({\color{lightgreen}-8.755 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$1.96 \mathrm{ms} \pm 6.53 \mathrm{μs}\left({\color{gray}-3.992 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1002 $$7.37 \mathrm{ms} \pm 67.1 \mathrm{μs}\left({\color{lightgreen}-11.197 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$25.6 \mathrm{ms} \pm 203 \mathrm{μs}\left({\color{gray}-4.555 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$9.01 \mathrm{ms} \pm 60.5 \mathrm{μs}\left({\color{gray}-3.906 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1527 $$14.9 \mathrm{ms} \pm 88.9 \mathrm{μs}\left({\color{lightgreen}-5.865 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$16.7 \mathrm{ms} \pm 131 \mathrm{μs}\left({\color{gray}-3.776 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.18 \mathrm{ms} \pm 14.2 \mathrm{μs}\left({\color{gray}-3.084 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$8.91 \mathrm{ms} \pm 63.0 \mathrm{μs}\left({\color{lightgreen}-6.018 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$2.20 \mathrm{ms} \pm 13.5 \mathrm{μs}\left({\color{gray}0.097 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$1.78 \mathrm{ms} \pm 9.77 \mathrm{μs}\left({\color{gray}0.852 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 52 $$2.02 \mathrm{ms} \pm 18.6 \mathrm{μs}\left({\color{gray}1.02 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$3.05 \mathrm{ms} \pm 16.7 \mathrm{μs}\left({\color{gray}-0.924 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$2.12 \mathrm{ms} \pm 20.2 \mathrm{μs}\left({\color{gray}1.08 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 108 $$2.46 \mathrm{ms} \pm 33.3 \mathrm{μs}\left({\color{gray}1.82 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$2.55 \mathrm{ms} \pm 18.9 \mathrm{μs}\left({\color{gray}-3.279 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.10 \mathrm{ms} \pm 28.7 \mathrm{μs}\left({\color{gray}2.39 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$2.40 \mathrm{ms} \pm 22.5 \mathrm{μs}\left({\color{gray}0.940 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$1.64 \mathrm{ms} \pm 24.1 \mathrm{μs}\left({\color{gray}-1.773 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$1.59 \mathrm{ms} \pm 8.62 \mathrm{μs}\left({\color{gray}-2.534 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 2 $$1.65 \mathrm{ms} \pm 7.39 \mathrm{μs}\left({\color{gray}0.140 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$1.80 \mathrm{ms} \pm 10.1 \mathrm{μs}\left({\color{gray}-1.085 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$1.74 \mathrm{ms} \pm 21.4 \mathrm{μs}\left({\color{gray}0.493 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$1.89 \mathrm{ms} \pm 12.7 \mathrm{μs}\left({\color{gray}1.72 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$1.80 \mathrm{ms} \pm 8.91 \mathrm{μs}\left({\color{gray}-3.392 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$1.63 \mathrm{ms} \pm 6.70 \mathrm{μs}\left({\color{gray}-1.149 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 26 $$1.78 \mathrm{ms} \pm 20.3 \mathrm{μs}\left({\color{gray}0.396 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$2.02 \mathrm{ms} \pm 14.7 \mathrm{μs}\left({\color{gray}-2.305 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$1.84 \mathrm{ms} \pm 12.7 \mathrm{μs}\left({\color{gray}0.130 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 27 $$1.99 \mathrm{ms} \pm 11.9 \mathrm{μs}\left({\color{gray}-0.603 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$1.98 \mathrm{ms} \pm 14.5 \mathrm{μs}\left({\color{gray}-0.315 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$1.87 \mathrm{ms} \pm 19.7 \mathrm{μs}\left({\color{gray}0.950 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$1.96 \mathrm{ms} \pm 14.2 \mathrm{μs}\left({\color{gray}1.20 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$19.3 \mathrm{ms} \pm 171 \mathrm{μs}\left({\color{gray}0.262 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$40.4 \mathrm{ms} \pm 263 \mathrm{μs}\left({\color{gray}3.02 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$21.9 \mathrm{ms} \pm 146 \mathrm{μs}\left({\color{gray}1.55 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$23.1 \mathrm{ms} \pm 247 \mathrm{μs}\left({\color{gray}-0.400 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$25.2 \mathrm{ms} \pm 181 \mathrm{μs}\left({\color{gray}4.18 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$19.7 \mathrm{ms} \pm 98.8 \mathrm{μs}\left({\color{gray}-0.675 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$217 \mathrm{ms} \pm 748 \mathrm{μs}\left({\color{gray}-2.757 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$51.9 \mathrm{ms} \pm 319 \mathrm{μs}\left({\color{gray}0.414 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$41.2 \mathrm{ms} \pm 332 \mathrm{μs}\left({\color{gray}-3.229 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$151 \mathrm{ms} \pm 767 \mathrm{μs}\left({\color{gray}-0.230 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$6.25 \mathrm{ms} \pm 39.4 \mathrm{μs}\left({\color{gray}-4.268 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$6.45 \mathrm{ms} \pm 95.7 \mathrm{μs}\left({\color{gray}1.17 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$6.49 \mathrm{ms} \pm 44.0 \mathrm{μs}\left({\color{gray}-0.990 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$6.32 \mathrm{ms} \pm 56.6 \mathrm{μs}\left({\color{gray}-0.448 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$6.34 \mathrm{ms} \pm 29.7 \mathrm{μs}\left({\color{gray}-3.687 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$6.25 \mathrm{ms} \pm 33.3 \mathrm{μs}\left({\color{gray}-0.787 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$6.16 \mathrm{ms} \pm 24.9 \mathrm{μs}\left({\color{gray}-2.100 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$6.34 \mathrm{ms} \pm 83.6 \mathrm{μs}\left({\color{gray}-0.882 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$6.46 \mathrm{ms} \pm 62.0 \mathrm{μs}\left({\color{gray}2.35 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$6.66 \mathrm{ms} \pm 46.6 \mathrm{μs}\left({\color{gray}0.326 \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 $$6.53 \mathrm{ms} \pm 40.6 \mathrm{μs}\left({\color{gray}-1.645 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$6.59 \mathrm{ms} \pm 45.1 \mathrm{μs}\left({\color{gray}0.024 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$6.48 \mathrm{ms} \pm 32.8 \mathrm{μs}\left({\color{gray}-1.830 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$6.67 \mathrm{ms} \pm 65.9 \mathrm{μs}\left({\color{gray}1.88 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$6.55 \mathrm{ms} \pm 39.6 \mathrm{μs}\left({\color{gray}-1.939 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$6.55 \mathrm{ms} \pm 52.4 \mathrm{μs}\left({\color{gray}-2.703 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$6.98 \mathrm{ms} \pm 327 \mathrm{μs}\left({\color{gray}4.94 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$6.70 \mathrm{ms} \pm 75.2 \mathrm{μs}\left({\color{gray}0.236 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$6.52 \mathrm{ms} \pm 35.6 \mathrm{μs}\left({\color{gray}-4.075 \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 $$4.86 \mathrm{ms} \pm 29.6 \mathrm{μs}\left({\color{gray}-0.379 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$33.5 \mathrm{ms} \pm 248 \mathrm{μs}\left({\color{lightgreen}-5.775 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$63.5 \mathrm{ms} \pm 303 \mathrm{μs}\left({\color{gray}-3.977 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$37.3 \mathrm{ms} \pm 286 \mathrm{μs}\left({\color{lightgreen}-5.048 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$43.1 \mathrm{ms} \pm 512 \mathrm{μs}\left({\color{lightgreen}-5.730 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$47.3 \mathrm{ms} \pm 310 \mathrm{μs}\left({\color{lightgreen}-5.027 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$52.7 \mathrm{ms} \pm 577 \mathrm{μs}\left({\color{gray}-1.250 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$25.6 \mathrm{ms} \pm 326 \mathrm{μs}\left({\color{gray}-3.873 \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 $$41.7 \mathrm{ms} \pm 338 \mathrm{μs}\left({\color{gray}-0.031 \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 $$29.0 \mathrm{ms} \pm 205 \mathrm{μs}\left({\color{gray}-4.644 \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 $$35.7 \mathrm{ms} \pm 307 \mathrm{μs}\left({\color{gray}-0.006 \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 $$36.2 \mathrm{ms} \pm 349 \mathrm{μs}\left({\color{gray}-3.875 \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 $$36.0 \mathrm{ms} \pm 223 \mathrm{μs}\left({\color{gray}-2.358 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$67.6 \mathrm{ms} \pm 482 \mathrm{μs}\left({\color{gray}-0.099 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$73.3 \mathrm{ms} \pm 288 \mathrm{μs}\left({\color{gray}-1.260 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$13.0 \mathrm{ms} \pm 91.9 \mathrm{μs}\left({\color{gray}-0.707 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$305 \mathrm{ms} \pm 772 \mathrm{μs}\left({\color{gray}2.58 \mathrm{\%}}\right) $$ Flame Graph

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

Labels

area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team

Development

Successfully merging this pull request may close these issues.

1 participant