Skip to content

CSE Machine (Conductor) : Move host-plugin registration out of createConductor #4004

Description

@Akshay-2007-1

Refactor: register conductor plugins on-demand rather than unconditionally in createConductor

Currently createConductor.ts unconditionally registers all host-side plugins every time a conductor is instantiated:

hostPlugin.registerPlugin(AutoCompletePlugin);
const csePlugin = conduit.registerPlugin(CseMachineHostPlugin);

@AaravMalani has pointed this out in the review comments of #4000.

Problems:

  • Every worker load registers all plugins regardless of whether the evaluator uses them AutoComplete and CSE machine code runs even for evaluators that don't need either
  • The return type of createConductor grows as plugins are added, coupling callers to plugin-specific instances they may not need

Proposed direction:
The runner-side plugin (or the evaluator when it loads a CSE/autocomplete runner plugin) should signal to the host which host-side plugins it requires, triggering registration on demand. This keeps createConductor minimal and makes plugin coupling explicit at the runner level. The host only spins up what is actually requested.

Steps:

  1. Investigate whether conductor's conduit protocol supports runner-initiated host plugin registration, or if that needs to be added to conductor itself
  2. Migrate AutoCompletePlugin first : @AaravMalani has indicated he plans a PR for this side
  3. Migrate CseMachineHostPlugin in the same pattern once the mechanism is established
  4. createConductor should ideally return only { hostPlugin, conduit } specific plugin instances should be obtained separately or via a plugin registry, not bundled in the factory return

Needs discussion with @AaravMalani on what the conductor protocol changes look like before any code is written.

Activity

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions