Skip to content

perf(l5): det_port keeps a translated port per translate fingerprint (Part of #8599) - #8802

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8599-20261120T2203Z
Nov 20, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8599-20261120T2203Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8599. Follow-up to #8643.

det_port.port_case now keeps each translated port in the equivalence cache (~/.cache/gitgalaxy-equivalence/port), keyed by the corpus state, every engine file, the case without its scenarios and notes, the layers, and the bytes of the four tools that shape the port (det_port.py, equivalence_common.py, equivalence_java.py, det_parity.py). det_mutation.py refresh / run (which translate through det_port.py run --translate-only) therefore no longer translate a program again for a case-only change (scenarios, notes). A failed translation is returned, never cached; GITGALAXY_EQUIV_CACHE=off still translates every time.

Honest size: the estate scan and refactor were already cached, so the saving is the program's own translation (2.7-2.8 s warm on UPDCUST, 15.8 s cold on readcust) per case; the baseline proof is untouched.

Checklist: partial [c:eed19d0d] -- the per-case translation is skipped on an unchanged fingerprint; no live refresh of UPDCUST was timed end to end (the cold/warm byte comparison on readcust is in the evidence below).
Checklist: partial [c:17c4dbfd] -- the translation and scan are shared across a batch via the cache; the baseline proof is still run per case.

Evidence

det_port.py run carddemo-readcust --translate-only twice into two fresh work dirs with an empty cache: translate_seconds 1.5 then 0.0, and diff -r of the two carddemo-readcust dirs (port + generated) is empty; summary.json results identical but for the timing. 11 new unit tests pass (fingerprint ignores scenarios/notes, moves on any translated input, hit/miss, failure never cached, cache off).

Class / Sibling gaps

Class: work a refresh / run batch repeats per case although its inputs did not change. Members: (1) estate scan and refactor: already cached by equivalence_cache (handled); (2) the program translation per case: handled here, covers every det_port.py run caller (det_mutation run/refresh, proof sweeps, check), each served by the same port_case; (3) the baseline proof per case (13-26 s): missing, a different mechanism (needs a proof-result cache keyed by port + case + harness); (4) the CICS in-process path running every scenario before judging (c:6437d0ca): missing, different mechanism; (5) java-facade survivors in the in-process runner (c:47d5fdb6): missing; (6) detmut / ground-truth CI shards re-proving unchanged inputs (c:1e9afc06): not checked here.

Remaining slices

  • Baseline-proof sharing/cache across cases (tests/tools/mutation.py, evidence.py; a proof-result cache keyed by port, case and harness fingerprints).
  • Early exit in the CICS in-process path (mutation.py).
  • Facade survivors routing (mutation.py, survivor_attack.py).
  • CI shard audit for re-proved unchanged inputs (.github/workflows, tests/tools/*_plan.py).

Files

Hand-written: tests/tools/det_port.py, tests/tools/equivalence_cache.py, tests/tools/test_det_port_cache_8599.py, docs/language_status/mutation_testing.md (4).

Lessons for agents

  • heavy-run.sh can queue a whole det_port.py run for many minutes behind other workers; start the one real-corpus check early and write tests meanwhile.

🤖 Generated with Claude Code

… a case-only change no longer re-translates (Part of #8599)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 20, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 20, 2026 22:50
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant