Skip to content

refactor(conversation): centralize execution registry - #943

Closed
Neonforge98 wants to merge 1 commit into
codex/turn-producer-migrationfrom
codex/conversation-execution-store
Closed

refactor(conversation): centralize execution registry#943
Neonforge98 wants to merge 1 commit into
codex/turn-producer-migrationfrom
codex/conversation-execution-store

Conversation

@Neonforge98

Copy link
Copy Markdown
Collaborator

Problem

Shared-conversation one-shot runners persist their hidden-session registry directly inside conversationTurnRunner as one global localStorage blob keyed with colon-concatenated organization and session ids. That couples execution to sidebar policy, permits key collisions, can lose an unrelated conversation update from another desktop window, and does not isolate records across cloud accounts.

Solution

  • Add one canonical local conversation execution store with a separate entry per (executor scope, root session) tuple.
  • Scope new records by signed-in cloud identity plus organization, while preserving the root session as the second identity dimension.
  • Move runner hiding and lifecycle registration behind a small conversationRunnerSessions facade.
  • Keep reading the shipped legacy one-shot registry so upgrades never reveal plumbing sessions in My Sessions.
  • Record proven terminal runners for later safe cleanup without adding continuation behavior in this PR.
  • Leave Team Chat, audience routing, cloud schemas, Work Item dispatch, and the current one-shot execution semantics unchanged.

Potential risks

Validation

  • pnpm typecheck
  • ESLint and Prettier on all 6 changed files
  • 3 focused Vitest files, 29 tests passed
  • Conversation execution-store suite: 7 tests covering account isolation, tuple collisions, legacy visibility, malformed data, nested window writes, lifecycle, and cleanup
  • Madge scan from all changed entry points: 1220 files, no circular dependency
  • Repository commit hooks passed

Move hidden runner persistence behind one per-conversation store keyed by cloud identity, organization, and root session. Preserve legacy runner visibility filtering, record terminal lifecycle, and remove localStorage ownership from the turn runner.
@Harry19081 Harry19081 added refactor Code restructuring without an intended behavior change cloud-collaboration Cloud sync, organizations, channels, or collaboration sessions Sessions, history, replay, sidebar, workspace, or worktrees labels Aug 25, 2026
@Neonforge98

Copy link
Copy Markdown
Collaborator Author

Superseded by the final two-PR design: #844 removes the Work Item-specific remote continuation bridge, and stacked #939 keeps the reusable audience routing plus sender-local provider-native continuation. This dispatcher/store/handoff stack is intentionally retired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cloud-collaboration Cloud sync, organizations, channels, or collaboration refactor Code restructuring without an intended behavior change sessions Sessions, history, replay, sidebar, workspace, or worktrees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants