Skip to content

Offer the complete reference in Simple mode, when it would change something - #49

Merged
JamesKane merged 1 commit into
mainfrom
feat/simple-realign-offer
Aug 15, 2026
Merged

Offer the complete reference in Simple mode, when it would change something#49
JamesKane merged 1 commit into
mainfrom
feat/simple-realign-offer

Conversation

@JamesKane

Copy link
Copy Markdown
Owner

Realignment shipped in alpha.17 reachable only from Advanced mode, on a card among alignment internals. The reader most likely to be holding vendor data on an unfinished reference — and least likely to ever find that card — is the one in Simple mode.

What this adds

An offer under Your test, pitched at someone who should never need to know what a reference build is, with a confirmation step before a four-hour job starts.

Eligibility is a field on SubjectBrief, computed in the app layer beside needs_analysis, rather than a UI decision. It appears only when it would change something:

  • A paternal line to improve. Realignment's payoff today is Y discovery; ancestry, IBD and the autosomes already handle GRCh37/38 and return the same answer either way.
  • No CHM13 alignment already, by any route.
  • An alignment the job would actually act onrealign::realignable_for_subject, extracted from the project-batch path rather than reimplemented. If the offer and the job disagreed about what is realignable, a user would be promised hours of work the job then refuses.

The bug a screenshot caught

The first version rendered correctly and was still wrong. On a donor holding six CHM13 alignments it offered to realign an old GRCh37 file nobody had touched, telling them their father's line had nowhere to be read from — while four finished alignments of theirs said otherwise.

The per-alignment rule was answering "would the job act on this file?". The card was making a claim about "is part of this person's line unreadable?". Those are not the same question, and only the second one is the offer's promise. Hence the subject-level guard.

Copy, corrected twice

Both corrections came from review, and both were substantive rather than stylistic:

  1. It described the gaps as a shortcoming of the reader's test. They are a property of every human reference before T2T — saying so protects a reader from concluding their sequencing was bad.
  2. It framed the finished genome as a paternal-line feature. That misdescribes what T2T delivered: a full autosomal sequence end to end and the first complete Y. Y discovery is what Navigator puts it to work on today, not the scope of what was built.

The card also now states whose genome the reference is — a donor of European ancestry, carrying a J1a Y — because a "complete" reference is still one person's, and complete-for-whom is exactly the sort of thing that goes unsaid.

README, User Guide and the published alpha.17 release notes carry the same framing.

Validation

  • 983 tests, 0 failed; clippy clean under -D warnings; cargo fmt clean; locale parity (every_es_key_exists_in_en) passes.
  • Six new tests on the eligibility rule, including the set-level one — the offer disappears once a realigned alignment exists — and that the masked CHM13 variant is still worth realigning to plain CHM13.
  • Rendered in the running app and screenshotted; that is how the gating bug surfaced.

Not covered

The corrected gating has not been re-checked in the GUI. It follows deterministically from the subject's alignment rows, but it has not been seen.

🤖 Generated with Claude Code

…uld change something

Realignment existed only in Advanced, on a card sitting among alignment internals.
Simple mode's reader is the one most likely to be holding vendor data on an
unfinished reference and least likely to ever find that card.

The offer is a field on the brief rather than a UI decision, computed where the
data is. It appears only when it would change something: a paternal line to
improve, and — the condition a screenshot caught me missing — no CHM13 alignment
already. The per-alignment rule alone still found an old GRCh37 file nobody had
realigned and cheerfully told a donor with four CHM13 alignments that their
father's line had nowhere to be read from. The offer's promise is about the
person, not about one file.

The three remaining conditions are `realignable_for_subject`, extracted from the
project-batch path rather than reimplemented. If the offer and the job disagreed
about what is realignable, a user would be promised four hours of work the job
then refuses.

Simple mode gets a confirmation step where Advanced does not. Advanced states the
cost in a paragraph its reader is equipped to weigh; this reader arrived from a
page about their ancestors and should not commit the machine to four hours and
276 GB by misjudging one button.

The copy went through two corrections worth recording. It first described the
gaps as a defect in the reader's test — they are a property of every human
reference before T2T, and saying so protects the reader from concluding their
sequencing was bad. It then framed the finished genome as a paternal-line
feature, which misdescribes what T2T delivered: a full autosomal sequence end to
end *and* the first complete Y. Y discovery is what Navigator uses it for today,
not the scope of what was built. The card also now says whose genome it is —
European-ancestry donor, J1a Y — because a "complete" reference is still one
person's, and complete-for-whom is the sort of thing that goes unsaid.

README, User Guide and the alpha.17 release notes carry the same framing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@JamesKane
JamesKane merged commit 67c02e7 into main Aug 15, 2026
5 of 6 checks passed
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