P6 G3 — mutation of the branch kernel¶
scripts/mutation-p6.sh on the remote Linux host (cargo-mutants 27.1.0,
one target directory per mutant, ≤ 48 cores). Each mutant runs the core
library tests and the testkit suites P0, P1, P3, P3 certificates and every
P6 suite (PROP13, PROP7 and PROP11 on short slices; their full 10,000-seed
runs are in p6-g3-properties.txt).
| Run | Tree | Caught | Missed | Timeout | Unviable |
|---|---|---|---|---|---|
kernel 1: kernel.rs, kernel_merge.rs, merge.rs, whatif.rs, kernel_view.rs |
f23f600 | 315 | 56 | 1 | 90 |
shared: the P6 functions in arena.rs, layers.rs, txn.rs, lib.rs (--re) |
5968472 | 82 | 7 | 3 | 3 |
kernel 2, after the new tests |
23ec037 | 339 | 24 | 1 | 90 |
kernel_merge.rs again, after ADR r0.6 (merge bases, pruning) |
e37e864 | 128 | 4 | 0 | 18 |
kernel 3, after the independent review (ADR r0.7) |
6eab9bd | 352 | 27 | 1 | 90 |
The ADR's mutation targets (§11) are all covered: visibility and dedup
(kernel.rs), merge base and classification (kernel_merge.rs,
merge.rs), ExpectHeads (txn.rs::final_read_set and the merge read
set), the undo journal (whatif.rs, the arena/layer truncations) and the
conflict gate (Indexes::conflicted, adjust_conflicts, the layer node).
The file names differ from the ADR's sketch (branch.rs).
Survivors that were real gaps (closed)¶
From run 1, p6_kernel_edges.rs adds:
- ValidationRecord conflicts in a merge (different verdicts conflict on the rule's conclusion with the canonical payload; the same verdict from another validator converges) — 10 mutants; no test merged ValidationRecords before;
- the merge report's
source; duplicate entries in a merge's read set; main_is_identity(andIdMap::push's renumbering flag);- a dry run of a batch that needs the import retry (the restore of the backup must not happen for WHAT_IF);
- snapshot import refusing ids with a gap;
state_diffdetecting a difference; - the view's accessors on a renumbered branch, historical reads below the global epoch, observation support and merged anchors' unobserved bit;
- a certificate entry the branch cannot see, required (Changed) or advisory (skipped).
From the shared run: WHAT_IF rollback of metadata on a new logical (a stale
entry would attach to the next logical with that id) and of many colliding
keys (the key table's probe chains). The merge-pruning code was killed in
full by superseded_sync_points_are_pruned. All were re-run locally
against the new tests before the full re-runs.
Equivalent survivors (final runs)¶
kernel.rs:
run301/304 (b.ops.len() == 1guards → true):SoleOpRequiredhas already rejected aCreateBranch/ArchiveBranchthat is not alone.commit_ops418–420, 426, 439–442: the import-retry loop.ambiguousmade true more often only adds attempts; the backup condition variants take an equal backup (the restored or untouched database); the attempt bound is defensive (every generated and constructed batch settles by the second attempt), soattempts *= 1still terminates there.commit_ops480/481 (logicaldropped from the kernel's provenance copy of a revision): only its origin fields are read (set_revision_origin).resolve594/595: the fresh-id arithmetic for global ids beyond the previous attempt's plan. A wrong local id makes the attempt disagree with the assignment, and the loop retries with the corrected plan.names_invisible602/605: made true, it only marks more batches ambiguous (more attempts, same result).staged_global987/988: the branch for an id beyond everything staged. The resolver refuses forward references (UnknownRef) and every error that names a staged object names one the assignment covers, so no input reaches it (an attempted test gotUnknownRef).
kernel_merge.rs:
merge_bases232 (<→<=choosing a branch's latest state): sync points are one per epoch, so two states of one branch never tie.merge315 (n < op_index→<=): the Op atop_indexis the merge, never anExpectHeads.merge449 (||→&&in the dirs conflict): an empty side cannot reach the conflict row (dirs only narrow, so an emptySorTequals an empty base), and an empty side makes the intersection empty anyway.
whatif.rs 183 (state_diff's journal check && → ||): a journal
exists only inside a dry run, never between commits.
Shared files:
lib.rs701 (&&→||before clearing merged anchors on a watermark): with no unobserved anchors or no watermarks theretainremoves nothing.lib.rs688 (<→<=journalling metadata of logicals): the extra entry is for a logical the rollback removes; the new metadata test shows no trace.KeyTable::remove61 (len -= 1→+=//=):lenonly drives the resize threshold.LogicalArena::truncate197 (n < len→<=): atn == lenthe block truncates nothing and drains no lane.LayerColumns::footprint93 (<→<=): a saved row at the old length is dropped by the restore's truncation.
Timeouts (IdMap::len → 0, three KeyTable::remove probe mutants) loop
forever and count as detected.
After the independent review (6eab9bd)¶
The kernel run on the reviewed tree left 27 survivors. 24 are the
equivalent survivors above, at shifted line numbers. The other 3 were in
code the review fixes added, and the tests now kill them (each mutant
applied by hand against p6_kernel_edges):
BranchView::digest(&&→||in themain-without-merges shortcut): a merge intomainnow must changemain's digest (branch_digests_cover_the_branch_table_and_sync_points).merge'searlyguard forInvalidReadSet, madetrueorfalse: an invalid read set before the Merge on a renumbered branch names the global logical, and one after the Merge comes after an unknowncertifykey (late_invalid_read_set_in_a_merge_names_the_global_logical).