Poly + Release Workflow
The canonical order to run before pushing a change. Each step gates the next; do not skip.
Local check loop
cargo fmt
cargo clippy --workspace --all-targets --tests -- -D warnings
cargo test --workspace
poly lint .
Why this order:
cargo fmt first so clippy / poly don't fail on formatting.
- Clippy strict (
-D warnings) — surface real issues before the broader poly sweep.
- Unit + integration tests catch logic regressions before the slow harness.
poly lint . is the meta-linter: typos, markdownlint (120-char cap), cargo-deny licenses, cargo-machete unused deps, rustdoc-lint, rust-max-lines (1000-line cap on src/**/*.rs).
Harden harness
After the local loop passes:
BASEMIND_HARDEN_NO_BUILD=1 \
cargo test --release --test harden -- --ignored --nocapture \
2>&1 | tee /tmp/basemind-harden-$(date +%s).log
BASEMIND_HARDEN_NO_BUILD=1 reuses target/release/basemind — saves ~30s per run. Drop it when you're suspicious the binary is stale.
- Expect 8/8 green: ripgrep, tokio, typescript, react, django, requests, gin, ripgrep-shallow.
- Canaries: tokio
spawn_hits >= 200, django get_hits >= 200, react useState_hits >= 20, ripgrep-shallow any_truncated == true.
Commit + push
- Conventional Commit prefix (
feat:, fix:, perf:, chore:, refactor:).
- Body explains why. Mention schema bumps (
INDEX_SCHEMA_VER / blob format) and added dependencies.
- Co-author trailer per repo convention.
- Push directly to
main is approved for the active iteration loop; PRs only when explicitly requested.
When something fails
- typos: fix the misspelling; prefer the dictionary correction unless it's a proper noun.
- markdownlint MD013 (line length > 120): split the line; for table cells, shorten the cell or move details to a code block under the table.
- cargo-deny license rejection: add the SPDX expression to
deny.toml's licenses.allow only if the license is genuinely permissive (Apache, MIT family, ISC, 0BSD, BSL, Unicode). Anything copyleft (GPL family) — escalate.
- rust-max-lines: extract a submodule or helper file. Do not raise the cap.
1---2name: poly-and-release-workflow3description: Commit step lint/test/harness order4---56# Poly + Release Workflow78The canonical order to run before pushing a change. Each step gates the next; do not skip.910## Local check loop1112```bash13cargo fmt14cargo clippy --workspace --all-targets --tests -- -D warnings15cargo test --workspace16poly lint .17```1819Why this order:2021- `cargo fmt` first so clippy / poly don't fail on formatting.22- Clippy strict (`-D warnings`) — surface real issues before the broader poly sweep.23- Unit + integration tests catch logic regressions before the slow harness.24- `poly lint .` is the meta-linter: typos, markdownlint (120-char cap), cargo-deny licenses, cargo-machete unused deps, rustdoc-lint, rust-max-lines (1000-line cap on `src/**/*.rs`).2526## Harden harness2728After the local loop passes:2930```bash31BASEMIND_HARDEN_NO_BUILD=1 \32 cargo test --release --test harden -- --ignored --nocapture \33 2>&1 | tee /tmp/basemind-harden-$(date +%s).log34```3536- `BASEMIND_HARDEN_NO_BUILD=1` reuses `target/release/basemind` — saves ~30s per run. Drop it when you're suspicious the binary is stale.37- Expect 8/8 green: ripgrep, tokio, typescript, react, django, requests, gin, ripgrep-shallow.38- Canaries: tokio `spawn_hits >= 200`, django `get_hits >= 200`, react `useState_hits >= 20`, ripgrep-shallow `any_truncated == true`.3940## Commit + push4142- Conventional Commit prefix (`feat:`, `fix:`, `perf:`, `chore:`, `refactor:`).43- Body explains *why*. Mention schema bumps (`INDEX_SCHEMA_VER` / blob format) and added dependencies.44- Co-author trailer per repo convention.45- Push directly to `main` is approved for the active iteration loop; PRs only when explicitly requested.4647## When something fails4849- typos: fix the misspelling; prefer the dictionary correction unless it's a proper noun.50- markdownlint MD013 (line length > 120): split the line; for table cells, shorten the cell or move details to a code block under the table.51- cargo-deny license rejection: add the SPDX expression to `deny.toml`'s `licenses.allow` only if the license is genuinely permissive (Apache, MIT family, ISC, 0BSD, BSL, Unicode). Anything copyleft (GPL family) — escalate.52- rust-max-lines: extract a submodule or helper file. Do not raise the cap.