ARIA: suppress incoherent 'unusually quiet' initiative signals#358
Open
holoduke wants to merge 1 commit into
Open
ARIA: suppress incoherent 'unusually quiet' initiative signals#358holoduke wants to merge 1 commit into
holoduke wants to merge 1 commit into
Conversation
Three targeted fixes in backend/initiative.ts for the frequency_anomaly signal pipeline that was polluting reflect prompts with wrong-by-construction "Check in with X — unusually quiet" suggestions: 1. Owner-quiet suppression. The owner is the observer; per-tick activity for the owner is observed by definition, so a "quiet 51 days" anomaly on the owner JID is incoherent and conceptually meaningless. Drop any anomaly whose contactJid matches process.env.OWNER_PHONE (raw, LID- normalized, or @lid-prefixed forms). 2. Group-activity-aware silence validation. Per-JID baselines miss group chat activity when a contact's group participant JID differs from their DM JID (common on WhatsApp v7 with @lid identities). For each silence anomaly, scan the last ~1MB of observations.jsonl and skip the signal if the contact shows up as a sender — by JID, by LID- normalized JID, or by display name — in any chat (group or DM) within the alleged silence window. This is what made "Jaap Haasnoot quiet 47 days" fire while Jaap was actively posting in Familie Haas. 3. Tighter silence threshold. The baseline frequency-tracker already requires ≥2× normal gap before flagging silence; bump the initiative- layer cutoff to 3× normal gap to suppress noisy MEDIUM signals that sit just past the lower bound. Failure mode this addresses: initiative signals were generating reflect prompts that would have led ARIA to message contacts about non-existent silences (owner included), which directly undermines signal trust and risks misdirected proactive outreach. Intent-summary: Initiative frequency_anomaly signals were flagging the owner and group-active contacts as "unusually quiet" because the per-JID baseline ignores group-chat activity and never excludes the owner. Intent-tokens: initiative, anomaly, owner-quiet, group-activity, silence, signal-noise, false-positive
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
Fixes three coherence bugs in the
frequency_anomalyinitiative signal pipeline that were polluting reflect prompts with false "Check in with X — unusually quiet" suggestions. Tonight's reflect surfaced two wrong-by-construction signals:[MEDIUM] Gillis has been unusually quiet — no messages in 51 days(Gillis is the owner — I observe him every tick)[MEDIUM] Jaap Haasnoot quiet 47 days(Jaap posts regularly in the Familie Haas group)Both signals undermine trust in the initiative system and risk misdirected proactive outreach.
Changes (
backend/initiative.tsonly)Owner-quiet suppression. Any anomaly whose
contactJidmatchesprocess.env.OWNER_PHONE(raw, LID-normalized, or@lid-prefixed forms) is dropped. The owner is the observer — quietness is conceptually meaningless.Group-activity-aware silence validation. Per-JID baselines miss group activity when participant JIDs differ from DM JIDs (common on WhatsApp v7 with @lid identities). Before emitting a silence signal, scan the last ~1MB of
observations.jsonland skip if the contact appears as a sender — by JID, LID-normalized JID, or display name — in any chat within the alleged silence window.Tighter threshold. Baseline silence detection in
frequency-tracker.tsalready requires ≥2× normal gap. Bump the initiative-layer cutoff to 3× normal gap to filter noisy MEDIUM signals that sit just past the lower bound.No changes to
frequency-tracker.ts— the baseline detection remains unchanged so other consumers aren't affected.Verification
npx tsc --noEmitpassesstripLidPrefix,isOwnerJid,readRecentObservationSenders,contactActiveAcrossAllChats) are local toinitiative.tsTest plan