fix: Address GitHub issues #511, #517, #527, #531 (#542)

* feat(docs): Add analysis reports for issues #514, #517, #520, #527, and #532

- Issue #514: Documented analysis of orphaned observer session files, including root cause, evidence, and recommended fixes.
- Issue #517: Analyzed PowerShell escaping issues in cleanupOrphanedProcesses() on Windows, with recommended fixes using WMIC.
- Issue #520: Confirmed resolution of stuck messages issue through architectural changes to a claim-and-delete pattern.
- Issue #527: Identified detection failure of uv on Apple Silicon Macs with Homebrew installation, proposed path updates for detection.
- Issue #532: Analyzed memory leak issues in SessionManager, detailing session cleanup and conversationHistory growth concerns, with recommended fixes.

* fix: address GitHub issues #511, #517, #527, #531

- #511: Add gemini-3-flash model to GeminiAgent (type, RPM limits, validation)
- #517: Replace PowerShell with WMIC for Windows process management (fixes Git Bash/WSL)
- #527: Add Apple Silicon Homebrew paths for bun and uv detection
- #531: Remove duplicate type definitions from export-memories.ts using bridge file

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(docs): Add detailed reports for issues #511 and #531 addressing model validation and type duplication

* test: add regression tests for PR #542 fixes

Adds comprehensive regression tests for all 4 issues addressed in PR #542:

- #511: Add gemini-3-flash model tests to verify model acceptance and rate limiting
- #517: Add WMIC parsing tests for Windows process enumeration (23 tests)
- #527: Add Apple Silicon Homebrew path tests for bun/uv detection (18 tests)
- #531: Add export types tests to validate type interfaces (12 tests)

Total: 53 new tests, all passing. Addresses PR review feedback requesting test coverage.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Alex Newman
2026-01-04 02:21:02 -05:00
committed by GitHub
parent a833cd2099
commit 316d9cf96b
19 changed files with 2162 additions and 98 deletions
+96
View File
@@ -0,0 +1,96 @@
/**
* Export/Import types for memory data
*
* These types represent the structure of exported memory data.
* They are aligned with the actual database schema and include all fields
* needed for complete data export and import operations.
*/
/**
* Observation record as stored in the database and exported
*/
export interface ObservationRecord {
id: number;
memory_session_id: string;
project: string;
text: string | null;
type: string;
title: string;
subtitle: string | null;
facts: string | null;
narrative: string | null;
concepts: string | null;
files_read: string | null;
files_modified: string | null;
prompt_number: number;
discovery_tokens: number | null;
created_at: string;
created_at_epoch: number;
}
/**
* SDK Session record as stored in the database and exported
*/
export interface SdkSessionRecord {
id: number;
content_session_id: string;
memory_session_id: string;
project: string;
user_prompt: string;
started_at: string;
started_at_epoch: number;
completed_at: string | null;
completed_at_epoch: number | null;
status: string;
}
/**
* Session Summary record as stored in the database and exported
*/
export interface SessionSummaryRecord {
id: number;
memory_session_id: string;
project: string;
request: string | null;
investigated: string | null;
learned: string | null;
completed: string | null;
next_steps: string | null;
files_read: string | null;
files_edited: string | null;
notes: string | null;
prompt_number: number;
discovery_tokens: number | null;
created_at: string;
created_at_epoch: number;
}
/**
* User Prompt record as stored in the database and exported
*/
export interface UserPromptRecord {
id: number;
content_session_id: string;
prompt_number: number;
prompt_text: string;
created_at: string;
created_at_epoch: number;
}
/**
* Complete export data structure
*/
export interface ExportData {
exportedAt: string;
exportedAtEpoch: number;
query: string;
project?: string;
totalObservations: number;
totalSessions: number;
totalSummaries: number;
totalPrompts: number;
observations: ObservationRecord[];
sessions: SdkSessionRecord[];
summaries: SessionSummaryRecord[];
prompts: UserPromptRecord[];
}