You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing,deep-link" -- -D warnings — the exact command documented in .claude/rules/branching.md / CLAUDE.md for the local pre-commit gate, and the exact feature matrix CI's lint-clippy job uses — currently fails locally on macOS/aarch64 (Darwin) with 17 clippy::large_futures errors, all in build_agent_factory(...).await call sites:
error: large future with a size of 16456 bytes
--> src/serve/agent_factory.rs:1848:27
--> src/serve/agent_factory.rs:1904:27
--> src/serve/agent_factory.rs:1979:27
--> src/serve/handlers.rs:64:9
(17 total across these two files)
CI's lint-clippy (desktop-ide-server-chat-pdf-scheduler) job passed on the exact same commit (5ab24a9e) with the exact same feature set, on ubuntu-latest. This reproduces the same platform-specific pattern as the closed issue #3521 (stable-aarch64-apple-darwin): the large_futures lint's fixed 16384-byte threshold is apparently crossed on macOS/aarch64's async state-machine layout but not on Linux's, for the same source.
Reproduction Steps
On macOS/aarch64 (confirmed: rustc 1.97.0 (2d8144b78 2026-07-07)), checkout origin/main at 5ab24a9e (or later) with a clean working tree.
Run cargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing,deep-link" -- -D warnings.
Observe 17 large_futures errors in src/serve/agent_factory.rs and src/serve/handlers.rs, all citing build_agent_factory(...).await at a reported future size of 16456 bytes (just over the 16384-byte default threshold).
Compare: GitHub Actions lint-clippy job on the same commit, same feature matrix, ubuntu-latest — passes cleanly (confirmed via gh run view on the CI run for 5ab24a9e).
Expected Behavior
The documented local "Before Every Commit" clippy command should pass on any supported development platform (including macOS/aarch64, the primary dev machine for this project), matching CI's result for the same commit and feature set.
Actual Behavior
Local clippy on macOS/aarch64 fails where Linux CI passes, for code neither introduced nor touched by the commit under test — this blocks the documented pre-commit gate for any macOS contributor without an unrelated change ever entering their diff.
Root Cause (suspected, not confirmed)
Per the pattern in #3521 (previously observed and closed for a different call site: agent.run().await in src/acp.rs/crates/zeph-bench/src/runner.rs), the clippy::large_futures lint's future-size computation is sensitive to platform-specific async state-machine layout (alignment/padding differences between Linux's and macOS/aarch64's Rust ABI). build_agent_factory's future appears to sit right at the ~16KB threshold boundary, so small ABI differences tip it over on macOS but not Linux.
Suggested Fix
Same remedy as #3521's resolution: Box::pin the build_agent_factory(...) call at the flagged sites (clippy's own suggestion), which moves the large future onto the heap and should resolve the lint on both platforms regardless of the underlying size discrepancy — rather than chasing platform-specific size tuning.
Description
cargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing,deep-link" -- -D warnings— the exact command documented in.claude/rules/branching.md/CLAUDE.mdfor the local pre-commit gate, and the exact feature matrix CI'slint-clippyjob uses — currently fails locally on macOS/aarch64 (Darwin) with 17clippy::large_futureserrors, all inbuild_agent_factory(...).awaitcall sites:CI's
lint-clippy (desktop-ide-server-chat-pdf-scheduler)job passed on the exact same commit (5ab24a9e) with the exact same feature set, onubuntu-latest. This reproduces the same platform-specific pattern as the closed issue #3521 (stable-aarch64-apple-darwin): thelarge_futureslint's fixed 16384-byte threshold is apparently crossed on macOS/aarch64's async state-machine layout but not on Linux's, for the same source.Reproduction Steps
rustc 1.97.0 (2d8144b78 2026-07-07)), checkoutorigin/mainat5ab24a9e(or later) with a clean working tree.cargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing,deep-link" -- -D warnings.large_futureserrors insrc/serve/agent_factory.rsandsrc/serve/handlers.rs, all citingbuild_agent_factory(...).awaitat a reported future size of 16456 bytes (just over the 16384-byte default threshold).lint-clippyjob on the same commit, same feature matrix,ubuntu-latest— passes cleanly (confirmed viagh run viewon the CI run for5ab24a9e).Expected Behavior
The documented local "Before Every Commit" clippy command should pass on any supported development platform (including macOS/aarch64, the primary dev machine for this project), matching CI's result for the same commit and feature set.
Actual Behavior
Local clippy on macOS/aarch64 fails where Linux CI passes, for code neither introduced nor touched by the commit under test — this blocks the documented pre-commit gate for any macOS contributor without an unrelated change ever entering their diff.
Root Cause (suspected, not confirmed)
Per the pattern in #3521 (previously observed and closed for a different call site:
agent.run().awaitinsrc/acp.rs/crates/zeph-bench/src/runner.rs), theclippy::large_futureslint's future-size computation is sensitive to platform-specific async state-machine layout (alignment/padding differences between Linux's and macOS/aarch64's Rust ABI).build_agent_factory's future appears to sit right at the ~16KB threshold boundary, so small ABI differences tip it over on macOS but not Linux.Suggested Fix
Same remedy as #3521's resolution:
Box::pinthebuild_agent_factory(...)call at the flagged sites (clippy's own suggestion), which moves the large future onto the heap and should resolve the lint on both platforms regardless of the underlying size discrepancy — rather than chasing platform-specific size tuning.Environment
5ab24a9e(main, 2026-07-12)rustc 1.97.0 (2d8144b78 2026-07-07),stable-aarch64-apple-darwindesktop,ide,server,chat,pdf,scheduler,testing,deep-link(CI's exactlint-clippymatrix)origin/mainbefore any of the three fixes' files (src/commands/db.rs,src/commands/migrate.rs,src/runner.rs) were touched.Related
src/acp.rs,crates/zeph-bench/src/runner.rs)