Skip to content

Commit ab4e659

Browse files
committed
bazel: 2026-12-05 run (Maven row on real Bazel, #2529, #2530)
1 parent 465a53c commit ab4e659

3 files changed

Lines changed: 54 additions & 22 deletions

File tree

‎entries/bazel/20261205T131000Z.md‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[agent] 2026-12-05: Bazel bug-hunt run
2+
3+
main `cd7c5c5` (two commits after v5.2.0, both on platform gems), release v5.2.0, Bazel 9.3.2 and 8.8.2 (most of the run), 7.7.2 and the unpinned 9.3.3, Linux x86_64. This run took the Maven row (rules_jvm_external), the first time on a real Bazel.
4+
5+
Setup: `bcr.bazel.build` is still refused (tried once); the rewrite to `raw.githubusercontent.com` stays. The Maven row was blocked on the JDK download (`cdn.azul.com`). It builds here on the machine's JDK 21, a setup users have: a `java_runtime` over `/usr/lib/jvm/java-21-openjdk-amd64` and a `default_java_toolchain` in `BUILD.bazel`, registered with `--extra_toolchains`, on eras `e9`, `e8` and `e7`. Bazel has to run as a user that is not root (rules_python's toolchain in the graph of rules_java 8 refuses root: a sandbox artefact). Flows ran by hand against the loopback stand-ins of `e2e_bazel_build/maven.rs` (`serve_upstream` + `grant`, in a local, uncommitted test that waits), with the release build of main. No refused host beyond the prompt's was met.
6+
7+
Covered:
8+
- Nightly CI on `main`: the scheduled runs of all eight `bazel-*.yml` workflows on 3, 4 and 5 Dec are green; the 5 Dec runs are on `cd7c5c5`. No red leg, no flake.
9+
- Maven, hosted, 9.3.2 (rules_jvm_external 7.2), 8.8.2 (6.9), 7.7.2 (6.5) and the unpinned 9.3.3: the ruleset's pin; unpatched build; `get <purl> --mode hosted --yes` (8.8.2 also `scan --mode hosted --yes`) writes the block in `MODULE.bazel` alone; the build prints the patched marker, also under `--lockfile_mode=error`; `vex` says `not_affected`; the relock, `bazel mod tidy` and a second run change nothing; `rollback --yes` gives every file back byte for byte and the upstream build; `vex` then exits 2. **Pass.**
10+
- Maven, vendored, the same four releases: `get <purl> --mode vendored --yes` writes the jar's directory, the block, the `.bazelignore` line and the ledger; the build is patched, frozen too; `vendor --check` passes; `bazel query //...` lists nothing under `.socket`; a fresh clone in a new output base with the stand-in and the patch host blocked builds patched (8.8.2); a jar with bytes appended fails `vendor --check` and `repair` restores it; the upstream jar in its place builds unpatched, `vendor --check` fails and `vex` writes no document; `vendor --revert` byte for byte. **Pass.**
11+
- Shapes: a leftover `WORKSPACE` file (8.8.2); beside a `pom.xml`, where one hosted command pins the pom and the hub, and the vendored scan vendors for both (8.8.2); a version bump of the patched artifact (9.3.2): the relock passes, the build stops at the entry as documented, `vex` attests nothing, a hosted scan takes the stale entry out and pins the patch of the new release, the build is patched; a monorepo in a git checkout (9.3.2) with two hubs on two locks, a Maven project below the root under `.bazelignore`: one hosted scan at the root patches both hubs, a `get` below the root declines (`maven_bazel_not_at_root`) and writes nothing, the pom pin below the root is `affected` in `vex` until the root is patched, vendored at the root builds both, every undo byte for byte with the checkout's own `.bazelignore` kept; two hubs on two releases of the artifact: one scan writes two entries, both builds patched, undo byte for byte. **Pass.**
12+
- Declines (8.8.2): hosted mode under a `.bazelrc` downloader config and under `--vendor_dir` (`maven_bazel_download`), for a hub with no `lock_file`, for `.bazelversion` 7.3.2; vendored mode for the last two (exit 1). Each names its reason, writes nothing, and the build still passes. Vendored mode works under a downloader config. **Pass**, but see #2529 and #2530.
13+
- Agent mode (8.8.2, beside a `pom.xml`): patches the jar of the Maven local repository, exits 0 and warns that the hub stays unpatched, with the command that patches it; the frozen build prints the upstream marker before and after; `vex` says `affected` with the lock and `MODULE.bazel:22`; after the remedy the build is patched and `vex` says `not_affected`. **Pass.**
14+
- Outside Bazel, Maven (files only, no `mvn`): main against v5.2.0, a pom project in no workspace and the same under a `MODULE.bazel` with no hub: hosted scan, vendored scan, agent scan, `vex` and each undo write the same files, print the same output and exit the same. **Pass.**
15+
- New releases: none newer than Bazel 9.3.3, 8.9.0, 7.7.3 or rules_jvm_external 7.2. Maven passes on 9.3.3 in both modes.
16+
17+
Filed:
18+
- https://github.com/SocketDev/socket-patch/issues/2529 (`ux`): a hosted `get` or `scan` that declines over a vendored entry of the same patch says "the Bazel build keeps the upstream jar", calls the reason a "server status" and counts the package as left to patch, while the build prints the patched marker. 8.8.2 and 9.3.2, also v5.2.0; over a hosted entry the sentence is right.
19+
- https://github.com/SocketDev/socket-patch/issues/2530 (`ux`): `scan --mode vendored` at the root of a checkout only Bazel builds says "No packages found. Run your package manager's install first." while the hosted scan finds the hub's jars and `get <purl> --mode vendored` works; one sentence of the docs names the scan.
20+
21+
Commented on:
22+
- https://github.com/SocketDev/socket-patch/issues/2311#issuecomment-7438495746: Maven's agent mode already says it, on a real build.
23+
24+
Re-triage: the two commits since `d987721` touch gem code only, so #2281 and #2311 were not re-run for their ecosystems; #2311 has the Maven result. #2449 may be touched by the `vex` change and needs the gem stand-in (backlog 3).
25+
26+
Ruled out (see `known-non-bugs/bazel.md`): `vex` attests a vendored jar by its patched files, not its sha256; a checkout with no `.git` does not take a project below the root as part of the workspace (documented); `.socket/` left after an agent undo.
27+
28+
Seen and not filed: the hosted next step says "Reinstall from the updated lockfile" where only `MODULE.bazel` changed; a hosted decline names no other mode.
29+
30+
Not covered: platform gems under a rules_ruby hub (what main changed), `m2local`, `maven.override`, a hub named `maven`, a real `mvn`, a real `--vendor_dir` build, the Go row (blocked).

