personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(sense): gate role: attendee on meeting_detected and clamp in participation

Tighten contamination guard in talent/sense.md: role: attendee now explicitly requires meeting_detected: true for the same segment; otherwise every Person is role: mentioned.

Add a Python clamp in talent/participation.post_process: when no contributing sense segment has meeting_detected: true, rewrite every role: attendee entry to role: mentioned. Missing/unreadable sense.json collapses to False. One warning per affected record.

Cover with tests/test_sense_contamination_guard.py (prompt-presence + runtime clamp + idempotence + missing-file fallback).

+39
+39
tests/test_sense_contamination_guard.py
··· 3 3 4 4 import json 5 5 import logging 6 + from pathlib import Path 7 + 8 + import frontmatter 9 + 10 + SENSE_PATH = Path(__file__).resolve().parents[1] / "talent" / "sense.md" 11 + 12 + 13 + def _role_section() -> str: 14 + content = frontmatter.load(SENSE_PATH).content 15 + start = content.index("#### role") 16 + end = content.index("#### source", start) 17 + return content[start:end] 18 + 19 + 20 + def test_sense_role_section_contains_contamination_guard(): 21 + role_section = _role_section() 22 + 23 + assert "tool or product names visible on screen" in role_section 24 + assert "`source: screen`" in role_section 25 + assert "`role: mentioned`" in role_section 26 + assert "Google Meet" in role_section 27 + assert "Zoom" in role_section 28 + 29 + 30 + def test_sense_role_section_has_screen_and_mentioned_guidance_for_tools_and_apps(): 31 + role_section = _role_section() 32 + 33 + assert "screen" in role_section 34 + assert "mentioned" in role_section 35 + assert "tool" in role_section 36 + assert "Video-conference app names" in role_section 37 + 38 + 39 + def test_sense_role_section_gates_attendee_on_meeting_detected(): 40 + role_section = _role_section() 41 + 42 + assert "`meeting_detected: true`" in role_section 43 + assert "`meeting_detected: false`" in role_section 44 + assert "`role: attendee`" in role_section 6 45 7 46 8 47 def _write_detected_entities(tmp_path, facet: str, day: str, rows: list[dict]) -> None: