Skip to content

Migrate NamespaceCandidates onto the SymbolSource seam - #376

Merged
Firehed merged 1 commit into
mainfrom
slice/S2.3
Jul 28, 2026
Merged

Migrate NamespaceCandidates onto the SymbolSource seam#376
Firehed merged 1 commit into
mainfrom
slice/S2.3

Conversation

@Firehed

@Firehed Firehed commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Slice S2.3 — Migrate NamespaceCandidates to childrenOf

Slice: S2.3 (docs/architecture/build-manifest.md, Wave 1)
Plan step: docs/architecture/0002-execution-plan.md Step 2 (§5.5
consumer-migration table; §5.3 name-type model) — a consumer migration onto
the S2.1 seam, no behavior change.
Depends on: S2.1 (SymbolSource / SymbolSink + delegating facade, #374)
— merged.
RFC sections: 0001 §4.2 (Symbol Discovery Authority), §4.4 (FQN-based
knowledge queries), §5.1 (typed identifiers).

Routes NamespaceCandidates' namespace enumeration through
SymbolSource::childrenOf instead of naming NamespaceCatalog directly. Each
of the four call sites now wraps the namespace string in a NamespaceName
(the typed identifier the manifest flagged as needed by this slice, already
landed in S2.1). The consumer is constructed with the one shared
DelegatingSymbolSource facade wired in Server.php in S2.2.

Behavior preservation

The plan requires this migration be identical. The facade's childrenOf
unwraps NamespaceName and delegates to the same NamespaceCatalog the
consumer used before, so no enumeration result changes. The frozen
ChildrenOfParityTest golden (children-of.json) is unchanged — this slice
does not touch the enumeration surface itself — and the full
NamespaceCandidates unit suite plus the CompletionHandler namespace-
navigation cases stay green across every path (absolute, use, bare descend,
inline/node, multibyte range).

Acceptance criteria

  • NamespaceCandidates reads namespace enumeration through
    SymbolSource::childrenOf, no longer naming NamespaceCatalog directly.
  • The string namespace is carried as a NamespaceName typed identifier at
    each call site (RFC 1 §5.1).
  • Offered candidates are identical (existing NamespaceCandidatesTest and
    CompletionHandlerTest coverage green).
  • The ChildrenOfParityTest golden is unchanged (the enumeration surface
    is untouched).
  • The shared facade is reused; construction routes through the S2.2
    DelegatingSymbolSource instance in Server.php.
  • composer test green (PHPStan + tests + PHPCS).

Not in this slice

  • The §4.2 enforcement rule forbidding direct
    SymbolIndex / ClassRepository / NamespaceCatalog names outside a
    backend lands in S2.6 (scoped-exempt), once the remaining consumers
    (S2.4, S2.5) have migrated.

Candidate closes (pending review verification)

None — the manifest lists no Closes for S2.3.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.14%. Comparing base (e2cf6b0) to head (86e3fa7).

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #376   +/-   ##
=========================================
  Coverage     98.14%   98.14%           
  Complexity     1711     1711           
=========================================
  Files           107      107           
  Lines          4308     4308           
=========================================
  Hits           4228     4228           
  Misses           80       80           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@Firehed
Firehed merged commit b205420 into main Jul 28, 2026
7 checks passed
@Firehed
Firehed deleted the slice/S2.3 branch July 28, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant