Repository navigation
Make existing Engine tests fail when the code they run is broken - #212
Closed
Laserwolve wants to merge 1 commit into
Closed
Laserwolve wants to merge 1 commit into
Laserwolve wants to merge 1 commit into
Conversation
Mutation testing makes one small change to the production code at a time and reports each change that every test still passes. Outside `runvil-vfs`, 89 such changes sit on a line that an existing test runs: the test passes with the code it runs broken. Checks and input cases added to 45 existing tests now make 63 of the 89 fail a test. No test is added, and no production code changes. - `runvil-lua`: 24 of 42, in 19 tests. - `runvil-runtime`: 20 of 23, in 12 tests. - `runvil-prompt`: 13 of 14, in 8 tests. - `runvil-types`: 4 of 7, in 4 tests. - `runvil-plugin` and `runvil-model-client`: 1 each, in one test each. - Of the 26 left, 20 alter no behavior, so no test can tell them apart, and 6 are reached only by tests about something else. The plan names each one. - The Engine has 2,638 tests before and after. - The plan is `vibe/2026-11-12-1-strengthen-engine-tests.md`. `cargo dylint` did not run here, because it is not installed on this machine. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Laserwolve
force-pushed
the
prompt-mutation-gaps
branch
from
November 12, 2026 17:37
1360dd7 to
f2b18aa
Compare
runvil-prompt lines that could break without failing a test
Laserwolve
marked this pull request as ready for review
November 12, 2026 18:06
[Low impact] The PR appears safe to merge; no actionable issue was found in the test changes.
|
Member
|
This has to be opened against the runvil-harness repository, as the engine and harness have moved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Existing tests only. No test is added, and no production code changes.
Why
A test that runs a line does not always fail when the line is wrong. Mutation testing finds those cases: it makes one small change to the production code at a time (a swapped operator, a deleted
matcharm, a function body replaced by a default value) and reports each change that every test still passes. Per-test coverage then names the tests that run the changed line and pass anyway.Outside
runvil-vfs, 89 such changes sit on a line that an existing Engine test runs. For each one, this strengthens the test whose subject is that code: it adds a check on a value the test already produces, or an input case the test did not try.runvil-luarunvil-runtimerunvil-promptrunvil-typesrunvil-pluginrunvil-model-clientWhat changed
45 existing tests gain checks or input cases, in 37 files. The Engine has 2,638 tests before and after. Three examples:
a_duplicate_role_key_is_rejectedchecked only that an error came back. It now checks that the error names the role, so replacingContractKey::shownwith an empty string fails it.one_exact_fence_is_the_prologue_and_two_can_surround_empty_prosetried twoluafences with a blank line between them. It now also tries them with none, whichopening < posas<=insplit_section_blocksturns into an internal error.the_records_span_the_complete_runtime_lifecyclenow calls every store operation, so a deleted arm invfs_observationsfails it.Hunks worth a closer look
Most hunks are one or two assertions. These change more of a test's setup:
an_end_to_end_run_threads_one_vfs_ref_through_every_sectionnow builds its own watched store, to read the origin line thatfirst_chunk_linegives the walk.a_prelude_write_across_two_arms_ends_the_run_with_determinism_caught_or_notis wrapped in a loop over two parent bodies, which re-indents its existing assertions unchanged.status_reports_a_parked_task_and_then_a_finished_onegains two fixture sections, so that a task at depth 2 exists.a_canceled_tasks_partial_write_is_readable_after_the_joingains a second trace.a_message_to_one_task_does_not_withdraw_another_chains_requestnow ends withdone, to read the unread messages.The 26 left
Vec::new()asvec![],|as^on two values with no bit in common, and the library flags of a temporary VM that only parses a chunk.The plan,
vibe/2026-11-12-1-strengthen-engine-tests.md, names all 26 with the reason for each.Checks run
cargo nextest run --locked --all-featuresover the nine Engine packages: 2,638 passed, twice.cargo clippy --locked --all-targets --all-featuresover the six changed packages, withCARGO_BUILD_WARNINGS=deny.cargo fmt --all --check,cargo test -p build-xtask, andnode --test crates/workshop/ui/test/docs-claims.mjs.#[test]added or removed, no line touched outside test code.cargo dylint, which is not installed on my machine, and the whole-workspace test, clippy, and doc commands. CI covers them.Not in this change
runvil-vfs.runvil-markdown, which is newer than the measurement. The list of changes comes fromfa9936f64and was tested again at2d40bafa2.🤖 Generated with Claude Code
Summary by CodeRabbit
No production behavior changes are included.