# Behavior traces — ReactiveX/rxjs

> Canonical page: https://codevetter.com/unpack/rxjs/behavior-traces

# Behavior traces — ReactiveX/rxjs

Scanned commit 54796b38a57e6309f9861e174737479bb3f63f61 (2026-08-05). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The source investigation followed initialization, operator execution, cancellation, and migration output end-to-end. Additional traces cover independent producers, virtual-time cleanup, document rendering, and worker search. These are source-derived execution orders, not recorded runtime executions.
- Initialization: importing rxjs reaches the fallback initializer → initializeObservablePolyfill checks globalThis.Observable → prepares fallback/abort properties only when absent → fills missing EventTarget.when → installs prepared properties. — [packages/rxjs/src/index.ts#L1-L1](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/packages/rxjs/src/index.ts#L1-L1) [packages/observable-polyfill/src/index.ts#L1377-L1438](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/packages/observable-polyfill/src/index.ts#L1377-L1438) [packages/observable-polyfill/src/index.ts#L1492-L1492](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/packages/observable-polyfill/src/index.ts#L1492-L1492)
- Projection: importing map loads create and subscription helpers → installs Observable.prototype[map] → mapOperator calls this[create] → subscription starts subscribeToSource → project(value,index++) feeds subscriber.next. — [packages/rxjs/src/map.ts#L1-L26](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/packages/rxjs/src/map.ts#L1-L26) [packages/rxjs/src/create.ts#L25-L30](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/packages/rxjs/src/create.ts#L25-L30) [packages/rxjs/src/util/observable-helpers.ts#L31-L39](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/packages/rxjs/src/util/observable-helpers.ts#L31-L39)
- Cancellation: observer AbortSignal invokes removeObserver → the final observer triggers closeSubscriber → the producer signal aborts → observer state clears → teardown callbacks run last-in-first-out. — [packages/observable-polyfill/src/index.ts#L136-L177](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/packages/observable-polyfill/src/index.ts#L136-L177) [packages/observable-polyfill/src/index.ts#L613-L615](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/packages/observable-polyfill/src/index.ts#L613-L615)
- Independent producer: ColdObservable.subscribe creates ColdSubscriber → invokes its stored init; Symbol composition uses its [create] override, while string map wraps through #asPlatformObservable. — [packages/rxjs/src/cold-observable.ts#L105-L122](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/packages/rxjs/src/cold-observable.ts#L105-L122) [packages/rxjs/src/cold-observable.ts#L202-L205](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/packages/rxjs/src/cold-observable.ts#L202-L205)
- Migration output: runCli parses/validates arguments → createMigrationCliReport plans files → migrateTestSource performs rewrites → any refused result prevents writes → otherwise applyMigrationPlan preflights and writes → CLI emits JSON and an exit code. — [packages/migrate/src/cli.ts#L64-L113](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/packages/migrate/src/cli.ts#L64-L113) [packages/migrate/src/node.ts#L108-L151](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/packages/migrate/src/node.ts#L108-L151) [packages/migrate/src/index.ts#L64-L85](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/packages/migrate/src/index.ts#L64-L85)
- Virtual test: rxTest queues behind a realm lock → executeRxTest verifies Observable and installs virtual time → runs callback until settled → checks expectations/open work → restores the realm → releases the queue. — [packages/test/src/rx-test.ts#L23-L49](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/packages/test/src/rx-test.ts#L23-L49) [packages/test/src/rx-test.ts#L52-L101](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/packages/test/src/rx-test.ts#L52-L101)
- Documentation: currentPath → getDocument → fetchDocument/AsyncSubject → DocViewer doc setter → render → assign contents → prepare title/TOC → load contained elements → swapViews → docRendered. — [apps/rxjs.dev/src/app/documents/document.service.ts#L43-L73](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/apps/rxjs.dev/src/app/documents/document.service.ts#L43-L73) [apps/rxjs.dev/src/app/layout/doc-viewer/doc-viewer.component.ts#L38-L44](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/apps/rxjs.dev/src/app/layout/doc-viewer/doc-viewer.component.ts#L38-L44) [apps/rxjs.dev/src/app/layout/doc-viewer/doc-viewer.component.ts#L141-L149](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/apps/rxjs.dev/src/app/layout/doc-viewer/doc-viewer.component.ts#L141-L149)
- Search: initWorker races delay against first query → creates Worker/WebWorkerClient → sends load-index → worker XHR builds index → search waits on ready → query-index returns a correlated response inside NgZone. — [apps/rxjs.dev/src/app/search/search.service.ts#L27-L54](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/apps/rxjs.dev/src/app/search/search.service.ts#L27-L54) [apps/rxjs.dev/src/app/search/search.worker.ts#L68-L95](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/apps/rxjs.dev/src/app/search/search.worker.ts#L68-L95) [apps/rxjs.dev/src/app/shared/web-worker.ts#L24-L44](https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/apps/rxjs.dev/src/app/shared/web-worker.ts#L24-L44)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
