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
- Grep the codebase (and, if possible, any known external consumers/plugins) for imports of
xcore.kernel.runtime.middlewares and xcore.kernel.sandbox.middlewares.
- 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.
- 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)
Context
xcore/kernel/runtime/middlewares/*.pyandxcore/kernel/sandbox/middlewares/*.pyare entirely one-line re-export shims (from xcore.kernel.middlewares.X import *) pointing atxcore/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
xcore.kernel.runtime.middlewaresandxcore.kernel.sandbox.middlewares.xcore.kernel.middlewaresinstead.Acceptance criteria
xcore.kernel.middlewares(the canonical path)make teststill greenFiles
xcore/kernel/middlewares/(canonical)xcore/kernel/runtime/middlewares/(shim)xcore/kernel/sandbox/middlewares/(shim)