Skip to content

RFC: replace remaining LangGraph assumptions with Wiii-native orchestration runtime #130

@meiiie

Description

@meiiie

Objective

Define and execute a controlled path to remove remaining LangGraph assumptions from Wiii and converge on a Wiii-native orchestration runtime.

This is intentionally an RFC / architecture control issue, not a one-shot deletion ticket. Wiii is already moving toward WiiiRunner, but the remaining work must preserve chat stability, streaming semantics, memory continuity, tool routing, checkpoint behavior, and CI governance.

Why Now

Proposed Target Direction

  • Treat WiiiRunner or its successor as the only active orchestration entrypoint.
  • Keep provider access behind a Wiii-owned provider/runtime abstraction rather than framework-bound graph nodes.
  • Make state transitions explicit: input processing, routing, memory retrieval/update, tool execution, synthesis, streaming, and persistence.
  • Preserve public API contracts while internals are replaced behind feature flags or compatibility shells.
  • Avoid broad deletion until test parity and rollback criteria are written.

Required Design Deliverables

  • Current pipeline map from API -> orchestrator -> runner/agents -> provider/tools -> persistence/streaming.
  • Inventory of remaining langgraph, get_multi_agent_graph*, graph/checkpointer/shim imports and tests.
  • Target orchestration contract: state model, node/step interface, event stream schema, error semantics, checkpoint/session model.
  • Provider abstraction plan aligned with multi-provider goals: Gemini/OpenAI/OpenRouter/Ollama/Zhipu and future providers.
  • Migration sequence with PR boundaries small enough for multi-agent ownership.
  • Rollback plan for each phase.

Suggested Phases

  1. Merge governance baseline (chore: harden GitHub security gates #126) and stabilize security backlog (security(deps): remediate high Dependabot alerts in desktop/Tauri stack #127, security(secrets): rotate and resolve historical OpenRouter secret-scanning alerts #128).
  2. Complete active LangGraph shim cleanup ([Ops]: complete Phase 1 LangGraph runtime-shell purge #93, [Ops]: remove retired LangGraph graph/checkpointer shims #97, chore(test): clean up deprecated test_sprint54_graph_streaming mocks (Phase 3 of LangGraph purge) #101) only after CI is green.
  3. Add a runtime inventory report documenting every remaining graph dependency.
  4. Define Wiii-native orchestration interfaces and golden tests before deleting implementation.
  5. Move one lane at a time: direct -> memory -> tutor/RAG -> tool loop -> streaming/checkpoint.
  6. Remove final compatibility shells only after parity tests pass.

Acceptance Criteria

  • A reviewed architecture document exists before destructive deletion starts.
  • Each migration PR has an owned path list and exact verification commands.
  • No PR mixes broad dependency upgrades, secret rotation, and orchestration refactor.
  • CI Gate Summary stays required throughout the migration.
  • Wiii can still chat on FE after each phase.

Related Work

Metadata

Metadata

Assignees

Labels

area:backendBackend API, service, or runtimeenhancementNew feature or requestmaintenanceCleanup, governance, tooling, dependency, or operational workpriority:P2Important issue with workaround

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions