Skip to content

Full audit: dedup fix, PV tests, README rewrite, release workflow#5

Merged
harsh-kr11 merged 4 commits into
mainfrom
fix/metrics-and-results
May 19, 2026
Merged

Full audit: dedup fix, PV tests, README rewrite, release workflow#5
harsh-kr11 merged 4 commits into
mainfrom
fix/metrics-and-results

Conversation

@harsh-kr11
Copy link
Copy Markdown
Owner

Summary

Commits that were pushed to the branch after PR #4 was merged early, plus release workflow fix.

  • README rewritten — integration-first, concise, shows how to plug into your own agent (OpenAI, Google, Ollama examples), persistence limitations documented
  • Full audit fixes — pgvector dedup scoring (distance→similarity conversion), 29 new PV unit tests, typer moved to core deps, SQL docstring corrected, .env.example + CONTRIBUTING updated
  • Release workflow — added contents: read permission and explicit dist/ path for PyPI trusted publishing

Changes

  • README.md — rewritten from scratch, integration-focused
  • src/behavioral_memory/evaluation/metrics.py — ORCHESTRATION_PARAMS documented, SQL docstring fixed
  • src/behavioral_memory/memory/store.py — similarity_score() converts distance to similarity
  • src/behavioral_memory/memory/dedup.py — docstring updated
  • tests/unit/test_metrics.py — 29 new tests (133 total)
  • pyproject.toml — typer in core deps
  • .github/workflows/release.yml — permissions + dist path
  • .env.example, CONTRIBUTING.md, .gitignore, agent/tools/mcp_tools.py — polish

Test plan

  • All 133 tests pass
  • CI lint + typecheck + test green

Made with Cursor

harsh-kr11 and others added 4 commits May 19, 2026 21:49
Focus on how users plug behavioral memory into their own agent
(OpenAI, Google, Ollama examples). De-emphasize reference agent
to a single line. Remove redundant sections, cut length by ~60%.

Co-authored-by: Cursor <cursoragent@cursor.com>
Critical fixes:
- Wire ORCHESTRATION_PARAMS as documented constant, clarify routing
- Add 29 unit tests for lenient PV matching (SQL, text, structure)
- Move typer to core deps (CLI entry point requires it at import)

Correctness fixes:
- Fix pgvector dedup: convert cosine distance to similarity (1 - dist)
  so the 0.95 threshold works correctly with both store backends
- Fix _sql_structural_match docstring (table overlap only, not aggregates)

Documentation:
- Add README sections: register custom schemas, non-LangChain usage,
  persistence limitations, MCP schema loading
- Add SANDBOX_TIMEOUT_SECONDS to .env.example
- Add make targets to CONTRIBUTING.md
- Clarify agent/tools/mcp_tools.py as example stub code

Tests: 133 passing (up from 104)
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@harsh-kr11 harsh-kr11 merged commit 15a7a42 into main May 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant