Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Add a
--streamsflag to the forks CLI and passSTREAMS_ENABLED=trueto tests to start worker message streamsIntroduce a
--streamsCLI flag, plumboptions.streamsthrough to setprocess.env.STREAMS_ENABLED, exposeconfig.streamsEnabled, and startworker.worker.startStream(typeofStream.Message)in tests when streams are enabled. Update help and README accordingly.📍Where to Start
Start with
mainand flag parsing in forks/cli.ts, then reviewrunForkTestfor environment propagation andstreamsEnabledin forks/config.ts, followed by the test setup in forks/forks.test.ts.📊 Macroscope summarized 24c219c. 4 files reviewed, 8 issues evaluated, 7 issues filtered, 0 comments posted
🗂️ Filtered Issues
forks/cli.ts — 0 comments posted, 2 evaluated, 2 filtered
console.debugis temporarily overridden to suppress output duringcleanForksLogs, but it is restored only on the success path. IfcleanForksLogsthrows, the restoration line is skipped, leavingconsole.debugpermanently muted for the remainder of the process. Use a try/finally to restoreconsole.debugon all paths. [ Out of scope ]getForkCount()returns the total number of files currently inlogs/cleaned, and in the test loop this value is added tostats.forksDetectedand used to classify the current run. This causes double-counting across runs and marks subsequent runs as having forks even if the current run produced none. Fix by counting only new files produced in the current run (delta since previous count), or by isolating/clearing the cleaned directory per run, or by deriving the count directly from the current run’s output files rather than the global directory total. [ Out of scope ]forks/utils.ts — 0 comments posted, 4 evaluated, 4 filtered
applyPresetToNodedoes not validate or clamp the preset ranges. Ifpreset.delayMax < preset.delayMinorpreset.jitterMax < preset.jitterMin, the computeddelay/jittercan be negative. Ifpreset.lossMin/lossMaxare outside 0–100 orlossMax < lossMin, the computedlosscan be negative or >100. These values are then passed tonode.addJitter(delay, jitter)andnode.addLoss(loss), which can produce invalid netem rules or throw at runtime. [ Low confidence ]validateContainersthrows inside thetrywhen!node.ip || !node.veth, but immediately catches its own throw and rethrows a different error. This masks the original, more specific message ("has no IP address") and any other underlying errors, always reporting "is not running". Also, the constructed message mentions IP even whenvethis missing, which is misleading. Net effect: incorrect error reporting and loss of diagnostic detail. [ Low confidence ]startChaosusespreset.intervaldirectly insetIntervalwithout validation. Ifinterval <= 0, negative,NaN, or extremely small, Node will schedule the callback as quickly as possible (effectively 0 ms), causing excessive CPU usage and log spam;NaNcoerces to 0 as well. There is no guard to prevent this. [ Low confidence ]clearChaosonly callsnode.clearLatency()butstartChaosapplies both jitter/delay (addJitter) and loss (addLoss). IfclearLatencydoes not clear loss rules, packet loss persists after clearing, violating teardown symmetry and leaving residual effects. [ Low confidence ]workers/manager.ts — 0 comments posted, 2 evaluated, 1 filtered
appendFile(...)is fire-and-forget usingvoidand has no.catchorawait. If the write fails (invalid path, permissions, disk full), Node may emit an unhandled rejection and the failure is silently ignored, leaving the.envfile inconsistent. Add explicitawaitwith try/catch or attach a.catchhandler to ensure failures are handled and reported. [ Low confidence ]