Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
with:
submodules: true
- name: CI reporting contracts
run: node --test .github/scripts/test_prepare_test_reports.cjs
run: node --test .github/scripts/test_prepare_test_reports.cjs tools/test_measured_report.cjs
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
Expand Down
70 changes: 70 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2056,6 +2056,76 @@ There are a few important things to keep in mind when working on the project:
execution time, and total wall time separately: precompilation makes the execution phase much faster but adds
preparation that is only recovered by a sufficiently large or repeated filter.

### Local measured execution bundles

`tools/measured-report.cjs` captures narrowly selected existing tests; it does not change the
configuration classification report or run a compatibility campaign. Use the repository toolchain
and Node 22.14.0 (strictly enforced for installed-package controls); the API suite's independent
target version is recorded from the vendored `NODE_VERSION`, validated against its configuration
by the existing harness. Run from the checkout with no concurrent source edits:

```sh
node tools/measured-report.cjs plan tmp/measured api-1 api parallel__test_path_basename_js
node tools/measured-report.cjs run tmp/measured api-1
node tools/measured-report.cjs plan tmp/measured installed-1 installed node_modules_app__popular_pure_js__test_01_cjs_utilities_cjs
node tools/measured-report.cjs run tmp/measured installed-1
node tools/measured-report.cjs plan tmp/measured bundled-1 bundled ajv/test-01-basic.js
node tools/measured-report.cjs run tmp/measured bundled-1
node tools/measured-report.cjs assemble tmp/measured
node tools/measured-report.cjs verify tmp/measured
node tools/measured-report.cjs render tmp/measured/report.json
```

`plan` discovers generated cases before shared guest setup; tag/static-test filters are unsupported.
It retains fixture/configuration and lockfile inputs, including a superset of the API harness's
vendored helpers, fixtures and ESM siblings. `run` refuses changed inputs or toolchain versions
and records individual retries and prerequisite,
Node-control and guest phases, along with raw CTRF and stdout/stderr. It never rewrites an execution;
use a new execution ID for a rerun. Installed planning and execution also refuse fixture files absent from retained inputs, including
untracked/ignored helpers or a local `node_modules` tree, rather than copying them into evidence.
Bundled runs use a fresh `tmp/measured-<execution-id>` directory
and the root Cargo target cache; they build the current generator and execute the existing fixture's
Rollup output with Node and Wasmtime. Each execution uses a unique generated Cargo library name
while sharing the dependency cache, so builds cannot overwrite another fixture's output before
publication. The execution-owned `component.wasm` copy is hashed, executed and retained. No
producer-owned build lock needs recovery after interruption.
Execution-specific Cargo outputs accumulate in the shared target cache. When no builds are
running, reclaim that regenerable WASM cache with `cargo clean --target-dir target --target wasm32-wasip2`;
this does not remove the authoritative component copies retained in evidence bundles.
Only use offline fixtures without credentials.

The version-1 bundle's `plan.json` declares expected executions/cases; `selection.json` selects
whole executions, independently of their observed outcomes. An optional final JSON metadata-file
argument to `plan` sets `consumer`, `artifactRole`, `lane`, `workflowRun`, `workflowAttempt`, and
`behaviorCases`. Coverage defaults to `unclassified`, which never qualifies as properly implemented.
After inspecting the selected assertions, declare behavior case IDs explicitly, for example
`{"behaviorCases":["ajv/test-01-basic.js"]}` for the bundled smoke. Unknown IDs are rejected.
Discovery does not mechanically classify import-only checks: reviewers must exclude those from
behavior declarations. A declaration is audited input, not automatic proof of assertion quality.
Same-lane/profile reruns are retained but not selected automatically: explicitly select complete
execution IDs with `select <bundle> <id>...`. A missing selected rerun remains incomplete; it never
borrows earlier green cases. Assembly and verification reject overlapping selected case keys across
lanes instead of counting them twice or choosing a preferred outcome. Select whole non-overlapping
executions; unselected evidence remains retained. Existing CI artifact selection is unchanged.

Each execution has an identity-bound `component.json`, immutable attempt `start.json`/`finish.json`
records and numbered phase records/logs. Missing completion stays `not-run`; a failed prerequisite
is `blocked`, not a guest failure. Configured or runtime skips retain their reason. Sealed execution
`evidence.json` and bundle `checksums.json` detect missing/corrupted evidence; these are integrity
checks, not signatures. Assembly rejects duplicate/conflicting identities and cross-artifact mixing.

Normalized `report.json` is authoritative; Markdown uses only that JSON and never inserts fresh
timestamps. Reports separate all six outcomes, non-flaky/flaky passes and attempt totals. Fail-then-pass
is `pass` with `flaky: true`, excluded from every "properly implemented" numerator but kept in the
selected denominator. Only explicitly declared non-flaky behavior assertions with sealed completed
evidence qualify; unclassified checks never qualify. Reviewers must exclude import-only checks from
behavior declarations; discovery does not detect their assertion quality. Incomplete selected evidence
is explicit. These counts describe selected
local assertions, not full Node support, Golem recovery/durability or shipped qualification.

The bundle is portable local evidence, not an uploader or permanent archive. Keep raw bundles out
of Git. Test the producer contract with `node --test tools/test_measured_report.cjs`.

## Acknowledgements

The builtin JS modules are based on the work of several other projects:
Expand Down
Loading
Loading