Skip to content

feat(session): shared Slack->Claude session mapping (#24)#33

Merged
Grant Foster (grantfosterdev) merged 1 commit into
mainfrom
feat/session-core
Jun 25, 2026
Merged

feat(session): shared Slack->Claude session mapping (#24)#33
Grant Foster (grantfosterdev) merged 1 commit into
mainfrom
feat/session-core

Conversation

@grantfosterdev

Copy link
Copy Markdown
Contributor

Core extraction slice for #24. New core/session package implementing the consensus session mapping (design doc PR #30):

  • Key() — uniform per-thread: top-level msg = new session, thread reply = resume, loop = one session per loop. No DM special-case (uniform across surfaces, per the decision).
  • Namespace(prefix, persona) — mixes a persona/instructions hash into the namespace so a persona change auto-invalidates sessions (universalizes Joanne #55; PA passes its per-user system prompt).
  • ResolveFlag — workspace-scoped --session-id/--resume detection (Joanne's scoped stat, not the Ross/PA glob-all that risked the #65 stale-JSONL --resume).
  • IsLockRace — shared classifier.

New package, no consumers yet — safe to merge + tag. Agents adopt after the oauthpool slice settles (Joanne's oauthpool PR is in flight). 9 tests green incl. the thread-resumes-top-level invariant and the scoped-resolve correctness.

Relates to #24. 🤖 Generated with Claude Code

Core extraction slice. Unified, per the 2026-06-25 consensus:
- Key(): uniform per-thread mapping (top-level=new session keyed message_ts;
  thread reply=resume keyed thread_ts; loop=one session per loop). No DM
  special-case (the rolling 'DM as channel' model is gone).
- Namespace(prefix, persona): mixes a persona/instructions hash into the
  namespace so a persona change auto-starts fresh sessions (universalizes
  Joanne #55; PA passes its per-user system prompt).
- ResolveFlag: workspace-scoped --session-id/--resume detection (Joanne's
  scoped stat, not Ross/PA glob-all -> avoids the #65 cross-workspace stale
  JSONL --resume).
- IsLockRace: shared classifier.

No consumers yet; agents adopt after the oauthpool slice settles.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@grantfosterdev Grant Foster (grantfosterdev) merged commit cf829d8 into main Jun 25, 2026
1 check passed
@grantfosterdev Grant Foster (grantfosterdev) deleted the feat/session-core branch June 25, 2026 19:00
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