Skip to content

feat(retain): add affect recognition metadata - #9

Open
Musicaldg wants to merge 1 commit into
Shadow-Weave:mainfrom
Musicaldg:codex/retain-affect-recognition
Open

feat(retain): add affect recognition metadata#9
Musicaldg wants to merge 1 commit into
Shadow-Weave:mainfrom
Musicaldg:codex/retain-affect-recognition

Conversation

@Musicaldg

Copy link
Copy Markdown
Contributor

Summary

  • add opt-in sentiment/emotion recognition to the Retain extraction schema
  • propagate versioned affect metadata through the HMS ingestion pipeline and persist it on memory units
  • add PostgreSQL and Oracle migrations/write paths while leaving Recall unchanged
  • document deployment configuration with safe defaults and fail-soft parsing

Design

  • taxonomy: positive/negative/neutral sentiment plus joy, sadness, anger, fear, surprise, disgust, and neutral emotion
  • intensity is constrained to 0.0–1.0
  • classification uses the existing structured Retain LLM call, avoiding an extra provider round trip
  • feature defaults off and invalid model output degrades to NULL rather than failing Retain

Validation

  • Retain offline CI-equivalent suite: 316 passed, 3 skipped
  • focused affect, Alembic DAG, and database abstraction suite: 94 passed
  • related extraction, projection, labels, and batch regression suite: 86 passed (DB-dependent cases separately covered by deployed smoke test)
  • deployed PostgreSQL migration advanced to s7t8u9v0w1x2
  • real fact_storage -> PostgreSQLOps write/read smoke test preserved the affect JSON and cleaned up the test row
  • deployed API health check: healthy, database connected
  • Ruff, format, compileall, Docker Compose config, and diff 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.

2 participants