Repository navigation
test(compaction): consolidate classification proof at its owner - #139564
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 5, 2026, 11:05 PM ET / September 6, 2026, 03:05 UTC. ClawSweeper reviewWhat this changesMoves repeated conversation-classification tests into their owning suite and removes unused internal exports without changing compaction behavior. Merge readiness✅ Ready for maintainer review Useful, bounded cleanup with no actionable correctness findings. The consolidation is not present on inspected main, and it supports the explicitly requested test-audit campaign. Priority: P3 Review scores
Verification
How this fits togetherCompaction summarizes older conversation history so sessions can continue within model context limits. Its conversation classifier distinguishes meaningful transcript content from boilerplate and feeds compaction guards and context reports. flowchart TD
A[Session transcript] --> B[Conversation classifier]
B --> C[Meaningful content and anchors]
B --> D[Boilerplate and orphan tool output]
C --> E[Compaction guards]
D --> E
E --> F[Summarize or skip]
B --> G[Context report]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -11, Tests -105. Total -116 across 8 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep classification contracts in the canonical predicate suite while retaining compaction and context-report integration coverage. Do we have a high-confidence way to reproduce the issue? Not applicable: this consolidates existing tests rather than repairing a reported runtime defect; the repeated predicate assertions are directly visible in the introduced diff. Is this the best way to solve the issue? Yes: testing through the existing classifier preserves the removed scenarios while eliminating internal forwarding seams and leaving integration behavior checks intact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cbcc1df2b32b. 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)
|
9ce6413 to
3614129
Compare
3614129 to
bc1dfcc
Compare
|
Merged via squash.
|
* commit 'a2886546df92c3a601db538b1b70125e3519a16f': test(reports): deduplicate native process census setup (#139596) fix(ui): avoid refetching unrelated catalog hosts (#139570) test(compaction): consolidate classification proof at its owner (#139564) fix(apple): harden native state file permissions (#139623) improve(skills): review retained conversation for durable learning (#139656) fix(docker): stage bundled plugin runtime dependencies under the packaged plugin root (#139117) test: close HTTP fixtures before destroying their sockets (#139595) refactor(agents): simplify attempt execution and recovery (#139597) test(gateway): share HTTP authority scenarios (#139611) test(gateway): distinguish final CLI results from draft text (#139605) fix(shell-env): preserve CLI terminal ownership during login imports (#139308)
Related: #139428
What Problem This Solves
Compaction integration suites repeat direct classifier checks through test-only exports, incurring the suites' workspace/database setup for pure predicates and maintaining redundant entry points.
Why This Change Was Made
Move the unique classification cases to the existing canonical unit suite. Remove duplicate predicate assertions, obsolete test exports, and the direct diagnostics alias. Keep the production classifier and transcript-wide wrapper, along with all real compaction, summary-anchor, anti-loop, hook and context-report integration proof.
User Impact
No production behavior changes. The same classification contracts have one owner. Net removal: 103 test lines, two support lines, and 11 production lines.
Evidence
All 365 cases pass before and after across the canonical classifier, compact hooks, safeguard and context-report suites. Preserved cases include both user-anchor positions, silent-reply context, custom anchors, excluded events, summaries, thinking/reasoning blocks, and wrapped heartbeat tokens. Full changed gate, formatting, diff check and independent P2 review pass.
Raw grouped timing was 140.74s before and 94.00s after, but cold/warm/load differences prevent attribution; this is not a full-suite speedup claim. Seven original predicate cases reported 307ms total and their canonical replacements reported below 1ms each.