Design-doc audit: correct five stale status headers, and the two one-file fixes it surfaced - #58
Merged
Merged
Conversation
`AlignmentArtifacts::load` called `artifact::list_for_alignments`, which selects the payload of *every* artifact of every listed alignment. A `tree-genotype` row runs to megabytes, so opening one project tab pulled gigabytes of JSON to read five small kinds. `list_for_alignments_of_kind` already existed for exactly this; the caller was never converted. `documents/BACKLOG.md` has carried it under "Cross-cutting" since 2026-07-26. `load` now takes the `(kind, algorithm version)` pairs to read, and runs one narrow query for each. Five small queries cost less than one wide one, because the wide one selects every payload. The five pairs are `PROJECT_REPORT_KINDS`, next to the method that reads them. All six accessor call sites in `project_report` resolve to those five pairs, and two of the six sit on a continuation line, so `grep artifacts\.` alone does not find them. A kind that is absent from the const reads as `None` at all times, which the const documents. `list_for_alignments` now has no caller in the workspace. It stays, because a caller that does not know the kinds in advance still needs it, but its doc says which form to reach for and what this one costs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SequryftjcFkLnjQRMKCx3
…links `phasing.rs` linked `[`TrioPhaser`]` twice, and no such type has ever been written. The module header listed it as one of two phasers that "can then go in", which is accurate, but the `Phaser` trait doc read as though trio phasing were available today: "a Mendelian trio phaser when a parent is available (see [`TrioPhaser`])". Both now say plainly that `ReferencePhaser` is the only implementation, and that the beam search stands in for the full PBWT. The trio phaser and the PBWT phaser are still the two things the trait seam exists for; the text no longer implies either one is written. `TrioPhaser` is gone from rustdoc's unresolved-link list. Nine unresolved links remain in this crate and are untouched: `resolve_chip` (x4), `0,1` (x2), `haplo::INDEL_DERIVED`, `crate::revert::collate`, and `AnalysisError::io`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SequryftjcFkLnjQRMKCx3
…missing chapter An audit of all 32 docs in documents/design/ against the tree found five status headers wrong, three of them claiming *less* than the tree has. A header goes stale the moment a branch merges, because the merge updates code and not the header. ArchaicAncestry_Design.md "Tier B GATED OFF" -> ARCHAIC_SEGMENTS_ENABLED = true realignment-module.md "not yet merged" -> bf576ab, v0.1.0-alpha.17 project-block-tree.md "15 commits, not pushed" -> 4cb9eca (#45), v0.1.0-alpha.16 BACKLOG.md 1.1 Tier B gated off -> both tiers ship BACKLOG.md 1.7 "code signing deferred" -> macOS done 2026-08-15, Windows open BACKLOG.md 2.1 "Designed, not started" -> shipped; 2.2 is unblocked by it The archaic doc needed more than a header. PR #42 (906b9ee) carried the *Why it failed* diagnosis **and** a full Tier B rebuild — 909 lines of `archaic_match.rs`, ten validation scripts — but touched no design document at all, so the whole record has lived in a module doc-comment for three weeks. Section 11 is the pointer that was missing: what changed (matching the archaic genomes, not counting private-variant density), the held-out numbers (r = +0.710 against -0.018 for v1), and the cross-population limit that is the reason the report is worded as a within-population measure. Every figure is copied from the module doc-comment, which stays authoritative. BACKLOG 2.1 is compressed rather than deleted. Each measurement it carried — the 1,157 MAPQ deltas, the `SEQ: *` CRAM panic, the 4 h 44 m sort, the single-core `open_seq` — was checked to survive in realignment-module.md before the text came out. Three Scala-era documents get stale-warning headers in the style of the one already on IBD_Matching_Implementation_Plan.md, rather than a rewrite or a delete: Edge_Client_Implementation_Status.md (~55%, last touched 2025-12-08, six months before the Rust cutover), UI_Redesign_Proposal.md and UI_i18n_Guidelines.md (both December 2024). The i18n guidelines still hold as architecture; only their examples and paths are dead. Also noted, not fixed: several passages inside archaic_match.rs still say the module "stays gated", overtaken by b39db0b and 9fca4c1. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SequryftjcFkLnjQRMKCx3
… overtook The module doc-comment is chronological, and it also *ended* chronologically. Its last word was "**This is still not enough to turn the module on**", written while the module was off. `b39db0b` turned it on as a within-population measure and `9fca4c1` answered the cohort objection, and neither touched the prose. A reader who reached the end of the file came away believing Tier B does not ship. Two stale verdicts, both replaced with what happened: - "the one reason that this module stays gated", on the population-ordering result. That ordering is real and unchanged. It is the reason the report is within-population and the reason the UI carries the caveat, not a reason the module is off. - The closing three-reasons paragraph. Two of the three now have an answer, so the section says which. *The cohort was chr21+22 alone* is answered by the genome-wide run already written up earlier in the same doc-comment: 40-43 % sensitivity and ~46 % precision on all 22 autosomes, better than the two-chromosome figures. *Precision was 34.9 % without the filter* is answered by the shipped path applying the filter, which measures 90 %. *The reference callset has weak support* stands, and is marked as standing. A new closing section carries the outcome: the module is on, it shipped in v0.1.0-alpha.15, the measure is within-population and must not be compared across ancestries, and Tier A's count rule is untouched. It also says plainly that the sections above stop before the decision, so the next reader knows the body is a work record rather than a current-state description. Nothing measured is edited or removed. Every table, figure and caveat stands as written. `filter_by_concordance`, `MIN_CONCORDANCE` and `call_from_observations` are now intra-doc links and resolve; the crate's nine pre-existing unresolved links are unchanged. ARCHAIC_SEGMENTS_ENABLED is referenced as plain code, since navigator-analysis sits below navigator-app and cannot link to it. Design section 11 pointed at this stale prose; it now describes how the doc-comment reads. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SequryftjcFkLnjQRMKCx3
JamesKane
added a commit
that referenced
this pull request
Aug 24, 2026
Design docs: the drift PR #58 missed, and a Grid re-walk now that realignment shipped
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.
An audit of all 32 documents in
documents/design/against the tree. Five status headerswere wrong, three of them claiming less than the tree actually has, and the audit
surfaced two small code fixes that had been sitting in the backlog.
Four commits, split so the one behaviour change can be reviewed — or reverted —
independently of the documentation.
c0994d0—project_reportreads only the five artifact kinds it usesThe only behaviour change here.
AlignmentArtifacts::loadcalledartifact::list_for_alignments, which selects thepayload of every artifact of every listed alignment. A
tree-genotyperow runs tomegabytes, so opening one project tab pulled gigabytes of JSON to read five small kinds.
list_for_alignments_of_kindalready existed for exactly this and the caller was neverconverted;
BACKLOG.mdhas carried the item under "Cross-cutting" since 2026-07-26.loadnow takes the(kind, algorithm version)pairs to read and runs one narrow queryfor each. The five pairs live in
PROJECT_REPORT_KINDS, next to the method that readsthem.
Worth a reviewer's attention: all six accessor call sites in
project_reportresolveto those five pairs, and two of the six sit on a continuation line, so
grep 'artifacts\.'alone does not find them. A kind absent from the const reads asNoneat all times, which is the failure mode to watch for if someone adds a columnlater. The const documents that.
list_for_alignmentsnow has no caller in the workspace. It stays — a caller that doesnot know the kinds in advance still needs it — but its doc now says which form to reach
for and what this one costs.
db86061—TrioPhaserdoes not existphasing.rslinked[`TrioPhaser`]twice, and no such type has ever been written.The trait doc read as though trio phasing were available today: "a Mendelian trio phaser
when a parent is available (see [
TrioPhaser])". Both passages now say plainly thatReferencePhaseris the only implementation and that the beam search stands in for thefull PBWT.
Nine unresolved links remain in the crate and are untouched:
resolve_chip(×4),0,1(×2),
haplo::INDEL_DERIVED,crate::revert::collate,AnalysisError::io.ec965c3— five stale status headersA header goes stale the moment a branch merges, because the merge updates code, not the
header.
ArchaicAncestry_Design.mdARCHAIC_SEGMENTS_ENABLED = truerealignment-module.mdbf576ab,v0.1.0-alpha.17project-block-tree.md4cb9eca(#45),v0.1.0-alpha.16BACKLOG.md§1.1BACKLOG.md§1.7BACKLOG.md§2.1The archaic doc needed more than a header. PR #42 (
906b9ee) carried the Why itfailed diagnosis and a full Tier B rebuild — 909 lines of
archaic_match.rs, tenvalidation scripts — but touched no design document at all. The whole record has lived in
a module doc-comment since 2026-08-01. Section 11 is the pointer that was missing: what
changed, the held-out numbers (r = +0.710 against −0.018 for v1), and the cross-population
limit that is the reason the report is worded as a within-population measure. Every figure
is copied from the module doc-comment, which stays authoritative.
§2.1 is compressed rather than deleted. Each measurement it carried — the 1,157 MAPQ
deltas, the
SEQ: *CRAM panic, the 4 h 44 m sort, the single-coreopen_seq— waschecked to survive in
realignment-module.mdbefore the text came out.Three Scala-era documents get stale-warning headers in the style of the one already on
IBD_Matching_Implementation_Plan.md, rather than a rewrite or a delete:Edge_Client_Implementation_Status.md(~55 %, last touched 2025-12-08, six months beforethe Rust cutover),
UI_Redesign_Proposal.mdandUI_i18n_Guidelines.md(both December2024). The i18n guidelines still hold as architecture; only their examples and paths are
dead.
9e0e633—archaic_match.rsno longer ends on a verdict two commits overtookSame drift, one layer down. The module doc-comment is chronological and also ended
chronologically, so its last word was "This is still not enough to turn the module
on" — written while the module was off.
b39db0bturned it on and9fca4c1answeredthe cohort objection; neither touched the prose. A reader who reached the end of the file
came away believing Tier B does not ship.
Two stale verdicts replaced with what happened:
ordering is real and unchanged — it is the reason the report is within-population and
the reason the UI carries the caveat, not a reason the module is off.
elsewhere in the same file. Cohort was chr21+22 alone → the genome-wide run written up
130 lines earlier (40–43 % sensitivity, ~46 % precision, both better than the
two-chromosome figures). Precision 34.9 % without the filter → the shipped path
applies the filter (
haplogroup.rs:4061), which measures 90 %. The reference callsethas weak support genuinely stands, and is marked as standing.
A new closing section carries the outcome and says plainly that the body above stops
before the decision — which is what made the file misleading rather than merely
incomplete.
No measured figure is edited or removed. Every table, number and caveat stands as
written; only the verdicts drawn from them changed.
Checks
cargo fmt --all --checkclean (pre-commit hook ran on each commit)cargo clippy --all-targets -- -D warningscleancargo test --workspace— 35 result lines, 0 failures, 0 errorssentence with a paired em-dash aside; later a 7-sentence paragraph and a passive clause)
and were fixed. Note that passing file paths to
ste-check.pysilently ignored them —only the full run catches anything.
cargo doc— the three new intra-doc links resolve, no new unresolved links.One process note: an intermediate
cargo test --workspaceshowed 2 failures innavigator-app --lib. That was two overlapping runs of mine colliding on shared temppaths, not a regression — both pass alone and the clean run is 177/177. It does expose
latent fragility though:
a_present_file_resolveswrites a fixed filename intostd::env::temp_dir(), so it will flake under any concurrent run. Not fixed here.Not fixed, deliberately
navigator-analysis.list_for_alignmentskept rather than deleted (see above).distributed-compute-grid(now unblocked by realignment),academic-ena-import,pangenome (both docs), local-LLM M6.
🤖 Generated with Claude Code
https://claude.ai/code/session_01SequryftjcFkLnjQRMKCx3