Named symbol backends behind a fixed-precedence composite - #384
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>
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>
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>
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 #384 +/- ##
============================================
+ Coverage 98.14% 98.23% +0.08%
- Complexity 1708 1725 +17
============================================
Files 109 111 +2
Lines 4311 4356 +45
============================================
+ Hits 4231 4279 +48
+ Misses 80 77 -3 ☔ 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
docs/architecture/0002-execution-plan.md)0001-foundational-architecture.md§4.2 (Symbol Discovery Authority), §4.3 (Read/Write Segregation), §5.1 (SymbolSource read contract), §5.3 (Backend Substitutability and Caching Policy)What this does
Replaces the ad-hoc symbol-resolution tiering (baked into
DefaultClassRepositoryand the namespace-catalog composite) with one shared read seam — a
CompositeSymbolSourceover four namedSymbolBackends at fixed precedence:vendor/autoload prefixes).vendor/prefixes). SameFilesystemBackend, a different autoload-map subset.A lookup takes the first backend that answers; enumeration and search merge every
backend with the earlier (more authoritative) one winning a name clash. The write
path is a single
SymbolSink(DocumentSymbolSink);KnowledgeStack::forProjectassembles the read composite and the write sink over a shared open-document backend
and index, and is used by both
Serverand the tests.This is behavior-preserving (Step 3a): the Step P parity goldens
(class-like lookup, namespace enumeration) are unchanged, and
TypeGraphParityTeststays green.
MemberResolvernow reads throughSymbolSourceso there is no secondlookup authority — the discovery-axis M×N is closed, enforced by the (updated) §4.2
SymbolDiscoveryAuthorityExtensionPHPStan rule.Acceptance criteria
SymbolBackendcontract —lookupClassLike/childrenOf/searchClassLikes, absence asnull/ empty (§5.3)CompositeSymbolSourceat fixed precedence — open document overrides workspace › vendor › built-in (§5.3)ComposerAutoloadMap::partitionByVendorDirectory; the union resolves exactly as beforeDocumentSymbolSink) registers class metadata + indexes from one document (§4.3)MemberResolverreads throughSymbolSource; no consumer names a concrete repository/index directlyDefaultClassRepository,DelegatingSymbolSource,NamespaceCatalogFactory,CompositeNamespaceCatalog, and theClassRepositoryinterface retired; §4.2 confined set updated (their coverage migrated to the new backend/composite/sink unit tests)Deferred / tracked gaps
Candidate closes
None — the manifest lists no
Closesfor S3.3.