Skip to content

id: give the scaffold test's Roc compile a writable cache (nix sandbox AccessDenied) - #11471

Merged
dezren39 merged 1 commit into
mainfrom
fix/11163-roc-sandbox-home
Nov 18, 2026
Merged

dezren39 merged 1 commit into
mainfrom
fix/11163-roc-sandbox-home

Conversation

@dezren39

@dezren39 dezren39 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Closes #11163

Before: cli_tests::world_new_scaffold_compiles_with_pinned_roc failed id-lib's nix check with "The compiler stopped with the error AccessDenied but did not say why." Roc writes its cache under XDG_CACHE_HOME, falling back to $HOME/.cache. In the nix sandbox, HOME is /homeless-shelter, which can't be created.

After: the test points XDG_CACHE_HOME at its own temp dir for the Roc compile, which is what crates/id-worlds/src/world_compile.rs already does for every real compile. The serve_tests scaffold compile gets the same line. serve_tests is skipped in nix, so this is only for consistency there.

How I checked the cause, with the pinned nightly-2026-10-04-130536d binary (sha256 matches nix/roc.nix):

  • HOME=/homeless-shelter roc check created /homeless-shelter/.cache. I ran as root here, so the directory could be created; the nix build user can't create it.
  • HOME=/proc/nohome roc check (unwritable even for root) never finished.
  • The same command with XDG_CACHE_HOME set to a temp dir passed in 19 ms and put its cache there.

Testing: rustfmt (edition 2024) is clean. I couldn't run the test end to end here: it needs the zig-built host.wasm and a nix build of id-lib, and neither is available in this environment. nix build .#id-lib is the confirming run.


Generated by Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Roc writes its cache under XDG_CACHE_HOME, else $HOME/.cache. In the
nix check sandbox HOME is /homeless-shelter, which cannot be created,
so world_new_scaffold_compiles_with_pinned_roc failed id-lib's check
with a bare AccessDenied. Point XDG_CACHE_HOME at the test's temp dir,
as world_compile.rs already does for real compiles; same for the
serve_tests scaffold compile.

Closes #11163

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dezren39
dezren39 marked this pull request as ready for review November 18, 2026 01:30
@dezren39
dezren39 requested a review from a team as a code owner November 18, 2026 01:30
@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T01:31:42.461148Z 6b4d498 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 merged commit 51de1f4 into main Nov 18, 2026
@dezren39
dezren39 deleted the fix/11163-roc-sandbox-home branch November 18, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build(id-lib): cli_integration Roc scaffold test fails in nix sandbox check — AccessDenied from pinned roc (does not block amd switch)

2 participants