Skip to content

mutate: -cache keeps the edits refused, for a run over the same code - #42

Merged
aledbf merged 1 commit into
mainfrom
mutate/cache
Oct 16, 2026
Merged

aledbf merged 1 commit into
mainfrom
mutate/cache

Conversation

@aledbf

@aledbf aledbf commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

A pull request's gate that is run again after a fix re-broke every package of the change. spin#493 took eleven gate runs, and each spent its ten to sixteen minutes of mutate on edits whose answer could not have changed.

-cache <dir> keeps each edit the tests refused, under a key of everything that answer was read from:

  • the edit itself;
  • every file in the directory of each package its tests, or its importers' tests, are built from, and those directories' testdata;
  • the module's go.mod and go.sum;
  • the toolchain;
  • this tool's version.

The next run asks the tests only about the rest. Only refusals are kept: a survivor fails the run, and is the next run's question.

The cache is off unless named. A file a test reads from outside its package is not in the key, so a run from scratch (spin's daily ci.yml) stays the one to trust.

Measured on spin over #493's diff (-max 60): the second run took 54 of the 60 edits from the cache. Its time then went to the one survivor, in testutil, which every importer is asked about.

Tests: a refusal is kept for the same code, and is asked again once the tests, the testdata, a package two imports down or the module's pins change. A package the tests do not reach changes nothing. Each was planted and failed. task test, task lint and task mutate are green (0 survived).

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

A pull request's gate run again after a fix re-broke every package of the
change: spin#493's took eleven runs, each spending its ten to sixteen minutes of
mutate on edits whose answer could not have moved. An edit refused is kept
under a key of the edit, of every file in the directories of the packages its
tests and its importers' tests are built from, their testdata, the module's
pins, the toolchain and this tool's version; the next run asks only about the
rest. Off unless named: a file a test reads from outside its package is not in
the key, so a run from scratch stays the one to trust.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@aledbf
aledbf merged commit a6705a4 into main Oct 16, 2026
1 check passed
@aledbf
aledbf deleted the mutate/cache branch October 16, 2026 15:12
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