Repository navigation
feat: Memory system enhancements - dedup, TTL, context window, passport - #1
Merged
Merged
Conversation
- Add content_hash column (SHA-256) for server-side dedup - Add ttl_seconds and expires_at columns for memory lifecycle - Implement CreateWithParams for dedup and TTL options - Add DeleteExpired() for cleanup of expired memories - Update schema migration to v2 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
- Automatically exclude memories where expires_at < NOW() - Ensures expired session data doesn't appear in search results Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
- Add skip_duplicate_threshold parameter (0.95 exact, 0.85 semantic) - Add ttl_seconds parameter for temporary memories - Session namespaces auto-default to 24h TTL - Return existing memory when duplicate detected Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
- BuildContextWindow(): weighted scoring for LLM context optimization - Relevance (50%) + Recency (30%) + Type boost (20%) - Token budget management - CreatePassport(): export context for cross-system handoff - ImportPassport(): import context to target system - Comprehensive tests for both features Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
- Update AGENT.md with new schema, Phase 3 completions, advanced features - Update README.md with new features overview and examples - Update docs/cli.md with new environment variables and parameters - Add comprehensive docs/api.md with API reference - Update CLAUDE.md with architectural facts Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
- Add observability package with structured logging, Prometheus metrics, request tracing - Add /metrics endpoint for Prometheus scraping - Add RequestID and Logging middleware to web server - Create OpenAPI 3.0 specification (docs/openapi.yaml) - Create 6 Architecture Decision Records (docs/adr/) - Create CONTRIBUTING.md guide - Create CHANGELOG.md - Update AGENT.md, README.md, docs/cli.md with new features Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
The importWithEmbedding function was missing content_hash in the INSERT statement, causing NULL values in the database. This broke the List function which expects content_hash to be non-NULL. - Added content_hash computation using computeContentHash() - Added content_hash column to INSERT statement - Added content_hash to ON CONFLICT UPDATE clause Fixes integration test failure: TestStore_Import_Integration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements complete Phase 3 memory system enhancements and observability infrastructure.
Core Features
Memory System Enhancements
Advanced Retrieval
Observability
Documentation
Changes
Database Schema v2
MCP Tools
API Changes
Testing
All memory package tests pass (27+ tests)
Build verified: passes
Commits