Skip to content

ci: clippy first-party WASM plugins in default lint gate (H5) - #25

Merged
ElSargo merged 1 commit into
mainfrom
ci/plugin-clippy-gate
Sep 16, 2026
Merged

ElSargo merged 1 commit into
mainfrom
ci/plugin-clippy-gate

Conversation

@ElSargo

@ElSargo ElSargo commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Closes audit H5: first-party plugins/* crates declare empty [workspace] and are not root workspace members, so root cargo clippy --workspace never linted product UI (session-switcher, keybindings, default-workspace, etc.).
  • Adds pluginClippyCheck (Nix/crane-style guest src + vendored plugin lockfiles) that runs:
    cargo clippy --manifest-path plugins/<name>/Cargo.toml --target wasm32-unknown-unknown --locked --lib
    over all 18 first-party plugins.
  • Wired into default PR CI via checks.*.lint / lintCheck, interactive nix run .#lint, and cache-ci.
  • No -D warnings on this first gate — build fails on errors only. Unwrap/deny tightening is a follow-up.

Plugins gated

coding-agent, component-runtime-io, component-workspace-watch, default-workspace, diff-viewer, inbox, keybindings, neovim-client, neovim-files, picker, resize-proof, session-switcher, status-bar, terminal-session, terminal-ui, theme-switcher, workspace-file-log, worktree-manager

(plugins/neovim-runtime has no Cargo.toml / is out of scope.)

How to verify locally

# Host/dev parity (same flags as the Nix job):
for plugin in coding-agent component-runtime-io component-workspace-watch default-workspace \
  diff-viewer inbox keybindings neovim-client neovim-files picker resize-proof \
  session-switcher status-bar terminal-session terminal-ui theme-switcher \
  workspace-file-log worktree-manager; do
  cargo clippy --manifest-path "plugins/$plugin/Cargo.toml" \
    --target wasm32-unknown-unknown --locked --lib
done

# Nix CI path:
nix build --print-build-logs .#pluginClippyCheck
# or full default lint gate (pulls pluginClippyCheck as a dep):
nix build --print-build-logs .#checks.x86_64-linux.lint

Residual gaps / allowlist choices

  • --lib only (not --all-targets): several plugins' test / host-only paths fail to compile for wasm32 (e.g. worktree-manager unix symlink helpers; default-workspace custom panic_impl vs std when tests pull in serde_json).
  • No -D warnings: existing Clippy warnings (e.g. too_many_arguments, if_same_then_else) are allowed so the gate lands without a multi-kLOC cleanup.
  • Root workspace unwrap/expect deny policy is still not applied inside plugins — gradual per-crate lints are follow-up.
  • Nested e2e / examples / runtimes/* remain out of this gate.
  • .cargo/config.toml mold linker left alone (wasm32 path unaffected).

Test plan

  • Host cargo clippy … --lib over all 18 plugins: green (warnings only)
  • nix build .#pluginClippyCheck: green (result/passed)
  • nix eval / show-derivation: lintCheck depends on brood-plugin-clippy
  • GitHub Actions green on this PR (nix run .#ci)

@ElSargo ElSargo left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Brood QA review

Checked: diff/view; CI 35149558447; audit H5.

Code: Correct H5 approach. pluginClippyCheck loops 18 first-party plugins with cargo clippy --manifest-path … --target wasm32-unknown-unknown --locked --lib, wired into lint/cache-ci. Explicitly no -D warnings yet; --lib not --all-targets justified (wasm test/host paths). neovim-runtime correctly out of scope.

CI: FAILURE — runner ENOSPC. Cannot confirm the new clippy derivation on GHA yet. Author reports host loop + nix build .#pluginClippyCheck green.

Desktop verify: N/A (CI-only).

Residual / merge: Follow-ups remain (warnings deny, unwrap policy in plugins, all-targets where feasible). Land after CI disk relief proves the gate. May stack with #24 in nix/packages.nix — expect conflict.

— Brood QA

@ElSargo ElSargo left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Brood QA review — PR #25 (H5 plugin WASM clippy gate)

Verdict

Approve (content). CI red is infra ENOSPC, not a plugin clippy failure.

What looks good

  • Closes audit H5: first-party plugins/* are independent empty-[workspace] crates and were invisible to root cargo clippy --workspace.
  • Gates all 18 Cargo-based plugins for wasm32-unknown-unknown with --locked --lib.
  • Correctly omits plugins/neovim-runtime (no Cargo.toml).
  • Vendoring path matches existing guest builds (guestSrc + wasmCargoVendorDir + crane vendored-deps hook).
  • Toolchain includes clippy + wasm32 targets via rustToolchainWithTools.
  • Conservative first gate: no -D warnings, --lib only — avoids false fails from known warnings and host-only test paths.
  • Wired into lintCheck / checks.*.lint, nix run .#lint, and cache-ci.

CI

Failed run https://github.com/ElSargo/manifold/actions/runs/35149558447 — No space left on device unpacking rust-std (wasm). Infra, not this diff. Re-run after disk cleanup.

Local checks (this review)

  • nix eval / nix derivation show .#lintCheck — lint hard-depends on brood-plugin-clippy.
  • Spot-checked all 18 plugins: empty [workspace], Cargo.lock present, list aligns with vendor lockfiles.
  • Did not run full nix build .#pluginClippyCheck here (disk).

Notes for merge

  • nix/packages.nix will conflict with PR #24; rebase whichever lands second.
  • Follow-ups (optional, not blocking): -D warnings, per-crate unwrap denies, eventually --all-targets where wasm-clean.

Oliver

No code blockers. Infra: free CI disk / re-run. Coordinate merge order with #24.

Plugins are independent Cargo workspaces and were invisible to root
cargo clippy --workspace. Run cargo clippy --lib for wasm32 over all
plugins/*/ crates in lintCheck / nix run .#lint without -D warnings.
@ElSargo
ElSargo force-pushed the ci/plugin-clippy-gate branch from 3ad3b2a to 84ede44 Compare September 16, 2026 21:44
@ElSargo
ElSargo merged commit dd710ab into main Sep 16, 2026
1 check failed
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