Dedupe the duplicate ComposerAutoloadMap - #382
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #382 +/- ##
============================================
- Coverage 98.14% 98.14% -0.01%
+ Complexity 1710 1708 -2
============================================
Files 109 109
Lines 4316 4311 -5
============================================
- Hits 4236 4231 -5
Misses 80 80 ☔ View full report in Codecov by Harness. |
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.
Slice S3.2 — Dedupe the duplicate
ComposerAutoloadMapbuild-manifest.md, Wave 2)0002-execution-plan.mdStep 3a(ii) — "dedupe the doubleComposerAutoloadMap" (behavior-preserving)0001-foundational-architecture.md§4.2 (Symbol Discovery Authority), §5.3 (backends)What changed
Server::forProjectpreviously built twoComposerAutoloadMapinstances from thesame project root: one inside
ComposerClassLocatorand a second insideNamespaceCatalogFactory::forProject. Each re-required the three generated Composerautoload files and built its own
ClassLoader.Both consumers now receive an injected
ComposerAutoloadMap, and the composition rootbuilds exactly one and shares it.
ComposerClassLocatorno longer knows about projectroots or map construction — it holds the shared map and reads through it (the old
nullable
ClassLoaderandis_dirguard fall out; an empty map's loader alreadyreturns
falsefor every name).Acceptance criteria
ComposerAutoloadMapinstances collapse to a single sharedinstance (one construction site remains in
src/, inServer::forProject).(
class-like-lookup,childrenOf) are unchanged.Candidate closes
None (manifest
Closescolumn is—for this slice).