CodeVetter · Repo Unpack · Behavior traces
ReactiveX/rxjs
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.
- 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.
- Cancellation: observer AbortSignal invokes removeObserver → the final observer triggers closeSubscriber → the producer signal aborts → observer state clears → teardown callbacks run last-in-first-out.
- Independent producer: ColdObservable.subscribe creates ColdSubscriber → invokes its stored init; Symbol composition uses its [create] override, while string map wraps through #asPlatformObservable.
- 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.
- 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.
- Documentation: currentPath → getDocument → fetchDocument/AsyncSubject → DocViewer doc setter → render → assign contents → prepare title/TOC → load contained elements → swapViews → docRendered.
- 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.