Skip to content

Disambiguate duplicate ShelfAccessPort across bookcase and cataloging modules #346

@leodvincci

Description

@leodvincci

Context

From the Naming Is a Feature Audit (PR #342).

Problem

Two interfaces named ShelfAccessPort and two classes named ShelfAccessPortAdapter exist in different bounded contexts with completely different contracts:

Bookcase module (writes — create/delete shelves):

  • bookcase.core.ports.outbound.ShelfAccessPort
  • bookcase.infrastructure.adapter.ShelfAccessPortAdapter

Cataloging/Book module (reads — find shelf, check capacity):

  • cataloging.book.core.port.outbound.ShelfAccessPort
  • cataloging.book.infrastructure.adapter.outbound.ShelfAccessPortAdapter

rg ShelfAccessPort returns hits from both modules with no way to distinguish without reading file paths. This is a grep-ability score of 1.

Renames

Current Proposed Rationale
bookcase...ShelfAccessPort ShelfCommandAccessPort This port only writes (create, delete)
bookcase...ShelfAccessPortAdapter ShelfCommandAccessPortAdapter Matches port
cataloging.book...ShelfAccessPort ShelfQueryAccessPort This port only reads (find, isFull)
cataloging.book...ShelfAccessPortAdapter ShelfQueryAccessPortAdapter Matches port

Verification

mvn test + ArchUnit rules still pass.

Risk

Medium. Four files renamed across two modules, but no behavior change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorInternal code cleanup with no user-facing behavior change.

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions