Skip to content

chore(hooks): keep mobile analysis out of pre-commit - #6236

Merged
wesbillman merged 2 commits into
mainfrom
carl/faster-pre-commit
Aug 18, 2026
Merged

chore(hooks): keep mobile analysis out of pre-commit#6236
wesbillman merged 2 commits into
mainfrom
carl/faster-pre-commit

Conversation

@wesbillman

@wesbillman wesbillman commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • run only Dart formatting for mobile changes during pre-commit
  • move Flutter static analysis to the path-scoped pre-push graph
  • fix case-sensitive Justfile triggers for the Rust and Tauri pre-push gates
  • skip whole-tree desktop/web formatting for lockfile-only commits while retaining every lockfile-triggered pre-push check

No 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.23s
  • flutter analyze: 5.58–7.51s
  • old forced full pre-commit: 10.16–18.40s
  • current forced full pre-commit at f18d9b5: 5.42–7.09s, median 6.29s (45% lower)
  • current forced full pre-push at f18d9b5: 2m45s, effectively unchanged from the prior warm 2m41s run
  • lockfile-only pre-commit after the follow-up: 0.18–0.19s across three runs

The 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 validate
  • isolated temporary-repository selection test:
    • Justfile selects both Rust and Tauri pre-push gates
    • pnpm-lock.yaml selects neither mutating frontend formatter
    • desktop/web source files still select their formatter
  • lockfile-only pre-commit: 0.19s, 0.19s, 0.18s
  • pre-push hook passed on the exact pushed head

Earlier full-cycle validation at f18d9b5802f11543e8afbef3cd54c5928817e32b:

  • forced full pre-commit: 5.42s, 6.29s, 7.09s
  • forced full pre-push: 2m45s; all lanes passed
  • mobile tests: 1,465 passed

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>
@wesbillman
wesbillman requested a review from a team as a code owner August 18, 2026 16:35

@jedwards27 jedwards27 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

: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-42 now runs formatter-only just mobile-fmt for mobile/**, retaining stage_fixed.
  • lefthook.yml:82-87 runs mobile-check and the existing mobile-test in parallel for the same mobile path shape. mobile-check still performs non-mutating format validation plus flutter analyze; mobile-test still 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-check through 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_function diagnostic. Analysis is deferred, not discarded.

Exact-head validation:

  • git diff --check d2cfd377e27dab8fdef0236dd8e92c89efbae829...f18d9b5802f11543e8afbef3cd54c5928817e32b — pass
  • lefthook validate under 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 issues
  • just 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>
@wesbillman
wesbillman merged commit b74700d into main Aug 18, 2026
44 of 46 checks passed
@wesbillman
wesbillman deleted the carl/faster-pre-commit branch August 18, 2026 19:56
wpfleger96 pushed a commit that referenced this pull request Aug 18, 2026
…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>
jedwards27 pushed a commit to jedwards27/buzz that referenced this pull request Aug 18, 2026
* 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
wpfleger96 pushed a commit that referenced this pull request Aug 19, 2026
…-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>
wpfleger96 pushed a commit that referenced this pull request Aug 19, 2026
…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>
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.

3 participants