Skip to content

Decouple remoteExecution runner plugin from py-slang's EV3Engine #151

Open

Description

@martin-henz

Problem

src/runner/remoteExecution/index.ts (remoteRunnerPlugin) does two unrelated things:

  1. Forwards data over a conductor channel (transport).
  2. Constructs and runs py-slang's EV3Engine and handles the {type: 'run'} / {type: 'result'} protocol (execution).

Consequences:

  • The package cannot be used without py-slang installed, so it is not the generic, reusable runner-side plugin it claims to be.
  • It depends on a personal fork branch: github:proto-aiken-13/py-slang#branch-ev3-engine.
  • It imports its message types (PySlangMessage, CHANNEL_ID, RUNNER_ID) from @sourceacademy/common-test, which looks like test scaffolding.

Proposal

Narrow the plugin to transport only, following the shape of CseMachinePlugin (pure channel forwarding, with the evaluator deciding when and what to send):

  • Remove the EV3Engine import and all code-execution handling from this package.
  • Move the run / result protocol to the evaluator side (py-slang), which owns EV3Engine.
  • Expose a small send API on the plugin (e.g. sendConnectionStatus(status), mirroring CseMachinePlugin.sendSnapshots).
  • Drop the py-slang dependency, and the worker-bundle rollup target if nothing else needs it.
  • Add a changeset, since this renames/changes the public API.

Notes

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions