Skip to content

refactor: remove the middleware management API #316

Closed

Description

@uniqueg

Problem

api/middleware_management.yaml specifies a runtime management API for
middlewares (list/add/update/delete/reorder, with Git, PyPI and local
code sources: remote code execution if served). It was never served,
and the maintainer decided against any runtime management API (#197 and
PR #199 closed as not planned): plugins are managed by config only. The
spec and the middlewares collection (with two unique indexes, created
at every start) are dead weight and mislead readers.

Proposal

  • Delete pro_tes/api/middleware_management.yaml and the comment in
    config.yaml that refers to it.
  • Remove the middlewares collection from db.dbs.taskStore in
    config.yaml. Existing collections are left alone; the upgrading
    notes say they can be dropped.
  • Docs: remove the "Middleware management API" sections
    (docs/middlewares.md, docs/api.md, docs/index.md); upgrading
    notes updated.
  • Tests: the tests of failing unique indexes other than that of task
    identifiers use a collection from a test overlay instead.

Acceptance criteria

  • No management spec, no middlewares collection; GET /protes/v1/middlewares stays 404.
  • The start still fails with FOCA's error for other conflicting
    unique indexes (tests with an overlay collection).
  • ruff, mypy, ast-grep, semgrep, pytest (100% coverage),
    mkdocs build --strict pass locally.

Verification (local)

All checks pass (1035 passed, 80 skipped; 100% coverage). Not run:
smoke test, MongoDB 7.0 matrix entry.

Dependencies

Open questions

  • None.

Activity

  1. added
    priority: medium
    status: in progress
    type: maintenance
    type: security
    workload: hours
    on Oct 24, 2026
  2. removed
    status: in progress
    on Oct 24, 2026
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

    priority: mediumtype: maintenancetype: securityworkload: hours

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions