Repository navigation
impl(027): increment 7, headless Chromium - #141
Conversation
AI review (no-findings)Reviewing the diff: new headless Chromium test runner wired through
Makefile – nested quotes in shell substitution No bugs or security issues found. {"head": "3ccc154d57028b90464d0d0eb598d4165e7d1632", "verdict": "no-findings", "findings": []}Subject: 1eaaab3...3ccc154, diff digest 95f53c295f10ea936e84f1bf52e4fa3fd75642a950f43d2d01d5315b210a50a2, 1 call(s). An AI comment is not an approval. |
1eaaab3 to
02297d2
Compare
3ccc154 to
a299f00
Compare
AI review (findings)Reviewing the diff for the headless Chromium conformance runner addition. Findings1.
|
02297d2 to
7251222
Compare
a299f00 to
ede887b
Compare
AI review (no-findings)Reviewing the diff carefully across all changed files. chromium.mjs — new loopback server + Chromium timing harness:
run.mjs —
wasm-check.mjs —
Makefile / package files — no issues found. Pin is exact ( Nothing rises to the level of a bug or security problem. {"head": "ede887bc3c81431d0c406ea25359d718f8ea6574", "verdict": "no-findings", "findings": []}Subject: 7251222...ede887b, diff digest dcc8bd6d644970188588612757769c1c0bfc7db0c842ae48c3214ae87cd65cbf, 1 call(s). An AI comment is not an approval. |
f5d267b to
92d4d9a
Compare
ede887b to
385c040
Compare
AI review (no-findings)Reviewing the PR, which adds headless Chromium testing for WebAssembly conformance via
Makefile
No bugs, security issues, or inconsistencies found. {"head": "385c0403387a532123d6e10552c14d3c298d7675", "verdict": "no-findings", "findings": []}Subject: 3556d24...385c040, diff digest dcc8bd6d644970188588612757769c1c0bfc7db0c842ae48c3214ae87cd65cbf, 1 call(s). An AI comment is not an approval. |
AI review (findings)Reviewing the diff: a new headless Chromium adapter ( 1. Double URL-decoding in path = decodeURIComponent(new URL(req.url, 'http://x').pathname);
2. adapter.close = async () => {
await browser.close();
server.close(); // ← no await / callback
};
await new Promise((r) => server.close(r));No other bugs, security problems, or inconsistencies found. The traversal guard in {"head": "385c0403387a532123d6e10552c14d3c298d7675", "verdict": "findings", "findings": [{"path": "tools/rustev-conformance/js/chromium.mjs", "line": 33, "summary": "URL pathname is decoded twice: `new URL(...).pathname` already normalises percent-sequences, so the subsequent `decodeURIComponent` produces unexpected double-decoding (e.g. `%252F` → `/`); traversal guard still holds, but the behaviour is inconsistent."}, {"path": "tools/rustev-conformance/js/run.mjs", "line": 282, "summary": "`server.close()` is called without a callback or await in `adapter.close`, so teardown is non-deterministic and the process could hang if any connection is still open when the adapter is closed."}]}Subject: 3556d24...385c040, diff digest dcc8bd6d644970188588612757769c1c0bfc7db0c842ae48c3214ae87cd65cbf, 1 call(s). An AI comment is not an approval. |
Spec 031 increment 1: the facade crate `rustev`, its boundary rules, and `rustev-pkg-lodging` and the facade joining the release family. - `integrations/rustev/` (new, crate `rustev`): `#![forbid(unsafe_code)]`, no binary. `rustev::contract` and `rustev::decision_core` always (3.2.1); features `runtime`, `eval`, `rules`, `remote-http` (the four whose crates are in this release, 3.4), each `dep:` exactly one optional dependency and gating one module named after it; `default = []`; documented with module, crate and subset (3.2.5). - `tests/public_items.rs`: the source is only those re-exports; each feature enables exactly its one `dep:`; `default` is empty; every feature is documented. - `tests/plan_ids.rs` (3.7): both reference plans compiled through `rustev::decision_core` from the conformance suite's pinned `plan check` fixtures equal the plan identities the CLI goldens pin. Passes with no feature and with all features. - `tools/rustev-boundaries` (3.3): `FacadeIntegration` (an integration dependency of the facade that is not optional, not normal, or not enabled by exactly one feature), `DependsOnFacade` (any workspace crate, any dependency kind), `FacadeDefault` (non-empty default), `FacadeFamily` (the facade naming an ecosystem, HTTP or binding family itself), and the facade's no-feature graph checked transitively like the pure crates. Integration crates still may not depend on one another. Eight synthetic-metadata fixtures. - `tools/rustev-release`: - `release-set.json`: `rustev-pkg-lodging` in layer 3 (uploading after the CLI it dev-depends on, as support-routing does); `rustev` alone in a new last layer, uploading last; lodging's exclusion removed. - policy: only the facade may declare features, each exactly one optional normal dependency on a release member (I-3: a feature for a crate outside the release fails), and a non-empty default fails (`FacadeFeature`); the facade's layer is the last one and the set refuses a facade sharing it or not uploading last. Tests for each; three existing tests that used lodging as their excluded example now use `rustev-boundaries`. - `archive-policy.json`: the reviewed file lists of both new archives (equal to `cargo package --list`, which the existing test checks). - `packages/rustev-pkg-lodging`: family metadata, `publish = ["crates-io"]`, `include`, `LICENSE`, workspace dependencies (031 amends 008's out-of-scope publication). Its tests pass unchanged. - Workspace `Cargo.toml`: the two packages as exact-pinned workspace dependencies. - Spec 031: `integrations/rustev/` established (no longer planned), an `extends` edge for lodging's `LICENSE`, implementation record. Later increments: subset jobs, MSRV and semver checks, SBOMs, the changelog, the extended dry run and the release workflow. Local verification (macOS arm64): `cargo test -p rustev` (with no feature and with `--all-features`), `cargo test -p rustev-boundaries` (28), `cargo test -p rustev-release` (all pass, manifests 17), `cargo test -p rustev-pkg-lodging`, `make boundaries`, `cargo clippy --workspace --all-targets -D warnings` and `-p rustev --all-features`, `cargo fmt --check`, `make gate`, `bash scripts/check-authored-content.sh`. Review round 1 (3 findings: 1 fixed, 2 answered in the diff): 1. "The last-layer test calls `check_manifests`, but the message comes from `check_set`." `check_manifests` begins with `let mut v = check_set(set);`, so it carries that verdict; the test passed locally. A comment at the test now says so. 2. A facade feature naming a crate outside the release produced two violations (not a member, and not a dependency). Fixed: the membership violation is the only one (`continue`), and the test now asserts exactly one violation with `only()`. 3. "`README.md` is not in the facade's or lodging's archive." It is: Cargo adds the workspace `README.md` that `readme.workspace` names regardless of `include`, `cargo package --list -p rustev` prints it, and `tests/archives.rs` (`the_reviewed_lists_equal_cargo_package_list`) checks the reviewed lists against that output and passes. Both manifests now say so beside `include`. Review round 2 (2 findings, fixed): 1. A workspace crate depending on the facade was reported twice (`DependsOnIntegration`, since the facade lives under `integrations/`, and `DependsOnFacade`). A dependency on the facade is now `DependsOnFacade` alone; the fixture uses `rustev-eval` (which no other rule restricts) and asserts exactly that one violation for normal, dev and build dependencies. The "integration crates still may not depend on one another" fixture now has a second integration crate depending on the remote binding and asserts exactly `DependsOnIntegration`. 2. `every_feature_is_documented` indexed `entries[0]`; a feature enabling nothing now fails with a message naming it. Review round 3 (2 findings, fixed): `tests/public_items.rs` no longer parses `Cargo.toml` by hand; it reads the facade's features from `cargo metadata --no-deps` (Cargo's own parse), and compares the declared features with the gated modules as sorted sets, so neither file's order matters. Rebased onto `main` after #138 to #141 merged (derived shards regenerated). Review round 4 (1 finding, fixed): the facade's archive bounds (128 KiB compressed, 256 KiB unpacked) were looser than lodging's although the facade holds less. They are now 64 KiB compressed and 128 KiB unpacked, the ceilings of the other small library crates: its archive is `src/lib.rs`, the workspace README and LICENSE (16.5 KB together), the manifests and a `Cargo.lock` of its all-features graph (about 25 KB). The release candidate measures every archive against these bounds and fails on any excess.
Spec 027 increment 7, second change: the WebAssembly package in headless Chromium (3.10.5, 3.11.3, 3.13.3).
tools/rustev-conformance/js/package.json:playwright-coreexact-pinned at 1.63.0 (no dependencies;npm audit signaturescovers it), which fixes the Chromium build;make bindingsinstalls that version's headless shell.tools/rustev-conformance/js/chromium.mjs time <pkg> <out>: cold instantiation as 3.10.5 defines it (module bytes in memory to the first successfulversion()), 3 discarded warm-up runs then 21 measured, each in a fresh browser process, the page served from a loopback server holding only the package directory (paths outside it refused). Writes browser version, samples, median and p95; prints the median.wasm-check.mjs:--chromium-record <file>records those in the measurement document (chromium,chromium_instantiation_mswith samples and p95); its median must equal the gated--chromium-ms.run.mjs: the WebAssembly adapter now turns each case into one plain call (wasmCall, bytes as base64) run by one self-contained executor (executeWasm), so identical code runs in Node and in a Chromium page.run.mjs chromium <pkg>runs every WebAssembly case in Chromium. A replay's synchronous resolver answers from the case's store items, exactly as before.Makefile(bindings): installs the headless shell, measures Chromium, passes the median and record towasm-check.mjs, and runs the conformance cases in Chromium after Node.#140 has merged; this PR is rebased onto
main.Local verification (macOS arm64):
make bindingspasses end to end: WebAssembly conformance 23/23 in Node and 23/23 in Chromium 153.0.8010.12 (headless shell), Chromium instantiation median 3.1 ms and p95 3.3 ms (budget 100 ms), Node median 3.7 ms, sizes raw 2,216,152 / gzip 763,059 / Brotli 543,437, 27 native tests, native conformance 34/34 on the local build and on the fresh install. That run preceded the rebase onto #140's review fixes, which touch onlyplatform-packages.mjsand were verified there.make gate;bash scripts/check-authored-content.sh.Review round 1 (3 findings, fixed):
undefined(which a page receives asnull) and stayedundefinedin Node. Both cases already read asNone(wasm-bindgen'sisLikeNonetests both), which is why all 23 cases passed in Chromium, butwasmCallnow writesnullitself for--executionand--host-cap-ms, so Node and the page receive the same value, with a comment saying why./%E0%A4%A).Rebased onto #140's review rounds 2 and 3. After the fixes:
run.mjs wasm23/23 andrun.mjs chromium23/23,chromium.mjs timemedian 3 ms with version 153.0.8010.12 recorded.