Explicit CI test-report inventory and retry reconciliation
moon update
moon run scripts/workflow-demo.mbtx wasm| Need | Entry point | Requirements |
|---|---|---|
| Embed reconciliation in a MoonBit project | Library setup and public API | Validated MoonBit toolchain; dependency resolution/cache |
| Inspect reports and save replayable evidence | moon run scripts/workflow-demo.mbtx wasm from the source/package root | moonrun host; no GitHub account, Python or Java |
| Use a native executable without compiling | GitHub releases and platform/checksum instructions | Exact supported release OS/architecture; preview limitations apply |
| Contribute, benchmark or investigate faults | Development and validation from a Git checkout | Git and the tools specified by each development workflow |
moon run --target wasm cmd/moontestledger -- archive examples/repetitions/plan-a.json examples/repetitions/bundle-a.json > repeat-a.json
moon run --target wasm cmd/moontestledger -- archive examples/repetitions/plan-b.json examples/repetitions/bundle-b.json > repeat-b.json
moon run --target wasm cmd/moontestledger -- repetitions repeat-a.json repeat-b.jsonmoon run --target wasm cmd/moontestledger -- archive examples/continuation/plan.json examples/continuation/bundle.json > failed.json
moon run --target wasm cmd/moontestledger -- retry failed.json examples/continuation/reports.json > pending.json
moon run --target wasm cmd/moontestledger -- verify pending.json
moon run --target wasm cmd/moontestledger -- append pending.json examples/retry/retry-only-bundle.json > recovered.json
moon run --target wasm cmd/moontestledger -- verify recovered.jsonmoon run scripts/render-demo.mbtx wasmmoon run --target wasm cmd/moontestledger -- html evidence.json > report.htmlmoon run --target wasm cmd/moontestledger -- archive examples/retry/plan.json examples/retry/missing-bundle.json > initial.json
moon run --target wasm cmd/moontestledger -- archive examples/retry/plan.json examples/retry/retry-only-bundle.json > retry.json
moon run --target wasm cmd/moontestledger -- merge initial.json retry.json > combined.json
moon run --target wasm cmd/moontestledger -- verify combined.jsonmoon run --target wasm cmd/moontestledger -- archive examples/history/before-plan.json examples/history/before-bundle.json > before.json
moon run --target wasm cmd/moontestledger -- archive examples/history/after-plan.json examples/history/after-bundle.json > after.json
moon run --target wasm cmd/moontestledger -- compare before.json after.jsonmoon run --target wasm cmd/moontestledger -- archive examples/upstream/plan.json examples/upstream/bundle.json > evidence.json
moon run --target wasm cmd/moontestledger -- verify evidence.jsonmoon version --all
moon update
moon run --target wasm cmd/moontestledger -- audit examples/upstream/plan.json examples/upstream/bundle.jsonmoon run --target wasm cmd/moontestledger -- audit examples/upstream/plan.json examples/upstream/missing-bundle.json
moon run --target wasm cmd/moontestledger -- audit examples/retry/plan.json examples/retry/bundle.json
moon run --target wasm cmd/moontestledger -- audit examples/retry/plan.json examples/retry/bundle.json --deny-recovered
moon run scripts/e2e.mbtx wasmmoon run --target wasm cmd/moontestledger -- capture examples/upstream/bundle.json{
"schema": 1,
"run_id": "ci-1042",
"revision": "your-commit",
"reports": [{
"id": "payments-1",
"environment": "linux-node22",
"shard": "payments",
"attempt": 1,
"cases": [{"classname": "checkout.payment", "name": "charge_once"}]
}]
}{
"schema": 1,
"documents": [{
"id": "payments-1",
"run_id": "ci-1042",
"revision": "your-commit",
"environment": "linux-node22",
"shard": "payments",
"attempt": 1,
"path": "reports/payments.xml"
}]
}moon add jhshuai/moontestledger@0.1.0// moon.work
members = ["MoonTestLedger", "consumer"]// consumer/moon.mod: alongside the consumer's own name/version
import { "jhshuai/moontestledger@0.1.0" }
// consumer/moon.pkg
import { "jhshuai/moontestledger" }fn reconcile(plan_json : String, binding : @moontestledger.ReportBinding,
xml : String) -> String raise @moontestledger.InputError {
let plan = @moontestledger.decode_plan(plan_json)
let ledger = @moontestledger.Ledger::new(plan)
let report = @moontestledger.parse_junit(xml, report_id=binding.id)
ledger.ingest({ binding, report })
@moontestledger.encode_summary(ledger.summary())
}| Exit | Meaning |
|---|---|
| 0 | Complete; all final cases passed, skipped or recovered, according to policy |
| 1 | Complete with final failure/error, unresolved failure followed by skip, or denied recovery |
| 2 | Invalid plan, bundle, XML, arguments or file I/O; diagnostic on standard error |
| 3 | Missing report or expected testcase; incomplete evidence takes precedence |
moon run scripts/render-demo.mbtx wasm
moon run --target wasm cmd/moontestledger -- check-integrity output/jest-evidence.json output/jest-integrity.jsonmoon run scripts/render-demo.mbtx wasm
moon run --target wasm cmd/moontestledger -- detach output/jest-evidence.json output/jest-pack
moon run --target wasm cmd/moontestledger -- verify-pack output/jest-pack
moon run --target wasm cmd/moontestledger -- restore-pack output/jest-pack > restored.jsonmoon run --target wasm cmd/moontestledger -- collect examples/upstream/collection.json examples/upstream > collected-jest.json
moon run --target wasm cmd/moontestledger -- verify collected-jest.json
moon run --target wasm cmd/moontestledger -- collect examples/retry/collection.json examples/retry > collected-retry.json
moon run --target wasm cmd/moontestledger -- verify collected-retry.jsonmoon fmt
moon fmt scripts/e2e.mbtx scripts/verify.mbtx scripts/check-encapsulation.mbtx scripts/render-demo.mbtx scripts/output-e2e.mbtx scripts/check-consumer.mbtx scripts/delivery-e2e.mbtx
moon info --target wasm
moon check --target all --deny-warn
moon build --target all --deny-warn
moon test --target all --deny-warn
moon run scripts/e2e.mbtx wasm
moon run scripts/e2e.mbtx nativefn analyze_repetitions(inputs : ArrayView[Evidence], limits? : Limits) -> Repetitions raise InputErrorfn encode_evidence(ledger : Ledger, deny_recovered? : Bool, limits? : Limits) -> String raise InputErrorfn parse_junit(source : String, report_id? : String, limits? : Limits) -> ParsedReport raise InputErrorfn prepare_retry(evidence : Evidence, reports : ArrayView[RetryReport], limits? : Limits) -> Evidence raise InputErrorfn review_plan(before : RunPlan, proposed : RunPlan, limits? : Limits) -> PlanReview raise InputErrorInstall
Download zipExplicit CI test-report inventory and retry reconciliation