Skip to content

build: pin Rust to nightly-2026-09-27 - #3883

Merged
ScriptedAlchemy merged 12 commits into
masterfrom
cursor/nightly-rust-toolchain-1f4f
Oct 14, 2026
Merged

ScriptedAlchemy merged 12 commits into
masterfrom
cursor/nightly-rust-toolchain-1f4f

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Pins the only Rust compiler to dated nightly nightly-2026-09-27 in rust-toolchain.toml, Bazel rules_rust, CI, and release builds.
  • Enables asupersync 0.5.0's nightly-outcome-try feature and deletes the stable toolchain lane.
  • Records before/after clean release build, binary size, and index-bench numbers on the same host.
  • Fixes the failures that pin produced: Clippy map_unwrap_or, the toolchain probe's version check, and the provenance fixture's build-script path.

Motivation

asupersync's nightly-outcome-try default needs try_trait_v2, which stable 1.99.0 does not provide. A second stable lane would rebuild the same graph on a different rustc. This PR keeps one pinned nightly everywhere.

nightly-2026-08-25 (the asupersync/fastmcp date) predates rust-lang/rust#162275, which stops coroutine witnesses from inflating auto-trait recursion depth. nightly-2026-09-27 includes that fix. recursion_depth_exceeding_limit (rust-lang/rust#159228) is still warn-by-default. Clippy's -Dwarnings turns it into an error, so Send proofs that overflow were shortened in the merged #3909 commits. recursion_limit was not raised.

nightly-2026-10-13 (rustc 1.101.0-nightly (e9bbadf68 2026-10-12), not commit 822182db4) still emitted 13 of those diagnostics on the pre-#3909 tree, so the pin stayed on 2026-09-27.

Changes

  • rust-toolchain.toml: channel nightly-2026-09-27; components clippy, rustfmt, rust-analyzer, rust-src.
  • MODULE.bazel: versions and rustfmt_version are nightly/2026-09-27.
  • .bazelrc: --@rules_rust//rust/toolchain/channel=nightly, required when no stable toolchain is registered.
  • Cargo.toml: asupersync features proc-macros, native-runtime, nightly-outcome-try. Cargo.lock is unchanged (v4 does not record features).
  • .github/workflows/ci.yml: feature-gates no longer sets RUSTUP_TOOLCHAIN=stable.
  • .github/workflows/release.yml: the TypeScript/SDK job resolves the channel from rust-toolchain.toml instead of toolchain: stable.
  • .github/workflows/upstream-compat.yml: the floating nightly probe and its nightly-date input are removed. bazel-10-readiness stays.
  • scripts/bazel/rust_test_environment_probe.rs: a dated nightly's --version text does not contain the channel date. PATH cargo/rustc/rustdoc must print the same version as the declared binaries, and that text must contain nightly.
  • Provenance fixture walks target/debug/build for build-script-runs. Nightly cargo nests units at build/<package>/<hash>/out.
  • map(...).unwrap_or_default() call sites Clippy denies on this nightly now use map_or_default.

No rust-version or MSRV field exists. None was added. cargo-conductor was not touched.

Test plan

  • The affected Bazel targets pass
  • bazel build //... passes when the change crosses package boundaries
  • Tested manually (describe below if applicable)

Host: 4 vCPU Intel Xeon, 16780713984 bytes RAM, Linux. Bazel 9.3.0, jobs=4 from .bazelrc. Both builds are clean output bases of bazel build --config=release //crates/tracedecay-cli:tracedecay (CI shipped-cli config: opt 3, no LTO, unstripped). The nightly wall clock is the second clean output base, so fetches and the OS cache were warmer. Critical path is the compile comparison.

stable 1.99.0 nightly-2026-09-27
rustc 1.99.0 (b940084d7 2026-09-28) 1.101.0-nightly (75a75c3e0 2026-09-26)
wall 2140.192s 1638.988s
critical path 1319.32s 1380.31s
processes 3608 3608
binary bytes 588944304 588600344
index-bench total 2653 ms 2586 ms
peak RSS 230055936 234180608

Critical path +61s (~4.6%). Unstripped release binary −343960 bytes. Index-bench sealed and artifact digests match:

  • sealed_state_digest sha256:a33bbec1b1d52f0b3fb52eb871bdd62de12f9e442850687c16346d1db7f58873
  • artifact_digest sha256:25d4ee8168a322c35617972ec91f0f6b3b4df60f4028d2d0f03b4a598a1f7517

asupersync proof: the nightly release build compiled asupersync v0.5.0 (959 files) and linked the CLI. The crate params file contains feature="nightly-outcome-try". cargo tree -p tracedecay-runtime-core --locked --offline shows native-runtime,nightly-outcome-try,proc-macros.

cargo +nightly-2026-09-27 fmt --all -- --check exited 0 before the Clippy rewrite. The rewrite was formatted with rustfmt +nightly-2026-09-27. python3 scripts/test-check-sdk-publish-workflow.py -q reported Ran 26 tests in 0.043s / OK.

