Skip to content

chore: one-shot cargo fmt --all + CI fmt-check gate + §七 drift-zero policy#136

Merged
firstintent merged 1 commit into
mainfrom
chore/fmt-sweep
May 24, 2026
Merged

chore: one-shot cargo fmt --all + CI fmt-check gate + §七 drift-zero policy#136
firstintent merged 1 commit into
mainfrom
chore/fmt-sweep

Conversation

@firstintent
Copy link
Copy Markdown
Owner

Change

One-shot workspace-wide cargo fmt --all (38 .rs files, 242+/207-, pure formatting diff) + new .github/workflows/check.yml (fmt + clippy CI gate) + CLAUDE.md §七 policy rewrite from drift-tolerant to drift-zero. rustfmt.toml header comment synced.

Why

V0.6.5 / V0.6.6 cycles saw 5 subagents each manually revert 12-20 unrelated rustfmt drift files after touching a single .rs file — 15-20% time burn / subagent. Root cause = pre-existing drift accumulated pre-§七-rule. Eliminating at source.

Review

  • All diff is pure formatting (whitespace, line-wrap per rustfmt.toml pinned style: max_width=100 / tab_spaces=4 / use_field_init_shorthand). Spot-check 1-2 files to verify.
  • cargo test --workspace: 1614 pass / 26 fail — identical to origin/main pre-fmt run on the same host (failures are WSL2 inotify-host transient, not counted in baseline per CLAUDE.md §一).
  • cargo clippy --workspace --all-targets --locked -- -D warnings: clean
  • cargo fmt --all -- --check: clean (self-verify)

Scope

  • No code change (semantically identical)
  • No version bump (still 0.6.6)
  • No baseline change (1639/1 nominal baseline; host-transient delta unchanged)
  • CI gate active on next PR

Follow-up

After merge, memory entries advising "don't run cargo fmt" become obsolete — main session updates them to reflect the new drift-zero policy.

…ift-zero policy

Sweep accumulated rustfmt drift in one shot (38 .rs files, 242+/207-).
All changes are pure formatting (whitespace, line-wrap, attribute spacing
per rustfmt.toml pinned style). Zero functional delta — workspace baseline
holds at 1614 pass / 26 host-transient fail (WSL2 inotify; identical count
on origin/main pre-fmt).

Add `.github/workflows/check.yml` enforcing `cargo fmt --all -- --check` +
`cargo clippy -D warnings` on push to main and on PRs. Future PRs fail CI
if they introduce new drift.

CLAUDE.md §七 rewritten from "drift-tolerant" (don't run cargo fmt; keep
drifted files alone) to "drift-zero" (commit-front cargo fmt --all
required; CI gates). rustfmt.toml header comment synced.

Discovered need: V0.6.5 + V0.6.6 cycles saw 5 subagents burn ~15-20% time
each manually reverting rustfmt drift after touching a single file. Root
cause = pre-existing accumulated drift. Eliminating root cause via one-shot
cleanup + CI gate.

No version bump.
@firstintent firstintent merged commit fadaf34 into main May 24, 2026
1 of 2 checks passed
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