Skip to content

refactor(workspace): remove pass-through Port/Adapter/Authority/Service layers with one caller and one impl #1088

Description

@ScriptedAlchemy

Priority: P2 architecture.

Flows of the shape transport → adapter → service → application port → usecase runtime → runtime adapter → registered owner → registered lease → database facade → executor exist across the workspace. Keep a layer only if it (1) owns mutable state or lifetime, (2) enforces a real trust/authorization boundary, (3) is a dependency-inversion point with more than one implementation, (4) translates an external protocol, or (5) is a transaction/durability boundary. A layer whose body is self.inner.x(request).await fails all five: delete it and let the caller hold the inner.

Inventory types ending in *AdapterV1, *ServiceV1, *RuntimeV1, *AuthorityV1, *PortV1, *ProviderV1 with exactly one implementation and one caller (rg + cargo doc/callers via the graph), decide per the five rules, and remove the pass-throughs one subsystem per commit. Security ports with a single impl may stay when rule 2 applies — say so.

Acceptance: a table in the closing comment of every inspected type and its disposition; no remaining layer that merely forwards.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions