Skip to content

Wave-33 C06: exact rustc toolchain pin + SelfCheck - #275

Merged
KooshaPari merged 3 commits into
mainfrom
feat/sl-w33-c06-rustc-pin
Jul 14, 2026
Merged

Wave-33 C06: exact rustc toolchain pin + SelfCheck#275
KooshaPari merged 3 commits into
mainfrom
feat/sl-w33-c06-rustc-pin

Conversation

@KooshaPari

Copy link
Copy Markdown
Owner

Summary

  • Pin rust-toolchain.toml to exact rustc 1.96.0 (not floating stable) with matching docs/ops/rustc-toolchain-pin.json commit-hash identity.
  • Add ops doc + hermetic scripts/rustc-toolchain-check.ps1 -SelfCheck (pin file exists, exact semver, primary CI uses dtolnay/rust-toolchain without toolchain: stable override).
  • Soft CI job in hermetic.yml; Rust wrapper test tests/rustc_toolchain.rs.

Test plan

  • pwsh ./scripts/rustc-toolchain-check.ps1 -SelfCheck
  • CI hermetic soft job rustc-toolchain-pin
  • cargo test --test rustc_toolchain --locked (optional local)

Made with Cursor

Close L60 soft gap: floating stable -> exact channel with commit-hash
identity JSON, ops doc, and hermetic CI wiring check.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary

Pins the repository to Rust 1.96.0, records matching toolchain identity metadata, documents the policy, and adds PowerShell/Rust validation plus a non-blocking CI check. Workflow comments and exotic-target builds now consistently reflect the pinned compiler.

Must Fix

None identified.

Should Fix

  • Consider making the hermetic CI job blocking once the self-check has proven stable; continue-on-error: true currently permits regressions.
  • Consider adding explicit test coverage for invalid pins and mismatched metadata, rather than only validating the repository’s current valid state.

Consider

The workflow updates preserve nightly overrides for fuzzing and Miri while ensuring primary and exotic-target jobs use the exact pinned toolchain.

Approve / Request Changes

Approve — no blocking compilation, test, security, or architecture issues are evident from the changes.

Walkthrough

The repository now pins Rust 1.96.0, documents the pin and its metadata, validates consistency with a PowerShell self-check and Rust test, and updates CI workflows to use or explicitly override the pinned toolchain.

Changes

Rust toolchain pin

Layer / File(s) Summary
Pin policy and operational documentation
rust-toolchain.toml, docs/ops/rustc-toolchain-pin.*, AGENTS.md, docs/ops/runbook.md
Rust 1.96.0, its compiler identity, components, MSRV, verification process, and operational guidance are recorded.
Toolchain pin self-check
scripts/rustc-toolchain-check.ps1, tests/rustc_toolchain.rs
The PowerShell self-check validates configuration, metadata, documentation, and CI wiring; the Rust test executes it and checks for successful completion.
CI toolchain alignment
.github/workflows/cross-platform-build.yml, .github/workflows/hermetic.yml, .github/workflows/ci.yml, .github/workflows/fuzz-cadence.yml, .github/workflows/miri-smoke.yml
Exotic-target builds use Rust 1.96.0, hermetic CI runs the non-blocking self-check, and fuzz/Miri comments document nightly overrides and related environment behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: pinning the rustc toolchain and adding a SelfCheck.
Description check ✅ Passed The description matches the changeset and accurately describes the pinning, self-check, CI job, and test wrapper.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/sl-w33-c06-rustc-pin
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/sl-w33-c06-rustc-pin

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/cross-platform-build.yml:
- Around line 67-71: Remove the explicit toolchain: 1.96.0 input from the
dtolnay/rust-toolchain action in the cross-platform build workflow, leaving the
action to read the active compiler version and targets from rust-toolchain.toml.

In `@scripts/rustc-toolchain-check.ps1`:
- Around line 53-65: Rename the Assert-Contains function to a singular-noun name
such as Assert-Substring or Assert-Content, then update every call site to use
the new name while preserving its parameters and behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: db361715-e217-404f-81c5-1cddaecdd943

