Keep void-node constructor in homogeneous gene during validation#813
Merged
chrxh merged 1 commit intoJul 14, 2026
Merged
Conversation
In a homogeneous gene the effective cell type comes from the first node, so a void node is expressed as that type and legitimately keeps its constructor (matching ConstructorProcessor/MutationProcessor). The genome editor's validateAndCorrect stripped it unconditionally, making such genes appear unreachable in the editor. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
chrxh
force-pushed
the
claude/genome-editor-keep-void-constructor-homogeneous
branch
from
July 14, 2026 16:56
0768771 to
439dc17
Compare
chrxh
marked this pull request as ready for review
July 14, 2026 16:59
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
In the genome editor, genes reachable only through a homogeneous gene's void nodes were shown as unreachable (e.g. the whole graph collapsing to just gene 0 + gene 4), even though the engine keeps and builds them.
Root cause: the editor runs
DescValidationService::validateAndCorrectwhen a genome is set (GenomeTabWidget), and that function stripped the constructor from every void node:But in a homogeneous gene the effective cell type is taken from the first node, so a void node is actually expressed as that type and legitimately keeps its constructor — exactly as
ConstructorProcessor::createConstructionData(usesresult.node->constructor) andMutationProcessor::applyMutations(MutationProcessor.cuh:823only clearsconstructorAvailablewhen!homogeneousCellType) do. So the display dropped live references the engine relies on.Reproduction (References.sim, one timestep)
[0,5]validateAndCorrect(before fix)[]validateAndCorrect(after fix)[0,5]The
reachable=2case exactly matches the reported "only gene 0 and gene 4 reachable" symptom.Fix
Strip the constructor from a void node only in non-homogeneous genes, mirroring the engine.
Tests
genome_keepsConstructorOnVoidCellInHomogeneousGene.genome_removesConstructorFromVoidCell(non-homogeneous) still passes.🤖 Generated with Claude Code