Repository navigation
fix: line-cap checks skip files in ignored temporary directories - #151748
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 18, 2026, 7:47 AM ET / 11:47 UTC. ClawSweeper reviewWhat this changesThe PR prevents ancestor Git ignore rules from hiding temporary source snapshots from line-cap checks and adds regression coverage. Merge readiness✅ Ready for maintainer review The repair remains useful on current main, and the introduced patch has no actionable correctness findings. The focused regression covers skipped measurement and preserved exclusions. Priority: P2 Review scores
Verification
How this fits togetherThe line-cap checker compares changed source files with their Git baseline using oxlint. Local checks and PR CI consume its result to reject new violations or growth in oversized files. flowchart LR
A[Changed source files] --> C[Disposable snapshots]
B[Git baseline and lint configuration] --> C
C --> D[Local Git-ignore boundary]
D --> E[Oxlint line counts]
E --> F[Compare allowed growth]
F --> G[Pass or actionable failure]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +30, Other +2. Total +32 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep snapshot isolation in the existing checker while retaining configured caps, exclusions, and cleanup. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the trigger: place temporary snapshots beneath a Git-ignored directory and grow an oversized file. The regression encodes this path, but this read-only review did not execute it. Is this the best way to solve the issue? Yes. The boundary addresses oxlint's verified parent-ignore behavior at the snapshot owner without disabling explicit exclusions or changing repository lint policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8db38db91191. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Line-cap checks can report success without analyzing any files when the temporary directory is inside a Git-ignored directory such as
.artifacts.User Impact
The checker now measures copied source files in that environment and rejects actual over-cap growth. Explicit lint exclusions, configured caps and normal lint behavior remain unchanged. There is no runtime product change.
Why This Change Was Made
Oxlint inherits ancestor Git ignore rules while walking the disposable snapshots. An empty Git boundary inside the scratch directory stops that inheritance for both snapshots. The existing cleanup removes the boundary with the scratch directory.
This fixes the snapshot owner rather than relaxing lint configuration. The installed-tool reproduction also showed that
--no-ignorealone still analyzed zero files in this case.Evidence
ignorePatternsand override exclusions.