Skip to content

build(toolchain): pin rust 1.95 — unblock continuum-core unit tests on stable - #1614

Merged
joelteply merged 1 commit into
canaryfrom
fix/rust-toolchain-pin
Jun 14, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/rust-toolchain-pin

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Summary

BIGMAMA's dogfood validation on continuum #1613 surfaced toolchain drift: the three continuum-core Dockerfiles pin rust:1.89-bookworm, but Cargo.lock requires rtc-mdns 0.20.0-alpha.1 which uses Ipv4Addr::from_octets (tracking issue #131360). On 1.89 + 1.90 stable, cargo build/test -p continuum-core dies compiling rtc-mdns with E0658.

The CPU Dockerfile builds release bins that may resolve features differently, hiding this in CI. Real cargo test -p continuum-core on the project pinned toolchain is broken today.

No rust-toolchain.toml existed at the repo root, so cargo picks whatever rustc is on PATH. Joel Mac (1.95.0 stable) compiles + runs cargo test -p continuum-core --lib end-to-end — 8/8 green on lease_revocation per the #1613 validation thread.

Changes

  • rust-toolchain.toml (new) — pin channel 1.95, profile minimal, components rustfmt + clippy. Doc comment names the failure shape so a future bump knows what to verify.
  • docker/continuum-core.Dockerfile — rust:1.89-bookworm → rust:1.95-bookworm
  • docker/continuum-core-vulkan.Dockerfile — same bump
  • docker/continuum-core-cuda.Dockerfile — --default-toolchain 1.89 → 1.95 and the stale "1.89-bookworm" comment

Verified

  • cargo check -p continuum-core --lib --features metal,accelerate on the pinned 1.95 toolchain: clean (60 warnings, 0 errors); rtc-mdns transitive dep compiles fine.
  • cargo test -p continuum-core --lib lease_revocation --features metal,accelerate on the lease-revocation branch (separately): 8/8 green, 0.00s exec.

Test plan

  • CI green on Linux Docker build (this is the case the 1.89 pin broke).
  • BIGMAMA self-validates continuum-core unit tests under Docker once this lands.
  • Spot-check rustup picks up the pin: cd continuum && rustup show reports 1.95.0.

🤖 Generated with Claude Code

…n stable

