Skip to content

Design-doc audit: correct five stale status headers, and the two one-file fixes it surfaced - #58

Merged
JamesKane merged 4 commits into
mainfrom
chore/design-audit-followups
Aug 24, 2026
Merged

Design-doc audit: correct five stale status headers, and the two one-file fixes it surfaced#58
JamesKane merged 4 commits into
mainfrom
chore/design-audit-followups

Conversation

@JamesKane

Copy link
Copy Markdown
Owner

An audit of all 32 documents in documents/design/ against the tree. Five status headers
were 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.

c0994d0project_report reads only the five artifact kinds it uses

The only behaviour change here.

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 and the caller was never
converted; BACKLOG.md has carried the item under "Cross-cutting" since 2026-07-26.

load now takes the (kind, algorithm version) pairs to read and runs one narrow query
for each. The five pairs live in PROJECT_REPORT_KINDS, next to the method that reads
them.

Worth a reviewer's attention: 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 absent from the const reads as
None at all times, which is the failure mode to watch for if someone adds a column
later. The const documents that.

list_for_alignments now has no caller in the workspace. It stays — a caller that does
not know the kinds in advance still needs it — but its doc now says which form to reach
for and what this one costs.

db86061TrioPhaser does not exist

phasing.rs linked [`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 that
ReferencePhaser is the only implementation and that the beam search stands in for the
full 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 headers

A header goes stale the moment a branch merges, because the merge updates code, not the
header.

Document Said Actually
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 — and §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. 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-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.

9e0e633archaic_match.rs no longer ends on a verdict two commits overtook

Same 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. b39db0b turned it on and 9fca4c1 answered
the 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:

  • "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 had answers already sitting
    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 callset
    has 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 --check clean (pre-commit hook ran on each commit)
  • cargo clippy --all-targets -- -D warnings clean
  • cargo test --workspace — 35 result lines, 0 failures, 0 errors
  • STE checker at 0 workspace-wide. Two drafts of my own prose regressed it (a 26-word
    sentence 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.py silently 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 --workspace showed 2 failures in
navigator-app --lib. That was two overlapping runs of mine colliding on shared temp
paths, not a regression — both pass alone and the clean run is 177/177. It does expose
latent fragility though: a_present_file_resolves writes a fixed filename into
std::env::temp_dir(), so it will flake under any concurrent run. Not fixed here.

Not fixed, deliberately

  • The nine pre-existing unresolved intra-doc links in navigator-analysis.
  • list_for_alignments kept rather than deleted (see above).
  • The temp-path test fragility.
  • Four designs verified to have zero implementation and left alone:
    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

JamesKane and others added 4 commits August 23, 2026 14:55
`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
JamesKane merged commit b528b07 into main Aug 24, 2026
3 checks passed
@JamesKane
JamesKane deleted the chore/design-audit-followups branch August 24, 2026 10:34
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
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