Local incremental DAG task execution with cache and recovery
moon update
moon build --target js
moon run cmd/main --target js -- examples/request.json # plan a graph from a JSON request
node _build/js/debug/build/cmd/main/main.js examples/request.json
node scripts/execute.mjs examples/codegen/workflow.json WORKSPACE # execute a workflow for real
node scripts/execute.mjs --plan examples/codegen/workflow.json WORKSPACE # hash and plan, execute nothing
node scripts/execute.mjs --why test examples/codegen/workflow.json WORKSPACE # explain one task against the cache
node scripts/execute.mjs --status WORKSPACE # summarize the last run's journal
node scripts/execute.mjs --prune examples/codegen/workflow.json WORKSPACE # also delete outputs no task declares any more
node scripts/execute.mjs --target compile examples/codegen/workflow.json WORKSPACE # only compile and what it needsmoon add 123123213weqw/moon_taskforge@0.10.0import {
"123123213weqw/moon_taskforge" @engine,
"moonbitlang/core/json",
}fn example(request : Json) -> Json raise {
@engine.execute(request)
}| Scenario | Workflow | What the passes show |
|---|---|---|
| examples/codegen | generate a model from a schema → bundle → test | first run executes all three; the second is fully cached with reasons; a schema change rebuilds the whole chain and the regenerated model breaks the test (captured output, rerun: ["test"]); fixing the source reruns only compile and test |
| examples/docs | render pages → index + link check → package | a broken link fails the check, blocks packaging and leaves no artifact while the index still completes; fixing the page reruns render and everything downstream; the clean run is idempotent |
| examples/assets | six thumbnails (one slow, one with a space in its path) → manifest, concurrency 2 | waves never exceed 2; the slow asset times out on both attempts, fails and blocks the manifest; after the fix only that asset and the manifest run; a deleted artifact rebuilds only its producer and the manifest stays cached; a forged cache digest is distrusted and rebuilt |
moon check --deny-warn --target js # zero warnings on every backend
moon test --target js # 33 tests: 30 fixture cases + property tests
moon test --target wasm
moon test --target wasm-gc
moon test --target native # requires a C compiler
moon build --target js
node scripts/check.mjs # the 30 fixtures through the real CLI
python -B scripts/reference.py # 100 task graphs vs an independent Python oracle
node scripts/integration.mjs # real subprocesses: cache, invalidation, failure, timeout, retry, env privacy, tool hashing
node scripts/scenarios.mjs # the three scenarios, 36 checks
python -B scripts/bench.py --check # scale: 1000-task plans, closure-exact invalidation
python -B scripts/fixtures.py --check # generated tests and usage guide match tests/cases.json
python -B scripts/stats.py # source statistics by category
sh scripts/consume.sh REGISTRY_VERSION # fresh module consumes the published packagefn digest(text : String) -> String