chore(hooks): keep mobile analysis out of pre-commit - #6236
Conversation
Run only the Dart formatter during pre-commit, and retain static analysis as a path-scoped pre-push check alongside the existing mobile test lane. Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
jedwards27
left a comment
There was a problem hiding this comment.
:bot: Jude’s code review agent
Verdict: APPROVE
Reviewed: d2cfd377e27dab8fdef0236dd8e92c89efbae829..f18d9b5802f11543e8afbef3cd54c5928817e32b
Risk: Low — one-file local hook-graph change; no runtime, protocol, persistence, identity, packaging, or release contract changes.
No material findings. I traced the formatter/analyzer/test recipes and the Lefthook selection, failure, and parallelism semantics:
lefthook.yml:39-42now runs formatter-onlyjust mobile-fmtformobile/**, retainingstage_fixed.lefthook.yml:82-87runsmobile-checkand the existingmobile-testin parallel for the same mobile path shape.mobile-checkstill performs non-mutating format validation plusflutter analyze;mobile-teststill runs the Flutter suite.- An isolated Lefthook 2.1.3 semantics probe using these command blocks started both pre-push jobs concurrently, waited for both, propagated a failing
mobile-checkthrough the aggregate exit status, and skipped mobile formatting for a non-mobile input. - A mutation probe added an undefined Dart function: pre-commit formatted and passed as intended, while pre-push failed with the exact file/line and
undefined_functiondiagnostic. Analysis is deferred, not discarded.
Exact-head validation:
git diff --check d2cfd377e27dab8fdef0236dd8e92c89efbae829...f18d9b5802f11543e8afbef3cd54c5928817e32b— passlefthook validateunder pinned Lefthook 2.1.3 — pass- representative mobile pre-commit — formatter only, pass
- representative non-mobile pre-commit — mobile command skipped, pass
just mobile-check— pass, no analyzer issuesjust mobile-test— pass, 1,465 tests- representative mobile pre-push — both jobs selected and pass; tests remained the wall-clock critical path
The diff matches the documented hook contract in AGENTS.md:119-130 and introduces no unrelated scope or conflict with VISION.md / TESTING.md.
Residual risk: GitHub path filtering skips Mobile because this PR changes only lefthook.yml, so CI does not exercise the changed hook shape. Exact-head local selection, mutation, analyzer, and full mobile-suite evidence covers that gap. The aggregate Desktop check is red because smoke shards 1 and 3 were cancelled; successful sibling smoke shards and the one-file hook-only scope make that unrelated to this verdict.
Match the tracked Justfile's case so Rust and Tauri gates run on case-sensitive hosts. Skip whole-tree frontend formatting for lockfile-only commits while retaining all lockfile-triggered pre-push checks. Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
…c-agent-commit-identity * origin/main: feat(managed-agents): close five Claude Code agent-config gaps (#4557) chore(hooks): keep mobile analysis out of pre-commit (#6236) fix(shared-ui): delay hover disclosures by default (#5821) Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
* origin/main: (43 commits) perf(desktop): parallelize relay agent directory rebuild (block#6258) Refine the mobile emoji picker (block#5853) fix(desktop): exclude archived agents from nest, order regeneration (block#5905) Add font size and conversation density preferences (block#5644) fix(desktop): emit camelCase config-write payload fields (block#6062) fix(desktop): downscale large avatars for agent-share PNG body (block#6260) fix(desktop): preserve early relay auth challenges (block#3320) Polish mobile message actions (block#5873) Refine mobile pairing confirmation (block#6018) chore(scripts): add buzz-adopt-prod-agents.sh (block#6250) feat(managed-agents): close five Claude Code agent-config gaps (block#4557) chore(hooks): keep mobile analysis out of pre-commit (block#6236) fix(shared-ui): delay hover disclosures by default (block#5821) fix(desktop-chrome): preserve balanced layout when sidebar collapses (block#6000) Polish mobile timeline navigation (block#5874) chore(release): release Buzz Desktop version 0.5.17 (block#6234) fix(prompt): simplify pickup follow-through (block#6186) fix(mcp): scope todo usage (block#6216) fix(desktop): bound remote agent mention authorization (block#6224) fix: bump h2 for RUSTSEC-2026-0258 (block#6222) ... Signed-off-by: Princess Donut <3cb959c7eb65d61f634e61df318e450f18f82fa0e01849e7010b82666ead0587@buzz.block.builderlab.xyz> # Conflicts: # desktop/src/main.tsx # mobile/ios/Podfile.lock
…-in-thread * origin/main: (32 commits) Revert "fix(acp): gate relay-signed workflow messages on their attributed author" (#6311) fix(desktop): morph the drawer panel icon instead of sliding it (#6306) feat(desktop): refine repository-aware project workspaces (#6003) Fix mobile Activity thread navigation (#5850) perf(desktop): parallelize relay agent directory rebuild (#6258) Refine the mobile emoji picker (#5853) fix(desktop): exclude archived agents from nest, order regeneration (#5905) Add font size and conversation density preferences (#5644) fix(desktop): emit camelCase config-write payload fields (#6062) fix(desktop): downscale large avatars for agent-share PNG body (#6260) fix(desktop): preserve early relay auth challenges (#3320) Polish mobile message actions (#5873) Refine mobile pairing confirmation (#6018) chore(scripts): add buzz-adopt-prod-agents.sh (#6250) feat(managed-agents): close five Claude Code agent-config gaps (#4557) chore(hooks): keep mobile analysis out of pre-commit (#6236) fix(shared-ui): delay hover disclosures by default (#5821) fix(desktop-chrome): preserve balanced layout when sidebar collapses (#6000) Polish mobile timeline navigation (#5874) chore(release): release Buzz Desktop version 0.5.17 (#6234) ... Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
…ntion-phase1 * origin/main: (71 commits) Revert "fix(acp): gate relay-signed workflow messages on their attributed author" (#6311) fix(desktop): morph the drawer panel icon instead of sliding it (#6306) feat(desktop): refine repository-aware project workspaces (#6003) Fix mobile Activity thread navigation (#5850) perf(desktop): parallelize relay agent directory rebuild (#6258) Refine the mobile emoji picker (#5853) fix(desktop): exclude archived agents from nest, order regeneration (#5905) Add font size and conversation density preferences (#5644) fix(desktop): emit camelCase config-write payload fields (#6062) fix(desktop): downscale large avatars for agent-share PNG body (#6260) fix(desktop): preserve early relay auth challenges (#3320) Polish mobile message actions (#5873) Refine mobile pairing confirmation (#6018) chore(scripts): add buzz-adopt-prod-agents.sh (#6250) feat(managed-agents): close five Claude Code agent-config gaps (#4557) chore(hooks): keep mobile analysis out of pre-commit (#6236) fix(shared-ui): delay hover disclosures by default (#5821) fix(desktop-chrome): preserve balanced layout when sidebar collapses (#6000) Polish mobile timeline navigation (#5874) chore(release): release Buzz Desktop version 0.5.17 (#6234) ... Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Summary
Justfiletriggers for the Rust and Tauri pre-push gatesNo test suite was removed or narrowed. Cargo formatting remains workspace-scoped; frontend and mobile source changes still select their existing formatters.
Benchmark
Warm isolated timings on an M2 Max:
dart format .: 1.92–2.23sflutter analyze: 5.58–7.51sf18d9b5: 5.42–7.09s, median 6.29s (45% lower)f18d9b5: 2m45s, effectively unchanged from the prior warm 2m41s runThe new mobile analysis lane finishes before the existing mobile test lane, so it added no observed full-push wall time.
Validation
At pushed head
79626be60d89ba34e0fe136f254cc38cf1f1c2b8:lefthook validateJustfileselects both Rust and Tauri pre-push gatespnpm-lock.yamlselects neither mutating frontend formatterEarlier full-cycle validation at
f18d9b5802f11543e8afbef3cd54c5928817e32b: