Skip to content

rust: cli/env, cli/cli and tools/testing stop dropping fs errors (part of #13352) - #13409

Merged
TrapsterDK merged 1 commit into
mainfrom
cloud-drop-errors-13352c
Nov 18, 2026
Merged

TrapsterDK merged 1 commit into
mainfrom
cloud-drop-errors-13352c

Conversation

@TrapsterDK

Copy link
Copy Markdown
Collaborator

Pull Request

Linked Issue

Part of #13352

Changes

  • cli/env: the symlink probe and the stage dir go through dx_atomic_fs::discard_file / discard_dir. clean_stage is gone. Test cleanup uses the same helpers.
  • cli/cli: test cleanup in update_outdated.rs, error_boundary_launcher_tests.rs and tests/agents/tests/dev_launcher.rs uses the helpers.
  • tools/testing: scratch removals in dx_testing and dx_nested use the helpers. compare_or_update returns an error when it cannot create the parent directory. Hermetic timeline, copy_latest_profile, windows_env and copy_test_logs, and nested make_file_writable, print the path and error to stderr instead of dropping it.
  • BUILD: dx_atomic_fs is now a dep of dx_testing, dx_nested and dev_launcher_test, and is visible to //tools/testing and //tools/testing/nested.

Left for a follow-up with dx_atomic_fs::write_hint once #13403 merges (best-effort writes):

  • tools/testing/process_probe/probe_test.rs:428 drop(std::fs::write(&self.0, b""))
  • tools/testing/hermetic/src/lib.rs:1696 drop(std::fs::write(&target, &content))

Verification

Run in a cloud container (as root):

  • tools/dx test //cli/env:dx_env_test //cli/cli/tests/agents:dev_launcher_test //tools/testing:dx_testing_test //tools/testing/nested:dx_nested_test //tools/testing/hermetic:hermetic_unit_test //cli/atomic_fs:dx_atomic_fs_test: 3 passed, 3 failed. All 6 failing cases fail the same way on the base commit: the read-only and undeletable-dir cases in atomic_fs and cli/env (root ignores the permissions), and the_consumer_materializes_from_dx_init in hermetic.
  • tools/dx test //cli/cli:dx_cli_test -- --test_filter=exec::: the update_outdated and error_boundary_launcher tests passed. The failing cases are read-only/unwritable cases that need a non-root user, plus sync_prunes_the_superseded_setup, which failed in 1 of 7 identical runs.
  • //tools/ci:lint_attributes_test: strict_tier_and_bazelrc_deny_the_same_rust_lints fails on the base commit too.
  • tools/dx check --apply on the touched files: the only finding is the dx_os_sys unused-crate warning in dx_nested, which the base commit has too. --apply also rewrote the deps of unrelated targets in tools/testing/BUILD.bazel and tools/testing/hermetic/BUILD.bazel, adding all_crate_deps(...). The check-only run on base shows no drift there, so I left those rewrites out.

Not run: --affected over the whole graph; CI is the gate.

This touches cli/atomic_fs/ (a .github/review-paths.txt path), so it needs needs-review and a second-session Review: comment.


Generated by Claude Code

@TrapsterDK TrapsterDK added the needs-review Touches review paths; needs a second-session Review: comment label Nov 18, 2026 — with Claude

Copy link
Copy Markdown
Collaborator Author

The red affected-test shards so far are not from this PR. Each of these fails locally on base 36813b3 the same way:

  • //deploy/private/install:cosign_real_test: the pinned cosign rejects --fulcio-url/--rekor-url ("cannot specify service URLs and use signing config").
  • //tools/api:api_test: "dx.schema.json changed but its version is still 1".
  • //cli/cli/tests/agents:agents_test: .claude/settings.json is not in the runfiles.

//rust/tests:rust_analyzer_acquisition_test passes locally on both base and this branch. It touches none of these files, so its shard gets one re-run once the run finishes.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator Author

Shard 12 is also red on base: //ruby/tests:crlf and //powershell/tests/conformance:coverage_test fail locally on 36813b3 too. This diff touches neither.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator Author

Shard 10 failed on //gazelle/kotlin:compile_test. It passes locally on both base 36813b3 and this branch. Like rust_analyzer_acquisition_test in shard 13, it failed only in CI. Once the run finishes, I'll re-run the failed jobs once.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator Author

Shard 2 is red on //config:workspace_policy (FAIL: observations). It fails the same way locally on base 36813b3, so it isn't from this PR.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator Author

Shard 15 is red on five tests. root_module_test, language_skeleton_test, module_extension_srcs_test, hermetic:elixir and hermetic_unit_test all fail locally on base 36813b3 too, so none of them comes from this PR.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator Author

Shard 14 is red on 18 tests, mostly tools/ci snapshot guards. I ran them locally:

  • host_env_test, lint_attributes_test, unreferenced_files_test, zero_compat_test and sandbox_escape_test give the same messages on base 36813b3. host_env_test names cli/atomic_fs/src/lib.rs, dev_launcher.rs and tools/testing/nested/src/lib.rs, but it reports the identical counts on base, and this diff adds no shebang or host path.
  • zero_compat_test, unreferenced_files_test and sandbox_escape_test flag only files this diff does not touch (cli/adopt, cc/tests/llvm_windows_cross, cli/os_sys).
  • starlark_docs_test fails locally too, and this diff changes no Starlark docs.

Generated by Claude Code

…t of #13352)

Scratch removals go through dx_atomic_fs::discard_file / discard_dir.
tools/testing propagates or reports the create, copy and permission
errors it used to drop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hyegjKSXyqfDEaFXtd
@TrapsterDK
TrapsterDK force-pushed the cloud-drop-errors-13352c branch from 3d98025 to 37f2351 Compare November 18, 2026 12:40
@TrapsterDK
TrapsterDK merged commit 9ac481a into main Nov 18, 2026
2 checks passed
@TrapsterDK
TrapsterDK deleted the cloud-drop-errors-13352c branch November 18, 2026 12:41
@github-actions

Copy link
Copy Markdown
Contributor

This pull request touched paths in .github/review-paths.txt and was merged without a Review: comment. See CONTRIBUTING.md.

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

Labels

needs-review Touches review paths; needs a second-session Review: comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants