chore(#5721): scope ty pre-commit hook to changed files - #5728
Conversation
The ty hook was configured with `pass_filenames: false` and a `.` positional argument, causing it to check the entire project on every commit. Remove `.` from the entry command and drop `pass_filenames: false` so pre-commit passes only staged Python files to ty, matching the standard hook behavior. Note: pre-commit hooks could not run in sandbox (network blocked). The post-script runs pre-commit authoritatively. Closes #5721
|
🤖 Finished Review · ✅ Success · Started 3:07 PM UTC · Completed 3:16 PM UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ReviewFindingsMedium
Labels: PR modifies pre-commit config (CI infrastructure) |
|
🤖 Finished Retro · ✅ Success · Started 3:32 PM UTC · Completed 3:46 PM UTC |
Retro: PR #5728 — scope ty pre-commit hook to changed filesVerdict: Clean workflow, no new proposals warranted. This was a well-executed end-to-end pipeline for a simple 2-line config change to Timeline
Total: ~34 min issue-to-merge, ~$3.46, zero rework iterations. Agents repo: What went well
Evidence supporting existing issues (not filing new proposals)Review proportionality (agents#301, agents#439, agents#497): This run is another data point — $1.77 and 46 tool calls across 4 sub-agents for a 2-line YAML change that produced zero code findings. Only the orchestrator's structural protected-path flag was meaningful. The review sub-agents spent effort on tangential exploration: correctness globbed Sub-agent redundant reads (agents#140, agents#252): Despite PR #172 (merged Jul 17) reportedly fixing cross-agent file duplication, the style-conventions sub-agent still made 7 tool calls reading the same file at different offsets. This may be intra-agent fragmentation rather than inter-agent duplication — a distinct pattern from what #140 addressed — but it contributes to the same cost overhead. Triage output directory (fullsend#3012): The triage agent needed 4 attempts to write its output (directory didn't exist, then tried unavailable Write tool). Pre-creating |
Summary
.positional argument from thetypre-commit hook entry so it no longer checks the entire project treepass_filenames: falseso pre-commit appends only the staged Python files toty checkWhy
The hook was configured to run
ty check .on every commit regardless of which files changed. This made commits slower and surfaced diagnostics unrelated to the staged files. Sincety checkaccepts individual file paths, letting pre-commit pass filenames is the correct behavior.Testing
Closes #5721
Post-script verification
agent/5721-ty-hook-pass-filenames)8ac8468aeabcc94dc3be41d911c7fa97508211db..HEAD)