feat(dev-tools): refactor pre-commit output and runtime profile#1773
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the developer pre-commit hook experience to reduce noise and improve latency by default, while adding structured output modes intended for both humans and automation. It also updates workflow documentation/specs and adds a follow-up “open issue” spec for bringing pre-push behavior to parity.
Changes:
- Refactor
pre-commit.shto default to a faster 3-step profile and add--format=<text|json>+--verbosity=<concise|verbose>(plus--verbosealias) with per-step log capture. - Update agent/skill documentation to describe the new output modes, log directory override via
PRE_COMMIT_LOG_DIR, and tier ownership (pre-commit vs pre-push vs CI). - Add a new open spec describing a future pre-push refactor for output-mode parity.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
contrib/dev-tools/git/hooks/pre-commit.sh |
Implements new output modes, concise-by-default summaries, and per-step log capture; updates runtime profile. |
docs/issues/open/1769-refactor-pre-commit-checks-performance-and-verbosity.md |
Updates the issue spec to reflect implemented pre-commit contract, timings, and completion status. |
docs/issues/open/1770-refactor-pre-push-checks-performance-and-verbosity.md |
Adds a follow-up open spec for pre-push output/logging parity. |
AGENTS.md |
Documents the new pre-commit profile, output modes, and log directory guidance for agents. |
.github/skills/dev/git-workflow/run-pre-commit-checks/SKILL.md |
Updates skill guidance for running pre-commit with new flags and troubleshooting. |
.gitignore |
Ignores /.tmp/ to support workspace-local log output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3e2b6d6 to
369c5fd
Compare
|
ACK bf6b570 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1773 +/- ##
===========================================
- Coverage 79.02% 79.01% -0.01%
===========================================
Files 371 371
Lines 27928 27928
Branches 27928 27928
===========================================
- Hits 22069 22068 -1
Misses 5555 5555
- Partials 304 305 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| # Expected runtime: ~1 minute on a modern developer machine (concise default profile). | ||
| # AI agents: set a per-command timeout of at least 3 minutes before invoking this script. | ||
| # | ||
| # All steps must pass (exit 0) before committing. |
There was a problem hiding this comment.
Perhaps we should have a summary of the steps and what it supposed to be achieved in this file header?
Summary
--format=<text|json>,--verbosity=<concise|verbose>, and--verbosealiascargo machete,linter all,cargo test --doc --workspace)PRE_COMMIT_LOG_DIR(default/tmp, workspace option.tmp)docs/issues/open/1770-refactor-pre-push-checks-performance-and-verbosity.mdValidation
linter all./contrib/dev-tools/git/hooks/pre-commit.sh./contrib/dev-tools/git/hooks/pre-commit.sh --format=jsonContext
Implements issue spec:
docs/issues/open/1769-refactor-pre-commit-checks-performance-and-verbosity.md