Skip to content

testing: prebuilt guards on cache sets (part of #10986) - #13971

Draft
TrapsterDK wants to merge 3 commits into
mainfrom
issue-10986-prebuilt-guards
Draft

TrapsterDK wants to merge 3 commits into
mainfrom
issue-10986-prebuilt-guards

Conversation

@TrapsterDK

@TrapsterDK TrapsterDK commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #10986

The Go and Java prebuilt guards run offline from cache sets instead of network = True.

  • tools/testing/consumer/BUILD.bazel: go_prebuilt_guard_test and java_prebuilt_guard_test take cache/cache_locks, keep GO_GUARD_LANGS/JAVA_GUARD_LANGS, and stay on linux_x86_64 (the only host that ran them in CI; macOS and Windows host issues are prebuilt guard: go and java guards run offline on macos_arm64 and windows_x86_64 #13969). They get //core/coreutils:applets as the nested PATH, since gazelle's go_repository_tools execs env.
  • prebuilt_guard_test.rs: use_lock of the first language before the first nested command; every nested command runs with the applets PATH.
  • prebuilt_guard.rs: target_root deps take allow_files = True; the pcov and julia_internal hub aliases name source files, which failed analysis on main.
  • MODULE.bazel, tools/testing/nested_cache/: the two sets, their lists and locks, recorded by evidence run 44890086581 and merged with nested_cache_update --from.
  • .github/workflows/lock-refresh.yml: both guards in the linux_x86_64 nested record row.

Evidence: offline run 44892209394: go_prebuilt_guard_test passed; java_prebuilt_guard_test failed offline on jline-3.30.6-sources.jar, which record run 44890086581 did not list (reached via the rules_scala java_binaries from #14409).

The Java guard reports rules_scala exe and scalac_bootstrap java_binaries in the java consumer, from #14409 on main; main's network job fails the same guard.

Tested: bazel test //tools/testing/consumer:prebuilt_guard_lib_test //tools/testing/consumer:in_graph_prebuilt_guard_test //tools/ci:test_tags_test //tools/testing:nested_cache_update_test passed; both guard tests build. //core/modules:consumer_deps_test fails on main's other nested locks (rules_dart/rules_flutter) and rules_cuda, not on these locks.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hzWDHEg9zNhhTJrJ7t

@TrapsterDK TrapsterDK added the needs-review Touches review paths; needs a second-session Review: comment label Nov 19, 2026
@TrapsterDK
TrapsterDK force-pushed the issue-10986-prebuilt-guards branch from edca194 to 74f6289 Compare November 19, 2026 16:07
@TrapsterDK TrapsterDK changed the title testing: prebuilt guards on cache sets, test_tags_test counts network = True (part of #10986) testing: prebuilt guards on cache sets (part of #10986) Nov 19, 2026
@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

Draft: java_prebuilt_guard_test fails offline and online in an untouched file (jvm_android_sdk_aspect resolves rules_android's empty-SDK @androidsdk//:sdk, which has no ToolchainInfo). Fix needs a choice between a rules_android patch and dropping the toolchain request from the aspect. Go guard passes (runs 44564882050, 44565826282).

@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

Merge lane: blocked. The java blocker is gone on main (#14053, jvm_android_sdk_aspect requires AndroidIdeInfo). Rebasing conflicts with main's guard rework: the go guard now covers GO_GUARD_LANGS (go, lua, capnproto, ...), java covers java/kotlin/scala, and the guards run on Windows (#14072). The recorded go_prebuilt_guard/java_prebuilt_guard sets are for single-language consumers, and target_compatible_with linux_x86_64 would drop the other platforms. Next step: rebase, keep the multi-language env, re-record both sets on linux_x86_64, macos_arm64 and windows_x86_64 with a lock-refresh.yml nested record run (not an evidence/ci run, so not dispatched here), and drop the platform restriction.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K

Copy link
Copy Markdown
Collaborator Author

/lock-refresh nested=true


Generated by Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

Lock refresh (nested=true) started on issue-10986-prebuilt-guards: https://github.com/devhusdk/rules_dx/actions/runs/44711851915

@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

Rebased onto main (squashed onto the current guard layout), fixed target_root allow_files and the missing env on the nested PATH. Record run 44890086581, offline run 44892209394: go guard passes offline; java guard fails offline on jline-3.30.6-sources.jar missing from the recorded list. That jar is reached only through the rules_scala exe/scalac_bootstrap java_binaries that #14409 brought into the java consumer, which the java guard also reports on main. Stays draft until the java set records it or the rules_scala regression is fixed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hzWDHEg9zNhhTJrJ7t

TrapsterDK and others added 3 commits November 23, 2026 13:05
go_prebuilt_guard_test and java_prebuilt_guard_test run offline from the
nested_cache_go_prebuilt_guard and nested_cache_java_prebuilt_guard sets
on linux_x86_64 instead of network = True.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hzWDHEg9zNhhTJrJ7t
…(part of #10986)

gazelle go_repository_tools execs env, which the nested NO_PATH lacks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hzWDHEg9zNhhTJrJ7t
…6_64 (part of #10986)

Recorded by evidence run 44890086581, merged with nested_cache_update --from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hzWDHEg9zNhhTJrJ7t
@TrapsterDK
TrapsterDK force-pushed the issue-10986-prebuilt-guards branch from 4ee64d9 to f2670fa Compare November 23, 2026 12:08
@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

Rebased onto main (5bf6454); the target_root allow_files commit is already on main and dropped. Local: prebuilt_guard_lib_test, in_graph_prebuilt_guard_test, test_tags_test, nested_cache_update_test, workflow_files_test pass; both guard tests build. #14482 (dx_pins rule sets count as upstream) is on main now, which may clear the rules_scala java_binary reports. Re-recording the two sets against current main, then an offline run.

/lock-refresh nested=true

🤖 Generated with Claude Code

@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

/lock-refresh nested=true

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

Lock refresh (nested=true) started on issue-10986-prebuilt-guards: https://github.com/devhusdk/rules_dx/actions/runs/45173007219

@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

Lock refresh 45173007219 records every nested set, so it will hit the same main failure as #14093: the README quickstart case fails dx check //app/... on clippy::must_use_candidate, fixed by 3b96a67 on #14188. Re-record and run the offline java guard after that reaches main.

🤖 Generated with Claude Code

This branch has not been deployed

No deployments
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.

1 participant