Skip to content

test(formal): compile the M11 mutant after the settings rename and guard mutant compilation - #192

Closed
lan17 wants to merge 1 commit into
mainfrom
claude/fix-go-mutation-m11
Closed

lan17 wants to merge 1 commit into
mainfrom
claude/fix-go-mutation-m11

Conversation

@lan17

@lan17 lan17 commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Summary

The full formal verification run on main after #190 failed in Go mutation shard 3 with M11: noncompiling mutant/baseline, not detection. The API reshape renamed Cache.options to Cache.settings, and the M11 replacement text ("renew the local insertion TTL on every cache hit") still referred to c.options.Clock. The anchor check only validates the before text, so nothing caught it before the weekly lane. Every other job in that run passed, including go-parity (the complete corpus replayed through the ported driver) and all TypeScript lanes.

Changes

  • formal/go-mutations.json: M11 after now reads c.settings.clock.ElapsedMS(). Applied in a scratch copy, the mutant compiles and is caught by TestLocalExpiryIsCheckedOnReadWithoutRenewal, TestLocalInsertionExpiryUsesWholeMilliseconds and TestDefaultInstancesShareLocalMillisecondGrid.
  • go/mutation_catalog_test.go: a PR-time guard. For every catalogued mutation it copies the production sources into a temp dir, requires each anchor to occur exactly once, applies the edit and runs go build. Thirteen parallel builds add a few seconds to make check-go. It skips when the catalog is absent, so a consumer running the module's tests is unaffected. It compiles production sources only; a mutant that breaks test compilation is still the full lane's job.

Validation

make check-go and make audit pass. All thirteen mutants compile in the scratch copies.

After merge

Re-dispatch "Full formal verification" on main; with this fix the only failed jobs (shard 3, mutations merge, aggregate) should pass. Then the Release workflow can be run again for 0.24.0.

…ard mutant compilation

The Go API reshape renamed Cache.options to Cache.settings but left the M11
replacement text ("renew the local insertion TTL on every cache hit")
referring to c.options.Clock. The mutant no longer compiled, so the full
mutation lane reported a measurement error for shard 3 instead of a
detection result. The replacement now reads c.settings.clock and the mutant
is caught by the whole-millisecond expiry tests.

Only the weekly full run compiled mutants; the audit lane checks nothing
about the Go catalog. A native test now applies every catalogued edit to a
temporary copy of the production sources, requires each anchor to match
exactly once, and builds the mutant, so a rename that strands a mutation
fails the PR checks rather than the next full formal run.
@lan17 lan17 closed this Sep 22, 2026
@lan17
lan17 deleted the claude/fix-go-mutation-m11 branch September 22, 2026 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant