Repository navigation
fix(bazel): Cargo feature parity and Windows builds - #3133
Conversation
rules_rust matches per_crate_rustc_flag on a prefix of the crate root's exec path, which carries the canonical repository name rules_rust++crate+crates__<name>-<version>; the generated +crate+crates__ filters matched nothing, so the perf opt-levels never applied. Windows cannot execute workspace_status.sh, which left the product SHA genrule without its stable key, and its runners have python but no python3 for the dashboard digest genrule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
rules_rust stages each external build script's sources under <repo>/_bs.cargo_runfiles/<repo>/, spelling the canonical repository name twice, so the deepest vendored headers (tree-sitter grammars, aws-lc's jitterentropy) reached 260-270 characters and MSVC could not open them. A one-letter crate hub and a D:/b output base on Windows shorten every such path by 15 characters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
|
Bazel hands genrule actions a stripped PATH on Windows, so neither python3 nor python resolved for the dashboard digest; pass the runner's PATH and take the first interpreter that starts. The workspace status wrapper now reads git directly, since a bare bash can resolve to WSL. CI also prints failing commands and keeps large build-script output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
|
Windows lane status after 558b65f (run 37438541376):
A new Generated by Claude Code |
crate_universe folds a host triple's build-dependency features into its
normal build, so tree-sitter's build script widened serde_json with
preserve_order: JSON objects kept insertion order and every digest over
them drifted from Cargo builds. A generated crate annotation rebuilds
serde_json from Cargo's target resolution.
rust_test(crate=) takes cfgs from its own crate_features, so unit tests
compiled without their features; they now carry the variant's set.
Rustc runs unsandboxed so env!("CARGO_MANIFEST_DIR") stays readable at
test time, test binaries get 30 minutes, and the cold-cache Linux and
Clippy jobs get room to finish.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
Cargo starts a test binary in its crate directory, and 53 suites read ../../tests/fixtures from there; the launchers now cd into the crate's runfiles directory and every test carries //tests:fixtures. aws-lc's four-level relative jitterentropy include still overran MAX_PATH once MSVC joined it to the staged build-script tree, so a crate patch names the header the builder already puts on the include path. Bazel runs the Windows status command through cmd.exe, which needs backslashes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
|
Test Windows failed on
The Linux and macOS lanes of run 37511829834 are still running. They're the first check of the serde_json and unit-test feature fixes, so I'll dispatch Generated by Claude Code |
The golden Pi fixture gained a contentless user message, which capture refuses, so the malformed-file test's fixture has nine lines and session_info spans the last one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
Each member's tests resolved features on their own, as `cargo test -p` does, so every test build carried its own featured copy of its dependency closure: 534 libraries for 50 crates, more than a CI lane compiles inside its timeout on a cold cache. Tests now share two workspace-wide resolutions, as one `cargo test --workspace` does: the plain one, and one enabling every required feature plus the test-transport surfaces. That leaves 181 libraries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
… HEAD # Conflicts: # crates/tracedecay-agent-hosts/BUILD.bazel # crates/tracedecay-application/BUILD.bazel # crates/tracedecay-automation-runtime/BUILD.bazel # crates/tracedecay-capture/BUILD.bazel # crates/tracedecay-code-index-retention/BUILD.bazel # crates/tracedecay-code-index-runtime/BUILD.bazel # crates/tracedecay-code-index/BUILD.bazel # crates/tracedecay-configuration/BUILD.bazel # crates/tracedecay-daemon-control/BUILD.bazel # crates/tracedecay-daemon-identity/BUILD.bazel # crates/tracedecay-daemon-protocol/BUILD.bazel # crates/tracedecay-daemon-service/BUILD.bazel # crates/tracedecay-dashboard-api/BUILD.bazel # crates/tracedecay-global-db/BUILD.bazel # crates/tracedecay-graph-db/BUILD.bazel # crates/tracedecay-graph-query/BUILD.bazel # crates/tracedecay-host-admission/BUILD.bazel # crates/tracedecay-lcm/BUILD.bazel # crates/tracedecay-lsp/BUILD.bazel # crates/tracedecay-maintenance/BUILD.bazel # crates/tracedecay-mcp-catalog/BUILD.bazel # crates/tracedecay-mcp/BUILD.bazel # crates/tracedecay-privacy/BUILD.bazel # crates/tracedecay-private-fs/BUILD.bazel # crates/tracedecay-project/BUILD.bazel # crates/tracedecay-query/BUILD.bazel # crates/tracedecay-runtime-core/BUILD.bazel # crates/tracedecay-rusqlite-runtime/BUILD.bazel # crates/tracedecay-session-memory/BUILD.bazel # crates/tracedecay-session-runtime/BUILD.bazel # crates/tracedecay-sessions/BUILD.bazel # crates/tracedecay-source-edit/BUILD.bazel # crates/tracedecay-store-runtime/BUILD.bazel # crates/tracedecay-store/BUILD.bazel # crates/tracedecay-temporal-query/BUILD.bazel # crates/tracedecay/BUILD.bazel # scripts/bazel/gen_builds.py
5118be5 added a contentless user message to the Pi golden fixture, which capture refuses, but the malformed-file test still split the fixture into eight lines and expected session_info at the eighth line's byte range. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
All test contexts now share a single workspace resolution with every required feature and test-transport surface enabled, as the hosted test partitions ran them: one test build per crate, 162 libraries in all. Cargo builds the binaries a test run spawns with that run's features, so each binary gains a `__test` build the suites' runtime overrides and CARGO_BIN_EXE_* name; the plain target stays the shipped one. Binaries' own #[cfg(test)] modules run as `<bin>_unit_test`, which covers the CLI's inline tests, and the host-CLI fixture example reaches its installer through TRACEDECAY_HOST_CLI_FIXTURE. CI exports the toolchain the rustup proxy hands `cargo test` (CARGO, RUSTUP_TOOLCHAIN, and both homes) and passes it to tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
The test-run builds of every binary (`<bin>__test`, from the shared test resolution) replace the tracedecay-cli `__test_transport` builds, keeping their testonly flag and shipped file name; the launcher's own CARGO, RUSTC, and RUSTUP_TOOLCHAIN supersede exporting them from CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
Binary unit tests stage the same runtime resource directories as library unit tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
|
Status at Linux at b7d27ef (job 112555776231). The whole suite ran in 3h15m: 151/160 pass, against 14 failures plus a timeout at 14b8ffd. The 9 failures, sorted: Already fixed on head:
Rustup reached through a redirected HOME ("missing manifest in toolchain 1.97.1", "syncing channel updates"):
The runner leaves SDK journeys:
In-process vs nextest isolation:
Build parity fixes, both host-wide:
Windows E0463. The params file does name every Generated by Claude Code |
#3073 (lexical roster carry) and #3067 (ambiguous candidate gaps) merged on 2026-10-05 seconds apart and moved validation ranking; Linux tests moved to Bazel that evening and no master run has reached search-eval since, so the drift went unseen. The train receipt still matches its pin under Bazel, so the fixture inputs are unchanged and only the validation rows moved. The workload identity pin excludes receipts and stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
… claude/bazel-windows-fixes
tracedecay-lsp and tracedecay-code-index fail on Windows with a bare E0463 for every --extern their params file names, which is the locator dropping each candidate without recording a reason. On failure, rerun one lsp compile from its expanded params with the locator's info log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
rules_rust sets a cargo_build_script's CFLAGS and CXXFLAGS from the C toolchain's own arguments, overwriting --action_env, so vendored C never got Cargo's -DNDEBUG on any host and MSVC never got /utf-8: tree-sitter grammars spelled symbol names in the ANSI code page, and every Windows extraction test panicked on invalid UTF-8. cc-rs appends HOST_ (native) or TARGET_ (cross) flags to CFLAGS, and rules_rust leaves those alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
.cargo/config.toml hands libsqlite3-sys's build script the worker-thread cap and disabled memory-status counters through [env]; Bazel never set them, so the Bazel lanes tested a differently configured SQLite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
Tests reached rustup through a HOME Bazel had redirected, so cargo,
rustc, and rust-analyzer found an empty toolchain home ("missing
manifest in toolchain"); the runner leaves CARGO_HOME and RUSTUP_HOME
unset, so export them. The SDK journeys build sdks/typescript with pnpm
from the checkout, which the Cargo-era test jobs installed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V8Xg2pQQcTiyVB8ndJc5oo
… HEAD # Conflicts: # .github/workflows/ci.yml
Bazel builds were resolving different Rust features and test runtime inputs from the existing workspace. That changed canonical JSON identity digests, omitted grammars and test-transport behavior, and left test subprocesses and fixtures inaccessible.
This change corrects target-side serde_json features, shares the workspace test feature resolution, and generates test binaries with the features their suites require. Test launchers stage runtime resources, provide absolute executable and toolchain paths, retain canonical test crate names, and isolate each test's home and profile. Installed host configuration prefers the stable PATH executable over a Bazel build output.
Windows fixes shorten external build-script paths, patch the aws-lc header include, and apply platform configuration after generic defaults so the Windows workspace-status command and UTF-8 compiler flags actually take effect. CI queues are scoped to each PR instead of blocking unrelated validation globally. The macOS filename probe proves ordinary writes succeed before recognizing an unsupported filename.
Validation through Bazel:
Full CI is running on the current head. Windows launcher and dependency-resolution failures still need confirmation from the diagnostic run; this draft is not yet green across all platforms. Temporary Windows diagnostic output will be removed after the failures are resolved.