iai-personal-memory-engine icon indicating copy to clipboard operation
iai-personal-memory-engine copied to clipboard

camouflaging_relaxation (AUTIST-13) pipeline is fully built and tested but never called

Open tom-shields-stitch opened this issue 3 months ago • 1 comments

What happens

iai_mcp.camouflaging has a complete detection pipeline for the camouflaging_relaxation procedural knob:

  • record_user_formality(store, text, lang) scores a turn's formality and logs a formality_score_weekly event.
  • run_weekly_pass(store) aggregates that event stream and relaxes the register on a detected over-formal trend.

Every pure function here has thorough unit coverage in tests/lilli/test_camouflaging_detection.py — but neither end had a caller anywhere in the package:

  • capture_turn never called record_user_formality, so the event stream run_weekly_pass depends on stayed permanently empty.
  • Nothing called run_weekly_pass itself, so even manually-seeded data would never have been aggregated.

Effect

On a real install with 33k+ episodic records across 5 days of heavy multi-host usage, profile_get_set(operation="get") showed all 11 procedural knobs sitting at their exact seed defaults — zero drift, confirmed by diffing live values against knobs.py's default_state() line by line.

Fix

PR incoming:

  • capture_turn now calls record_user_formality for live, non-replayed user turns (same gate the existing foresight-refresh call already uses, so a historical backfill can't skew weeks that never happened live).
  • run_heavy_consolidation now calls run_weekly_pass.

Verified end-to-end against an isolated scratch store: a live user capture produces a real formality_score_weekly event, and seeding a clear over-formal trend across 5 synthetic weeks followed by a real run_heavy_consolidation call detects the trend and relaxes camouflaging_relaxation from 0.0 to 0.1, using the project's own unmodified trigger thresholds.

tom-shields-stitch avatar Aug 11 '26 09:08 tom-shields-stitch

Fixed in 3.0.2 — the whole masking-detection feature is out: the camouflaging_relaxation knob, the camouflaging_status tool, and the formality-relaxation it applied on the recall path are all removed. Thanks for the analysis showing the knob sat at seed defaults on a real store — you're credited in the 3.0.2 changelog.

CodeAbra avatar Aug 16 '26 21:08 CodeAbra