Directory inventory
Create a scanner that walks the watched tree, applies ignore policy, records relative paths, counts files and directories, and writes repeatable scan reports.
Build a watch-mode CLI that treats filesystem events as prompts to verify state. It scans a directory, fingerprints inputs, persists cache data, normalizes noisy saves, queues rebuilds, and writes reports that explain the session.
$ npm run scan -- watched --metadata --hashCaptures file identity, content hash, and cache input.
$ npm run watch -- watchedStarts the native watcher path.
$ npm run watch -- watched --poll --poll-interval 1000Exercises the fallback watcher with measured work.
$ npm run watch -- watched --debounce 50 --concurrency 2 --rebuild-delay-ms 500Makes rebuild batching and queue limits observable.
$ npm run scan -- watched --metadata --hash --follow-symlinksCompares link treatment with the default scan.
Create a scanner that walks the watched tree, applies ignore policy, records relative paths, counts files and directories, and writes repeatable scan reports.
Store file type, size, timestamps, permissions, device and inode identity, symlink targets, SHA-256 hashes, and persistent cache data.
Receive native watcher events, add polling fallback, normalize uncertainty, group atomic writes, debounce bursts, and verify state through rescans.
Classify added, changed, deleted, and unchanged paths, queue rebuild jobs with bounded concurrency, skip cache hits, clean deleted outputs, and report the session.
The build starts with a tiny command surface and ends with a complete watch-session report. Each phase adds one observable mechanism and one artifact to inspect.
Create the watcher project shell and a CLI that accepts a directory argument.
Build the initial file inventory for the watched tree.
Store size, mtime, mode, inode, device, and file type for each scanned entry.
Compute a content hash for every regular file.
Save the latest inventory to .cache/index.json and load it on the next run.
Compare the current inventory against the cached inventory and classify paths.
Receive live filesystem events from the watched directory tree.
Support polling mode with --poll.
Detect editor-style temporary write and rename patterns as one logical file change.
Group rapid events into one rebuild cycle after the event stream settles.
Run rebuild jobs under a concurrency limit.
Skip unchanged files during rebuild.
Define and implement policy for symlinks, unreadable files, and special files.
Close watchers and save cache state on SIGINT and SIGTERM.
Produce a final Markdown report for a complete watch session.
Lab 05 treats reports as build output. The learner can inspect the scan baseline, cache load, diff reasons, raw events, logical groups, queue pressure, rebuild decisions, shutdown state, and the final watch report.
scan.jsonbaseline inventory, metadata, hash, cache timing, and scan errorsdiff.jsonadded, changed, deleted, unchanged, and reason fieldsevents.jsonlraw native or polling watch events in append orderlogical-events.jsonatomic write groups and verified final statebatches.jsonldebounced rebuild batches with affected pathsqueue.jsonlactive and pending rebuild queue samplesrebuilds.jsonlcache hits, misses, rebuilt paths, and deleted outputswatch-state.jsonwatch mode, poll counters, registrations, and event totalsshutdown.jsonsignal, cleanup, cache save, and queue state at exitwatch-report.mdthe final session report from scan through shutdownSwitch between one-reader pricing and team licenses for up to 25 team members.
Volume I as EPUB, light/dark PDFs, slides, cheatsheets, and future updates.
All Labs plus the downloadable Volume I bundle in one purchase. Save $9.99 vs buying separately.
Seven long-form builds: recorder, binary store, stream workbench, resolver, watcher, task runtime, and protocol gateway.
Volume I files, slides, cheatsheets, and updates for a small engineering team.
Node Runtime Labs plus the downloadable Volume I bundle in one team license.
Seven long-form builds for onboarding, study groups, and internal training.
The bundle includes seven runtime projects covering process observation, binary storage, streams, module resolution, file watching, async orchestration, and custom protocols.