| name | b4push |
| description | Run comprehensive pre-push validation covering Rust formatting, Clippy lints, Rust tests, and the zfb app build. Use when: (1) Completing a PR or feature implementation, (2) Before pushing significant changes, (3) After large refactors or multi-file edits, (4) User says 'b4push', 'before push', 'check everything', 'run all checks', or 'ready to push'. |
| user-invocable | true |
| allowed-tools | ["Bash"] |
Before Push Check
Run pnpm b4push from the project root. This executes scripts/run-b4push.sh which runs:
cargo fmt --check — Rust formatting check across all crates
cargo clippy --workspace --all-targets — Rust lints across workspace
cargo test --workspace — Rust unit and integration tests
cd app && pnpm install then pnpm exec zfb build — node-free zfb frontend build via the bundled native binary (no global zfb / env vars needed). app/ is a standalone pnpm project (hoisted node_modules).
Takes ~2-4 minutes depending on whether cargo cache is warm. All steps must pass.
On failure
- Read the failure output to identify which step failed
- Auto-fix what you can:
- Formatting:
cargo fmt
- Clippy: address the lint warnings manually
- Tests: investigate failing test output
- App build: ensure
zfb is installed (cargo install --path $HOME/repos/myoss/zfb/crates/zfb)
- Re-run
pnpm b4push to confirm all checks pass
- Report the final status