OnPush by default: how much real Angular code is ready?

37 minResearchAngular 22OnPush

A static reading of 31,531 components in 225 open-source Angular apps, with the code behind every finding.

Summary

Angular 22 made OnPush the default change detection strategy. The update schematic stamps changeDetection: ChangeDetectionStrategy.Eager on every component that had not chosen a strategy, so that nothing changes on upgrade, and teams now decide whether to remove the stamp. I built a tool that reads a component and its template against the four conditions under which Angular checks an OnPush view, and ran it over 31,531 components in 225 open-source Angular applications.

In the 56 Angular 22 apps found without searching for the stamp, 55% of components declare OnPush, 24% declare nothing and therefore already run as OnPush, and 21% carry the stamp. Of the stamped components, the tool finds no path around the triggers in 54% and at least one in 40% (46% and 47% in the 76 apps found by searching for the stamp, which hold five and a half times as many stamped components). Among the components it blocks by their own code, 93% have no finding other than an asynchronous write of rendered state, the kind that markForCheck() or a signal turns into a trigger. The 24% that already run as OnPush are a check on the tool: it flags 3.5% of them by their own code, and the readers confirm between four and six of every ten such flags, so the confirmed share is nearer 2%.

No app in the sample was run (my own is not among the 225). The readers who checked samples of verdicts are language models that never ran the tool, two from one vendor on every sample and a third from another on the held-out sample, working from my definitions and from code the tool assembled. On a held-out sample of 148 components the tool had not been tuned on, they and an adjudication confirmed 90% of its "ready" verdicts and 88% of its "blocked" ones, and overturned 2 of 78 "ready" verdicts; with the tool's evidence hidden from the adjudicators, 90% of the ready verdicts still stood, 82% of the blocked ones, and 3 of 78 ready verdicts were overturned. The second-vendor reader, run after both adjudications were sealed, agreed with the blind labels on blocked-or-not for 96% of the items. On my own app, four blocked components with a visible asynchronous write went stale under OnPush and repainted on the next event, two it flags wrongly, because their only emission is synchronous, did not go stale, and eight ready ones passed their existing end-to-end tests unchanged.

How to read the numbers

  • The tool is my program; the readers are language models that never ran it but read code it assembled under my definitions, two Claude models on every sample and one OpenAI model on the held-out sample and the third probe; the adjudicators are fresh model sessions that settled the disagreements after seeing the tool's evidence as well.
  • Independent apps are the 56 Angular 22 apps found by topic and name. Every number in the body is about them unless it says otherwise; the 76 apps found only by searching for the stamp, and the 56 apps on Angular 17 to 21, are in appendix F.
  • Judged components are the ones that do not declare OnPush: stamped ones, and ones that declare nothing. By own code means the verdict from the component's own class and template; final adds its children, because the screen it renders includes them.
  • Tuning sample (299 components) was used to fix the tool; held-out sample (148) was not; the probes (29, 14 and 11 components already running as OnPush that the tool had flagged) tested those flags, and the first two were used to fix it.

1. Why I measured this

