Skip to content

Commit 5a4e0ca

Browse files
committed
bazel: first run, real builds blocked by the sandbox network
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aeSp4RkjkUTnKx5sbMn
1 parent d0e7237 commit 5a4e0ca

3 files changed

Lines changed: 38 additions & 15 deletions

File tree

‎entries/bazel/20261126T002114Z.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[agent] 2026-11-26: Bazel bug-hunt run
2+
3+
First run. main `cfc870f`, latest release v5.1.0, Bazel 9.3.2 (newest pin), Linux x86_64.
4+
5+
**Blocked: no real Bazel build runs in this sandbox.** The network policy refuses `bcr.bazel.build` (HTTP 403 from the egress proxy), so `bazel build` of the rules_js fixture stops at "Error accessing registry https://bcr.bazel.build/", and `npm::hosted_npm_translate_lock` fails at its first build for the same reason. Also refused: `releases.bazel.build`, `mirror.bazel.build`, `patches-api.socket.dev`, `api.socket.dev`, `patch.socket.dev`. Reachable: `github.com`, `registry.npmjs.org`, `nodejs.org`. `scripts/install-bazel.sh 9.3.2` worked only because the binary was already cached. Not worked around.
6+
7+
Covered:
8+
- Nightly CI on `main`: the scheduled runs of all eight `bazel-*.yml` workflows on 23, 24 and 25 Nov are green (npm legs read per job: 7.7.2, 8.8.2, 9.3.2 and macOS 9.3.2 all pass). No red leg, no flake.
9+
- Outside a Bazel build, npm (pnpm lock v9, lock-only checkout, a loopback stand-in for the Socket API, the patch host and the registry): hosted scan, `vex`, `rollback`, vendored scan, `vex`, `vendor --check`, `vendor --revert` with main and with v5.1.0. Pass: the same exit codes and the same files at every step, and each undo gives the tree back byte for byte. The output differs only by changes that are not Bazel's (new `mergePendingIds` and `removedRegistryEntries` fields, a second product id in the VEX document, the layout of the human scan summary); main with `SOCKET_NO_BAZEL=1` prints the same as main without it.
10+
- A project Bazel does not build, npm: the same project under a root `MODULE.bazel` with no hub, and under a leftover empty `WORKSPACE`. Pass: identical to the same project in no workspace (files, output, exit codes).
11+
- File level only, no build, in the rules_js fixture workspace with a committed `MODULE.bazel.lock` and a `.bazelrc`: hosted scan then `rollback`, vendored scan then `vendor --revert` each give every file back byte for byte, and neither touches `MODULE.bazel`, `MODULE.bazel.lock`, `.bazelrc` or `.bazelignore`. `vex` says `not_affected` after each mode. These are not matrix passes: nothing was built.
12+
13+
Not covered (need a build): every Hosted, Vendored, Agent and VEX cell of the matrix, the shapes list, new Bazel and ruleset releases.
14+
15+
Issues filed, commented on or closed: none. Open `pm:bazel` issues: none.
16+
17+
False positives ruled out (stand-in artifacts, see `known-non-bugs/bazel.md`): `vex` exit 1 "record_unavailable" after a hosted scan, and `rollback` "manifest_not_found" after a hosted scan.

‎known-non-bugs/bazel.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Bazel: ruled out, do not re-file
2+
3+
- 2026-11-26: `vex` exits 1 with `record_unavailable` after a hosted scan against a home-made stand-in API. The stand-in did not answer `GET /patches/view/<uuid>?include_blobs=false` (query string). Not a product bug.
4+
- 2026-11-26: `rollback` says `manifest_not_found` after a hosted scan against a stand-in on loopback. A hosted pin is recognised by the patch host's origin: set `SOCKET_PATCH_SERVER_URL` (and `SOCKET_NPM_REGISTRY`) as `e2e_bazel_build/npm.rs` does.
5+
- 2026-11-26: main and v5.1.0 print different output for a project in no Bazel workspace (`mergePendingIds`, `removedRegistryEntries`, a second product id in the VEX document, the human scan summary). These come from changes that are not Bazel's: main with `SOCKET_NO_BAZEL=1` prints the same as main without it.

‎state/bazel.md‎

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

