Repository navigation
test: make suppression inventory independent of line numbers - #139769
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 6, 2026, 2:49 AM ET / 06:49 UTC. ClawSweeper reviewWhat this changesThe suppression inventory test compares filenames and directive text without fixed line numbers, preventing unrelated line insertions from failing the check. Merge readiness✅ Ready for maintainer review The change remains useful because current main still compares fixed line numbers. The updated body resolves the previous review’s follow-up, and no actionable patch defect was found. Maintainer-authored, protected work remains open. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s suppression inventory scans repository TypeScript files for unchecked casts and expected type errors. Its test enforces the allowed directives, while the report supplies locations for diagnostics. flowchart LR
A[Repository TypeScript files] --> B[Suppression scanner]
B --> C[Findings with diagnostic locations]
C --> D[Reject unchecked casts]
C --> E[Compare filenames and directive text]
D --> F[Inventory test result]
E --> F
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests 0. Total 0 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep the directive inventory strict about filenames, exact text, order, and multiplicity while retaining line numbers solely in diagnostic output. Do we have a high-confidence way to reproduce the issue? Yes, from source: inserting a line before an existing directive changes the scanner’s location and fails main’s exact comparison despite unchanged directive content; the merged resync provides a concrete prior example. This review did not execute that scenario. Is this the best way to solve the issue? Yes. Removing location from equality addresses incidental line drift while preserving directive content, ordering, duplicate counts, and unchecked-cast enforcement. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2a488546aabe. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
e69d849 to
8039e58
Compare
8039e58 to
3e0f6f6
Compare
3e0f6f6 to
1d63090
Compare
|
Merged via squash.
|
What Problem This Solves
The suppression inventory fails after unrelated line insertions, forcing updates such as #139747 even when no suppression changed.
Why This Change Was Made
Compare each suppression's filename and exact directive text. Ordered array equality preserves all 17 entries and duplicate counts, while the inventory still reports line numbers for diagnostics.
User Impact
No production changes. New or changed directives and unchecked casts still fail. This independent extraction from #135599 changes one test file; production and test LOC deltas are both zero.
Evidence
Both inventory tests, formatting, and fresh independent P2 review passed. An initial local scan hit the existing 120-second deadline under heavy host load. After the concurrent review finished, the identical command passed in 11 seconds without source, deadline, or coverage changes. Exact-head CI remains the landing gate.