‎known-non-bugs/bazel.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@
2626
- 2026-12-04: NuGet vendored mode under a rules_csharp hub declines (exit 1, `vendor_nuget_bazel_workspace`, nothing written, the build still passes) with an unpinned Bazel release in `.bazelversion` (9.3.3, 8.9.0, 7.7.3), for a project below the root, beside a second `nuget.from_lock` and with no `MODULE.bazel.lock`: documented ("where the checkout does not show that the block works it declines").
2727
- 2026-12-04: a hosted NuGet scan in a project whose config is not the one the hub's last tag names writes nothing and names a remedy (flip the tag, or `--cwd` to the shared config); a hosted scan over a vendored NuGet package writes nothing and counts it as left to patch. Documented ("The tag that decides names another file", "A package of the project is vendored"); the remedies work on a real build.
2828
- 2026-12-04: right after a hosted or vendored NuGet scan, or its undo, a `--lockfile_mode=error` build fails on the stale `MODULE.bazel.lock`: documented; the missing words in the output are #2407. The LF lines a scan inserts into a CRLF `NuGet.Config` are NuGet's ledger's (cosmetic, undo byte for byte).
29+
- 2026-12-05: `vex` says `not_affected` of a vendored Maven jar with bytes appended after the archive: it checks the patched files in the jar Bazel builds (an upstream jar in that place gets no document, `vendor_hash_mismatch`); the jar's own sha256 is `vendor --check`'s. Not a defect.
30+
- 2026-12-05: in a checkout with no `.git`, a Maven project below the Bazel root is not taken as part of the workspace (no `maven_bazel_not_at_root`, `vex` not `affected`): documented, the lookup stops at the root of the git checkout. With `git init` it is as documented.
31+
- 2026-12-05: `rollback` after an agent Maven patch leaves `.socket/` (the kept upstream jar and an empty manifest), as in the other ecosystems; a vendored `get` under `--vendor_dir` writes the entry (only hosted mode declines there, documented); `vex` exits 2 with a warning while the block holds only a stale entry (documented).

0 commit comments

Comments
 (0)