Repository navigation
chore(backend): remove services and repository no production code constructs (#710) - #1501
Open
alex-dembele wants to merge 2 commits into
Open
alex-dembele wants to merge 2 commits into
alex-dembele wants to merge 2 commits into
Conversation
…structs (#710) NotificationService, MultitenantOrgService (+ its unrouted handler), GormOrganizationRoleRepository and the multitenancy repository interfaces had no production caller and wrote to tables the startup schema never builds. Their now-unused domain models (NotificationTemplate, NotificationLog, OrganizationRole, UserSession) go with them, and the #710 entries leave knownMissingTables. Profile and ProfilePermission stay: Organization and OrganizationMember still reference them. The route list in main.go is unchanged. Signed-off-by: alex-dembele <alexandredembele16@gmail.com>
…on (#710) The deleted organisation-role repository held the only cross-organisation negative test of the organisation write path. Restate it against tenantwrite directly, and point the ROADMAP notifications row at the live code. Signed-off-by: alex-dembele <alexandredembele16@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #710
What
Removes backend code that no production path constructs, written against tables the startup schema never builds.
internal/service/notification_service.go(+ test),internal/infrastructure/repository/gorm_organization_role_repository.go,internal/service/multitenancy_org_service.go,internal/repository/multitenancy_repository.go. (multitenancy_auth_service.gowas already removed by chore(auth): supprimer la pile HS256 morte (JWT_SECRET, PermissionMiddleware, ancien GetMe) #789.)internal/handler/multitenancy_org_handler.go(NewMultitenantOrgHandlerhas 0 callers, no route inmain.go) and the debt(arch): handlers query database.DB directly — ratchet it to zero and add a structural tenant-filter guard #808 test of the role repository.NotificationTemplate,NotificationLog,OrganizationRole,UserSession.Profile/ProfilePermissionkept:Organization.Profiles,OrganizationMember.Profile,NewProfilePermissionSetandPreload("Profile.Permissions")ingorm_membership_repository.gostill use them. TheirknownMissingTablesentries go anyway, since no production code constructs them any more (schema test passes).TestUpdateInOrganization_ModelOfAnotherOrganisationIsForbiddenkeeps the cross-organisation guard oftenantwrite.UpdateInOrganization(used by the billing repository) under test now that the debt(arch): handlers query database.DB directly — ratchet it to zero and add a structural tenant-filter guard #808 test is gone.Verification (backend/)
Review
f7edca56f7edca56Not done
scripts/risk/rules.json:14still matches the deletedmultitenancy_repository.go. It only raises risk class and is harmless. Editing scripts/risk is out of scope.20260317_add_multitenancy.sqlstill createsuser_sessions,organization_rolesandnotification_*tables nothing reads. Dropping them is irreversible and needs its own issue.