refactor(reorg): extract endpoint + tool_type/tool_config/tool_product modules [7/10]#14982
Draft
valentijnscholten wants to merge 2 commits into
Draft
refactor(reorg): extract endpoint + tool_type/tool_config/tool_product modules [7/10]#14982valentijnscholten wants to merge 2 commits into
valentijnscholten wants to merge 2 commits into
Conversation
…jo/<module>/ [Phase 1,3,5,6,8,9]
…oint Phase 1,3,4,5,6,7,8,9]
This was referenced Jun 8, 2026
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.
Stacked PRs
This is one of a stacked series that reorganizes
dojo/into self-containeddojo/{module}/packages (matching thedojo/url/reference). They are stacked — each PR is based on the previous one — so review and merge bottom-up in this order:Merge #14970 first; each following branch is rebased onto the updated base and merged in turn. This PR continues the stack on top of #14981 — full implementation brief is the Phase 10 section in
AGENTS.md.Summary
Reorganizes the
endpoint,tool_type,tool_config, andtool_productdomains into self-containeddojo/{module}/packages withui/andapi/sub-packages, matching thedojo/url/reference layout. Pure code-movement: no behaviour or migration changes; backward-compat re-exports keep external consumers working.endpoint (
dojo/endpoint/)Endpoint_Params,Endpoint_Status,Endpointintodojo/endpoint/{models,admin}.py. All FKs use string references; thedojo.modelsre-export keepsEndpointresolvable for the remaining FKs that target it.ui/forms.pyand the endpoint UI filters (EndpointFilterHelper,EndpointFilter,EndpointFilterWithoutObjectLookups) intoui/filters.py; thedojo/filters.pyre-exports are dropped (they cycle withDojoFilter) and consumers in search/reports repoint to the new path.EndpointReportFilteris report-domain and stays indojo/filters.py.ApiEndpointFiltermoves toapi/filters.py.api/serializer.py.EndpointSerializer.tags(aTagListSerializerField, which stays inapi_v2/serializers.py) is resolved lazily in aget_fields()override so the module carries no top-levelapi_v2.serializersimport. The movedModelSerializers are re-exported fromapi_v2/serializers.pyfor prefetcher discovery and becauseReportGenerateSerializernestsEndpointSerializer.EndPointViewSet,EndpointStatusViewSet,EndpointMetaImporterViewintoapi/views.pyand adddojo/endpoint/api/urls.py. Thedojo/urls.pyregistration preserves the exact routes/basenames and theV3_FEATURE_LOCATIONSconditional:endpoint_meta_importis always registered; under V3 the location-compat viewsets serveendpoints/endpoint_status, otherwiseadd_endpoint_urlsregisters the legacy viewsets.views.py/urls.pyintoui/;queries.py/signals.py/utils.pystay.tool_type / tool_config / tool_product
Tool_Type,Tool_Configuration,Tool_Product_Settings,Tool_Product_Historyinto their{models,admin}.py(string-ref FKs). TheToolConfigForm_Admin(ModelForm) andTool_Configuration_Admin(ModelAdmin) helpers move fromdojo/models.pyintodojo/tool_config/admin.py.ui/forms.py, the serializers intoapi/serializer.py(re-exported for prefetcher discovery), andToolConfigurationsViewSet/ToolProductSettingsViewSet/ToolTypesViewSetintoapi/views.pywithadd_*_urls, preserving routes/basenames.views.py/urls.pyintoui/;tool_config/factory.pyandtool_product/queries.py/signals.pystay.