Skip to content

Stop stack mapping after one genome pass with a start value - #412

Open
alcides wants to merge 2 commits into
mainfrom
fix/stack-stop-after-one-genome-pass
Open

alcides wants to merge 2 commits into
mainfrom
fix/stack-stop-after-one-genome-pass

Conversation

@alcides

@alcides alcides commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • Change stack genotype→phenotype mapping to stop only when both hold:
    1. a start-symbol value has been produced, and
    2. the genome has been consumed at least once (len(dna) codon reads).
  • Track codon reads on ListWrapper (consumed / completed_one_pass()).
  • Remember the last good start-symbol value so later constructor pops cannot wipe the phenotype before return.
  • failures_limit only applies before the first start-symbol value; afterwards mapping continues until one full genome pass.

Test plan

  • pytest tests/nxt/stack/stack_stop_condition_test.py tests/nxt/stack/stack_test.py
  • pytest tests/nxt/umad_test.py
  • CI green

alcides and others added 2 commits September 17, 2026 17:10
Keep translating until the start-symbol stack has produced a candidate and
the genome has been fully read once; remember the last good value so later
pops cannot erase a completed mapping.

Co-authored-by: Cursor <cursoragent@cursor.com>
Without a start-symbol value, completing a full genome read must abort
instead of looping forever on successful non-start constructions.

Co-authored-by: Cursor <cursoragent@cursor.com>

This branch has not been deployed

No deployments
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