📥 Commits

Reviewing files that changed from the base of the PR and between 3efb0d0 and 9c57e14.

📒 Files selected for processing (12)
  • .github/workflows/ci.yml
  • .github/workflows/cross-platform-build.yml
  • .github/workflows/fuzz-cadence.yml
  • .github/workflows/hermetic.yml
  • .github/workflows/miri-smoke.yml
  • AGENTS.md
  • docs/ops/runbook.md
  • docs/ops/rustc-toolchain-pin.json
  • docs/ops/rustc-toolchain-pin.md
  • rust-toolchain.toml
  • scripts/rustc-toolchain-check.ps1
  • tests/rustc_toolchain.rs
📜 Review details
⏰ Context from checks skipped due to timeout. (9)
  • GitHub Check: semgrep-cloud-platform/scan
  • GitHub Check: soft loom · loom_model
  • GitHub Check: clean-host smoke · Windows unsigned portable install
  • GitHub Check: visual contract · WCAG AA
  • GitHub Check: race smoke + channel/cancel model · windows-latest
  • GitHub Check: pipeline perf regression gate
  • GitHub Check: sl-daemon build · windows-latest
  • GitHub Check: sl-daemon build · macos-latest
  • GitHub Check: session-ledger build · windows-latest
🧰 Additional context used
📓 Path-based instructions (4)
**/*

📄 CodeRabbit inference engine (AGENTS.md)

**/*: Perform feature work in a dedicated git worktree under .claude/worktrees/, created from origin/main on a branch named <type>/<topic>, where <type> is feat, fix, chore, ci, or docs; never work directly on main.
Do not directly commit to main; do not use git reset --hard, git stash, git clean, or --no-verify/hook bypass without operator approval; do not add AI attribution to commit or PR metadata; and do not use another actor's branch or worktree.

Files:

  • AGENTS.md
  • rust-toolchain.toml
  • docs/ops/runbook.md
  • docs/ops/rustc-toolchain-pin.json
  • docs/ops/rustc-toolchain-pin.md
  • tests/rustc_toolchain.rs
  • scripts/rustc-toolchain-check.ps1
**/*.{rs,toml}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{rs,toml}: Use the pinned Rust toolchain and workspace MSRV of Rust 1.85; keep Cargo.lock committed and current because CI uses --locked.
Before completion, use the prescribed Cargo validation commands: cargo build --all-targets --locked, cargo test --all-features --locked, cargo clippy --all-targets --all-features, and cargo fmt --all --check; use the documented targeted commands for the daemon and viewer when appropriate.

Files:

  • rust-toolchain.toml
  • tests/rustc_toolchain.rs
docs/**/*.md

📄 CodeRabbit inference engine (AGENTS.md)

Use the documented functional requirements, user journeys, operational runbook, feedback budgets, and toolchain-pin documentation as the authoritative references for corresponding behavior and development workflows.

Files:

  • docs/ops/runbook.md
  • docs/ops/rustc-toolchain-pin.md
