Skip to content

Commit a248df6

Browse files
committed
bazel: run 2026-11-28
1 parent 8d503e2 commit a248df6

2 files changed

Lines changed: 40 additions & 15 deletions

File tree

‎entries/bazel/20261128T125034Z.md‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[agent] 2026-11-28: Bazel bug-hunt run
2+
3+
main `cfc870f` (unchanged since 26 Nov), latest release v5.1.0, newest Bazel pin 9.3.2, Linux x86_64.
4+
5+
**Still blocked: no real Bazel build runs in this sandbox** (fourth run). New this run: `scripts/install-bazel.sh 9.3.2` now works (the release file comes from Bazel's GitHub releases). `bazel build //...` in the rules_js fixture then stops at module resolution: the egress proxy refuses `bcr.bazel.build` (HTTP 403, "no rule or network setting allows this host"). `releases.bazel.build`, `mirror.bazel.build` and the Socket API hosts are refused as well, and Bazel's GitHub releases page answers 403, so new Bazel and ruleset releases could not be looked up. Not worked around.
6+
7+
Covered:
8+
- Nightly CI on `main`: the scheduled runs of all eight `bazel-*.yml` workflows on 26, 27 and 28 Nov are green (Ruby legs read per job: 7.7.2, 8.8.2, 9.3.2 and macOS 9.3.2 pass). No red leg, no flake.
9+
- Outside a Bazel build, RubyGems (the rules_ruby fixture's `Gemfile`, `Gemfile.lock` with a `CHECKSUMS` section and `consumer.rb` in `svc/` of a git checkout; the loopback stand-in of `e2e_bazel_build/ruby.rs` for the Socket API, rubygems.org and the patch host): hosted scan, `vex`, a second scan with `--json`, `list`, `rollback`, and the scan and `rollback` again with `--json`; vendored scan, `vex`, `vendor --check`, a second scan, `vendor --revert`, and again with `--json`; each with main, with v5.1.0 and with main under `SOCKET_NO_BAZEL=1`. Pass: the same exit codes (all 0) and the same files at every step (the vendor marker differs by its timestamp only), `vex` says `not_affected` after each scan, and each undo gives the tree back byte for byte. The output differs from v5.1.0 only by the changes already ruled out as not Bazel's (the human scan summary, `mergePendingIds`, `removedRegistryEntries`, a second product id in the VEX document); main with the switch prints what main prints without it.
10+
- A project Bazel does not build, RubyGems: the same project under a root `MODULE.bazel` with no hub, under a leftover empty `WORKSPACE`, and in `tools/` of a workspace whose `ruby.bundle_fetch` reads `//other:Gemfile` and its lock. Pass in both modes, with main, v5.1.0 and the switch: files, output and exit codes are those of the project in no workspace.
11+
- File level only, no build, in the rules_ruby fixture workspace (the hub reads `//:Gemfile` and `//:Gemfile.lock`, rules_ruby 1.0.0-rc2):
12+
- hosted scan rewrites `Gemfile` and `Gemfile.lock` and nothing else; `vex` says `not_affected`; `rollback` gives every file back byte for byte, also with both files in CRLF.
13+
- vendored scan with no `.bazelversion`: declines with `vendor_gem_bazel_hub`, exit 1, writes nothing; the message names the call and its line, the missing Bazel release, `--mode hosted` and `--allow-vendored-in-bazel`. `vex` after it exits 2, "No patches in this project".
14+
- vendored scan with `.bazelversion` 9.3.2: commits `gems/sp-victim-1.0.0.gem` under `.socket/vendor/gem/<id>/` with its `.gitignore` and `.gitattributes`, and rewrites the pair; `vendor --check` passes; `vendor --revert` gives every file back byte for byte, also in CRLF.
15+
These are not matrix passes: nothing was built.
16+
17+
Filed: none.
18+
19+
Commented on or closed: none. #2281 and #2311 are still open; main has not changed since they were filed, so they were not re-run.
20+
21+
Not done: no real `bundle install` at any step (the stand-in serves no full compact index, and the gems exist nowhere else), so "Bundler loads the patched gem" was not checked for the project outside Bazel; agent mode for RubyGems (needs an installed gem).
22+
23+
Ruled out: nothing new.
24+
25+
Not covered (need a build): every Hosted, Vendored and Agent cell of the matrix, the shapes list, new Bazel and ruleset releases.

‎state/bazel.md‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
[agent] Progress ledger for the scheduled Bazel workspaces bug-hunt routine (label pm:bazel).
22

3-
Last run: 2026-11-27, main `cfc870f`, release v5.1.0, newest Bazel pin 9.3.2. Real Bazel builds are blocked in the sandbox (see backlog item 1), so no Hosted, Vendored or Agent cell has been tested on a build yet.
3+
Last run: 2026-11-28, main `cfc870f`, release v5.1.0, newest Bazel pin 9.3.2. Real Bazel builds are blocked in the sandbox (see backlog item 1), so no Hosted, Vendored or Agent cell has been tested on a build yet.
44

55
Bazel support is experimental. The rows below are the rows of "Bazel workspaces: what is supported" in `docs/ecosystems.md`, which says what each cell promises and with which conditions. A cell here records what this routine saw on a real Bazel build: pass (Bazel release, date), fail (issue number), blocked (why) or untested.
66

77
## Coverage matrix
88

99
| Ecosystem, and how Bazel takes its packages | Hosted | Vendored | Agent (not supported: the build must still pass) | VEX | Nightly CI legs on `main` |
1010
|---|---|---|---|---|---|
11-
| npm: aspect_rules_js over a pnpm lock | untested | untested | untested | untested | green 25, 26 and 27 Nov (2026-11-27) |
12-
| PyPI: rules_python `pip.parse` over a requirements file | untested | untested | untested | fail #2281 (no build: files only; no document for a hosted patch beside a virtualenv with the unpatched release) | green 25, 26 and 27 Nov (2026-11-27) |
13-
| Go: gazelle `go_deps.from_file` over `go.mod` | untested | untested | fail #2311 (no build: files only; the run says nothing about agent mode being unsupported for a Bazel build) | untested | green 25, 26 and 27 Nov (2026-11-27) |
14-
| RubyGems: rules_ruby `ruby.bundle_fetch` over `Gemfile.lock` | untested | untested | untested | untested | green 25, 26 and 27 Nov (2026-11-27) |
15-
| Cargo: rules_rust `crate.from_cargo` over `Cargo.lock` | untested | untested | untested | untested | green 25, 26 and 27 Nov (2026-11-27) |
16-
| NuGet: `nuget.from_lock` over `packages.lock.json` | untested | untested | untested | untested | green 25, 26 and 27 Nov (2026-11-27) |
17-
| Composer: a rule that runs `composer install` from `composer.lock` | untested | untested (declines by design) | untested | untested | green 25, 26 and 27 Nov (2026-11-27) |
18-
| Maven: rules_jvm_external `maven.install` with a `lock_file` | untested | untested | untested | untested | green 25, 26 and 27 Nov (2026-11-27) |
11+
| npm: aspect_rules_js over a pnpm lock | untested | untested | untested | untested | green 26, 27 and 28 Nov (2026-11-28) |
12+
| PyPI: rules_python `pip.parse` over a requirements file | untested | untested | untested | fail #2281 (no build: files only; no document for a hosted patch beside a virtualenv with the unpatched release) | green 26, 27 and 28 Nov (2026-11-28) |
13+
| Go: gazelle `go_deps.from_file` over `go.mod` | untested | untested | fail #2311 (no build: files only; the run says nothing about agent mode being unsupported for a Bazel build) | untested | green 26, 27 and 28 Nov (2026-11-28) |
14+
| RubyGems: rules_ruby `ruby.bundle_fetch` over `Gemfile.lock` | untested | untested | untested | untested | green 26, 27 and 28 Nov (2026-11-28) |
15+
| Cargo: rules_rust `crate.from_cargo` over `Cargo.lock` | untested | untested | untested | untested | green 26, 27 and 28 Nov (2026-11-28) |
16+
| NuGet: `nuget.from_lock` over `packages.lock.json` | untested | untested | untested | untested | green 26, 27 and 28 Nov (2026-11-28) |
17+
| Composer: a rule that runs `composer install` from `composer.lock` | untested | untested (declines by design) | untested | untested | green 26, 27 and 28 Nov (2026-11-28) |
18+
| Maven: rules_jvm_external `maven.install` with a `lock_file` | untested | untested | untested | untested | green 26, 27 and 28 Nov (2026-11-28) |
1919

2020
| Outside a Bazel build | Result |
2121
|---|---|
22-
| A project in no Bazel workspace behaves exactly as v5.1.0 did | npm (pnpm lock v9) and PyPI (hashed requirements.txt), 2026-11-26, and Go (`go.mod` with `go.sum`, a real `go run` at each step), 2026-11-27: pass, main `cfc870f` against v5.1.0: same files and exit codes; output differs only by changes that are not Bazel's. Other ecosystems untested |
23-
| A project in a Bazel workspace that Bazel does not build | npm and PyPI: pass under a `MODULE.bazel` with no hub and under a leftover `WORKSPACE`; PyPI also in `tools/` beside a `pip.parse` that reads another project's file, 2026-11-26. Go: pass under both, 2026-11-27: hosted mode identical; vendored mode adds the documented `.bazelignore` pair and its undo removes it. Other ecosystems untested |
22+
| A project in no Bazel workspace behaves exactly as v5.1.0 did | npm (pnpm lock v9) and PyPI (hashed requirements.txt), 2026-11-26, and Go (`go.mod` with `go.sum`, a real `go run` at each step), 2026-11-27, and RubyGems (`Gemfile.lock` with `CHECKSUMS`; files and output only, no `bundle install`), 2026-11-28: pass, main `cfc870f` against v5.1.0: same files and exit codes; output differs only by changes that are not Bazel's. Other ecosystems untested |
23+
| A project in a Bazel workspace that Bazel does not build | npm and PyPI: pass under a `MODULE.bazel` with no hub and under a leftover `WORKSPACE`; PyPI also in `tools/` beside a `pip.parse` that reads another project's file, 2026-11-26. Go: pass under both, 2026-11-27: hosted mode identical; vendored mode adds the documented `.bazelignore` pair and its undo removes it. RubyGems: pass under both and in `tools/` beside a `ruby.bundle_fetch` that reads another project's pair, 2026-11-28: both modes identical to no workspace. Other ecosystems untested |
2424

2525
## Backlog
26-
1. Feasibility: **blocked, 2026-11-26.** `bazel build` of a fixture stops at module resolution: the sandbox's network policy refuses `bcr.bazel.build` (HTTP 403 from the egress proxy). Also refused: `releases.bazel.build` (9.3.2 installed only from an existing cache), `mirror.bazel.build`, `patches-api.socket.dev`, `api.socket.dev`, `patch.socket.dev`. Still so on 2026-11-27 (third run), with no cached Bazel binary. Reachable: `github.com/SocketDev/socket-patch` only (other GitHub repositories answer 403, so new Bazel and ruleset releases cannot be looked up either), `registry.npmjs.org`, `nodejs.org`, `pypi.org`, `proxy.golang.org`, `rubygems.org`, `index.crates.io` (not `crates.io`), `api.nuget.org`, `repo1.maven.org`, `repo.packagist.org`. Each run: try one fixture build first (`cargo test -p socket-patch-cli --test e2e_bazel_build -- --ignored --exact npm::hosted_npm_translate_lock`, about 10 minutes to compile); while it fails on the registry, do only items 2, 3 and 8.
26+
1. Feasibility: **blocked, 2026-11-26.** `bazel build` of a fixture stops at module resolution: the sandbox's network policy refuses `bcr.bazel.build` (HTTP 403 from the egress proxy). Also refused: `releases.bazel.build` (9.3.2 installed only from an existing cache), `mirror.bazel.build`, `patches-api.socket.dev`, `api.socket.dev`, `patch.socket.dev`. Still so on 2026-11-28 (fourth run); since that day `scripts/install-bazel.sh 9.3.2` works (Bazel's GitHub release downloads are let through), so `bcr.bazel.build` is what stops a build. Reachable: `github.com/SocketDev/socket-patch` only (other GitHub repositories answer 403, so new Bazel and ruleset releases cannot be looked up either), `registry.npmjs.org`, `nodejs.org`, `pypi.org`, `proxy.golang.org`, `rubygems.org`, `index.crates.io` (not `crates.io`), `api.nuget.org`, `repo1.maven.org`, `repo.packagist.org`. Each run: try one fixture build first (install the pin, copy `fixtures/bazel/rules_js/bzlmod/common` and `e9` into one directory and run `bazel build //...` there: under a minute); while it fails on the registry, do only items 2, 3, 8 and 9.
2727
2. The latest nightly run of each `bazel-*.yml` workflow on `main`: which legs are red, and whether an open issue covers each.
28-
3. A project in no Bazel workspace, and one in a workspace that Bazel does not build: main against v5.1.0. npm, PyPI and Go are done; next RubyGems, then Cargo, NuGet, Composer, Maven. No public patch API here: use a loopback stand-in. The quickest one is the test harness's own: a local, uncommitted `#[ignore]` test at the end of `tests/e2e_bazel_build/<ecosystem>.rs` that builds the stand-in as the flows do, writes its origin to a file and waits (about 3 minutes to compile); run `socket-patch` against it with `--api-url <origin> --org test-org --api-token fake-token`.
28+
3. A project in no Bazel workspace, and one in a workspace that Bazel does not build: main against v5.1.0. npm, PyPI, Go and RubyGems are done; next Cargo, then NuGet, Composer, Maven. For RubyGems a real `bundle install` at each step is still open (the stand-in needs a compact index for both gems). No public patch API here: use a loopback stand-in. The quickest one is the test harness's own: a local, uncommitted `#[ignore]` test at the end of `tests/e2e_bazel_build/<ecosystem>.rs` that builds the stand-in as the flows do, writes its origin to a file and waits (about 3 minutes to compile); run `socket-patch` against it with `--api-url <origin> --org test-org --api-token fake-token`.
2929
4. Hosted mode, one ecosystem per run, in the order of the table (npm first): the mode's one command, `bazel build`, the patched package in the build, `vex`, the undo, `bazel build` again.
3030
5. Vendored mode, the same way, for the rows the docs list as Supported; for the rows that decline, the command exits 1, writes nothing and the build still passes.
31-
6. Agent mode in a Bazel workspace: the message says what to use instead (Go says nothing: #2311; check the next ecosystem on files too), and the build still passes. Also compare with v5.1.0 and with no workspace: after `scan --mode agent` and `rollback --yes` in the gazelle fixture, `.socket/manifest.json` stays.
31+
6. Agent mode in a Bazel workspace: the message says what to use instead (Go says nothing: #2311; check RubyGems or Cargo on files next, which needs an installed copy), and the build still passes. Also compare with v5.1.0 and with no workspace: after `scan --mode agent` and `rollback --yes` in the gazelle fixture, `.socket/manifest.json` stays.
3232
7. `vex` in each row: `not_affected` only for a package the Bazel build takes patched.
3333
8. The docs table against what you saw: a cell that promises more than the build holds.
34-
9. File-level checks that need no build, per ecosystem (done for PyPI, 2026-11-26: the vendored decline writes nothing; hosted and download-cache undo give `requirements.txt` and `.bazelrc` back byte for byte, also for a `.bazelrc` with CRLF, without a final newline or missing): and for Go, 2026-11-27: the `.bazelignore` pair and its undo byte for byte with LF, CRLF, no final newline, a BOM, blank lines at the end, a covering line and the opt-out): next the rules_ruby fixture. Needs a build: whether Bazel skips a directory named by a line `.socket/` or `./.socket/vendor/golang`, which socket-patch takes for a cover; and what a commit without `.bazelignore` costs, since the next steps of a vendored Go scan do not name the file.
34+
9. File-level checks that need no build, per ecosystem (done for PyPI, 2026-11-26: the vendored decline writes nothing; hosted and download-cache undo give `requirements.txt` and `.bazelrc` back byte for byte, also for a `.bazelrc` with CRLF, without a final newline or missing): and for Go, 2026-11-27: the `.bazelignore` pair and its undo byte for byte with LF, CRLF, no final newline, a BOM, blank lines at the end, a covering line and the opt-out): and for RubyGems, 2026-11-28: hosted undo byte for byte with LF and CRLF; the vendored decline without `.bazelversion` writes nothing; with `.bazelversion` the committed gem and its revert byte for byte, LF and CRLF): next the rules_rust fixture. Needs a build: whether Bazel skips a directory named by a line `.socket/` or `./.socket/vendor/golang`, which socket-patch takes for a cover; and what a commit without `.bazelignore` costs, since the next steps of a vendored Go scan do not name the file.
3535
10. Shapes, npm first: a committed `MODULE.bazel.lock` with `--lockfile_mode=error`, two hubs, a monorepo Bazel builds in part, a `.bazelrc` with a repository cache or a downloader config, a `WORKSPACE` file beside `MODULE.bazel`.
3636

3737
## Known non-bugs

0 commit comments

Comments
 (0)