Files
claude-mem/plugin/scripts
Alex Newman 3d9fa39cea refactor(phase-2a): consolidate duplicates (-1,073 LoC)
Phase 2 tasks 1–3 of PLAN-RIP-THE-BAND-AIDS-OFF — collapse duplicated
implementations into single canonical sources.

- Task 1 (transcript parser): replace inline
  parseAssistantTextFromLine/findLastAssistantMessage/extractPriorMessages
  in ObservationCompiler with shared extractLastMessage
- Task 2 (bun-path resolver): new src/shared/bun-resolution.ts; reduce
  npx-cli/utils/bun-resolver.ts to a re-export shim and delegate
  CursorHooksInstaller.findBunPath to the shared helper
- Task 3 (migration runner): delete ~965 lines of inlined migration
  methods from SessionStore; constructor now calls
  MigrationRunner.runAllMigrations(). Add addObservationModelColumns
  (v26) to the runner to preserve coverage.

Deferred: Task 4 (PendingMessage self-heal) reverted — test contract
encoded the removed side-effect behavior; will revisit with test
updates. Task 10 (GracefulShutdown merge) correctly skipped per plan
guardrail: performGracefulShutdown and runShutdownCascade serve
different scopes and are NOT always called together. Tasks 5–9 and
11–13 land in subsequent partial commits.

Tests: 28 fail / 1347 pass / 3 skip / 1 error (baseline 38 fail /
1337 pass — strict improvement, zero new failures).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 23:19:29 -07:00
..
2026-02-23 03:32:22 -05:00