test(pksave): kill the fixed-point mutation survivors - #45
Merged
Conversation
The first verification pass showed five survivors whose original test data made the mutated arithmetic a fixed point: swap at slot 0 (+0 == -0), a tail fill starting at party index 2 (2+2 == 2*2), species-list writes never asserted after swap_party_box/replace_raw, and the item quantity byte only reaching a diagnostic no test checked. Cover each with data where the mutation diverges: swap(1,2) with a species-list assert, species-list asserts on both sides of swap_party_box, a withdraw into a one-mon party pinning sentinel and zero fill, and a W-ITEMS-QTY-ZERO span test. Also records the sixth +0-constant equivalent (party_append_raw's count-byte write) in .cargo/mutants.toml. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BSxh62iGqh4bffn8hRcTME
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.
Follow-up to #44, closing out #33's verification pass. The targeted re-run (522 mutants over the affected functions) showed 5 survivors whose original test data made the mutated arithmetic a fixed point — slot 0 makes
+0 == -0, party index 2 makes2+2 == 2*2, species-list bytes went unasserted afterswap_party_box/replace_raw, and the item quantity byte only feeds a diagnostic no test checked. Each now has a test with data where the mutation diverges, plus the sixth+0-constant equivalent documented in.cargo/mutants.toml.Verified:
cargo test --workspacegreen, fmt clean; a final targeted cargo-mutants pass over these five functions is running to confirm the kills (evidence lands on #33).🤖 Generated with Claude Code
https://claude.ai/code/session_01BSxh62iGqh4bffn8hRcTME
Generated by Claude Code