Skip to content

refactor: standardize channel/conversation ID naming across runtime #544

@sentry-junior

Description

@sentry-junior

Context

PR #546 established a clean naming model in the tool/plugin context layer. This tracks remaining debt not required for that fix.

Canonical model (post-PR #546)

  • channelId — raw Slack channel/conversation container (C/D/G), stable state-binding key
  • conversationId — opaque Junior session identity; for Slack turns is slack:{channelId}:{threadTs} (the Slack conversation ID); for dispatched runs may be agent-dispatch:{id}
  • assistantContextChannelId — optional Slack assistant-panel source channel, output routing hint only, not a state key
  • threadTs — Slack thread timestamp, kept separately in plugin API

Convention: Id suffix, not ID.

Remaining debt

  • Internal threadId variable names (Slack-shaped slack:D:ts) — align with conversationId where generic
  • toolChannelId in ReplyRequestContext — rename to assistantContextChannelId
  • sourceChannelId in factory.ts/slack-runtime.ts — rename to assistantContextChannelId
  • Add naming spec doc to specs/
  • Consider helpers: buildSlackConversationId, parseSlackConversationId

Out of scope

  • Renaming persisted assistantContextChannelId storage key (needs migration)
  • Renaming correlation.channelId / correlation.threadId (stable, telemetry)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions