Repository navigation
Conversation
hoco-scy
force-pushed
the
codex/evomaster-generated-sql-foreign-key
branch
from
December 3, 2026 12:26
b6454fe to
fc2652e
Compare
hoco-scy
marked this pull request as ready for review
December 4, 2026 02:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When generating test setup, SqlWriter assumes that a foreign key targeting an auto-increment column must use a generated-key reference. The search can explicitly supply a value for that same column. The generated test then uses a different setup from the search.
Fix and rationale
Use the same referenced-gene check as SqlActionTransformer. Emit the value if it is printable, including an explicit value in an auto-increment column; use a generated-key reference only for a non-printable key. The existing-data and null paths remain unchanged.
Affected SUTs and trigger
A
proxyprintreplay failed in SQL setup after an explicitly inserted primary key was followed by a generated-key lookup. The missing mapping is directly observed; the reconstructed SQL fixture is not a full rerun of the original method.Verification
On master at c45c90e, the new composite-key case emits a generated-key reference instead of its explicit value. With this change both SqlWriterTest cases pass locally (JDK 21).
Split out of #1926; this PR has no dependency on the other fixes.
Evidence boundary
This branch checks composite-key source generation, and compiles and executes generated Java/Kotlin SQL with explicit, database-generated and existing keys. Four SqlWriterTest cases passed on this branch.