Skip to content

K99: bump workspace MSRV to Rust 1.95 (Phase 0-K critical chain)#8

Merged
vanyastaff merged 5 commits intomainfrom
feature/K99-msrv-bump-1.95
May 9, 2026
Merged

K99: bump workspace MSRV to Rust 1.95 (Phase 0-K critical chain)#8
vanyastaff merged 5 commits intomainfrom
feature/K99-msrv-bump-1.95

Conversation

@vanyastaff
Copy link
Copy Markdown
Owner

@vanyastaff vanyastaff commented May 9, 2026

Summary

K99 — first spec in the Phase 0-K Kernel Cleanup critical chain. Turns flui-v2's MSRV declaration from cosmetic (declared 1.85, but only 1/12 workspace members enforced it; CI used @stable) into a real, enforced invariant pinned to Rust 1.95.

This unblocks the rest of the K-track (K15 → K07 → K05 → K01 → K02 → K03 → K04) by making AFIT/RPITIT, edition-2024 lifetime captures, async closures, let-chains, lazy_cell, unsafe extern, and #[diagnostic::on_unimplemented] available for all subsequent specs.

BREAKING CHANGE: minimum Rust toolchain raised from 1.85 → 1.95. Hard-fork posture means we set MSRV unilaterally; no upstream-sync commitment.

What changed

Three-file synchronization invariant established

File Change
Cargo.toml [workspace.package].rust-version "1.85""1.95"
rust-toolchain.toml new — pins channel = "1.95" for rustup-based contributors
clippy.toml added msrv = "1.95" so MSRV-aware lints become active

Drift between these three is now documented as a bug.

Per-member MSRV inheritance

11 workspace members previously omitted rust-version.workspace = true (only flui-platform had it). Added to all of them:

  • 7 lib crates: flui-a11y, flui-core, flui-macros, flui-material, flui-navigator, flui-theme, flui-widgets
  • 3 examples: animation_demo, material_demo, nav_demo
  • 1 tooling: tooling/lock-checks

12/12 workspace members now declare and enforce the MSRV.

CI converted from declarative to enforced

  • Existing 5 jobs (check / clippy / test / format / windows-test-support) keep dtolnay/rust-toolchain@stable — but with rust-toolchain.toml present, that action defers to the pin. These jobs become the de facto MSRV gate.
  • New forward-compat job: explicitly bypasses the toolchain pin via rustup default stable && rustup update, runs cargo check --workspace on latest stable. Marked continue-on-error: true — non-blocking early-warning radar for upcoming Rust changes.
  • flake.nix (Nix users) intentionally stays on fenix.latest — complements the CI radar without forcing manual bumps on each MSRV change. Documented in rust-toolchain.toml header.

