Skip to content

fix(chat): Keep archive through system noise - #1511

Draft
sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/archive-human-activity-only
Draft

fix(chat): Keep archive through system noise#1511
sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/archive-human-activity-only

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Archived conversations were coming back into the personal feed without a human message.

What failed

Pierre archived all conversations. They stayed hidden, then later all reappeared.

Evidence

  • Slack report in #jr-cramer
  • Actual: archived roots returned to the feed after system activity
  • Expected: stay archived until a human message arrives

Root cause

SqlConversationEventStore.append cleared archived_at on every non-preserve write. Resource events, turn lifecycle, and other system noise count as normal appends. replaceHistory also cleared archive on compaction/handoff.

This matches the product intent from #908 (auto-unarchive on activity), but the activity definition was too broad. #1509 already treated resource events as non-user activity for Priority; archive did not.

Fix

  • Unarchive only for human user instructions (user_message + instruction provenance on slack/local/web) or human visible user messages
  • Keep archive through resource events, bot authors, turn lifecycle, ambient context, and compaction/handoff
  • Still refresh activity clocks for system noise

Verification

  • pnpm --filter @sentry/junior exec vitest run tests/component/conversation-storage-sql.test.ts tests/component/plugins/plugin-conversation-events.test.ts (35 passed)

Risk

Medium. Conversations with only resource-event traffic will stay archived until a human message. That is intentional.

Already-unarchived rows are not re-archived by this PR.

Requested by PDPM.

--

View Junior Session [Sentry]

Auto-unarchive previously fired on every non-preserve event append and on
history replacement. Resource events, turn lifecycle, and compaction could
restore archived conversations without a human message.

Clear archived_at only for human user instructions or human visible user
messages. Keep activity clock updates for system noise.

Co-Authored-By: Pierre Massat <pierre.massat@sentry.io>
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview Aug 13, 2026 3:45am

Request Review

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.

0 participants