- AbortSignal threading bounds ReasoningBank.initialize() (#478)
prevents leaked init from runaway patterns.rvf writes
- CapturedExperienceBridge wires hook activity to domain plugins (#479)
via kernel-side drain of captured_experiences
- Removes dead v3-qe-bridge.sh, two stale planning docs, five orphan
workers in qe-workers.ts (subsumed by LearningConsolidationWorker)
Net: +430 / -2,090 lines
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Imp-15: Session Reuse for Repeated Operations
Adds a SHA-256 fingerprint-based operation cache as layer 0 before HNSW
early exit. Exact-match lookups run in O(1) before O(log n) similarity
search, catching repeated operations instantly.
- SessionOperationCache with TTL, capacity eviction, and kv_store persistence
- Wired into TokenOptimizerService.checkEarlyExit() as first check
- cacheOperationResult() stores results after successful LLM execution
- session_cache_stats MCP tool for monitoring hit rates
- CLI: aqe token-usage --cache-stats for cache performance
- Cross-session persistence via existing kv_store table
- 26 new tests covering fingerprinting, TTL, eviction, stats, degradation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
125 test files had beforeEach/beforeAll but no afterEach/afterAll,
leaking state between tests and causing order-dependent failures.
Added cleanup to 104 files (skipped 4 archived, 16 import-only):
- 2 critical DB handle leaks (witness-chain): added db.close()
- 7 high-risk service files: added vi.restoreAllMocks()
- 7 beforeAll files: added matching afterAll
- 88 medium/low risk: added afterEach with appropriate cleanup
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>