3-
Last run: none yet (routine created 2026-11-26).
3+
Last run: 2026-11-26, 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, Agent or VEX cell has been tested 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 | unchecked |
12-
| PyPI: rules_python `pip.parse` over a requirements file | untested | untested | untested | untested | unchecked |
13-
| Go: gazelle `go_deps.from_file` over `go.mod` | untested | untested | untested | untested | unchecked |
14-
| RubyGems: rules_ruby `ruby.bundle_fetch` over `Gemfile.lock` | untested | untested | untested | untested | unchecked |
15-
| Cargo: rules_rust `crate.from_cargo` over `Cargo.lock` | untested | untested | untested | untested | unchecked |
16-
| NuGet: `nuget.from_lock` over `packages.lock.json` | untested | untested | untested | untested | unchecked |
17-
| Composer: a rule that runs `composer install` from `composer.lock` | untested | untested (declines by design) | untested | untested | unchecked |
18-
| Maven: rules_jvm_external `maven.install` with a `lock_file` | untested | untested | untested | untested | unchecked |
11+
| npm: aspect_rules_js over a pnpm lock | untested | untested | untested | untested | green 23, 24 and 25 Nov (2026-11-26) |
12+
| PyPI: rules_python `pip.parse` over a requirements file | untested | untested | untested | untested | green 23, 24 and 25 Nov (2026-11-26) |
13+
| Go: gazelle `go_deps.from_file` over `go.mod` | untested | untested | untested | untested | green 23, 24 and 25 Nov (2026-11-26) |
14+
| RubyGems: rules_ruby `ruby.bundle_fetch` over `Gemfile.lock` | untested | untested | untested | untested | green 23, 24 and 25 Nov (2026-11-26) |
15+
| Cargo: rules_rust `crate.from_cargo` over `Cargo.lock` | untested | untested | untested | untested | green 23, 24 and 25 Nov (2026-11-26) |
16+
| NuGet: `nuget.from_lock` over `packages.lock.json` | untested | untested | untested | untested | green 23, 24 and 25 Nov (2026-11-26) |
17+
| Composer: a rule that runs `composer install` from `composer.lock` | untested | untested (declines by design) | untested | untested | green 23, 24 and 25 Nov (2026-11-26) |
18+
| Maven: rules_jvm_external `maven.install` with a `lock_file` | untested | untested | untested | untested | green 23, 24 and 25 Nov (2026-11-26) |
1919

2020
| Outside a Bazel build | Result |
2121
|---|---|
22-
| A project in no Bazel workspace behaves exactly as v5.1.0 did | untested |
23-
| A project in a Bazel workspace that Bazel does not build | untested |
22+
| A project in no Bazel workspace behaves exactly as v5.1.0 did | npm (pnpm lock v9): pass, main `cfc870f` against v5.1.0, 2026-11-26: 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: pass under a `MODULE.bazel` with no hub and under a leftover `WORKSPACE`, 2026-11-26. Other ecosystems untested |
2424

2525
## Backlog
26-
1. Feasibility: install a pinned Bazel with `scripts/install-bazel.sh` and build one fixture workspace under `crates/socket-patch-cli/tests/fixtures/bazel`. Record every host the sandbox can't reach.
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`. Reachable: `github.com`, `registry.npmjs.org`, `nodejs.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.
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: the same commands on `main` and on v5.1.0 give the same files, output and exit codes.
29-
4. Hosted mode, one ecosystem per run, in the order of the table: the mode's one command, `bazel build`, the patched package in the build, `vex`, the undo, `bazel build` again.
28+
3. A project in no Bazel workspace, and one in a workspace that Bazel does not build: main against v5.1.0. npm is done; next PyPI (requirements file), then Go, RubyGems, Cargo, NuGet, Composer, Maven. No public patch API here: use a loopback stand-in shaped like `tests/hosted_memory_common/mod.rs` (`--api-url`, `--org test-org`, `SOCKET_PATCH_SERVER_URL`).
29+
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.
3131
6. Agent mode in a Bazel workspace: the message says what to use instead, and the build still passes.
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. 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`.
3435

3536
## Known non-bugs
36-
See `known-non-bugs/bazel.md` (none yet).
37+
See `known-non-bugs/bazel.md` (3 entries, all artifacts of a home-made stand-in API or output changes that are not Bazel's).

0 commit comments

Comments
 (0)