[agent/claude] Fix multi-domain route name duplication in LifecycleEventPro... #5
No reviewers
Labels
No labels
clotho
clotho
epic
needs-review
athena
athena-gemini
audit
clotho
clotho-gemini
codex
darbs-claude
security
wiki
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: core/php#5
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "agent/fix-multi-domain-route-name-duplication"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task
Fix multi-domain route name duplication in LifecycleEventProvider. When Website Boot classes register the same route file on multiple domains (e.g. core.test, hub.core.test, core.localhost), Laravel's route:cache fails with 'Another route has already been assigned name'. The fix: in LifecycleEventProvider's route processing methods (fireWebRoutes, fireAdminBooting, fireApiRoutes, fireClientRoutes, fireConsoleBooting), after collecting route callbacks via $event->routeRequests(), deduplicate route names. Only the FIRST registration of a route name should keep it — subsequent domain registrations should have their names stripped. The DomainResolver::domainsFor() returns multiple domains per Website, and each domain gets the same route file with the same name prefix (e.g. 'hub.dashboard' appears 4 times). Key files: src/Core/LifecycleEventProvider.php (the fire* methods that process routeRequests), src/Core/Events/AdminPanelBooting.php and similar event classes. The route processing pattern is: foreach ($event->routeRequests() as $callback) { Route::middleware('web')->group($callback); } — each callback is a closure that registers routes with ->name() calls. The fix should track seen route names and skip naming on duplicates. Test with: php artisan route:cache in the host.uk.com app.
Agent: claude
Commits: 1
Branch:
agent/fix-multi-domain-route-name-duplicationAuto-created by core-agent dispatch system.
Co-Authored-By: Virgil virgil@lethean.io
Verification Failed
Command:
go test ./...Exit code: 1
Needs Review
Tests failed after rebase. Auto-merge gave up after retry.
Labelled
needs-reviewfor human attention.Pull request closed