|
| 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). |
0 commit comments