cargo +nightly-2026-10-13 check --workspace --all-targets --message-format=json on e5e5b01935 (before #3909), clean CARGO_TARGET_DIR=/tmp/td-cargo-1013, exited 0 with 13 recursion_depth_exceeding_limit diagnostics (7 unique spans).

CI on e5e5b01935 (dispatch run 38527900207) failed before this fix:

  • Clippy: recursion_depth_exceeding_limit under -Dwarnings, plus clippy::map_unwrap_or (155 diagnostics).
  • Linux workspace-c and macOS: scripts:rust_test_environment_probe (rustc --version does not contain nightly-2026-09-27).
  • Linux workspace-code: core_cli_suite provenance tests found 0 build-script counters.
  • Linux root-b: hosted runner lost communication.
  • macOS also failed host-lifecycle exact-restore because Library/Caches/com.apple.python appeared in the fixture home, plus encoder_outputs_match_recorded_fhrr_bits, one git snapshot NeedsInspection, and two daemon socket NotConnected failures.

PR events run the Linux jobs only. macOS (macos-26) and Windows (windows-latest) Bazel lanes run only from workflow_dispatch with run_os=true:

gh workflow run ci.yml --ref cursor/nightly-rust-toolchain-1f4f -f run_os=true

This agent's gh token returned HTTP 403 (Resource not accessible by integration) on that dispatch. A dispatch run was nevertheless started (38527900207) on e5e5b01935.

Checklist

  • CHANGELOG.md updated (under [Unreleased] if no version bump)
  • No secrets, credentials, or .env files included
  • Breaking changes documented (if any)

CHANGELOG stays with release automation. The compiler pin is the breaking change for anyone still on stable 1.99.0: rustup and Bazel both resolve nightly-2026-09-27 only.

Master merge (2026-10-14)

Master's native-runtime cutover (#3736) made timed, blocking, and SQL futures hold an Asupersync Cx across an await. Proving those Send costs dozens of solver levels, so nested callers overflowed recursion_depth_exceeding_limit under nightly Clippy. The proofs were shortened at the source, and recursion_limit was not raised:

  • native_runtime::spawn_blocking, sleep_until, and NativeTask::spawn box their futures once.
  • timeout/timeout_at return a named Timeout future instead of three nested async fns.
  • The SQL writer admission (Database::writer) and the reader/snapshot joins (engine::connection::run_blocking) are boxed.
  • Futures that captured a RuntimeHandle (store-size telemetry, shard publication, memory release) no longer hold it across an await.

The #3909 erasures that conflicted with master were re-merged onto master's code. Its boxed-future annotations now use erase_send!, so type_complexity passes. Nightly needless_bool, large_enum_variant, map_unwrap_or, and needless_borrows_for_generic_args lints in new code are fixed.

Local gate on e65f6794ca: bazel build --config=clippy //crates/... passes, //crates/tracedecay-cli:tracedecay builds with no overflow warnings, and //crates/tracedecay:unit_test, //crates/tracedecay-cli:tracedecay_unit_test, //crates/tracedecay-rusqlite-runtime:unit_test, and //crates/tracedecay-runtime-core:unit_test pass.

Open in Web Open in Cursor 

Devin Review

cursoragent and others added 2 commits October 14, 2026 07:12
asupersync nightly-outcome-try compiles on this dated nightly.
Bazel selects that channel only; the stable toolchain lane is gone.

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Devin Review: 1 flag

Not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

Break the code-text generation self-cycle, prove deep registry and
database types field-by-field, and erase nested futures at the boundary
that was walking them past recursion_depth_exceeding_limit.

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
cursoragent and others added 2 commits October 14, 2026 15:30
Erase each overflowing child at the concrete call so its Send proof
is a separate root. A generic helper leaves the proof in the caller.

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
…pth-warnings-f220

fix(nightly): shorten Send proofs that overflow rustc
@changeset-bot

changeset-bot Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e65f679

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

cursoragent and others added 7 commits October 14, 2026 16:21
map_or_default replaces map().unwrap_or_default() under -Dwarnings.
The probe matches a dated nightly by version text, and the provenance
fixture follows cargo's nested build-script directory.

Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
…-toolchain-1f4f

# Conflicts:
#	crates/tracedecay-code-index-runtime/src/git_watch.rs
#	crates/tracedecay-daemon-service/src/doctor_kernel.rs
#	crates/tracedecay-daemon-service/src/doctor_kernel/tests.rs
#	crates/tracedecay-global-db/src/schema_stages.rs
#	crates/tracedecay-rusqlite-runtime/src/native_runtime.rs
#	crates/tracedecay-session-runtime/src/session_sync.rs
#	crates/tracedecay-session-runtime/src/session_temporal_refresh_scheduler/registry.rs
#	crates/tracedecay-sessions/src/runtime/ingest/user.rs
Re-merges schema_stages.rs with the #3909 authority-classify erasure and
master's bounded observation-authority audit, erases the LSP request and
refresh-batch futures, and fixes nightly clippy lints in new master code.
Master's native-runtime cutover made every timed, blocking, and SQL future
hold an Asupersync Cx across an await. Proving that Send costs dozens of
solver levels, and nested callers overflowed recursion_depth_exceeding_limit
under nightly clippy. spawn_blocking, sleep_until, the SQL reader and writer
admissions, and NativeTask::spawn now erase once at the source, and
timeout/timeout_at return a named Timeout future instead of three nested
async fns.
Reconciles #3909's Send-proof erasures and field assertions with the
master merge (git watcher, observability producer, stack runtime, CLI
daemon calls), turns #3909's boxed-future annotations into erase_send! so
type_complexity passes, and fixes nightly needless_bool,
large_enum_variant, and needless_borrows lints. The LSP erasures from the
previous commit are dropped: the runtime-primitive fix covers them.
…-toolchain-1f4f

# Conflicts:
#	crates/tracedecay-rusqlite-runtime/src/native_runtime.rs
@ScriptedAlchemy
ScriptedAlchemy merged commit 8a4a8e6 into master Oct 14, 2026
2 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants