# Behavior traces — parcel-bundler/parcel

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

# Behavior traces — parcel-bundler/parcel

Scanned commit 59484858a1a0bcbb71f74088956bb437a2db6505 (2026-02-01). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The source walks establish production startup, asset-to-output processing, watch rebuilds, lazy HTTP requests, and persistence restoration. Each trace names the actual execution order and relevant conditional branches. Builds and serving communicate through reporter events rather than a separate application backend. These are source-derived traces; no runtime behavior was exercised.
- Production startup follows bin.js → cli.runCommand() → run() → normalizeOptions() → new Parcel() → Parcel.run() → _init(); initialization awaits sourcemaps/Rust, resolves options, loads configuration, initializes workers/cache/reporters, then restores RequestTracker. — [packages/core/parcel/src/bin.js#L5-12](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/parcel/src/bin.js#L5-L12) [packages/core/parcel/src/cli.js#L273-298](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/parcel/src/cli.js#L273-L298) [packages/core/parcel/src/cli.js#L396-408](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/parcel/src/cli.js#L396-L408) [packages/core/core/src/Parcel.js#L97-163](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/Parcel.js#L97-L163)
- The build enters _build() → createParcelBuildRequest() → createBundleGraphRequest() → createAssetGraphRequest(); AssetGraphRequest.build() traverses queued requests, then runAssetRequest() dispatches AssetRequest → worker.runTransform() → Transformation.run(). — [packages/core/core/src/Parcel.js#L284-297](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/Parcel.js#L284-L297) [packages/core/core/src/requests/ParcelBuildRequest.js#L62-74](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/ParcelBuildRequest.js#L62-L74) [packages/core/core/src/requests/BundleGraphRequest.js#L100-115](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/BundleGraphRequest.js#L100-L115) [packages/core/core/src/worker.js#L93-106](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/worker.js#L93-L106)
- For a fresh bundle graph, BundlerRunner.bundle() calls loadConfigs(), gets the bundler, converts AssetGraph, calls bundler.bundle(), conditionally calls bundler.optimize() in production, then names bundles and applies runtimes; an eligible previous graph instead receives changed asset updates. — [packages/core/core/src/requests/BundleGraphRequest.js#L261-301](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/BundleGraphRequest.js#L261-L301) [packages/core/core/src/requests/BundleGraphRequest.js#L329-355](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/BundleGraphRequest.js#L329-L355) [packages/core/core/src/requests/BundleGraphRequest.js#L411-433](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/BundleGraphRequest.js#L411-L433)
- Output follows ParcelBuildRequest.run() → WriteBundlesRequest → PackageRequest → PackagerRunner.getBundleResult() → package() → optimize() → WriteBundleRequest; bundles without hash references can begin writing before complex name hashes are assigned. — [packages/core/core/src/requests/ParcelBuildRequest.js#L96-106](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/ParcelBuildRequest.js#L96-L106) [packages/core/core/src/requests/WriteBundlesRequest.js#L103-155](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/WriteBundlesRequest.js#L103-L155) [packages/core/core/src/PackagerRunner.js#L388-423](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/PackagerRunner.js#L388-L423) [packages/core/core/src/requests/WriteBundleRequest.js#L132-160](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/WriteBundleRequest.js#L132-L160)
- Watch startup calls watch() → _getWatcherSubscription() → report(watchStart) → queued _startNextBuild(); later filesystem events call respondToFSEvents(), abort an active build when invalidated, and enqueue one replacement build when none is waiting. — [packages/core/core/src/Parcel.js#L212-236](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/Parcel.js#L212-L236) [packages/core/core/src/Parcel.js#L190-209](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/Parcel.js#L190-L209) [packages/core/core/src/Parcel.js#L401-433](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/Parcel.js#L401-L433)
- An HTTP bundle request follows Server.respond() → serveBundle() → event.requestBundle(); a placeholder adds entry asset IDs and queues a rebuild, while a non-placeholder returns immediately, after which serveDist() serves outputFS content. — [packages/reporters/dev-server/src/Server.js#L160-167](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/reporters/dev-server/src/Server.js#L160-L167) [packages/reporters/dev-server/src/Server.js#L245-295](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/reporters/dev-server/src/Server.js#L245-L295) [packages/core/core/src/Parcel.js#L328-362](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/Parcel.js#L328-L362)
- Persistence follows Parcel._end() → RequestTracker.writeToCache() → serialized results/graph plus inputFS.writeSnapshot(); the next _init() calls RequestTracker.init() → loadRequestGraph(), with a fresh graph used when caching is disabled, missing, or restoration throws. — [packages/core/core/src/Parcel.js#L183-188](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/Parcel.js#L183-L188) [packages/core/core/src/RequestTracker.js#L1346-1389](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/RequestTracker.js#L1346-L1389) [packages/core/core/src/RequestTracker.js#L1410-1418](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/RequestTracker.js#L1410-L1418) [packages/core/core/src/RequestTracker.js#L1443-1485](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/RequestTracker.js#L1443-L1485)
- _build() reports buildSuccess before running validation and checking reporter errors; subsequent exceptions become a reported buildFailure, except BuildAbortError is rethrown. Parcel.run() then shuts down before throwing BuildError for a failure result. — [packages/core/core/src/Parcel.js#L367-398](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/Parcel.js#L367-L398) [packages/core/core/src/Parcel.js#L166-180](https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/Parcel.js#L166-L180)

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)
