Documentation

Docs / Reference

ADR 0034 - Angular pipe-name precedence in open scopes

Status: Accepted (developer review, 2026-10-27) Date: 2026-10-27

Context

ADR 0033 suppresses all local pipe edges in open scopes. T014c3b verifies Angular's dependency order to identify the subset that external contributors cannot shadow. This changes only pipe counters, matching usage counts and uses_pipe edges. Contract v1 and extractors-22 remain unchanged.

Sources and verified order

Read the supplied offline bundles only; no sources were fetched. References below are one-based bundle lines, including section headers:

Options considered

Decision

Replace only ADR 0033's blanket open-scope pipe suppression with rule P. Capture successful import leaves during the ADR 0031 array traversal, before edge merging. Local repeated leaves keep their first unit; external leaves are never deduplicated, even when they share a package identity. A standalone host uses its ordered imports. A declared host uses its declaring module's imports followed by one declaration unit. These units are transient, never serialized or cached.

An external unit is open. A local NgModule unit uses the status and local classes of its exported scope. Other local leaves are closed singleton units. Unknown/invalid/none scopes retain their previous suppression.

In an open scope, a usage links only with exactly one matching local pipe, no local pipe with missing/unknown name, a closed first contributing unit, and every open unit strictly before that unit. The first contribution can come from an NgModule export; a later direct import cannot move it. The existing complete-scope rule, invalid contexts, flagged pipes and recovery handling retain their precedence in classification.

Consequences

The five standalone corpus defaultImage usages and the declared corpus markdown usage link with fact/confidence 1 and pipe-name evidence. Standalone article markdown stays shadowable. Scope status, selector matching, declaration facts, diagnostics, identities, cache payloads and versions are unchanged. Fixture tests cover source-order expansion, shared external package targets, duplicate contributions, both Angular defaults and cached replay/import edits.

Known gaps

Open local NgModule units are deliberately opaque even when an internal export order could prove their local pipe wins. Multiple local pipes of the same name keep the prior classification; no winner is chosen between them. Missing names retain uncertainty. Deferred and selectorless scopes remain unmodeled. External leaf kinds are not resolved, so even an external directive is conservatively treated as an open unit.

Review notes (developer, 2026-10-27)

Report a problem with this pageSource: docs/adr/0034-angular-pipe-precedence.md