chore: bump version to 9.0.13

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Alex Newman
2026-02-04 19:41:07 -05:00
parent bef825c0d8
commit 57a60c1309
12 changed files with 457 additions and 9 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
"plugins": [
{
"name": "claude-mem",
"version": "9.0.12",
"version": "9.0.13",
"source": "./plugin",
"description": "Persistent memory system for Claude Code - context compression across sessions"
}
@@ -0,0 +1,52 @@
# Phase 02: Resolve Conflicts and Merge PR #722 - In-Process Worker Architecture
PR #722 replaces spawn-based worker startup with in-process architecture. Hook processes become the worker when port 37777 is free, eliminating Windows spawn issues. This PR has merge conflicts that must be resolved before merging.
## Tasks
- [ ] Checkout PR #722 and assess conflict scope:
- `git fetch origin bugfix/claude-md-index`
- `git checkout bugfix/claude-md-index`
- `git merge main` to see conflicts
- List all conflicting files
- [ ] Resolve merge conflicts in each affected file:
- For each conflict, understand both sides:
- Main branch changes (likely from PR #856 merge)
- PR #722 changes (in-process worker architecture)
- Preserve both sets of functionality where possible
- Key files likely affected:
- `src/services/worker-service.ts`
- `src/services/queue/SessionQueueProcessor.ts`
- `plugin/hooks/hooks.json`
- [ ] Run tests after conflict resolution:
- `npm test`
- All tests must pass (761+ expected)
- Report any failures with details
- [ ] Run build after conflict resolution:
- `npm run build`
- Verify no TypeScript errors
- Verify all artifacts are generated
- [ ] Code review the in-process worker changes:
- Verify `worker-service.ts` hook case starts WorkerService in-process when port free
- Verify `hook-command.ts` has `skipExit` option
- Verify `hooks.json` uses single chained command
- Verify `worker-utils.ts` `ensureWorkerRunning()` returns boolean
- [ ] Commit conflict resolution and push:
- `git add .`
- `git commit -m "chore: resolve merge conflicts with main"`
- `git push origin bugfix/claude-md-index`
- [ ] Merge PR #722 to main:
- Wait for CI to pass after push
- `gh pr merge 722 --squash --delete-branch`
- Verify merge succeeded
- [ ] Run post-merge verification:
- `git checkout main && git pull origin main`
- `npm test` to confirm tests pass on main
- `npm run build` to confirm build works
@@ -0,0 +1,54 @@
# Phase 03: Resolve Conflicts and Merge PR #700 - Windows Terminal Popup Fix
PR #700 eliminates Windows Terminal popups by removing spawn-based daemon startup. The worker `start` command now becomes daemon directly instead of spawning a child process. This PR has merge conflicts and may have significant overlap with PR #722 (in-process worker).
## Tasks
- [ ] Checkout PR #700 and assess conflict scope:
- `git fetch origin bugfix/spawners`
- `git checkout bugfix/spawners`
- `git merge main` to see conflicts
- List all conflicting files
- Assess if changes overlap significantly with already-merged PR #722
- [ ] Evaluate if PR #700 is still needed:
- PR #722 (in-process worker) may have already addressed the same Windows spawn issues
- Compare the changes in both PRs
- If #722 fully supersedes #700, close #700 with explanation
- Otherwise proceed with conflict resolution
- [ ] If proceeding, resolve merge conflicts:
- Key files likely affected:
- `src/services/worker-service.ts` (daemon startup changes)
- `src/services/sync/ChromaSync.ts` (windowsHide removal)
- `plugin/hooks/hooks.json` (command changes)
- Preserve functionality from main while adding non-spawn daemon behavior
- [ ] Run tests after conflict resolution:
- `npm test`
- All tests must pass
- Report any failures with details
- [ ] Run build after conflict resolution:
- `npm run build`
- Verify no TypeScript errors
- [ ] Code review the Windows-specific changes:
- Verify worker `start` command becomes daemon directly (no child spawn)
- Verify `restart` command removal (users do stop then start)
- Verify windowsHide removal from ChromaSync
- [ ] Commit conflict resolution and push:
- `git add .`
- `git commit -m "chore: resolve merge conflicts with main"`
- `git push origin bugfix/spawners`
- [ ] Merge PR #700 to main:
- Wait for CI to pass after push
- `gh pr merge 700 --squash --delete-branch`
- Verify merge succeeded
- [ ] Run post-merge verification:
- `git checkout main && git pull origin main`
- `npm test` to confirm tests pass
- `npm run build` to confirm build works
@@ -0,0 +1,54 @@
# Phase 04: Resolve Conflicts and Merge PR #657 - CLI Generate/Clean Commands
PR #657 adds `claude-mem generate` and `claude-mem clean` CLI commands with cross-platform support. It also fixes validation gaps that caused deleted folders to be recreated from stale DB records, and adds automatic shell alias installation. This PR has merge conflicts.
## Tasks
- [ ] Checkout PR #657 and assess conflict scope:
- `git fetch origin bugfix/jan10-bug-2`
- `git checkout bugfix/jan10-bug-2`
- `git merge main` to see conflicts
- List all conflicting files
- [ ] Resolve merge conflicts:
- Key files likely affected:
- `src/services/worker-service.ts` (generate/clean command cases)
- `plugin/scripts/smart-install.js` (CLI installation)
- Preserve all existing functionality while adding CLI commands
- [ ] Run tests after conflict resolution:
- `npm test`
- All tests must pass
- Report any failures with details
- [ ] Run build after conflict resolution:
- `npm run build`
- Verify no TypeScript errors
- [ ] Test the CLI commands manually:
- `bun plugin/scripts/worker-service.cjs generate --dry-run`
- `bun plugin/scripts/worker-service.cjs clean --dry-run`
- Both should exit with code 0
- Review output for sensible behavior
- [ ] Code review the CLI implementation:
- Verify `src/cli/claude-md-commands.ts` exports generate/clean functions
- Verify validation fixes in `regenerateFolder()` (folder existence check)
- Verify path traversal prevention
- Verify cross-platform path handling (`toDbPath()`, `toFsPath()`)
- [ ] Commit conflict resolution and push:
- `git add .`
- `git commit -m "chore: resolve merge conflicts with main"`
- `git push origin bugfix/jan10-bug-2`
- [ ] Merge PR #657 to main:
- Wait for CI to pass after push
- `gh pr merge 657 --squash --delete-branch`
- Verify merge succeeded
- [ ] Run post-merge verification:
- `git checkout main && git pull origin main`
- `npm test` to confirm tests pass
- `npm run build` to confirm build works
- Verify CLI commands still work: `bun plugin/scripts/worker-service.cjs generate --dry-run`
@@ -0,0 +1,46 @@
# Phase 05: Test and Merge PR #863 - Ragtime Email Investigation
PR #863 adds email investigation mode via `CLAUDE_MEM_MODE` environment variable. Each file is processed in a new session with context managed by Claude-mem hooks. It includes configurable transcript cleanup to prevent buildup. This PR has no merge conflicts and CI is passing.
## Tasks
- [ ] Checkout and verify PR #863:
- `git fetch origin claude/setup-ragtime-epstein-analysis-JApkL`
- `git checkout claude/setup-ragtime-epstein-analysis-JApkL`
- Verify the branch is up to date with origin
- [ ] Rebase onto main to incorporate previous PR merges:
- `git rebase main`
- If conflicts arise, resolve them
- Push with `git push --force-with-lease origin claude/setup-ragtime-epstein-analysis-JApkL`
- [ ] Run the full test suite:
- `npm test`
- All tests must pass
- Report any failures
- [ ] Run the build:
- `npm run build`
- Verify no TypeScript errors
- [ ] Code review the ragtime implementation:
- Understand the `CLAUDE_MEM_MODE` environment variable usage
- Review session-per-file processing approach
- Review transcript cleanup configuration (default 24h)
- Verify environment variable configuration for paths and settings
- [ ] Evaluate if this feature belongs in main:
- This appears to be an experimental/specialized feature
- Consider if it should be merged or kept as experimental branch
- If appropriate for main, proceed with merge
- If experimental, document status and skip merge
- [ ] If proceeding, merge PR #863 to main:
- `gh pr merge 863 --squash --delete-branch`
- Verify merge succeeded
- [ ] Run final verification:
- `git checkout main && git pull origin main`
- `npm test` to confirm all tests pass
- `npm run build` to confirm build works
- Verify all 5 PRs are now merged
+154
View File
@@ -0,0 +1,154 @@
# Plan: Address PR #856 Review Feedback
## Summary of Review Feedback
Multiple reviewers identified the same core issues:
1. **Race Condition in Idle Detection** (Medium-High Priority)
- When timeout fires at 3:00 but last message was at 2:59, `idleDuration` is 1 second, check fails
- Need to either remove redundant check or reset `lastActivityTime` on timeout
2. **Missing Test Coverage** (High Priority)
- No tests for SessionQueueProcessor timeout logic
- Critical fix for high-impact bug (79 processes, 13.4GB swap)
3. **Minor: Optional Chaining** (Low Priority)
- Use `onIdleTimeout?.()` instead of `if (onIdleTimeout) { onIdleTimeout() }`
4. **Minor: Logging Enhancement** (Low Priority)
- Add timeout threshold to log message for debugging
---
## Phase 0: Documentation Discovery (COMPLETE)
### Sources Consulted
- PR #856 comments from claude, greptile-apps reviewers
- `src/services/queue/SessionQueueProcessor.ts` (current implementation)
### Allowed APIs
- `waitForMessage(signal, timeoutMs)` → Promise<boolean>
- `logger.info('SESSION', ...)` for logging
### The Fix Strategy
The reviewers suggest two options:
**Option A**: Remove redundant check since `waitForMessage` enforces timeout
```typescript
if (!receivedMessage && !signal.aborted) {
// Timeout occurred - exit gracefully
const idleDuration = Date.now() - lastActivityTime;
logger.info('SESSION', 'Exiting queue iterator due to idle timeout', { ... });
onIdleTimeout?.();
return;
}
```
**Option B**: Reset `lastActivityTime` on timeout to handle edge cases
```typescript
if (!receivedMessage && !signal.aborted) {
const idleDuration = Date.now() - lastActivityTime;
if (idleDuration >= IDLE_TIMEOUT_MS) {
logger.info('SESSION', 'Exiting...', { ... });
onIdleTimeout?.();
return;
}
// CRITICAL: Reset timer since we know queue is empty now
lastActivityTime = Date.now();
}
```
**Decision**: Use Option B - it's defensive and handles spurious wakeups correctly.
---
## Phase 1: Fix Race Condition in SessionQueueProcessor
### What to Implement
Fix the idle timeout logic to reset `lastActivityTime` when timeout occurs but duration check fails.
### Tasks
1. In `createIterator()` at lines 50-62, add `lastActivityTime = Date.now()` after the duration check fails
2. Use optional chaining for `onIdleTimeout?.()`
3. Add timeout threshold to log message
### Pattern to Follow
```typescript
if (!receivedMessage && !signal.aborted) {
const idleDuration = Date.now() - lastActivityTime;
if (idleDuration >= IDLE_TIMEOUT_MS) {
logger.info('SESSION', 'Idle timeout reached, triggering abort to kill subprocess', {
sessionDbId,
idleDurationMs: idleDuration,
thresholdMs: IDLE_TIMEOUT_MS
});
onIdleTimeout?.();
return;
}
// Reset timer on spurious wakeup - queue is empty but duration check failed
lastActivityTime = Date.now();
}
```
### Verification
```bash
npm run build
grep -A10 "idleDuration >= IDLE_TIMEOUT_MS" src/services/queue/SessionQueueProcessor.ts
```
---
## Phase 2: Add Unit Tests for SessionQueueProcessor
### What to Implement
Create test file covering the idle timeout behavior.
### Test Cases Required
1. Iterator exits after idle timeout when no messages arrive
2. `onIdleTimeout` callback is invoked on timeout
3. Message arrival resets the idle timer
4. Abort signal takes precedence over timeout
5. Event listener cleanup happens correctly
### Location
`tests/services/queue/SessionQueueProcessor.test.ts`
### Verification
```bash
npm run test -- SessionQueueProcessor
```
---
## Phase 3: Build and Verify
### Tasks
1. Run `npm run build` - verify no TypeScript errors
2. Run tests to ensure timeout behavior works
3. Commit changes to fix/observer-idle-timeout branch
4. Push to update PR #856
### Verification
```bash
npm run build
npm run test
git diff --stat
```
---
## Phase 4: Update PR Description
### Tasks
1. Update test plan checkboxes in PR description
2. Add note about race condition fix
---
## Summary of Changes
| File | Change |
|------|--------|
| `src/services/queue/SessionQueueProcessor.ts` | Fix race condition, optional chaining, enhanced logging |
| `tests/services/queue/SessionQueueProcessor.test.ts` | New test file for timeout behavior |
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "claude-mem",
"version": "9.0.12",
"version": "9.0.13",
"description": "Memory compression system for Claude Code - persist context across sessions",
"keywords": [
"claude",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "claude-mem",
"version": "9.0.12",
"version": "9.0.13",
"description": "Persistent memory system for Claude Code - seamlessly preserve context across sessions",
"author": {
"name": "Alex Newman"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "claude-mem-plugin",
"version": "9.0.12",
"version": "9.0.13",
"private": true,
"description": "Runtime dependencies for claude-mem bundled hooks",
"type": "module",
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+89 -1
View File
@@ -3,5 +3,93 @@
<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
*No recent activity*
### Dec 8, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #22310 | 9:46 PM | 🟣 | Complete Hook Lifecycle Documentation Generated | ~603 |
| #22305 | 9:45 PM | 🔵 | Session Summary Storage and Status Lifecycle | ~472 |
| #22304 | " | 🔵 | Session Creation Idempotency and Observation Storage | ~481 |
| #22303 | " | 🔵 | SessionStore CRUD Operations for Hook Integration | ~392 |
| #22300 | 9:44 PM | 🔵 | SessionStore Database Management and Schema Migrations | ~455 |
| #22299 | " | 🔵 | Database Schema and Entity Types | ~460 |
| #21976 | 5:24 PM | 🟣 | storeObservation Saves tool_use_id to Database | ~298 |
### Dec 10, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #23808 | 10:42 PM | 🔵 | migrations.ts Already Migrated to bun:sqlite | ~312 |
| #23807 | " | 🔵 | SessionSearch.ts Already Migrated to bun:sqlite | ~321 |
| #23805 | " | 🔵 | Database.ts Already Migrated to bun:sqlite | ~290 |
| #23784 | 9:59 PM | ✅ | SessionStore.ts db.pragma() Converted to db.query().all() Pattern | ~198 |
| #23783 | 9:58 PM | ✅ | SessionStore.ts Migration004 Multi-Statement db.exec() Converted to db.run() | ~220 |
| #23782 | " | ✅ | SessionStore.ts initializeSchema() db.exec() Converted to db.run() | ~197 |
| #23781 | " | ✅ | SessionStore.ts Constructor PRAGMA Calls Converted to db.run() | ~215 |
| #23780 | " | ✅ | SessionStore.ts Type Annotation Updated | ~183 |
| #23779 | " | ✅ | SessionStore.ts Import Updated to bun:sqlite | ~237 |
| #23778 | 9:57 PM | ✅ | Database.ts Import Updated to bun:sqlite | ~177 |
| #23777 | " | 🔵 | SessionStore.ts Current Implementation - better-sqlite3 Import and API Usage | ~415 |
| #23776 | " | 🔵 | migrations.ts Current Implementation - better-sqlite3 Import | ~285 |
| #23775 | " | 🔵 | Database.ts Current Implementation - better-sqlite3 Import | ~286 |
| #23774 | " | 🔵 | SessionSearch.ts Current Implementation - better-sqlite3 Import | ~309 |
| #23671 | 8:36 PM | 🔵 | getUserPromptsByIds Method Implementation with Filtering and Ordering | ~326 |
| #23670 | " | 🔵 | getUserPromptsByIds Method Location in SessionStore | ~145 |
| #23635 | 8:10 PM | 🔴 | Fixed SessionStore.ts Concepts Filter SQL Parameter Bug | ~297 |
| #23634 | " | 🔵 | SessionStore.ts Concepts Filter Bug Confirmed at Line 849 | ~356 |
| #23522 | 5:27 PM | 🔵 | Complete TypeScript Type Definitions for Database Entities | ~433 |
| #23521 | " | 🔵 | Database Schema Structure with 7 Migration Versions | ~461 |
### Dec 18, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #29868 | 8:19 PM | 🔵 | SessionStore Architecture Review for Mode Metadata Addition | ~350 |
| #29243 | 12:13 AM | 🔵 | Observations Table Schema Migration: Text Field Made Nullable | ~496 |
| #29241 | 12:12 AM | 🔵 | Migration001: Core Schema for Sessions, Memories, Overviews, Diagnostics, Transcripts | ~555 |
| #29238 | 12:11 AM | 🔵 | Observation Type Schema Evolution: Five to Six Types | ~331 |
| #29237 | " | 🔵 | SQLite SessionStore with Schema Migrations and WAL Mode | ~520 |
### Dec 21, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #31622 | 8:26 PM | 🔄 | Completed SessionStore logging standardization | ~270 |
| #31621 | " | 🔄 | Standardized error logging for boundary timestamps query | ~253 |
| #31620 | " | 🔄 | Standardized error logging in getTimelineAroundObservation | ~252 |
| #31619 | " | 🔄 | Replaced console.log with logger.debug in SessionStore | ~263 |
### Dec 27, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #33213 | 9:04 PM | 🔵 | SessionStore Implements KISS Session ID Threading via INSERT OR IGNORE Pattern | ~673 |
### Dec 28, 2025
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #33548 | 10:59 PM | ✅ | Reverted memory_session_id NULL Initialization to contentSessionId Placeholder | ~421 |
| #33546 | 10:57 PM | 🔴 | Fixed createSDKSession to Initialize memory_session_id as NULL | ~406 |
| #33545 | " | 🔵 | createSDKSession Sets memory_session_id Equal to content_session_id Initially | ~378 |
| #33544 | " | 🔵 | SessionStore Migration 17 Already Renamed Session ID Columns | ~451 |
### Jan 2, 2026
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #36028 | 9:20 PM | 🔄 | Try-Catch Block Removed from Database Migration | ~291 |
### Jan 3, 2026
| ID | Time | T | Title | Read |
|----|------|---|-------|------|
| #36653 | 11:03 PM | 🔵 | storeObservation Method Signature Shows Parameter Named memorySessionId | ~474 |
| #36652 | " | 🔵 | createSDKSession Implementation Confirms NULL Initialization With Security Rationale | ~488 |
| #36650 | 11:02 PM | 🔵 | Phase 1 Analysis Reveals Implementation-Test Mismatch on NULL vs Placeholder Initialization | ~687 |
| #36649 | " | 🔵 | SessionStore Implementation Reveals NULL-Based Memory Session ID Initialization Pattern | ~770 |
| #36175 | 6:52 PM | ✅ | MigrationRunner Re-exported from Migrations.ts | ~405 |
| #36172 | " | 🔵 | Migrations.ts Contains Legacy Migration System | ~650 |
| #36163 | 6:48 PM | 🔵 | SessionStore Method Inventory and Extraction Boundaries | ~692 |
| #36162 | 6:47 PM | 🔵 | SessionStore Architecture and Migration History | ~593 |
</claude-mem-context>