Offline, read-only simulation of staged device-update cohorts. It does not dispatch, retry, pause, or resume any real update.
This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+.
Run the checked-in example
node bin/ota-cohort-planner.mjs --root examples/pass --policy policy.json --snapshot snapshot.json
node bin/ota-cohort-planner.mjs --root examples/fail --policy policy.json --snapshot snapshot.json
npm run checkRead the result
One JSON report goes to stdout. Exit 0=pass/ready, 1=fail/pause, 2=incomplete/unknown or invalid configuration. Invalid options, root, or policy leave stdout empty. Unreadable/invalid snapshot emits an incomplete report. Both paths are realpath-confined beneath --root, JSON uses strict UTF-8 and rejects duplicate decoded keys, and no files are written.
Scope
Policy ≤65,536 bytes; snapshot ≤1,048,576 bytes; at most 1,000 devices, 20 stages, 100 compatible hardware entries, JSON depth ≤16, and 5,000 ms evaluation with an injected monotonic clock. Capacities and observed/recovery counts are bounded by 1,000. N is accepted and N+1 rejected for each bound. This is a plan from supplied evidence, not a firmware compatibility proof, live health check, or update dispatcher.