From 4741ce25d5f7960e540d53b9b50b2d3d76654a59 Mon Sep 17 00:00:00 2001 From: Ralf Anton Beier Date: Wed, 22 Jul 2026 15:31:51 +0200 Subject: [PATCH] =?UTF-8?q?chore(release):=20v0.4.3=20=E2=80=94=20kilnd=20?= =?UTF-8?q?correctness=20(arg-arity)=20+=20kiln-component=20isolated=20bui?= =?UTF-8?q?ld?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Focused patch, 2 verified artifacts: SR-53 (#443) kilnd no longer invokes param-taking functions with zero-filled args and reports the wrong result as success — arity is enforced fail-loud on every invocation surface; a param-arity-invalid component is rejected at load (matching wasm-tools/wasmtime). SR-54 (#446) kiln-component compiles standalone (`cargo check -p kiln-component`), not only under workspace feature unification. Workspace 0.4.2 -> 0.4.3 (+16 internal path-dep pins + Cargo.lock; `cargo build --workspace --locked` verified green). Re-verified at this commit (4c0fb507), not inherited: - addone invoked with no args ERRORS (was "✓ I32(1)", exit 0); - internal dbl(21) via a zero-param export still returns I32(42); - zero-param _start still completes; - WAST arg-path slice: 589 assertions pass (call/func/fac/call_indirect); - bare `cargo check -p kiln-component` compiles; workspace still green. rivet release status v0.4.3: cuttable (2/2 verified). Statuses are prose-verified (the convention every prior kiln release used; typed `verifies` links remain structurally impossible for `type: requirement` — pulseengine/rivet#721). Trace: skip Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01FcTUZgts331Z1TK3q8YBQj --- Cargo.lock | 40 +++++++++---------- Cargo.toml | 34 ++++++++-------- .../functional-requirements/SR-53.yaml | 4 +- .../functional-requirements/SR-54.yaml | 4 +- 4 files changed, 41 insertions(+), 41 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5ae69742..43ca17ad 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -254,7 +254,7 @@ checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593" [[package]] name = "cargo-kiln" -version = "0.4.2" +version = "0.4.3" dependencies = [ "anyhow", "async-trait", @@ -1260,7 +1260,7 @@ dependencies = [ [[package]] name = "kiln-async" -version = "0.4.2" +version = "0.4.3" dependencies = [ "criterion", "kiln-error", @@ -1268,7 +1268,7 @@ dependencies = [ [[package]] name = "kiln-build-core" -version = "0.4.2" +version = "0.4.3" dependencies = [ "anyhow", "chrono", @@ -1298,7 +1298,7 @@ version = "0.1.0" [[package]] name = "kiln-component" -version = "0.4.2" +version = "0.4.3" dependencies = [ "criterion", "kiln-decoder", @@ -1317,7 +1317,7 @@ dependencies = [ [[package]] name = "kiln-debug" -version = "0.4.2" +version = "0.4.3" dependencies = [ "kiln-error", "kiln-format", @@ -1326,7 +1326,7 @@ dependencies = [ [[package]] name = "kiln-decoder" -version = "0.4.2" +version = "0.4.3" dependencies = [ "criterion", "hex", @@ -1343,11 +1343,11 @@ dependencies = [ [[package]] name = "kiln-error" -version = "0.4.2" +version = "0.4.3" [[package]] name = "kiln-format" -version = "0.4.2" +version = "0.4.3" dependencies = [ "kani-verifier", "kiln-error", @@ -1357,7 +1357,7 @@ dependencies = [ [[package]] name = "kiln-foundation" -version = "0.4.2" +version = "0.4.3" dependencies = [ "criterion", "hashbrown 0.17.1", @@ -1375,7 +1375,7 @@ dependencies = [ [[package]] name = "kiln-host" -version = "0.4.2" +version = "0.4.3" dependencies = [ "kiln-error", "kiln-foundation", @@ -1386,7 +1386,7 @@ dependencies = [ [[package]] name = "kiln-instructions" -version = "0.4.2" +version = "0.4.3" dependencies = [ "kiln-error", "kiln-foundation", @@ -1398,7 +1398,7 @@ dependencies = [ [[package]] name = "kiln-intercept" -version = "0.4.2" +version = "0.4.3" dependencies = [ "chrono", "kani-verifier", @@ -1411,7 +1411,7 @@ dependencies = [ [[package]] name = "kiln-logging" -version = "0.4.2" +version = "0.4.3" dependencies = [ "kiln-error", "kiln-foundation", @@ -1421,7 +1421,7 @@ dependencies = [ [[package]] name = "kiln-math" -version = "0.4.2" +version = "0.4.3" dependencies = [ "kiln-error", "kiln-platform", @@ -1430,11 +1430,11 @@ dependencies = [ [[package]] name = "kiln-panic" -version = "0.4.2" +version = "0.4.3" [[package]] name = "kiln-platform" -version = "0.4.2" +version = "0.4.3" dependencies = [ "criterion", "kiln-error", @@ -1444,7 +1444,7 @@ dependencies = [ [[package]] name = "kiln-runtime" -version = "0.4.2" +version = "0.4.3" dependencies = [ "criterion", "kiln-debug", @@ -1464,7 +1464,7 @@ dependencies = [ [[package]] name = "kiln-sync" -version = "0.4.2" +version = "0.4.3" dependencies = [ "kani-verifier", "kiln-error", @@ -1473,7 +1473,7 @@ dependencies = [ [[package]] name = "kiln-wasi" -version = "0.4.2" +version = "0.4.3" dependencies = [ "kiln-error", "kiln-format", @@ -1487,7 +1487,7 @@ dependencies = [ [[package]] name = "kilnd" -version = "0.4.2" +version = "0.4.3" dependencies = [ "kiln-component", "kiln-debug", diff --git a/Cargo.toml b/Cargo.toml index 4cb75cff..7bcdfaa2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ edition = "2024" rust-version = "1.85.0" license = "MIT" repository = "https://github.com/pulseengine/kiln" -version = "0.4.2" +version = "0.4.3" [workspace.dependencies] @@ -37,22 +37,22 @@ anyhow = "1.0" wit-bindgen = "0.41.0" # Internal crate versions -kiln-error = { path = "kiln-error", version = "0.4.2", default-features = false } -kiln-sync = { path = "kiln-sync", version = "0.4.2", default-features = false } -kiln-format = { path = "kiln-format", version = "0.4.2", default-features = false } -kiln-foundation = { path = "kiln-foundation", version = "0.4.2", default-features = false } -kiln-decoder = { path = "kiln-decoder", version = "0.4.2", default-features = false, features = ["std"] } -kiln-debug = { path = "kiln-debug", version = "0.4.2", default-features = false } -kiln-runtime = { path = "kiln-runtime", version = "0.4.2", default-features = false } -kiln-logging = { path = "kiln-logging", version = "0.4.2", default-features = false } -kiln-instructions = { path = "kiln-instructions", version = "0.4.2", default-features = false } -kiln-component = { path = "kiln-component", version = "0.4.2", default-features = false } -kiln-host = { path = "kiln-host", version = "0.4.2", default-features = false } -kiln-intercept = { path = "kiln-intercept", version = "0.4.2", default-features = false } -kiln-math = { path = "kiln-math", version = "0.4.2", default-features = false } -kiln-platform = { path = "kiln-platform", version = "0.4.2", default-features = false } -kiln-panic = { path = "kiln-panic", version = "0.4.2", default-features = false } -kiln-wasi = { path = "kiln-wasi", version = "0.4.2", default-features = false } +kiln-error = { path = "kiln-error", version = "0.4.3", default-features = false } +kiln-sync = { path = "kiln-sync", version = "0.4.3", default-features = false } +kiln-format = { path = "kiln-format", version = "0.4.3", default-features = false } +kiln-foundation = { path = "kiln-foundation", version = "0.4.3", default-features = false } +kiln-decoder = { path = "kiln-decoder", version = "0.4.3", default-features = false, features = ["std"] } +kiln-debug = { path = "kiln-debug", version = "0.4.3", default-features = false } +kiln-runtime = { path = "kiln-runtime", version = "0.4.3", default-features = false } +kiln-logging = { path = "kiln-logging", version = "0.4.3", default-features = false } +kiln-instructions = { path = "kiln-instructions", version = "0.4.3", default-features = false } +kiln-component = { path = "kiln-component", version = "0.4.3", default-features = false } +kiln-host = { path = "kiln-host", version = "0.4.3", default-features = false } +kiln-intercept = { path = "kiln-intercept", version = "0.4.3", default-features = false } +kiln-math = { path = "kiln-math", version = "0.4.3", default-features = false } +kiln-platform = { path = "kiln-platform", version = "0.4.3", default-features = false } +kiln-panic = { path = "kiln-panic", version = "0.4.3", default-features = false } +kiln-wasi = { path = "kiln-wasi", version = "0.4.3", default-features = false } # Note: Safety level presets should be defined in individual crate Cargo.toml files # as workspace.features is not supported by Cargo diff --git a/safety/requirements/functional-requirements/SR-53.yaml b/safety/requirements/functional-requirements/SR-53.yaml index 933ed5e9..80ff6ef5 100644 --- a/safety/requirements/functional-requirements/SR-53.yaml +++ b/safety/requirements/functional-requirements/SR-53.yaml @@ -2,8 +2,8 @@ artifacts: - id: SR-53 type: requirement title: kilnd rejects an arg-arity mismatch instead of zero-filling params and reporting a wrong result as success - status: implemented - description: 'IMPLEMENTED (PR #460): argument arity is now enforced fail-loud on every invocation surface instead of zero-filling missing params and reporting the wrong result as success (the #412 fabricated-reporting family on the function-invocation surface). (1) The stackless engine''s locals init (kiln-runtime stackless/engine.rs execute_function_body) no longer pads missing params with type-default zeros nor truncates extras — args.len() != declared param count is an Err. (2) kilnd''s execute_traditional_module checks the target export''s declared param count BEFORE engine.execute and errors with an actionable message ("function ''X'' expects N argument(s) but none were supplied; kilnd cannot yet pass wasm function parameters") — no CLI arg-passing flag was added; zero-param entry points still run. (3) The component direct-hosting path resolves the canon lift''s REAL param types into DirectExportTarget.params and the export''s FunctionSignature.params, so the existing validate_function_args arity check fires, and call_direct_export checks param arity alongside its existing result-arity check. (4) A spec-invalid component whose canon lift declares a different param arity than the backing core function is REJECTED at load (from_parsed_internal validates each lift against the live instantiated core module''s signature), matching wasm-tools validate / wasmtime. Verified: param_taking_export_invoked_with_no_args_errors, zero_param_start_still_runs, zero_param_result_export_still_runs, engine_rejects_missing_args_and_computes_correct_answer_with_args (kilnd/tests/arg_arity_tests.rs); direct_export_invoked_with_missing_args_errors, direct_export_with_matching_args_computes_correct_answer, canon_lift_param_arity_mismatch_rejected_at_load (kiln-component/tests/direct_export_arity_tests.rs). Real-binary repro re-run: kilnd mod.wasm --function addone now exits 1 with the actionable message (was "✓ returned I32(1)", exit 0); kilnd --invoke add pc.wasm (mismatched lift) now rejected at load, exit 1. --- kilnd invokes an exported function with ZERO-FILLED arguments when params cannot be supplied and reports the resulting wrong value as SUCCESS (exit 0); argument arity is never checked on either the core-module or component path, and a canon lift with param arity differing from its backing core function is accepted though wasm-tools/wasmtime reject it. Issue #443.' + status: verified + description: 'VERIFIED (PR #460; re-verified on the binary at the v0.4.3 cut commit 4c0fb507: addone no-args ERRORS not I32(1)/success; internal dbl(21) via zero-param export still returns I32(42); zero-param _start completes; WAST arg-path slice 589 assertions pass — call 138/func 192/fac 8/call_indirect 251). IMPLEMENTED (PR #460): argument arity is now enforced fail-loud on every invocation surface instead of zero-filling missing params and reporting the wrong result as success (the #412 fabricated-reporting family on the function-invocation surface). (1) The stackless engine''s locals init (kiln-runtime stackless/engine.rs execute_function_body) no longer pads missing params with type-default zeros nor truncates extras — args.len() != declared param count is an Err. (2) kilnd''s execute_traditional_module checks the target export''s declared param count BEFORE engine.execute and errors with an actionable message ("function ''X'' expects N argument(s) but none were supplied; kilnd cannot yet pass wasm function parameters") — no CLI arg-passing flag was added; zero-param entry points still run. (3) The component direct-hosting path resolves the canon lift''s REAL param types into DirectExportTarget.params and the export''s FunctionSignature.params, so the existing validate_function_args arity check fires, and call_direct_export checks param arity alongside its existing result-arity check. (4) A spec-invalid component whose canon lift declares a different param arity than the backing core function is REJECTED at load (from_parsed_internal validates each lift against the live instantiated core module''s signature), matching wasm-tools validate / wasmtime. Verified: param_taking_export_invoked_with_no_args_errors, zero_param_start_still_runs, zero_param_result_export_still_runs, engine_rejects_missing_args_and_computes_correct_answer_with_args (kilnd/tests/arg_arity_tests.rs); direct_export_invoked_with_missing_args_errors, direct_export_with_matching_args_computes_correct_answer, canon_lift_param_arity_mismatch_rejected_at_load (kiln-component/tests/direct_export_arity_tests.rs). Real-binary repro re-run: kilnd mod.wasm --function addone now exits 1 with the actionable message (was "✓ returned I32(1)", exit 0); kilnd --invoke add pc.wasm (mismatched lift) now rejected at load, exit 1. --- kilnd invokes an exported function with ZERO-FILLED arguments when params cannot be supplied and reports the resulting wrong value as SUCCESS (exit 0); argument arity is never checked on either the core-module or component path, and a canon lift with param arity differing from its backing core function is accepted though wasm-tools/wasmtime reject it. Issue #443.' tags: - kilnd - kiln-component diff --git a/safety/requirements/functional-requirements/SR-54.yaml b/safety/requirements/functional-requirements/SR-54.yaml index 955c2ce7..23cbc640 100644 --- a/safety/requirements/functional-requirements/SR-54.yaml +++ b/safety/requirements/functional-requirements/SR-54.yaml @@ -2,8 +2,8 @@ artifacts: - id: SR-54 type: requirement title: kiln-component compiles standalone (cargo check -p kiln-component), not only under workspace feature unification - status: implemented - description: 'IMPLEMENTED (PR pending): kiln-component failed to compile in isolation on clean main — `cargo check -p kiln-component` errored (E0433 cannot find std; E0609/E0599 for the runtime_engine field, call_direct_export, call_command_entry, link_imports). Root cause: `default = ["kiln-runtime/std"]` enabled the DEPENDENCY''s std but never kiln-component''s OWN `std`/`kiln-execution` features, so the cfg-gated surface vanished; only workspace feature unification hid it, so CI stayed green (the "green CI over a build that only works via unification" class — a consumer depending on kiln-component alone got a build failure). Fix: `default = ["std", "kiln-execution"]` (kiln-execution is a pure cfg flag, no deps, so no dependency-graph change). Verified: bare `cargo check -p kiln-component` compiles; `cargo check --workspace` still green; consumers unchanged (kilnd 6+4+13, kiln-wasi lib 68 pass). SCOPE: fixes the LIB isolated build only. The crate''s TEST/EXAMPLE targets are separately + more deeply rotten (~47 type mismatches + removed-API refs: execute_start, Component.options, ExternType::Function, task_manager, async_) — a larger fix-or-delete cleanup, the remaining half of #446. Issue #446.' + status: verified + description: 'VERIFIED (PR #462; re-verified at the v0.4.3 cut commit 4c0fb507: bare `cargo check -p kiln-component` compiles, workspace still green). kiln-component failed to compile in isolation on clean main — `cargo check -p kiln-component` errored (E0433 cannot find std; E0609/E0599 for the runtime_engine field, call_direct_export, call_command_entry, link_imports). Root cause: `default = ["kiln-runtime/std"]` enabled the DEPENDENCY''s std but never kiln-component''s OWN `std`/`kiln-execution` features, so the cfg-gated surface vanished; only workspace feature unification hid it, so CI stayed green (the "green CI over a build that only works via unification" class — a consumer depending on kiln-component alone got a build failure). Fix: `default = ["std", "kiln-execution"]` (kiln-execution is a pure cfg flag, no deps, so no dependency-graph change). Verified: bare `cargo check -p kiln-component` compiles; `cargo check --workspace` still green; consumers unchanged (kilnd 6+4+13, kiln-wasi lib 68 pass). SCOPE: fixes the LIB isolated build only. The crate''s TEST/EXAMPLE targets are separately + more deeply rotten (~47 type mismatches + removed-API refs: execute_start, Component.options, ExternType::Function, task_manager, async_) — a larger fix-or-delete cleanup, the remaining half of #446. Issue #446.' tags: - kiln-component - build