BIGMAMA's dogfood validation on continuum #1613 surfaced toolchain
drift: docker/continuum-core{,-vulkan,-cuda}.Dockerfile all pinned
rust:1.89-bookworm, but Cargo.lock requires rtc-mdns 0.20.0-alpha.1
which uses `Ipv4Addr::from_octets` (tracking issue #131360). That
method only stabilized in a more recent stable; on 1.89 (and 1.90)
`cargo build/test -p continuum-core` dies compiling rtc-mdns with
E0658. The CPU Dockerfile builds release bins which may resolve
features differently in CI, but real `cargo test -p continuum-core`
on the project's own pinned toolchain is broken.

No `rust-toolchain.toml` existed at the repo root, so cargo picks
whatever rustc is on PATH. Joel's Mac (1.95.0 stable) compiles +
runs `cargo test -p continuum-core --lib` end-to-end (8/8 green on
lease_revocation per the #1613 validation). Pinning to 1.95
guarantees Docker + CI + Joel + BIGMAMA-Windows all agree on the
compiler.

Changes:
- Add `rust-toolchain.toml` at repo root pinning channel "1.95"
  with rustfmt + clippy components. Doc comment names the failure
  shape so a future bump knows what to verify.
- Bump `docker/continuum-core.Dockerfile` rust:1.89-bookworm → rust:1.95-bookworm
- Bump `docker/continuum-core-vulkan.Dockerfile` similarly
- Bump `docker/continuum-core-cuda.Dockerfile`: `--default-toolchain 1.89` → `1.95`
  and the stale "1.89-bookworm" comment

Verified: `cargo check -p continuum-core --lib --features metal,accelerate`
clean on the pinned 1.95 toolchain (60 warnings, no errors). The
rtc-mdns transitive dep compiles fine.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@joelteply
joelteply merged commit c935ca9 into canary Jun 14, 2026
2 of 3 checks passed
@joelteply
joelteply deleted the fix/rust-toolchain-pin branch June 14, 2026 21:31
joelteply added a commit that referenced this pull request Jun 14, 2026
Today's session (2026-06-14) opened the first continuum realization cards
on canary — #1613 (lease-revocation classifier) + #1614 (rust toolchain
pin). In doing so we discovered NO existing CI workflow runs `cargo test`
against continuum-core. `docker-images.yml` builds release bins via
cargo-chef (compiles but never executes tests). `carl-install-smoke.yml`
exercises the install flow end-to-end. The Rust unit-test surface was
entirely unguarded — every Rust PR before #1613 was inspection-verified
rather than test-verified.

Adds `.github/workflows/continuum-rust-tests.yml` with the minimum gate:
- triggers on PRs that touch Cargo.{toml,lock}, rust-toolchain.toml,
  core/**, or this workflow itself, plus pushes to canary/main;
- checks out with submodules: recursive (the llama.cpp + whisper.cpp
  prereq BIGMAMA hit during Docker self-validation today);
- picks up Rust 1.95 from rust-toolchain.toml (PR #1614);
- installs the same -dev deps continuum-core.Dockerfile uses;
- caches cargo registry + target/ keyed on Cargo.lock with restore-key
  fallback (cold build ≈ 3-6 min, warm ≈ <1 min);
- runs `cargo test -p continuum-core --lib` with default features
  (Linux-CPU-only, no metal/cuda);
- 30-min timeout safety bound;
- concurrency group cancels prior runs on the same PR head.

`--lib` is the minimum scope. Integration tests + apps/cli + workers
binaries can join in follow-up workflows once this one proves stable.

The substrate doctrine the dogfood loop surfaced today: validation is
infrastructure, not an operator concern. A test that doesn't run in CI
is a documentation comment.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
joelteply added a commit that referenced this pull request Jun 15, 2026
* ci(rust): cargo test -p continuum-core --lib on every PR

Today's session (2026-06-14) opened the first continuum realization cards
on canary — #1613 (lease-revocation classifier) + #1614 (rust toolchain
pin). In doing so we discovered NO existing CI workflow runs `cargo test`
against continuum-core. `docker-images.yml` builds release bins via
cargo-chef (compiles but never executes tests). `carl-install-smoke.yml`
exercises the install flow end-to-end. The Rust unit-test surface was
entirely unguarded — every Rust PR before #1613 was inspection-verified
rather than test-verified.

Adds `.github/workflows/continuum-rust-tests.yml` with the minimum gate:
- triggers on PRs that touch Cargo.{toml,lock}, rust-toolchain.toml,
  core/**, or this workflow itself, plus pushes to canary/main;
- checks out with submodules: recursive (the llama.cpp + whisper.cpp
  prereq BIGMAMA hit during Docker self-validation today);
- picks up Rust 1.95 from rust-toolchain.toml (PR #1614);
- installs the same -dev deps continuum-core.Dockerfile uses;
- caches cargo registry + target/ keyed on Cargo.lock with restore-key
  fallback (cold build ≈ 3-6 min, warm ≈ <1 min);
- runs `cargo test -p continuum-core --lib` with default features
  (Linux-CPU-only, no metal/cuda);
- 30-min timeout safety bound;
- concurrency group cancels prior runs on the same PR head.

`--lib` is the minimum scope. Integration tests + apps/cli + workers
binaries can join in follow-up workflows once this one proves stable.

The substrate doctrine the dogfood loop surfaced today: validation is
infrastructure, not an operator concern. A test that doesn't run in CI
is a documentation comment.

Co-Authored-By: Claude Opus 4.7 <[email protected]>

* ci(rust): skip GPU + env-var-required tests on Linux CI

First CI run on this PR exposed ~20 continuum-core unit tests that
have never run on a Linux-CI runner before this workflow existed:

  GPU-required (need real GPU + driver):
    - gpu::memory_manager::tests::test_detect_returns_nonzero
    - modules::gpu::tests::* (13 tests)

  Env-var-required (assert behavior contingent on ANTHROPIC_API_KEY etc):
    - persona::allocator::tests::test_allocate_with_anthropic_key
    - modules::persona_allocator::tests::* (4 tests)

These have never been false-positives — they catch real environment
preconditions. They have just never been gated by feature flag or
hidden-by-default annotation, so until someone built CI for cargo test
they shipped as "ignored by virtue of nobody running them."

This patch skips them by name pattern with --skip so the gate ships
as the baseline (≈4000 other tests CONTINUE to run + protect every
PR). Each skipped pattern is a follow-up:

  - task #221: persona_allocator → test-fixtures shim
  - new follow-up: gpu::* behind a feature flag

The skip is named and inline-documented, not stealthy. Future PRs that
ADD a real GPU/env-var test will hit the skip pattern and need to
either fix the gate or graduate the test to a separate workflow that
provides the prerequisite.

Co-Authored-By: Claude Opus 4.7 <[email protected]>

---------

Co-authored-by: Claude Opus 4.7 <[email protected]>
joelteply added a commit that referenced this pull request Jun 15, 2026
The substrate has Rust types with `#[derive(TS)]` + `#[ts(export_to =
"../../../protocol/typescript/...")]` attributes. `cargo test`
regenerates those .ts files as a side effect of running per-type
`export_bindings_*` tests.

When an author adds a new field or variant to a Rust type but forgets
to commit the regenerated .ts file, the wire shape drifts silently:

  - Mac/Linux dev: cargo test regenerates locally, looks fine, ships
    PR without the .ts in the diff.
  - Reviewer: sees only the Rust change, approves.
  - Downstream TS consumer at runtime: hits the new variant / missing
    field; no compile-time guard fires (the .ts file is stale).

Today's session had a near-miss on continuum #1624 (Mac Intel
classify_silicon fix): TargetSilicon gained the MacIntelMetal variant
but the regenerated `protocol/typescript/governor/TargetSilicon.ts`
was not in the initial push. Had to amend.

Adds `.github/workflows/ts-rs-binding-drift-guard.yml`:
  - triggers on PRs touching Cargo, rust-toolchain, core/**, or
    protocol/typescript/** (a TS edit needs the gate too — it must
    match the Rust source);
  - picks up Rust 1.95 from rust-toolchain.toml (#1614);
  - runs ONLY the `export_bindings_*` tests (cheap — same skip
    patterns as #1616's CI gate so GPU/env-var tests don't sink it);
  - then `git diff --exit-code protocol/typescript/`. Non-empty diff
    means the test run regenerated bindings that the PR did NOT
    commit. Fail with a verbatim fix-recipe in the error log.

Composes with:
  - #1614 toolchain pin (Rust version)
  - #1616 unit-test CI gate (same skip patterns)
  - #1624 (the near-miss this workflow would have caught at CI)

Co-authored-by: Claude Opus 4.7 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant