Skip to content

Make chat session creation use one canonical path #2219

@chubes4

Description

@chubes4

Problem

ChatOrchestrator creates sessions through the create-session ability when available, then falls back to direct conversation-store writes when the ability is unavailable.

Code reference on origin/main (008878b6):

  • inc/Api/Chat/ChatOrchestrator.php:680// Fallback: direct store access.

Why this matters

This is a dual path for a core chat operation. The fallback can hide ability registration/bootstrap failures and makes it harder to reason about the canonical session creation contract.

Acceptance criteria

  • Decide the canonical internal path for creating chat sessions.
  • If the ability is canonical, remove the direct-store fallback and fail loudly when the ability is unavailable.
  • If the store is canonical, make the ability a thin wrapper over the same implementation and have ChatOrchestrator call that shared service directly.
  • Tests cover session creation failure when dependencies are unavailable rather than silently bypassing the canonical path.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (GPT-5.5)
  • Used for: 1.0 technical-debt audit and issue drafting; Chris requested tracking issues for the findings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    1.0-blockerBlocks the Data Machine core 1.0 releasearchitectureFoundational architecture changes

    Type

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