Profile
rm_gates_profileProfile pre-commit and pre-push gate hooks across repositories to pinpoint the slowest checks and speed up CI feedback.
Instructions
Profile (rm_gates). Run and inspect the two-tier (fast/heavy) pre-commit gate across repos.
The single tool that can actually drive both tiers of the two-tier gate
model: stage="fast" exercises a repo's pre-commit-stage hooks,
stage="heavy" exercises its pre-push-stage hooks (pytest, cargo,
uv lock --check, ...) via pre-commit run --hook-stage <stage>.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | Target one repo's latest gate job for 'status'/'explain'/'profile' (alternative to job_id). | |
| fleet | No | For 'audit_fail_fast': scan every repository in the workspace rather than the ones named by 'repos'. | |
| repos | No | Comma-separated repo names or absolute paths to target. Omit for 'run'/'retest' to target the whole workspace. | |
| stage | No | 'fast' -> `pre-commit run --hook-stage pre-commit` (formatters/linters, no network/tests). 'heavy' -> `--hook-stage pre-push` (pytest, cargo, `uv lock --check`, ...). For 'run'/'retest'. | fast |
| start | No | For 'phase_direction_here': directory to resolve the repository from (default: this process's current working directory). | |
| top_n | No | 'profile' with no job_id/repo: how many slowest hooks to report fleet-wide. | |
| job_id | No | Target one gate job for 'status'/'explain'/'profile'. | |
| dry_run | No | For 'xdist_apply': report what would change without writing. Defaults to True on purpose -- rewriting ~40 repositories' pre-commit configs must be an explicit choice, never the consequence of omitting an argument. | |
| summary | No | 'status': compact roll-up (counts + failed set) vs the full per-job detail. | |
| threads | No | Parallel workers. | |
| timeout | No | Per-repo pre-commit timeout in seconds. | |
| escalate | No | 'retest' only: when a repo's narrowed retest passes every requested hook, also submit a SECOND job for that repo's full wave (a narrowed pass alone is never sufficient evidence of shippability -- see gate_ledger.is_shippable). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||