Documentation aligned

  • AGENTS.md — MSRV refs updated; added 7 positive idiom-prefer rules (AFIT/RPITIT, edition-2024 lifetime captures, async closures, let-chains, lazy_cell, unsafe extern, #[diagnostic::on_unimplemented]).
  • .ai-factory/{DESCRIPTION,ARCHITECTURE,RESEARCH}.md and .ai-factory/rules/base.md — MSRV refs aligned, three-file invariant documented, Key Principle #11 in ARCHITECTURE updated.
  • New design spec: docs/superpowers/specs/2026-05-08-K99-msrv-bump-1.95-design.md (Context / Goals / Non-goals / Design / API surface / Migration / Testing / Open questions / Done criteria / Cross-references / Unblocks).
  • .ai-factory/ROADMAP.md — K99 entry checked off, completion row added (2026-05-08).

Why

Per audit recorded in .ai-factory/RESEARCH.mdflui-core has 24+ structural issues (broken Provider, no Widget identity / Key, Render::&mut self semantics, undefined re-entrancy contract, AppCell, action globals, leaky coordinate-space type-safety, etc.) that block a healthy Framework tier. Phase 0-K Kernel Cleanup repays this debt sequentially. K99 is the first spec because every subsequent K-spec depends on Rust 1.95+ idioms.

Cargo.lock policy

FREEZE — no cargo update. cargo metadata confirmed the declarative bump did not force any Cargo.lock changes. Dep updates are an orthogonal concern; deferred to a separate hygiene PR if a future need arises. Documented in spec § Migration.

tooling/perf orphan

Audit (Task 2) found tooling/perf/Cargo.toml declares edition.workspace = true but is NOT in [workspace] members — orphan with broken inheritance. Out of K99 scope; deferred to K93 (TODO/dead-code triage).

docs/superpowers/specs/ directory restored

The previous commit on main (95cb96e4a9, message: "Remove outdated gesture roadmap and recognizer extension guide") aggressively deleted the entire docs/superpowers/ tree even though the message mentioned only gesture docs. ROADMAP / AGENTS / RESEARCH continued to reference the canonical path. K99 restores the directory by adding the K99 design spec at the documented location.

Validation gates

Gate Command Result
Build cargo build --workspace --all-features ✅ green, 31.04s on 1.95.0
Test cargo test --workspace ✅ ~525 passed, 0 failed
Clippy cargo clippy --workspace --all-targets -- -D warnings ✅ clean
Format cargo fmt --all -- --check ✅ clean

Test plan

  • CI on this PR shows all 5 standard jobs (check, clippy, test, format, windows-test-support) passing on Rust 1.95 (via rust-toolchain.toml pin).
  • CI forward-compat job runs on latest stable (currently same as MSRV; will start to diverge with future Rust releases). Allowed to fail.
  • Locally: cargo build --workspace --all-features green on 1.95.
  • Locally: cargo test --workspace green.
  • Locally: cargo clippy --workspace --all-targets -- -D warnings clean.
  • Spot-check that all 12 workspace member Cargo.toml files have rust-version.workspace = true.
  • Verify Cargo.lock is unchanged (FREEZE policy).

Roadmap linkage

K99 in .ai-factory/ROADMAP.md Phase 0-K critical chain. Unblocks K15, K07, K05, K01, K02, K03, K04.

Spec

docs/superpowers/specs/2026-05-08-K99-msrv-bump-1.95-design.md

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Chores

    • Upgraded minimum supported Rust version (MSRV) from 1.85 to 1.95 across workspace and all crates.
    • Added rust-toolchain.toml to pin the Rust toolchain at version 1.95.
  • Tests

    • Added forward-compat CI job to detect compatibility issues with the latest stable Rust toolchain.
  • Documentation

    • Updated architecture, design specifications, and project documentation to reflect Rust 1.95 support and related idiom recommendations.

Review Change Stack

vanyastaff and others added 3 commits May 8, 2026 16:32
…ate to all 12 members

K99 (Phase 0-K Kernel Cleanup, critical chain). First mechanical bump of the
flui-v2 hard-fork that turns MSRV from a declarative number into an enforced
invariant.

Changes:
- Cargo.toml: [workspace.package].rust-version = "1.85" -> "1.95"
- rust-toolchain.toml (new): pin channel = "1.95" with rustfmt + clippy
  components; header documents that flake.nix's `fenix.latest` divergence
  is intentional (Nix users get forward-compat radar; rustup users stay
  pinned for reproducibility).
- clippy.toml: add `msrv = "1.95"` so MSRV-aware lints (manual_let_else,
  redundant_pattern_matching, ...) consider the floor when deciding
  whether a modern idiom is "available". Header documents the cross-file
  contract (Cargo.toml -> clippy.toml -> rust-toolchain.toml must stay
  in sync).
- 11 workspace member Cargo.toml: add `rust-version.workspace = true`.
  Previously only flui-platform inherited; the other 11 members compiled
  on whatever stable Rust the runner had, NOT the declared MSRV. With this
  change all 12 workspace members enforce the declared floor:
    * 7 lib crates (flui-a11y, flui-core, flui-macros, flui-material,
      flui-navigator, flui-theme, flui-widgets)
    * 3 examples (animation_demo, material_demo, nav_demo)
    * 1 tooling (tooling/lock-checks)
- .ai-factory/plans/feature-K99-msrv-bump-1.95.md (new): full implementation
  plan with 18 tasks, dependencies, and commit checkpoints.

Pre-flight audit findings:
- `cargo build --workspace` green on Rust 1.95.0 (43.58s).
- `cargo metadata` confirms Cargo.lock unchanged by declarative MSRV bump
  (FREEZE policy adopted — no `cargo update` in K99 scope).
- `tooling/perf/` is an orphan (not in [workspace] members but Cargo.toml
  references workspace deps). Out of K99 scope; deferred to K93 dead-code
  triage.

BREAKING CHANGE: minimum Rust toolchain bumped from 1.85 to 1.95.
Hard-fork posture means we set MSRV unilaterally; no upstream-sync
commitment. Unlocks AFIT/RPITIT, edition-2024 lifetime captures, async
closures, let-chains, lazy_cell, unsafe extern, #[diagnostic::on_unimplemented]
for subsequent K-track specs.

Refs: K99 in .ai-factory/ROADMAP.md (Phase 0-K critical chain)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ard-compat radar

docs(msrv): update MSRV references across AGENTS, DESCRIPTION, ARCHITECTURE,
RESEARCH, rules/base.md to reflect Rust 1.95

K99 commit 3+4 (combined for atomicity).

CI changes (.github/workflows/ci.yml):
- Existing 5 jobs (check/clippy/test/format/windows-test-support) keep
  `dtolnay/rust-toolchain@stable`. With rust-toolchain.toml pinning the
  channel to "1.95", the action now respects that pin — these jobs become
  the de facto MSRV gate (cleaner than adding a redundant msrv-check job).
- New `forward-compat` job: runs `rustup default stable && rustup update`
  to BYPASS the toolchain pin and check the workspace on the latest
  available stable Rust. Marked `continue-on-error: true` — non-blocking
  early-warning radar for upcoming Rust changes (deprecations, new lints,
  behavior shifts) so we know about them before the next MSRV bump.
- Header comment block documents the gate architecture.

Docs sweep:
- AGENTS.md: MSRV 1.85 -> 1.95 in tech stack and "Respect MSRV" rule;
  added 7 positive idiom-prefer rules (AFIT/RPITIT, edition-2024 lifetime
  captures, async closures, let-chains, lazy_cell, unsafe extern,
  #[diagnostic::on_unimplemented]); cross-referenced the three-file
  synchronization invariant (Cargo.toml ↔ rust-toolchain.toml ↔ clippy.toml).
- .ai-factory/DESCRIPTION.md: MSRV mentions updated to 1.95; added the
  three-file enforcement explanation and the flake.nix divergence note.
- .ai-factory/ARCHITECTURE.md: tech-stack and Key Principle #11 updated
  to reflect 1.95 and the three-file invariant; idioms list added.
- .ai-factory/RESEARCH.md: stale "target idioms 1.95+ when stable" wording
  replaced with "Rust 1.95 idioms" + actual unlocked-feature list.
- .ai-factory/rules/base.md: MSRV rule bumped to 1.95; positive idiom-prefer
  rules mirrored from AGENTS.md so contributor guidance is consistent.
- README.md: verified no MSRV mention — skipped (no-op task per plan).

Plan file: feature-K99-msrv-bump-1.95.md task checkboxes updated for tasks 6-14.

Refs: K99 in .ai-factory/ROADMAP.md (Phase 0-K critical chain)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
K99 commit 5+6 (combined).

Spec (new):
- docs/superpowers/specs/2026-05-08-K99-msrv-bump-1.95-design.md
  Full Context / Goals / Non-goals / Current state / Design /
  API surface / Migration / Testing / Open questions / Done criteria /
  Cross-references / Unblocks. Documents the three-file synchronization
  invariant (Cargo.toml ↔ rust-toolchain.toml ↔ clippy.toml), the FREEZE
  Cargo.lock policy, the intentional flake.nix divergence (fenix.latest as
  forward-compat radar for Nix users), the CI architecture (existing 5 jobs
  honor toolchain.toml = de facto MSRV gate; new forward-compat job is
  non-blocking radar), the bump cadence recommendation, and which K-specs
  this unblocks downstream (K15, K07, K05, K01, K02, K03 + SF01).

  Note: directory docs/superpowers/specs/ was recreated as part of K99 —
  the prior commit 95cb96e had aggressively deleted the entire
  docs/superpowers/ tree (commit message mentioned only gesture roadmap
  but the diff wiped all specs/plans/migrations). ROADMAP/AGENTS/RESEARCH
  still referenced the canonical path, so K99 restores it.

ROADMAP closure:
- K99 checkbox flipped (Phase 0-K critical chain entry).
- Completed table: row added with date 2026-05-08 + brief summary.

Plan file: feature-K99-msrv-bump-1.95.md final task checkboxes (15, 16)
ticked. All 18 tasks done.

Refs: K99 in .ai-factory/ROADMAP.md (Phase 0-K critical chain — DONE)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 9, 2026 08:16
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 9, 2026

Warning

Rate limit exceeded

@vanyastaff has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 52 minutes and 48 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6d70b947-7bc7-4f36-93fe-06c411c0c459

📥 Commits

Reviewing files that changed from the base of the PR and between baa8fdc and 125978f.

📒 Files selected for processing (10)
  • .ai-factory/ARCHITECTURE.md
  • .ai-factory/RESEARCH.md
  • .ai-factory/ROADMAP.md
  • .ai-factory/plans/feature-K99-msrv-bump-1.95.md
  • .ai-factory/rules/base.md
  • .github/workflows/ci.yml
  • AGENTS.md
  • docs/fixtures/platform-expected-stubs.txt
  • docs/reports/platform-imports.md
  • docs/superpowers/specs/2026-05-08-K99-msrv-bump-1.95-design.md
📝 Walkthrough

Walkthrough

This PR completes the K99 milestone by bumping the workspace minimum supported Rust version from 1.85 to 1.95. Changes include updating root and per-crate Cargo.toml manifests, adding rust-toolchain.toml pinning, enabling clippy MSRV linting, adding a non-blocking forward-compat CI job, and synchronizing documentation across multiple project files.

Changes

Rust MSRV Bump to 1.95

Layer / File(s) Summary
Root Workspace Configuration
Cargo.toml
Workspace [package.rust-version] updated from 1.85 to 1.95.
Toolchain & Clippy Enforcement
rust-toolchain.toml, clippy.toml
New rust-toolchain.toml pins channel to 1.95 with rustfmt/clippy components; clippy.toml adds msrv = "1.95" configuration to form the three-file synchronization invariant.
Per-Crate MSRV Propagation
crates/flui-*/Cargo.toml, examples/*/Cargo.toml, tooling/lock-checks/Cargo.toml
All 11 workspace members and examples now declare rust-version.workspace = true to inherit MSRV from root.
CI Infrastructure & Forward-Compat
.github/workflows/ci.yml
Adds MSRV-gate documentation block and new non-blocking forward-compat job that runs cargo check --workspace against latest stable Rust to detect forward-compatibility regressions.
Documentation & Rules
.ai-factory/ARCHITECTURE.md, .ai-factory/DESCRIPTION.md, .ai-factory/RESEARCH.md, AGENTS.md, .ai-factory/rules/base.md
MSRV references updated to 1.95 across all documentation; MSRV-1.95-enabled idioms (AFIT/RPITIT, async closures, let-chains, OnceCell, edition-2024 features) enumerated in rules.
Roadmap Completion
.ai-factory/ROADMAP.md
K99 milestone marked completed (2026-05-08) in critical chain and completed milestones table.
K99 Planning & Specification
.ai-factory/plans/feature-K99-msrv-bump-1.95.md, docs/superpowers/specs/2026-05-08-K99-msrv-bump-1.95-design.md
Comprehensive plan document and formal design specification define phased tasks, synchronization invariants, CI architecture, validation gates, done criteria, and downstream K-track dependencies.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A hop, a skip, toward 1.95!
Async traits and closures thrive,
Workspace aligned, toolchain tight,
Forward-compat jobs take flight,
MSRV bumped—our future's bright! 🚀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly reflects the main change: bumping the workspace MSRV from 1.85 to 1.95 and linking it to the Phase 0-K critical chain (K99 milestone). The title is concise, specific, and immediately communicates the primary intent of the entire changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/K99-msrv-bump-1.95

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 and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Raises and enforces the workspace MSRV at Rust 1.95 by synchronizing MSRV declarations across Cargo metadata, rustup toolchain pinning, and Clippy MSRV-aware lints, and by updating CI + documentation to match the new invariant. This supports the Phase 0‑K critical chain by ensuring all workspace members and CI actually run on the declared minimum toolchain.

Changes:

  • Bump workspace rust-version to 1.95 and propagate MSRV inheritance to all workspace members via rust-version.workspace = true.
  • Add rust-toolchain.toml (rustup pin) and configure clippy.toml msrv = "1.95" for MSRV-aware lints.
  • Update CI/docs/specs to reflect and document the new “three-file MSRV sync” invariant, and add a non-blocking forward-compat CI job.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Cargo.toml Bumps workspace rust-version to 1.95.
rust-toolchain.toml Adds rustup toolchain pin to 1.95 + components.
clippy.toml Enables MSRV-aware Clippy lints via msrv = "1.95".
.github/workflows/ci.yml Documents MSRV gating and adds a forward-compat job (needs a fix to truly bypass the pin).
crates/flui-a11y/Cargo.toml Inherits workspace MSRV via rust-version.workspace = true.
crates/flui-core/Cargo.toml Inherits workspace MSRV via rust-version.workspace = true.
crates/flui-macros/Cargo.toml Inherits workspace MSRV via rust-version.workspace = true.
crates/flui-material/Cargo.toml Inherits workspace MSRV via rust-version.workspace = true.
crates/flui-navigator/Cargo.toml Inherits workspace MSRV via rust-version.workspace = true.
crates/flui-theme/Cargo.toml Inherits workspace MSRV via rust-version.workspace = true.
crates/flui-widgets/Cargo.toml Inherits workspace MSRV via rust-version.workspace = true.
examples/animation_demo/Cargo.toml Inherits workspace MSRV via rust-version.workspace = true.
examples/material_demo/Cargo.toml Inherits workspace MSRV via rust-version.workspace = true.
examples/nav_demo/Cargo.toml Inherits workspace MSRV via rust-version.workspace = true.
tooling/lock-checks/Cargo.toml Inherits workspace MSRV via rust-version.workspace = true.
AGENTS.md Updates MSRV references and adds guidance on “allowed idioms” (contains an invalid std path that should be corrected).
.ai-factory/rules/base.md Updates MSRV rules and idiom guidance (contains an invalid std path that should be corrected).
.ai-factory/DESCRIPTION.md Aligns MSRV documentation and enforcement explanation.
.ai-factory/ARCHITECTURE.md Updates architecture principle for MSRV + sync invariant.
.ai-factory/RESEARCH.md Aligns MSRV references in research summary.
.ai-factory/ROADMAP.md Marks K99 complete and adds completion record.
.ai-factory/plans/feature-K99-msrv-bump-1.95.md Adds implementation plan and validation checklist for K99.
docs/superpowers/specs/2026-05-08-K99-msrv-bump-1.95-design.md Adds K99 design spec documenting rationale and enforcement approach (contains the same invalid std path reference).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml Outdated
Comment on lines +235 to +248
# Bypass rust-toolchain.toml (which pins the MSRV) and use the
# latest stable Rust as a forward-compat radar. If a deprecation,
# new lint, or behaviour change in a newer Rust would land before
# the next MSRV bump, this job surfaces it early.
- name: Install latest stable (override rust-toolchain.toml pin)
run: |
rustup update stable
rustup default stable
rustc --version

- uses: Swatinem/rust-cache@v2

- name: Check workspace on latest stable
run: cargo check --workspace
Comment thread AGENTS.md Outdated
- Edition-2024 lifetime captures (`-> impl Trait + use<'_>`) — express precise lifetime relationships in async/iterator return types without manual elision.
- Async closures (`async |...| { ... }`) — for callback-heavy APIs that need to await.
- `let-chains` (`if let Some(x) = ... && cond && let Some(y) = ...`) — collapse nested matches in reconciliation / lookup code.
- `lazy_cell::sync::OnceCell` from `std` (1.80+) — use instead of pulling in the `once_cell` crate.
Comment thread .ai-factory/rules/base.md Outdated
- Edition-2024 lifetime captures (`-> impl Trait + use<'_>`) — for precise async/iterator return-type lifetimes.
- Async closures (`async |...| { ... }`) — for callback APIs that need to await.
- `let-chains` (`if let Some(x) = ... && cond && let Some(y) = ...`) — collapse nested matches.
- `lazy_cell::sync::OnceCell` from `std` — instead of pulling in the `once_cell` crate.
- Edition-2024 lifetime captures (`-> impl Trait + use<'_>`) — for precise async/iterator return-type lifetimes in K01 (Provider) and K05 (Element ctx-object).
- Async closures stable (1.85+) — for callback APIs used in K07 (token-based borrow) and SF05 (setState).
- `let-chains` (1.88, edition 2024) — collapses nested `if let` patterns in K02 (reconciliation).
- `lazy_cell::sync::OnceCell` (1.80+) — drops the `once_cell` crate dependency in K01.
- **K15** (Re-entrancy contract) — next K-spec; uses `let-chains` for nested-state matching and AFIT for async re-entry detection.
- **K07** (AppCell removal) — async closures and AFIT for token-based borrow callbacks.
- **K05** (Element ctx-object) — RPITIT for ergonomic `&mut ElementCx<'_>` returns.
- **K01** (Provider rewrite) — `lazy_cell::sync::OnceCell` to drop `once_cell` dependency; AFIT for per-Window InheritedRegistry async paths.
The Lock-phase consistency checks step in .github/workflows/ci.yml runs:
  cargo run -q -p lock-checks -- check-stubs
  cargo run -q -p lock-checks -- check-platform-imports

Both commands depend on:
  docs/fixtures/platform-expected-stubs.txt    (12-file stub inventory)
  docs/reports/platform-imports.md             (platform imports survey)

These files were deleted on main in commit 95cb96e
("Remove outdated gesture roadmap and recognizer extension guide") even
though that commit's stated scope was only gesture documentation. The
regression broke CI for any PR (including K99) that hits the Lock-phase
consistency checks step.

Regenerated via the tool's own --bless / --emit flags:
  cargo run -p lock-checks -- check-stubs --bless
  cargo run -p lock-checks -- check-platform-imports --emit

Both files are derived from current source code (no manual content),
so regeneration is the canonical fix — restoring stale versions from
git history would create false drift.

Verified locally:
  - check-stubs reports "stub inventory in sync (12 files)"
  - check-platform-imports diff against live regeneration is empty

Out of K99 scope strictly speaking, but landing it here unblocks the
PR. Same regression would have surfaced on the next PR anyway.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@AGENTS.md`:
- Line 124: The documented import `lazy_cell::sync::OnceCell` is incorrect;
replace it with the appropriate std types depending on threading needs: use
`std::sync::OnceLock` for one-time thread-safe init or `std::sync::LazyLock` for
thread-safe lazy init, or for single-threaded contexts use `std::cell::OnceCell`
or `std::cell::LazyCell` (available in 1.80+); update the AGENTS.md line that
references `lazy_cell::sync::OnceCell` to list these four correct `std` modules
and their intended uses so contributors aren't misled to the external
`once_cell` crate.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 89a66673-9005-4aa5-b01f-f8cc43df960e

📥 Commits

Reviewing files that changed from the base of the PR and between 33af7d4 and baa8fdc.

📒 Files selected for processing (23)
  • .ai-factory/ARCHITECTURE.md
  • .ai-factory/DESCRIPTION.md
  • .ai-factory/RESEARCH.md
  • .ai-factory/ROADMAP.md
  • .ai-factory/plans/feature-K99-msrv-bump-1.95.md
  • .ai-factory/rules/base.md
  • .github/workflows/ci.yml
  • AGENTS.md
  • Cargo.toml
  • clippy.toml
  • crates/flui-a11y/Cargo.toml
  • crates/flui-core/Cargo.toml
  • crates/flui-macros/Cargo.toml
  • crates/flui-material/Cargo.toml
  • crates/flui-navigator/Cargo.toml
  • crates/flui-theme/Cargo.toml
  • crates/flui-widgets/Cargo.toml
  • docs/superpowers/specs/2026-05-08-K99-msrv-bump-1.95-design.md
  • examples/animation_demo/Cargo.toml
  • examples/material_demo/Cargo.toml
  • examples/nav_demo/Cargo.toml
  • rust-toolchain.toml
  • tooling/lock-checks/Cargo.toml

Comment thread AGENTS.md Outdated
Two valid issues raised by Copilot review on PR #8:

1. **Forward-compat CI job did not actually bypass rust-toolchain.toml.**
   `rustup default stable` only changes the rustup global default; the
   repo-local rust-toolchain.toml override still takes precedence when
   cargo is invoked from inside the repo. So `cargo check` would have
   continued running on the pinned 1.95 toolchain — defeating the
   purpose of the forward-compat radar.

   Fix: set `RUSTUP_TOOLCHAIN=stable` as an env var on the cargo step.
   This overrides rust-toolchain.toml. Also added a `rustc --version`
   line right before `cargo check` to confirm the override actually
   applied (visible in CI logs). Switched the toolchain-install step to
   `rustup run stable rustc --version` for the same clarity reason.
   Updated comment block to explain why `rustup default` alone is
   insufficient.

2. **Invalid std module path `lazy_cell::sync::OnceCell`.** That path
   doesn't exist in std. The correct std replacements for `once_cell`
   crate are:
     - `std::sync::OnceLock`  (1.70+) — replaces once_cell::sync::OnceCell
     - `std::sync::LazyLock`  (1.80+) — replaces once_cell::sync::Lazy
     - `std::cell::OnceCell`  (1.70+) — replaces once_cell::unsync::OnceCell
     - `std::cell::LazyCell`  (1.80+) — replaces once_cell::unsync::Lazy

   The "lazy_cell" name was a feature-gate name during stabilization, not
   a module path. Leaving the invalid path in idiom-prefer rules would
   have led future K01 (Provider rewrite) and SF specs to write invalid
   imports.

   Fix: replaced all "lazy_cell::sync::OnceCell" mentions across:
     - AGENTS.md
     - .ai-factory/rules/base.md
     - docs/superpowers/specs/2026-05-08-K99-msrv-bump-1.95-design.md
   And tightened the more general "lazy_cell" mentions for consistency:
     - .ai-factory/ARCHITECTURE.md (Key Principle #11 idiom list)
     - .ai-factory/RESEARCH.md (goal statement and Rust 1.95 specifics)
     - .ai-factory/ROADMAP.md (K99 entry)
     - .ai-factory/plans/feature-K99-msrv-bump-1.95.md (Unlocked idioms)

   All references now point to the actual std types.

No source code changes; docs + CI workflow only. `cargo fmt --check`
remains clean.

Refs: GitHub Copilot review on PR #8.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vanyastaff
Copy link
Copy Markdown
Owner Author

@coderabbitai already fixed in commit 125978fe1b (which is HEAD). The CodeRabbit review window was 33af7d4..baa8fdc5 — the fix landed in the next commit. The CodeRabbit comment itself acknowledges this with ✅ Addressed in commits 049347b to 125978f.

Verification on current HEAD (125978fe1b):

  • AGENTS.md:124 → std::sync::OnceLock (1.70+) / std::sync::LazyLock (1.80+), with single-threaded std::cell::OnceCell / std::cell::LazyCell variants noted.
  • .ai-factory/rules/base.md:56 → same.
  • docs/superpowers/specs/2026-05-08-K99-msrv-bump-1.95-design.md:23 and :249 → same.

grep -r "lazy_cell::sync" . returns zero matches across the workspace.

No further action needed.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 9, 2026

Tip

For best results, initiate chat on the files or code changes.

@vanyastaff Thanks for the thorough verification! Confirmed — the lazy_cell::sync non-existent path has been corrected to the proper stdlib types (std::sync::OnceLock / std::sync::LazyLock for thread-safe use and std::cell::OnceCell / std::cell::LazyCell for single-threaded use) across all affected files, and grep confirms zero stray references remain. All good! 🎉


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

@vanyastaff vanyastaff merged commit a33fa7d into main May 9, 2026
10 checks passed
@vanyastaff vanyastaff deleted the feature/K99-msrv-bump-1.95 branch May 9, 2026 08:40
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