Repository navigation
perf(tests): bound compaction identifier scans - #118422
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 11:43 PM ET / August 3, 2026, 03:43 UTC. ClawSweeper reviewWhat this changesThe branch makes opaque host/port identifier extraction start at a token boundary and adds a 120 KB regression case that preserves valid hostname, path, IP, and dashed-host endpoints. Merge readinessKeep this PR open for normal maintainer review. Current Priority: P2 Review scores
Verification
How this fits togetherThe compaction safeguard extracts opaque identifiers from recent conversation messages before requesting a summary, then audits the returned summary for those identifiers. This extraction therefore affects both compaction latency and whether a safeguard retry is requested. flowchart LR
A[Recent conversation messages] --> B[Opaque identifier extraction]
B --> C[Compaction summary request]
C --> D[Generated summary]
D --> E[Identifier quality audit]
E --> F[Accept summary or retry]
Decision needed
Why: The source and regression coverage support the repair, but the Before merge
Agent review detailsSecurityNone. PR surfaceSource +2, Tests +14. Total +16 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Merge the focused producer-side boundary guard once the exact merge result is green, retaining the new large-input regression and existing accepted endpoint forms. Do we have a high-confidence way to reproduce the issue? Yes—source establishes that the unbounded host/port alternative can retry from every character of a long identifier-like token, and the PR supplies a focused 120 KB regression input. This read-only review did not execute the benchmark locally. Is this the best way to solve the issue? Yes—the token-boundary condition is the narrowest owner-side fix: it prevents repeated starts without adding caches, retries, configuration, or downstream suppression, and the test retains the supported endpoint forms. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c3ea28af611a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* perf(tests): bound compaction identifier scans * chore: keep release notes out of test PR --------- Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
The compaction safeguard's opaque-identifier extractor could retry the greedy host/port alternative at every character of a very long non-identifier token. That made otherwise simple safeguard tests spend quadratic time scanning input.
Fix
Require the host/port alternative to start at an identifier token boundary. The regression fixture combines a 120 KB non-identifier token with valid hostname, path, IP, and dashed-host endpoints so the fast path and accepted endpoint forms stay covered.
Evidence
No test sharding, concurrency, or coverage configuration changed.