Skip to content

ARIA: suppress incoherent 'unusually quiet' initiative signals#358

Open
holoduke wants to merge 1 commit into
mainfrom
aria/initiative-quiet-signal-fix
Open

ARIA: suppress incoherent 'unusually quiet' initiative signals#358
holoduke wants to merge 1 commit into
mainfrom
aria/initiative-quiet-signal-fix

Conversation

@holoduke

Copy link
Copy Markdown
Owner

Summary

Fixes three coherence bugs in the frequency_anomaly initiative 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.ts only)

  1. Owner-quiet suppression. Any anomaly whose contactJid matches process.env.OWNER_PHONE (raw, LID-normalized, or @lid-prefixed forms) is dropped. The owner is the observer — quietness is conceptually meaningless.

  2. 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.jsonl and skip if the contact appears as a sender — by JID, LID-normalized JID, or display name — in any chat within the alleged silence window.

  3. Tighter threshold. Baseline silence detection in frequency-tracker.ts already 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 --noEmit passes
  • Conservative file IO: bounded 1MB tail-read, graceful failure on missing file
  • Helpers (stripLidPrefix, isOwnerJid, readRecentObservationSenders, contactActiveAcrossAllChats) are local to initiative.ts

Test plan

  • After merge + deploy, check next reflect prompt for absence of "Gillis quiet" entries
  • Verify no false "Jaap quiet" signals while he's active in Familie Haas
  • Confirm genuine long-silence signals (3× normal gap, no group activity) still surface

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
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