**/*.rs

📄 CodeRabbit inference engine (AGENTS.md)

Fix Clippy warnings rather than suppressing them with #[allow]; any necessary suppression must include a tracking-issue comment.

Files:

  • tests/rustc_toolchain.rs
🪛 LanguageTool
docs/ops/rustc-toolchain-pin.md

[uncategorized] ~33-~33: The official name of this software platform is spelled with a capital “H”.
Context: ...
Evidence workflows (non-exhaustive): .github/workflows/ci.yml,
`.github/workflows/...

(GITHUB)


[uncategorized] ~33-~33: The official name of this software platform is spelled with a capital “H”.
Context: ...haustive): .github/workflows/ci.yml,
.github/workflows/hermetic.yml, `.github/workf...

(GITHUB)


[uncategorized] ~34-~34: The official name of this software platform is spelled with a capital “H”.
Context: ...ml, .github/workflows/hermetic.yml, .github/workflows/release.yml`.

Bump proc...

(GITHUB)


[uncategorized] ~61-~61: The official name of this software platform is spelled with a capital “H”.
Context: ...| done |

Soft CI (non-blocking): .github/workflows/hermetic.yml job
`rustc-too...

(GITHUB)

🪛 PSScriptAnalyzer (1.25.0)
scripts/rustc-toolchain-check.ps1

[warning] 53-53: The cmdlet 'Assert-Contains' uses a plural noun. A singular noun should be used instead.

Suggested fix: Singularized correction of 'Assert-Contains'

(PSUseSingularNouns)

🪛 zizmor (1.26.1)
.github/workflows/cross-platform-build.yml

[info] 69-69: action functionality is already included by the runner (superfluous-actions): use rustup and/or cargo in a script step

(superfluous-actions)

.github/workflows/hermetic.yml

[warning] 43-43: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)


[warning] 38-46: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block

(excessive-permissions)

🔇 Additional comments (10)
rust-toolchain.toml (1)

2-5: LGTM!

docs/ops/rustc-toolchain-pin.json (1)

1-14: LGTM!

docs/ops/rustc-toolchain-pin.md (1)

1-62: LGTM!

.github/workflows/hermetic.yml (1)

37-47: LGTM!

.github/workflows/ci.yml (1)

184-186: LGTM!

AGENTS.md (1)

53-53: LGTM!

docs/ops/runbook.md (1)

7-7: LGTM!

tests/rustc_toolchain.rs (1)

1-33: LGTM!

.github/workflows/fuzz-cadence.yml (1)

41-41: LGTM!

.github/workflows/miri-smoke.yml (1)

20-20: LGTM!

Comment on lines +67 to +71
# Must match rust-toolchain.toml channel — floating `stable` leaves the
# pin override without the exotic target std (E0463 missing `core`).
- uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # pinned
with:
toolchain: 1.96.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Remove the explicit toolchain override to align with the CI policy and prevent breakage on the next bump.

Hardcoding 1.96.0 here violates the CI policy documented in docs/ops/rustc-toolchain-pin.md, which states: "Primary GitHub Actions jobs use dtolnay/rust-toolchain without a toolchain: input so the action installs from rust-toolchain.toml."

More importantly, on the next toolchain bump (e.g., to 1.97.0), this explicit config will install exotic targets against the hardcoded 1.96.0. However, the subsequent cargo check command will automatically use the updated version from rust-toolchain.toml, resulting in the exact same E0463 missing core error you are trying to prevent.

By omitting the toolchain input entirely, the action automatically reads the channel from rust-toolchain.toml and installs the targets for the correct, active compiler version.

♻️ Proposed fix to rely on the pinned toolchain file
-      # Must match rust-toolchain.toml channel — floating `stable` leaves the
-      # pin override without the exotic target std (E0463 missing `core`).
-      - uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # pinned
-        with:
-          toolchain: 1.96.0
-          targets: ${{ matrix.target }}
+      # Omit `toolchain` so the action reads from rust-toolchain.toml, ensuring
+      # the exotic target std is added to the exact pinned compiler.
+      - uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30
+        with:
+          targets: ${{ matrix.target }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Must match rust-toolchain.toml channel — floating `stable` leaves the
# pin override without the exotic target std (E0463 missing `core`).
- uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30 # pinned
with:
toolchain: 1.96.0
# Omit `toolchain` so the action reads from rust-toolchain.toml, ensuring
# the exotic target std is added to the exact pinned compiler.
- uses: dtolnay/rust-toolchain@4be7066ada62dd38de10e7b70166bc74ed198c30
with:
targets: ${{ matrix.target }}
🧰 Tools
🪛 zizmor (1.26.1)

[info] 69-69: action functionality is already included by the runner (superfluous-actions): use rustup and/or cargo in a script step

(superfluous-actions)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/cross-platform-build.yml around lines 67 - 71, Remove the
explicit toolchain: 1.96.0 input from the dtolnay/rust-toolchain action in the
cross-platform build workflow, leaving the action to read the active compiler
version and targets from rust-toolchain.toml.

Comment on lines +53 to +65
function Assert-Contains {
param(
[Parameter(Mandatory = $true)][string]$Doc,
[Parameter(Mandatory = $true)][string]$Needle,
[Parameter(Mandatory = $true)][string]$Label,
[string]$Context = "document"
)
$ok = $Doc.Contains($Needle)
[void](Write-Check -Label $Label -Ok $ok)
if (-not $ok) {
throw "$Context missing required anchor: '$Needle'"
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Fix PSScriptAnalyzer warning by using a singular noun.

PowerShell best practices dictate using singular nouns for cmdlet names. PSScriptAnalyzer flags Assert-Contains because "Contains" is not a singular noun. Consider renaming it to something like Assert-Substring or Assert-Content to comply with standard naming conventions.

♻️ Proposed refactor
-function Assert-Contains {
+function Assert-Substring {
     param(

Make sure to update the calls to this function as well:

-Assert-Contains -Doc $doc -Needle "Exact rustc toolchain pin (C06 L60)" `
+Assert-Substring -Doc $doc -Needle "Exact rustc toolchain pin (C06 L60)" `
     -Label "doc heading" -Context "docs/ops/rustc-toolchain-pin.md"
-Assert-Contains -Doc $doc -Needle "rust-toolchain.toml" `
+Assert-Substring -Doc $doc -Needle "rust-toolchain.toml" `
     -Label "toml reference" -Context "docs/ops/rustc-toolchain-pin.md"
-Assert-Contains -Doc $doc -Needle "rustc_commit_hash" `
+Assert-Substring -Doc $doc -Needle "rustc_commit_hash" `
     -Label "commit-hash identity" -Context "docs/ops/rustc-toolchain-pin.md"
-Assert-Contains -Doc $doc -Needle "scripts/rustc-toolchain-check.ps1" `
+Assert-Substring -Doc $doc -Needle "scripts/rustc-toolchain-check.ps1" `
     -Label "SelfCheck script reference" -Context "docs/ops/rustc-toolchain-pin.md"
-Assert-Contains -Doc $doc -Needle "-SelfCheck" `
+Assert-Substring -Doc $doc -Needle "-SelfCheck" `
     -Label "SelfCheck invocation" -Context "docs/ops/rustc-toolchain-pin.md"
-Assert-Contains -Doc $doc -Needle "Exact rustc toolchain pin SelfCheck | **done**" `
+Assert-Substring -Doc $doc -Needle "Exact rustc toolchain pin SelfCheck | **done**" `
     -Label "SelfCheck gate marked done" -Context "docs/ops/rustc-toolchain-pin.md"
-Assert-Contains -Doc $doc -Needle "dtolnay/rust-toolchain" `
+Assert-Substring -Doc $doc -Needle "dtolnay/rust-toolchain" `
     -Label "CI action named" -Context "docs/ops/rustc-toolchain-pin.md"
🧰 Tools
🪛 PSScriptAnalyzer (1.25.0)

[warning] 53-53: The cmdlet 'Assert-Contains' uses a plural noun. A singular noun should be used instead.

Suggested fix: Singularized correction of 'Assert-Contains'

(PSUseSingularNouns)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/rustc-toolchain-check.ps1` around lines 53 - 65, Rename the
Assert-Contains function to a singular-noun name such as Assert-Substring or
Assert-Content, then update every call site to use the new name while preserving
its parameters and behavior.

Source: Linters/SAST tools

@KooshaPari
KooshaPari merged commit 004db76 into main Jul 14, 2026
58 checks passed
@KooshaPari
KooshaPari deleted the feat/sl-w33-c06-rustc-pin branch August 12, 2026 08:59
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.

1 participant