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.
Context
From the Naming Is a Feature Audit (PR #342).
Problem
Two interfaces named
ShelfAccessPortand two classes namedShelfAccessPortAdapterexist in different bounded contexts with completely different contracts:Bookcase module (writes — create/delete shelves):
bookcase.core.ports.outbound.ShelfAccessPortbookcase.infrastructure.adapter.ShelfAccessPortAdapterCataloging/Book module (reads — find shelf, check capacity):
cataloging.book.core.port.outbound.ShelfAccessPortcataloging.book.infrastructure.adapter.outbound.ShelfAccessPortAdapterrg ShelfAccessPortreturns hits from both modules with no way to distinguish without reading file paths. This is a grep-ability score of 1.Renames
bookcase...ShelfAccessPortShelfCommandAccessPortbookcase...ShelfAccessPortAdapterShelfCommandAccessPortAdaptercataloging.book...ShelfAccessPortShelfQueryAccessPortcataloging.book...ShelfAccessPortAdapterShelfQueryAccessPortAdapterVerification
mvn test+ ArchUnit rules still pass.Risk
Medium. Four files renamed across two modules, but no behavior change.