Since v22 a component without a changeDetection setting is OnPush. The migration keeps existing code on the old behaviour by stamping it Eager, and the stamp is now a line to keep or remove in every codebase that ran the migration: a code search found it in 741 public repositories on the day I looked. The RFC for the change (discussion #66779, January 2026) asked whether specific authoring patterns would break or need refactoring under OnPush; the thread collected 34 comments and 20 replies, none with data, and I have not found a later answer. One disclosure: I contributed a sentence to the v22 update guide about the migration (angular/angular #72028), and section 8 proposes a documentation change based on this report.

2. What "ready" means

The Angular documentation on skipping component subtrees states when an OnPush component is checked: an input receives a new value through a template binding, compared with Object.is; Angular handles an event (an event binding, an output, a @HostListener) in the component or a descendant; something marks the view, ChangeDetectorRef.markForCheck() or the AsyncPipe; a signal read by the template changes. The same page lists two edge cases: writing an input through a @ViewChild reference and mutating an object while keeping its reference do not trigger a check.

A component that declares OnPush is counted and left alone. Every other component gets one of four verdicts.

  • Ready. Every change the template can show, on the code paths the tool can see, arrives through one of the four triggers.
  • Probable. The template depends on something that can change without a trigger, but the code alone cannot settle whether it will: service state read by the template, detectChanges(), a detached view, valueChanges subscriptions, templates handed to another component, a child's state read through a view query: a review list, not a verdict.
  • Blocked. The template shows data that can change along a path no trigger covers. Under OnPush the view stays stale until some other trigger happens to fire.
  • Unknown. The code needed to decide is not in the repository.

Verdicts propagate upward: a blocked child blocks its parent, a probable child makes it probable, an unknown child makes it unknown. Six rules produce the verdicts; appendix A spells them out. In one line each: a rendered field written in a callback that runs outside every trigger, with nothing on that path marking the view (rule 1); a parent mutating in place an object it binds to a child that looks inside it, or writing into a child through a view query (rule 2); child propagation (rule 3); service or child state read by the template, which yields probable (rule 4); componentRef.instance written after creation (rule 5); ApplicationRef.tick() from component code, which yields blocked, while detach(), reattach() and detectChanges() yield probable (rule 6).

Three policies go beyond the documentation. A callback handed to an API whose source is not in the repository is treated as asynchronous; such a callback is the only finding in 12 of the 580 components blocked by their own code in the independent apps. Methods of library services are trusted. Library elements never block their parent: Material, CDK, ng-zorro, Taiga and Ionic components are known to be OnPush, and other third-party elements are counted but not judged.

A blocked or probable verdict names the file, the line and the code fragment it rests on. A ready verdict rests on an absence, so it lists instead what the template reads and where each of those fields is written. "Ready" means the four triggers cover the code paths the tool can see; section 7 names what it cannot.

3. The sample

I searched GitHub five ways on 16 November 2026: the angular topic (10 or more stars, 854 repositories; 5 to 9 stars, 271), "angular" in the repository name or description (20 or more stars, 575; 10 to 19, 225), and a code search for the text ChangeDetectionStrategy.Eager (741): 2,029 distinct candidates, TypeScript, pushed in the previous six months, not forks, not archived. I kept those with an Angular application project (1,705), on Angular 17 or later (1,522), with at least 20 component or template files and 5 stars (499), and removed 274 that are not applications (203 libraries with demo apps, 32 samples, 13 templates, 13 courses, 6 starters, 5 tooling repositories, a fixture collection and a duplicate), each with its reason recorded. The 225 left were pinned to the head commit of their default branch that day and cloned sparsely. The 20-file filter was applied to file names before cloning; the main sample's threshold of 30 components was applied to @Component classes after the scan.

Repositories225 (Angular 22: 155 · 21: 32 · 20: 18 · 19: 8 · 18: 9 · 17: 3)
Stars1,000+: 15 · 100 to 999: 33 · 20 to 99: 75 · 5 to 19: 102
Components34,341 @Component classes, 31,531 of them outside test files
Main sample185 repositories with 30 or more components: 30,580 components

The code search finds repositories by the stamp's text, so by construction it only finds projects whose code carries the stamp today, and reporting stamp statistics from a population chosen by the stamp would be circular. The body of this report therefore uses the 56 Angular 22 repositories found by topic and name, the independent apps: 8,078 components, of which 55% declare OnPush, 21% carry the stamp and 24% declare nothing (chart C1 in appendix F shows all three groups). The five largest of them hold 25% of the group's components.

4. Results: readiness

The judged components split into two kinds that answer different questions. A stamped component asks the migration's question: can the stamp come off? A component that declares nothing on v22 is already OnPush, so its verdict checks the tool, and a blocked verdict there is a live defect or a mistake. Chart C6 and the table give both, with the blended figure beside them.

Verdicts by declared strategyVerdicts by the strategy a component declaresComponents not declaring OnPush, judged by the six rules; final verdicts after child propagationReadyProbableBlockedUnknownAngular 22, topic or name searchEager stamp54%40%1,693Angular 22, topic or name searchNo strategy, already OnPush89%1,960Angular 22, Eager code searchEager stamp46%47%9,398Angular 22, Eager code searchNo strategy, already OnPush70%7%20%1,358Angular 17-21No strategy, eager by default50%43%5,2980%25%50%75%100%components
Chart C6: verdicts by the strategy a component declares. Scroll sideways to see the whole chart.
Final verdicts, independent appsStampedNo strategy, already OnPushAll judged
Components1,6931,9603,654 (one declares Default)
Ready53.6%88.6%72.4%
Probable6.5%5.0%5.7%
Blocked39.7%6.1%21.6%
Unknown0.2%0.4%0.3%
Blocked by own code30.2%3.5%15.9%

The tool finds no path around the triggers in 54% of stamped components, at least one in 40%, and one in the component's own code rather than a child's in 30%. The 76 apps found by searching for the stamp hold 9,398 stamped components, five and a half times as many, and read 45.7% ready and 47.4% blocked; the selection argument of section 3 concerns how many apps keep the stamp, not whether stamped code is ready, so both figures stand; the per-app spread in section 6 says more than either. The blended 72.4% is what one gets by ignoring the split, and it overstates the readiness of the stamped code. Of the 791 blocked components, 211 are blocked only because a child is. Per app (chart C2), the median app has 98% of its components ready or already OnPush; a quarter of the apps are at or below 74% and the lowest is 27%; 40 of the 56 are at 80% or above, 6 below 50%. Leaves, the 44% of judged components that render no other in-repo component, are 86.7% ready; containers are 60.9% ready, and 211 of their 629 blocked ones are blocked only through a child. Zoneless apps (36 of the 56) are readier than the rest, 84.7% against 60.6%, and components using signals readier than components without, 84.0% against 58.7%; both are associations, not causes (appendix E).

Share of components ready or already OnPush, one dot per appPer app: components ready or already OnPushOne dot per app; share of its components that are already OnPush or judged ready. The line is the median.0%25%50%75%100%Angular 22topic or name search · 56 appsmedian 98%Angular 22Eager code search · 75 appsmedian 55%Angular 17-2154 appsmedian 73%
Chart C2: per app, components ready or already OnPush; each app counts once, in the group that holds most of its components, so the groups hold 56, 75 and 54 apps. Scroll sideways to see the whole chart.

The components already running as OnPush

The 1,960 components that declare no strategy run as OnPush wherever these apps run. The tool flags 119 of them, 50 only through a child and 69 by their own code (3.5%): in each of the 69 it finds a write to rendered state outside every trigger. One of the fixes in section 7 shows what such a case looks like once a user finds it, a v22 app with no declared strategy whose pages stayed blank after a subscribe wrote the data.

These flags are also where a tool over-reaches, so I probed them three times with the two readers of section 7 (appendix D has every item). The first probe, 29 of the 109 flags an earlier version raised, and the second, 14 flags drawn after the fixes from the first, exposed six blind spots in my rules, five on signal-based code and one on a helper call: an effect that depends only on the component's inputs or on signals the template reads runs inside the view's own refresh (Angular 19 and later run component effects as part of change detection, before the template), so its write is rendered; a one-argument set() is a signal write, not a mutation; a field that aliases a service's signal is a signal; a signal updated in a method called from the callback covers the plain write; so does a signal updated anywhere in the statement list that encloses it; and a markForCheck() inside a helper the callback calls counts like a direct one. The runtime checks in section 7 added three more: a reactive form's status is a signal since Angular 19, but only a form directive in the same view subscribes to it; a markForCheck() inside ngAfterViewInit is lost; a write in ngAfterContentInit is rendered by the first check. I fixed all nine and took the suite from 184 to 203 patterns. After the six, the own-code flags fell from 109 to 69 and the independent ready share rose from 70.0% to 72.4%; the three from the runtime run moved no verdict in the independent apps. The third probe, 11 flags drawn after the six fixes and never read before (the three later ones touched none of its items), is the untuned measure: the readers confirmed 7, called 3 ready and split on 1, and the second-vendor reader of section 7 later confirmed the same 7 (an interval of 35 to 85% for the confirmed share). Across the surviving flags of all three probes, 15 of 35 were confirmed, 11 called ready, 1 probable, 3 undecidable and 5 split. Taking the pooled 43% or the untuned 64%, the share of components already running as OnPush that carry a stale-view path the tool can show is 1.5% at the pooled rate and 2.2% at the untuned one (1.2% to 3.0% across the untuned interval). The tool also misses paths (section 7), so this bounds what it can find, not the stale views that exist.

5. Results: what breaks

Chart C4 ranks the patterns found in the 580 independent-app components blocked by their own code, by the share showing each; a component can show more than one, and appendix F has the same ranking for the other groups. Each pattern comes with the shortest example from the test suite and the change that flips the verdict; in the examples data is an injected service and the template reads the field named in the comment.

Blocking patterns, share of blocked componentsWhat blocks a componentShare of blocked components that show each pattern (a component can show several)Angular 22 apps found by topic or name (580 blocked components)All 185 apps (5,979)0%20%40%60%80%Field written in a subscribe callback75%Field written inside an RxJS operator10%Field written in a .then callback9%Field written after an await9%Parent mutates a bound object in place6%Callback handed to an unknown API6%Field written in a timer or animation frame5%writeValue() of a ControlValueAccessor3%effect() writing a plain field3%Field written in an after-view hook2%Field written in a hand-added event listener1%Written or driven through a view query1%ComponentRef.instance written after creation1%detach(), reattach() or ApplicationRef.tick()0%
Chart C4: what blocks a component. Scroll sideways to see the whole chart.

1. A field written in a subscribe callback. 75%.

items: string[] = [];                                  // template: {{ items.length }}
ngOnInit() { this.data.items$.subscribe((v) => { this.items = v; }); }

Flip: this.cdr.markForCheck() after the write, or make items a signal and call set, or keep the observable and read it through the async pipe.

2. A field written inside an RxJS operator. 10%. pipe(tap((v) => { this.x = v.length; })).subscribe(): the operator callback runs when the stream emits. The same tap is not counted when the stream ends in an async pipe, because the pipe marks the view on that emission.

3. A field written in a .then callback or after an await. 9% each. async ngOnInit() { this.rows = await this.api.fetch(); }: the code after await runs in a microtask, outside the event that started the method.

4. A parent that mutates an object it binds to a child. 6%. The child's input keeps its reference, so Object.is reports no change. Counted only when the child's template looks inside the bound object.

// parent template: <app-child [rows]="rows">      child template: {{ rows.length }}
add() { this.rows.push('x'); }

Flip: this.rows = [...this.rows, 'x'], or let the child own the state.

5. A callback handed to an API the tool cannot see. 6%. Treated as asynchronous by policy, whether passed inline or stored in a variable first.

6. A field written in a timer or animation frame. 5%. setTimeout, setInterval, requestAnimationFrame, queueMicrotask; NgZone.run around the write changes nothing under OnPush.

7. An effect that writes a plain field. 3%. effect(() => { this.plain = this.count() * 2; }) with count read nowhere in the template. Counted only when the effect can run without this view being refreshed: an effect that depends on nothing but the component's inputs or signals its template reads runs inside the view's refresh, before the template. Flip: a computed.

8 to 10. writeValue() or setDisabledState() in a ControlValueAccessor, which the forms API calls outside the component's own events (3%); a write in ngAfterViewInit or ngAfterViewChecked, after the first check is over, most often the assignment of the observable an async pipe reads (2%; a markForCheck() inside the hook does not help, as section 7 shows, a mark from a later callback or a signal does, and a write in ngAfterContentInit is not counted because it lands before the first check); a hand-added listener, addEventListener, onmessage, onload (1%).

11 to 13. Rare. Writing into a child through a view query, or calling a child method that writes what the child renders; ComponentRef.instance written from a later callback, while a write right after createComponent is rendered by the first check and not counted; ApplicationRef.tick() from component code. Each under 1%, and the last absent from the independent apps.

Every pattern except 4 and 11 to 13 is one rule, the asynchronous write. 93% of the components blocked by their own code have no other blocking finding, and 70% have nothing else noted at all, not even a review item. For each of them the tool's verdict flips when a markForCheck() follows the write (from a later callback when the write sits in an after-view hook) or the field becomes a signal, by construction of rule 1; whether the view then behaves is what section 7 tried: the stale view on four real components, the fix on the nineteen pattern components. Several things that look like violations are not counted because the triggers cover them, from a markForCheck() anywhere on the call path to patchValue on a form whose template reads only the form's status; appendix A lists them.

6. The Eager stamp, one release later

Angular 22 shipped in May 2026. Six months later, of the 56 independent apps, 32 carry no stamp at all, 11 are mixed, and 13 kept the stamp on 90% or more of their components; the median app has none (chart C5). Whether the 32 removed the stamps or never had them, I did not check; 28 of them are zoneless, and 2 of the 13 stamp-keepers are. The stamped components sit in 24 of the 56 apps. The stamped components of the 13 stamp-keeping apps read 51% ready and 43% blocked, close to the figures for stamped components overall: removing their stamps blindly would have left four in ten with a path the tool can see. Per app, among the 18 apps with 20 or more stamped components, the stamped ready share runs from 4% to 100% with a median of 62%, and the three largest hold 47% of all stamped components. Among the 76 apps found by the stamp's text, 40 keep it on 90% or more of their components and only 1 has none left (its three stamps sit in test files, which the census does not count).

Eager stamp status per appThe Eager stamp, one release later56 Angular 22 apps found by topic or name, one column per app.Sorted by the share of components still carrying the Eager stamp.OnPushEager stampNo strategy set0%25%50%75%100%32 apps: no stamp left11 mixed13 apps: stamp on 90%+
Chart C5: the Eager stamp per app. Scroll sideways to see the whole chart.

7. How much to trust these numbers

The rules are mine and so is the program that applies them. I checked them five ways. Layers 1 and 2 test the program against my own reading of the documentation. Layers 3 to 5 bring in judgments that are not mine, though not free of my influence: the readers worked from my verdict definitions and from context the tool assembled, the adjudicators saw the tool's evidence, the fixes in layer 4 were found by searching commit messages for the words my rules care about, and the app in layer 5 is my own.

Layer 1: known answers. 203 small components, each annotated with the verdict it must get and why: the first 125 written from the documentation's four triggers and two edge cases before any real code was read, the rest added as the validation rounds found shapes the rules misread. npm test requires the tool to reproduce all 203.

Layer 2: metamorphic edits. For every component in the sample the tool applies in-memory edits whose effect on the verdict is known in advance (a timer that writes a rendered field, a markForCheck() added or removed, a detach(), a service read added to the template, a push into a bound array in a parent, a write into a child through a view query) and reclassifies. 61,477 edits were applied and 61,454 produced the expected change; the 23 exceptions are all of one kind, a markForCheck() removed while another mark or a signal write on the same path still covered the write, which the rules now recognise and the edit's expectation did not. This layer tests that the parser sees every real code shape the edits touch, not the rules themselves.

Layer 3: blind reading of real components. I sampled 299 components from the census, stratified by verdict, and packed each with its template, base classes, in-repo services and parents, with the four triggers and the four verdict definitions as the only instructions. Two readers labelled every item without access to the tool or to each other: Claude Opus 5.5 and Claude Sonnet 5.5, with no tools and no conversation history. They are language models from one vendor, not Angular engineers, and no human labelled the sample; the layer adds a second opinion that does not run my rules. Long files were cut at a length cap (83 of the 299 prompts), and the readers were told to answer unknown when the decision hinged on code they could not see. The readers agreed with each other on 92.3% of items (kappa 0.87) and with the tool on 87.0% and 84.6%. The 51 items where at least one reader disagreed went to fresh sessions that saw the code, the tool's evidence and both readers' reasons, and returned a label or "split". I used those disagreements to fix the tool, so this is a tuning sample, scored after the tuning (appendix E): 160 of its 180 "ready" verdicts were confirmed (88.9%), two were contradicted outright (1.1%), and 67 of 77 "blocked" verdicts were confirmed (87.0%).

The held-out sample. To answer the tuning objection I drew a second stratified sample of 148 components that the first one did not contain and ran the same two readers and the same adjudication; none of its disagreements were used to change the tool, and it was re-scored after the last change. The readers agreed with each other on 93.2% of items (kappa 0.89), with the tool on 89.9% and 87.8%, and on blocked-or-not on 93.9% and 93.2%; 20 items went to adjudication; 41 of the 148 prompts had a file cut at the cap; the adjudicators saw the tool's evidence here as in the first sample, which favours the tool. Counting undisputed items as confirmed:

Tool verdictItemsConfirmed95% intervalAdjudicated otherwise
Ready7870 (89.7%)81 to 95%2 probable, 2 blocked, 2 unknown, 2 split
Probable2422 (91.7%)74 to 98%1 ready, 1 blocked
Blocked4035 (87.5%)74 to 95%3 ready, 2 unknown
Unknown65 (83.3%)44 to 97%1 split

The two "ready" verdicts overturned here (2.6%, interval 0.7 to 9%) are a form group patched inside a helper that received it as a parameter, and an input rendered through the impure json pipe while a parent mutates it; the three "blocked" verdicts overturned to ready are two dialog references confused with another dialog opened in the same method and one subscribe on a synchronously emitting stream. All five are limits listed in section 9 and described in appendix D. Because the adjudicators had seen the tool's evidence, I ran the adjudication a second time blind, with only the code and the two readers' positions: the "ready" row then reads 70 of 78 confirmed with 3 contradicted (3.8%), and the "blocked" row 33 of 40 (82.5%), 3 overturned to ready; the untuned probe of section 4 is unchanged at 7 of 11. The blind tables are in appendix E.

A second vendor. After both adjudications were sealed, a third reader from another vendor read the 148 held-out items and the third probe under the same prompts: OpenAI's gpt-6-luna through the Codex CLI (version 0.171, reasoning effort xhigh), with my Codex settings ignored, no session kept, a read-only sandbox and an empty directory as its working root, so it saw nothing but the prompt. It agreed with the tool exactly on 83.8% of the items and on blocked-or-not on 92.6% (the two Claude readers: 89.9% and 87.8%, 93.9% and 93.2%), and with the blind-adjudicated labels on blocked-or-not on 95.9%; its kappa with Opus is 0.81 and with Sonnet 0.76, against 0.89 between those two. It confirmed 65 of the 78 ready verdicts and called 3 blocked: two of them are the two the blind adjudication had contradicted, the third both adjudications had called ready, and it did not flag the adjudication's third. It confirmed 33 of the 40 blocked verdicts and called 5 ready: two of the three the adjudication had overturned, plus three the adjudication had left blocked, split or unknown; on the third overturned one it sided with the tool. It answered unknown 14 times against 8 and 6. On the third probe it confirmed the same 7 of 11 flags as the blind adjudication. Its answers sit next to the others in each pack's readers/codex/, and scripts/validation-run-codex.sh reruns it.

Layer 4: fixes that already happened. I searched GitHub commit messages for projects that switched components to OnPush and later fixed a stale view (OnPush together with markForCheck, detectChanges, "stale" or "not updating"), read each diff, and kept 38 fixes in 27 projects, 22 of them with 50 or more stars; one of the 38 is a v22 app that had declared no strategy, so its components were OnPush by default when its pages went blank. For each, the tool classified the component at the commit before the fix, as if it were not yet OnPush, and had flagged 35 of the 38: 30 as blocked and 5 as probable. The misses: a markForCheck() whose timing inside a change detection pass was the bug, a case I could not settle from the diff, and a domain object mutated elsewhere in the app. This layer holds only positives, found with the words my first rule looks for, so it measures what the tool catches, not what it wrongly flags.

Layer 5: one app run under OnPush. FrontendAtlas, the Angular 21 app I maintain (175 components, 65 already OnPush), is the one codebase whose code I may execute. I added changeDetection: OnPush to four of the 25 components the tool blocks by their own code, chosen because a test could observe their asynchronous write (a forgot-password success message and a login error message written in subscribe callbacks, a CV report assigned in a timer, a landing-page counter written after an HTTP response), to two it flags although their only emission is synchronous, and to eight it calls ready, then ran the same Playwright tests against the unchanged and the changed build. On the path each test drove, all four blocked components showed the stale view for two seconds after the write and repainted on the next template event; the two synchronous cases and the eight ready components behaved as before, including 50 of 50 existing end-to-end tests. The login page added one detail: with a 401 the view repainted on its own, with a 500 it stayed stale. The 401 path calls setErrors() on the form, and since Angular 19 a control's status, pristine, touched and submitted state are signals that the forms directives read, so a status change marks any view that holds a form directive bound to that form; a control's value is not a signal, nor is a plain field. The tool now models this. The spec, the flipped file list and the tool's verdicts for the app are in data/validation/runtime-2026-11-19/.

Layer 5, second part: the patterns at runtime. The one app shows four components; the pattern list of section 5 needed each pattern on its own. I wrote each as a component class in a fresh Angular 22.3 app with zone.js, in up to three variants of the same class, Eager, OnPush, and OnPush plus the fix the report names, nineteen scenarios in all, and had Playwright start the asynchronous write, wait, read the view, then fire a plain template event and read again, 47 checks. Every pattern of section 5 behaves as the rules say: the Eager variant repaints, the OnPush variant holds the stale value until its own event, the fixed variant repaints on its own. The run also corrected the tool three times. A markForCheck() placed inside ngAfterViewInit does nothing: the hook runs while the ancestors are still being refreshed, each ancestor clears its own dirty bit when its refresh ends, and the next pass never descends to the component; a mark from a later callback, a detectChanges(), or a signal works, and the tool now accepts only those. A field written in ngAfterContentInit is rendered: the hook runs once, in the parent's pass that also gives the component its first check, before the component's own view; the tool had counted it. And the form-status rule of the first part was too generous: a control's status getter is an untracked read, and what subscribes to the status signal is the host binding of the form directives, so a template that reads form.invalid is refreshed only when it also holds [formGroup], formControlName or a sibling; with the form rendered elsewhere the view stays stale. Across the 225 apps the three corrections moved 30 verdicts, none in the 56 independent apps and none among the components the readers judged; appendix F carries the decimals that changed. The app, the spec and the results are in runtime/patterns/ and data/validation/runtime-patterns-2026-11-20/.

Comparison with another analyzer. stackmagic's angular-onpush-analyzer (MIT, commit c74c9a0) is the closest existing tool; it parsed 184 of the sample's workspaces, and on the 15,942 judged components both tools saw they agree on blocked-or-not for 87.9%. It drops its asynchronous-write warning for a whole class as soon as markForCheck or detectChanges appears anywhere in it, and it has no notion of effects, listeners, operator callbacks, ControlValueAccessor hooks or after-view hooks. On the held-out components both saw, scored against the adjudicated labels with split and unknown items left out, my tool's "blocked" verdicts were right 28 of 30 times and caught 28 of the 30 blocked components; the analyzer's were right 18 of 22 times and caught 18 of 30. (Precision counts a verdict right when the adjudicated label is blocked; the confirmation table above also counts probable, unknown and split against the tool, which is why it reads lower.)

What static reading cannot see. The two "ready" components overturned in the tuning sample share a cause: parent and child held the same object and the parent changed it in a way no binding shows, once an object that had arrived through the child's own (select) output, once an entry object that lived both in a map and in the row bound to the child. A domain object mutated outside the component, the third miss in layer 4, is the same kind. The two held-out misses are different: a limit of the alias tracking and of the binding reader. This is the residual risk in every "ready" verdict. Outright contradictions were 1.1% of ready verdicts in the tuning sample (interval 0.3 to 4%) and 2.6% in the held-out one (0.7 to 9%); a further 18 and 6 ready verdicts were not confirmed without being contradicted; and the reference behind all of these is the model readers.

8. What this suggests

For a team on Angular 22 with the stamps still in place, the tool finds no path around the triggers in about half the stamps and a path it can see in four in ten, and 7% need a look; in the apps found by the stamp the halves are 46% and 47%. In order:

  1. List the components with an asynchronous write of rendered state, with this tool or by hand. 93% of the components blocked by their own code have no other blocking finding.
  2. Fix each with the smallest change: markForCheck() after the write (from a later callback when the write sits in ngAfterViewInit), the field moved to a signal, or the stream read through the async pipe.
  3. Look at parents that mutate bound objects in place, and at ControlValueAccessors.
  4. Treat "probable" as a review list: service state read by the template, detectChanges(), valueChanges subscriptions.
  5. Remove the stamps leaf-first; the containers blocked only through children clear as the children do.

For teams already on v22 without stamps, the components the tool flags by their own code (3.5% here) are worth the same pass; the readers of section 4 confirmed between four and six in ten of them. For the documentation: the v22 update guide says what the migration does, not what to check before undoing it. The top patterns of section 5 with their fixes would fit there, and this report is the data behind a documentation change I am proposing.

9. Limits

  • The sample is open-source applications on GitHub with at least five stars, pushed in the six months before the snapshot; the Angular 22 apps are early upgraders. Libraries were excluded, so the RFC's question about library authors is not answered here. Percentages are pooled over components of very different apps; the per-app view shows the spread, the intervals do not account for it.
  • Beyond the one app and the nineteen pattern components of layer 5, nothing was executed; the verdicts on the 225 sample apps are static readings.
  • The readers and adjudicators were language models, two readers and every adjudicator from one vendor and a third reader from another on the held-out sample and the third probe. Their answers and reasons are published with a link to each component at its pinned commit; the prompts are not, because 22 of the 129 repositories they quote have no license GitHub recognises. With the pinned commits cloned, npm run spot-check builds a 20-component kit (the same prompts, the tool's verdicts sealed) for anyone who wants to label a slice by hand in an hour; a sealed kit of 19, whose twelve source repositories all carry an open-source license, ships with its prompts in data/validation/spot-check-2026-11-20/. I labelled that kit myself and agreed with the tool on all 19; since I wrote the rules, that shows the kit works and nothing more, and no figure above counts it. The labeller these numbers still lack is an Angular engineer who did not write the tool. The tuning sample and the first two probes were used to improve the tool before they were scored; the held-out sample and the third probe were not, and both were also adjudicated blind.
  • The three policies of section 2 cut both ways: the unseen-API rule adds blocked verdicts, and the trust in library services and library elements removes some, so a parent that mutates an array bound to a library component is not caught.
  • A subscription whose source only ever emits synchronously is counted as asynchronous; its first emission is rendered by the first check and there is no later write to miss. Alias tracking stops at method parameters. Two dialog references opened in one method can be confused. An input rendered only through an impure pipe such as json is read as a shallow binding.
  • "Probable" is a review bucket. Treating every probable stamped component as blocked would put that share at 46.2% instead of 39.7%; treating them all as ready would put ready at 60.1%.
  • This is a snapshot of 16 November 2026. The pinned commits are in the data.

10. Reproduce it

Everything is in github.com/MuslumYilmaz/onpush-census under the MIT license.

git clone https://github.com/MuslumYilmaz/onpush-census
cd onpush-census && npm ci && npm test        # 203 known-answer patterns
node scripts/clone.mjs                          # sparse clones at the pinned commits, about 1.7 GB
node scripts/analyze.mjs                        # verdicts for the pinned sample
node scripts/report-charts.mjs                  # the numbers and charts in this report

The data directory holds the 225 pinned repositories with their commits, the per-component verdicts with evidence (components.csv), the reading packs with every reader's and adjudicator's answer (with and without the tool's evidence shown), the 38 commit-history fixes, the runtime check, the sealed spot-check kit, and the comparison with the other analyzer. To read your own workspace: npx onpush-census ./path/to/workspace prints the verdict counts and, for every component that is not ready, the lines of code behind its verdict; --json gives every component with its evidence.

Appendix A: the six rules in detail

Rule 1, asynchronous write. Counts an assignment, compound assignment, increment, destructuring target or in-place mutation (push, splice, sort, a nested property write, Object.assign, form patchValue, setValue, reset, enable, disable) of a field the template reads, when the write sits in a subscribe callback (function, arrow, method reference or observer object), an RxJS operator callback, .then, .catch or .finally, after an await in the same function (including x = await f()), a timer (setTimeout, setInterval, requestAnimationFrame, queueMicrotask), a hand-added listener (addEventListener, on* assignments, WebSocket handlers), an effect, a ControlValueAccessor hook (writeValue, setDisabledState), an after-view hook (ngAfterViewInit, ngAfterViewChecked, ngAfterContentChecked; ngAfterContentInit is not one: it runs once, in the parent's pass that also gives the component its first check, so its write is rendered, while ngAfterContentChecked runs again on every later check of the parent, when the component's own view is refreshed only if something marked it), or a callback passed to an API whose source is not available (flagged and counted separately). Writes inside methods called from such a callback count too, through any depth of in-repo calls. A subscription to a form control's valueChanges or statusChanges is reported as probable instead (rule 4), because for user input it fires inside an event. The template read may be direct, through a getter, through a method the template calls, or through [ngStyle], [ngClass], [class], [style] and ngForOf bindings, which look inside objects. Neutralised by markForCheck() in the same callback or later on the same call chain, except inside an after-view hook, where only a detectChanges() or a mark from a later callback reaches the view; by a set or update on a signal the template reads in the same block; by the stream ending in an async pipe; by a next() into a subject the async pipe consumes; by the field having been reassigned in the same function just before the mutation; by mutations of objects the template never looks inside; and, for writes inside an effect, by the effect depending on nothing but the component's input signals and signals the template reads, since such an effect runs during this view's refresh and before the template. The signal write may sit anywhere in the statement list that encloses the plain write, or inside a method called from it; a markForCheck() inside a helper method the callback calls counts like a direct one. A one-argument set() is a signal write, not a mutation (Map.set takes two); a field that aliases a service's signal is a signal. Since Angular 19 a reactive control's status, pristine, touched and submitted state are signals, so a form mutation is not counted when the template reads only those (valid, invalid, status, dirty, touched, errors, hasError()) and holds a form directive bound to the form ([formGroup], [formControl], formControlName and their siblings), whose host binding is what subscribes to the status signal; a template that reads a control's value, or reads the status with the form rendered elsewhere, is still a plain read. Noted but not counted: MatTableDataSource writes when the template renders only the table (a template that also shows dataSource.data.length is counted); instance.x = … right after createComponent or open; overlayRef.detach(), which is a CDK call; input setters and ngOnChanges, which run during the parent's binding update; detectChanges() after the write (probable, rule 6).

Rule 2, parent mutation. Counts a parent mutating in place an object or array it binds to a child input, when the child's template reads inside the bound value or the mutated sub-path; writes through @ViewChild or viewChild() into a field the child renders; and calls through a view query to a child method that writes a rendered field without marking the view. Neutralised by markForCheck() in the writing method, by a fresh reassignment, by a child template that only tests the input or reads a different sub-path, and by primitive bindings.

Rule 3, child propagation. A component takes the worst verdict among its own and those of the in-repo children it renders (resolved by selector within standalone imports or module scope), in the order ready, probable, unknown, blocked; an ambiguous selector makes it unknown. Library elements do not propagate: mat-, cdk-, nz-, tui- and ion- elements are known OnPush; other elements from outside the repository are counted and reported.

Rule 4, service and child state. Counts template reads, direct or through a getter or method, of injected in-repo service members that are mutable fields or getters, or methods that read the service's own state; a child's state read through a view query; and valueChanges or statusChanges subscriptions that write rendered fields. Not counted: service signals, readonly or constant members, pure methods, injection tokens, and members consumed through the async pipe. Calls into library services are trusted and noted. Yields probable.

Rule 5, instance writes. Counts ref.instance.x = … or componentInstance.x = … outside the synchronous block of creation, or inside an asynchronous callback, when the target renders x. Neutralised by markForCheck() on the created view's change detector.

Rule 6, manual change detection. ApplicationRef.tick() on an ApplicationRef receiver: blocked. detach() and reattach() on a ChangeDetectorRef, and detectChanges(): probable. A template reference handed to another component's input: probable.

Appendix B: the pattern catalogue

203 components in test/fixtures/patterns, each carrying its expected verdict and the reason: 100 ready, 12 probable, 83 blocked, 6 unknown, 2 already OnPush. The suite's README lists them in one table, and npm test runs them.

Appendix C: glossary

  • Ready, probable, blocked, unknown: the four verdicts of section 2.
  • Judged: components that do not declare OnPush and therefore receive a verdict; on v22 this includes components that declare nothing.
  • Stamped: carrying the changeDetection: ChangeDetectionStrategy.Eager line written by the v22 migration.
  • Leaf: a component whose template renders no other component from the same repository.
  • Own verdict: the verdict from the component's own code. Final verdict: after child propagation.
  • Independent: repositories found by the topic and name searches, as opposed to only by the code search for the stamp.

Appendix D: the already-OnPush probes and the held-out misses

Three probes drew components that declare no strategy in independent Angular 22 apps and that the tool had flagged as blocked by their own code; items and every reader's answer are in data/validation/unspecified-2026-11-19/, unspecified2-2026-11-19/ and unspecified3-2026-11-19/.

The first probe (29 items, from the 109 flags an earlier version raised) and the second (14 items, drawn after the fixes from the first) exposed six of the nine blind spots named in section 4; the runtime checks found the other three. Re-scored with the final tool, the first probe reads 10 ready (8 confirmed by both readers, 1 overturned to blocked, 1 split), 3 probable (confirmed), and 16 still blocked, of which the readers confirm 5, call 4 ready and 1 probable, cannot decide 3 because the prompt showed at most 700 lines of a long file, and split on 3. The second reads 6 ready (all confirmed) and 8 blocked, of which 3 are confirmed, 4 called ready and 1 split. The remaining disputes are judgment calls: a loading flag set in a route subscription and marked for check only in the finally of a later promise, forms reset in callbacks that also set signals the template reads in a branch, and a component whose writes sit in tap callbacks but which calls detectChanges() itself.

The third probe (11 items, drawn after the six probe fixes and never read before; the three later corrections from the runtime run changed none of its verdicts) is the untuned measure for this population: the readers confirmed 7, called 3 ready (a network list rebuilt in a helper that a subscription calls, a form configured inside a valueChanges subscription, and a form group reset in an effect that a signal the template reads drives) and split on 1.

The held-out misses. Ready overturned to blocked: a component whose ngOnInit subscriptions call a helper with the form group as an argument, and the helper patches it, while the template reads the group's validity in [ngClass]; alias tracking follows locals and this paths, not parameters. And a debug component rendering state | json, where a parent increments counters inside that object; the impure pipe looks inside the object and the tool treated the binding as shallow. Blocked overturned to ready: two dialog components blamed for componentInstance writes that targeted another dialog opened in the same method, and a subscribe on a toObservable stream inside a click handler, which emits synchronously.

Appendix E: the tuning sample and the two cuts

The first reading sample (299 components, stratified at sampling time as 150 ready, 92 blocked, 45 probable, 12 unknown) was used to fix the tool after two adjudication rounds; 48 of its items changed verdict along the way. Scored with the final tool, counting undisputed items as confirmed:

Tool verdictItemsConfirmed95% intervalAdjudicated otherwise
Ready180160 (88.9%)84 to 93%5 probable, 2 blocked, 7 unknown, 6 split
Probable3022 (73.3%)56 to 86%3 ready, 3 blocked, 2 split
Blocked7767 (87.0%)78 to 93%2 ready, 3 probable, 3 unknown, 2 split
Unknown1211 (91.7%)65 to 99%1 blocked

The two "blocked" verdicts overturned to ready are a component whose effect resets a form that reaches the template through toSignal, and a page index written in a subscription whose template the adjudicators read as covered.

Adjudicated blind, with the tool's evidence withheld, the held-out table reads:

Tool verdictItemsConfirmedAdjudicated otherwise
Ready7870 (89.7%)3 probable, 3 blocked, 2 unknown
Probable2422 (91.7%)1 ready, 1 blocked
Blocked4033 (82.5%)3 ready, 2 unknown, 2 split
Unknown65 (83.3%)1 split

For the tuning sample, blind adjudication leaves the confirmations unchanged (160 of 180 ready, 67 of 77 blocked) and moves one more "ready" verdict to blocked, 3 instead of 2. The rule changes that followed the second adjudication round moved 524 components from ready to blocked and 448 the other way across the census; the adjudication rounds together left the independent ready share where the first full run had put it, at 70.0%, and the six probe fixes of section 4 then took it to 72.4%; the three runtime corrections of section 7 moved no verdict in the independent apps. Each pack's score.md scores the second-vendor reader of section 7 next to the two Claude readers.

The two cuts of chart C3, on the judged components of the independent apps: zoneless apps (36 of 56, by a provideZonelessChangeDetection() call or the absence of zone.js from the dependencies) have 65.9% of their components declaring OnPush and 84.7% of the rest ready, against 34.3% and 60.6% in the 20 apps that ship zone.js; one reason may be that without zone.js an unmarked asynchronous write does not repaint under any strategy, so such writes get fixed early. The same split on the stamped components alone: 67.3% ready and 28.8% blocked in the 8 zoneless apps that hold stamps (205 components), 51.7% and 41.2% in the 16 apps with zone.js (1,488). In a zoneless app a blocked write does not repaint on its own even under the stamp; a check started elsewhere repaints it, and without the stamp that check skips the component. Components that use signal, computed, input(), model() or toSignal are 84.0% ready (1,972 components); components that use none of them are 58.7% ready (1,682); the two add up to the 3,654 judged components, which include one that declares Default explicitly, a deprecated alias of Eager in v22, judged with the rest.

Appendix F: the other populations

Chart C1 shows where all 30,580 components of the main sample come from and which strategy each declares. Each component carries the Angular major of the nearest package.json; three monorepos mix majors, so the group repository counts (56 + 76 + 56) add up to 188, not 185. Twenty-three of the 155 Angular 22 repositories fall below the 30-component line.

Strategy declared by components, by groupWhere the components come from30,580 components in 185 apps with 30 or more components; the strategy each one declaresOnPushEager stampNo strategy setAngular 22topic or name search · 56 apps55%21%24%8,078Angular 22Eager code search · 76 apps18%72%10%13,123Angular 17-2156 apps43%57%9,3790%25%50%75%100%components
Chart C1: where the components of the main sample come from, and which strategy each declares. Scroll sideways to see the whole chart.
Final verdictsAngular 22 code-search apps (76), stampedAngular 22 code-search apps, no strategyAngular 17 to 21 (56 apps), no strategyAll judged, 185 apps
Components9,3981,3585,29819,783 (with the 3,654 of the body, 43 stamped and 32 declaring Default, all on Angular 17 to 21)
Ready45.7%69.7%49.7%53.4%
Probable4.9%7.3%5.3%5.3%
Blocked47.4%19.6%42.7%39.4%
Unknown2.0%3.5%2.3%1.9%
Blocked by own code39.1%7.7%30.5%30.2%

In the code-search apps 72% of all components carry the stamp (87% of the judged ones); they read 48.7% ready and 43.9% blocked over all their judged components; their median app has 55% of its components ready or already OnPush. The Angular 17 to 21 apps, where a component that declares nothing runs eagerly today, read 49.7% ready and 42.5% blocked over all 5,373 of their judged components (the table shows the 5,298 no-strategy ones; the 43 stamped read 51% ready and 21% blocked); their median app is at 73%, and the group is more concentrated than the independent one (44% of its components in five apps). In the stamp-search apps 40 of 76 keep the stamp on 90% or more of their components and 35 are mixed.

The top of section 5's ranking holds in every group: a field written in a subscribe callback leads with 65% of the components blocked by their own code across all 185 apps (63% in the code-search apps, 66% on Angular 17 to 21), followed by RxJS operator callbacks (15%), writes after an await (15%) and .then callbacks (11%); in every group about 93% of the blocked components have no blocking finding other than an asynchronous write. Section 8's five steps therefore apply to them as they do to the independent apps; the difference is the amount of work, not its kind.