Skip to content

det_mutation: carry verdicts across a moved port, run only the new mutants (Part of #5862) - #7292

Merged
squid-shepherd[bot] merged 5 commits into
mainfrom
feat/l5-incremental-refresh
Oct 31, 2026
Merged

squid-shepherd[bot] merged 5 commits into
mainfrom
feat/l5-incremental-refresh

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Part of #5862.

Why

L5 needs a current ledger, and a port that moved means re-running every mutant: about 10,000 mutants, over a day of runner time, against ports that moved on 5 of the last 6 days. No nightly could keep up, so 0 programs show L5 although all 30 ledgers have every survivor accounted for.

Measured on real ports translated at daily commits 10-25 to 10-31 (asynccc-getpol, carddemo-signon, cbsa-getscode):

  • Most days only the cobolrt runtime moved, sometimes only a comment. It is never mutated.
  • On the days a program moved, it moved 0 to 5 lines (3 of 285, 2 of 1107).
  • With content ids that week leaves 1 to 7 new mutants per program, out of 181 to 1175.

Change

  • mutation.py: a mutant's id comes from its line's content, its occurrence among identical lines, and its column, not the byte offset.
  • det_mutation.py:
    • port covers the program only. runtime is its own fingerprint, recorded like generator / harness / oracle (the 2026-10-23 ruling).
    • every records the mutants in scope.
    • refresh carries a moved program: drop the mutants that went, run the new ones at the entry's own sample rate, keep the rest. It respects the budget, and a run that stops keeps what it finished.
  • Stays strict: a new survivor withholds L5 until accounted for; a new mutant with no verdict leaves the entry stale; a case / corpus / survivors move still re-runs the survivors; more than 40 new mutants and more than 25% of the port is a full run.

Owner review: this relaxes what current means

Owner 2026-10-21: "L5 stays strict (current required); make refresh cheap instead." current is still required, but it no longer means every mutant was judged against today's bytes. A killed or surviving mutant on an unchanged line keeps its verdict although other lines or the runtime moved. refresh already carries killed mutants this way across a case move; survivors across a program or runtime move are new here. Not covered: a runtime change that would turn a survivor or a kill around stays unseen until a full run.

Migration (data, 49 of the 52 files)

30 ledgers and 19 survivor lists rewritten by a one-off script, not committed. For each ledger it translated the recorded commit and required the bytes to match inputs.port: 30 of 30 matched (11 recorded +uncommitted; the clean commit reproduced them). It stopped on any change to a program's counts, accounted survivors, score or L5: none. port_moved stays set, so no program regains L5 until refresh has run on today's port.

First run

Against today's main: 0 full runs, 511 new mutants, so about 85 minutes plus a baseline proof per program. The largest are asynccc-asyncpnt and asynccc-seqpnt, 129 each. It may take two nights.

CI cost

No new jobs. The nightly job should fall from hitting its 120-minute limit to minutes once caught up. No new runs per PR.

Tested

test_det_mutation.py and test_mutation_bytes.py: 47 passed, 13 new. det_mutation.py check: no problems. stale-check --vs origin/main: no stale ledger. refresh has not run against a real oracle yet: that is the first nightly.

🤖 Generated with Claude Code

https://claude.ai/code/session_018srRvedw9dNhQwBgnauX7Q

squid-protocol and others added 2 commits October 31, 2026 07:21
…s limit

Both runs on 10-30 ran cbsa-updcust and carddemo-cardview, then spent the rest
of the 120 minutes inside asynccc-asyncpnt (1992 mutants, about 5 h) until the
job was cancelled. The budget is checked between cases, so it never stopped
it. The refresh job takes the artifact on success or failure only, so the two
finished ledgers were dropped and the next run started over.

Take the artifact on cancelled too, pass over a case its own size says cannot
fit what is left, and run python unbuffered so the log shows progress.

Part of #5862

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018srRvedw9dNhQwBgnauX7Q
…tants

A port move staled every ledger until all its mutants ran again: about 10,000
mutants, over a day of runner time, and ports moved on 5 of the last 6 days. Most
of those moves were the cobolrt runtime, which is never mutated, or a few lines
of the program (3 of 285, 2 of 1107).

- A mutant's id names its line by content, not byte offset, so a line added
  above it leaves it alone.
- `port` covers the translated program; `runtime` is recorded like the other
  INFO inputs.
- `refresh` carries a moved program: it drops the mutants that went, runs the
  new ones at the entry's own sample rate, and keeps the other verdicts. A new
  survivor withholds L5 until it is accounted for. A move too large to carry is
  a full `run`.

Ledgers and survivor claims are migrated to the new ids, from a translation of
each ledger's own commit that matched its recorded port bytes.

Part of #5862

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018srRvedw9dNhQwBgnauX7Q
@squid-protocol squid-protocol added enhancement New feature, sensor, or structural signature testing Unit, integration, and E2E pipeline verification priority: high Core feature broken, but workarounds exist scope:core Blocks a burned-estate program's next evidence rung, or the 4th-estate one-shot trial labels Oct 31, 2026
squid-protocol and others added 2 commits October 31, 2026 07:34
Listing one id per line added 44,000 lines to the ledgers. The migration also
removed carddemo-cardview's empty survivor list, which this change has no
reason to touch. Fix the sampling test's ids: they were not uniform.

Part of #5862

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018srRvedw9dNhQwBgnauX7Q
Base automatically changed from fix/l5-refresh-keeps-results to main October 31, 2026 11:58
# Conflicts:
#	tests/tools/det_mutation.py
@squid-protocol
squid-protocol marked this pull request as ready for review October 31, 2026 12:00
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 31, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 31, 2026 12:03
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit 1d23437 into main Oct 31, 2026
38 checks passed
@squid-shepherd
squid-shepherd Bot deleted the feat/l5-incremental-refresh branch October 31, 2026 12:36
squid-shepherd Bot pushed a commit that referenced this pull request Nov 4, 2026
…ger has is not a narrower run (#7718)

The evidence-refresh bot PR (#7591) has failed the det check on every push
since 2026-11-03 11:41Z, so no evidence refresh has reached main since #7538
and the v2.12.0 publish stopped at its evidence-report check.

Cause: refresh carries a moved port's verdicts (#7292) and rebase_entry drops
the sampled mutants the new port no longer has, so chosen falls (CardDemo
COADM01C 156 -> 154 after #7520). regressions() (#5862) read every fall as a
narrower sample and refused the ledger.

regressions() now allows the fall only when every mutant the old entry judged
and the new one does not is absent from the new entry's every, i.e. gone from
the port. A sample that leaves out mutants the port still has is still a
regression, and so is any entry that lacks the ids to tell.

Checked on the real ledgers: the 4 blocked CardDemo cases pass (0 of their
lost mutants are still in the port); the 2026-11-03 cbsa-abndproc 455 -> 150
cut that the guard caught is still flagged (302 of 309 lost still in the port).

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, sensor, or structural signature priority: high Core feature broken, but workarounds exist scope:core Blocks a burned-estate program's next evidence rung, or the 4th-estate one-shot trial shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md testing Unit, integration, and E2E pipeline verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant