Skip to content

Investigate and document/consolidate runtime/middlewares and sandbox/middlewares shims #274

Description

@traoreera

Context

xcore/kernel/runtime/middlewares/*.py and xcore/kernel/sandbox/middlewares/*.py are entirely one-line re-export shims (from xcore.kernel.middlewares.X import *) pointing at xcore/kernel/middlewares/, which holds the real implementation. Not code duplication in the logic sense, but three directories exist where one canonical implementation lives — confusing for new contributors, and a past changelog entry (2.3.4) already flagged this as a "point d'attention" without resolving it.

Task

  1. Grep the codebase (and, if possible, any known external consumers/plugins) for imports of xcore.kernel.runtime.middlewares and xcore.kernel.sandbox.middlewares.
  2. If nothing outside the shims themselves needs those two paths: either remove them (with a changelog entry) or add a short docstring in each explaining why the shim exists (e.g. backward compatibility) so it stops looking like accidental duplication.
  3. If something does depend on them: document why, and consider a deprecation warning pointing to xcore.kernel.middlewares instead.

Acceptance criteria

  • Clear resolution: either the shim directories are removed, or each has an explanatory docstring
  • No behavior change for existing imports of xcore.kernel.middlewares (the canonical path)
  • make test still green

Files

  • xcore/kernel/middlewares/ (canonical)
  • xcore/kernel/runtime/middlewares/ (shim)
  • xcore/kernel/sandbox/middlewares/ (shim)

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions