Skip to content

Decide the archaic asset staging split; both modes were disagreeing silently - #38

Merged
JamesKane merged 1 commit into
mainfrom
fix/archaic-asset-staging
Jul 30, 2026
Merged

Decide the archaic asset staging split; both modes were disagreeing silently#38
JamesKane merged 1 commit into
mainfrom
fix/archaic-asset-staging

Conversation

@JamesKane

Copy link
Copy Markdown
Owner

archaic_* appeared in neither PATTERNS nor ON_DEMAND_PREFIXES.

Those two lists are the same decision written once per source mode — local-dir mode bundles what PATTERNS names, release mode bundles everything the manifest names except ON_DEMAND_PREFIXES. So an asset missing from both is bundled in CI and absent from dev builds. Nobody chose that: the archaic design's M1 said to check Asset 1's size against the on-demand policy "before deciding", and no decision was ever recorded.

Measured cost on the release it shipped in. All five archaic assets (105.3 MB) went into v0.1.0-alpha.14:

Installer alpha.13 alpha.14
macOS .dmg 136 MB 199 MB
Windows .exe 105 MB 163 MB
Linux .AppImage 125 MB 186 MB

The split

Same principle as ancestry_haps_ — bundle what users can reach, download what almost nobody does.

Assets Size Decision Why
Tier A archaic_markers_, archaic_marker_dist_ 33 MB Bundled The marker count runs on chip data as well as WGS, so every user can reach it and it must work with no network. This is also what M1 assumed.
Tier B archaic_outgroup_af_, archaic_classify_, archaic_callable_ 72 MB On demand Segment calling needs whole-genome data and an hours-long de-novo calling pass to have already completed — a very small reachable population for two thirds of the archaic payload.

Verification

Not assumed — checked:

  • Simulated both modes against the real manifest. Each now stages an identical 13 files / 312.2 MB, with divergence empty in both directions. Before: release 384.2 MB vs local 312.2 MB.
  • Ran the script. 14 files staged (13 + manifest); Tier A present, Tier B and ancestry_haps absent.
  • The download path already exists and is on the only route that loads them. call_archaic_segments_for_subject calls ensure_ancestry_asset for all three before reading (haplogroup.rs:3596). They're in the manifest, so they're sha256-verified on fetch like every other asset.
  • First-run seeding is a directory scan (seed_assets_from), so an unbundled asset is simply not seeded rather than erroring.
  • bash -n clean.

Expected effect: ~40 MB off each installer (72 MB raw, compressed), taking the .dmg back to roughly 158 MB.

Also

Documents the trap in packaging-and-release.md, because the next asset added will hit it: silence is not a default, it is the CI-only bundle. The asset table gains explicit rows for both archaic tiers.

Companion to #37, which records the same finding in the archaic design doc's open-follow-ups list.

🤖 Generated with Claude Code

…ilently

`archaic_*` appeared in NEITHER `PATTERNS` nor `ON_DEMAND_PREFIXES`. Those two
lists are the same decision written once per source mode -- local-dir mode
bundles what PATTERNS names, release mode bundles everything the manifest names
EXCEPT ON_DEMAND_PREFIXES -- so an asset missing from both is bundled in CI and
absent from dev builds. Nobody chose that; the archaic design's M1 said to check
Asset 1's size against the on-demand policy "before deciding" and no decision was
ever recorded.

Cost of the omission, measured on the release it shipped in: all five archaic
assets (105.3 MB) went into v0.1.0-alpha.14, whose installers came out ~60 MB
larger than alpha.13's -- .dmg 136 -> 199 MB, .exe 105 -> 163 MB.

The split, on the same principle as `ancestry_haps_`: bundle what users can
reach, download what almost nobody does.

- Tier A (`archaic_markers_`, `archaic_marker_dist_`, 33 MB) BUNDLED. The marker
  count runs on chip data as well as WGS, so every user can reach it and it has
  to work with no network. This is also what M1 assumed.
- Tier B (`archaic_outgroup_af_`, `archaic_classify_`, `archaic_callable_`,
  72 MB) ON DEMAND. Segment calling needs whole-genome data AND an hours-long
  de-novo calling pass to have already completed, so the reachable population is
  very small for two thirds of the archaic payload.

Verified rather than assumed:

- Simulated BOTH modes against the real manifest: each now stages the identical
  13 files / 312.2 MB, divergence empty in both directions. Before this change
  release mode staged 384.2 MB and local mode 312.2 MB.
- Ran the script: 14 files staged (13 + manifest), Tier A present, Tier B and
  ancestry_haps absent.
- The download path for all three Tier B assets already exists and is on the
  only route that loads them -- `call_archaic_segments_for_subject` calls
  `ensure_ancestry_asset` for each before reading (haplogroup.rs:3596). They are
  in the manifest, so they are sha256-verified on fetch like every other asset.
- First-run seeding is a directory scan (`seed_assets_from`), so an asset that
  is not bundled is simply not seeded rather than erroring.

Also documents the trap in packaging-and-release.md, since the next asset will
hit it: silence is not a default, it is the CI-only bundle.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@JamesKane
JamesKane merged commit 9cf74fb into main Jul 30, 2026
3 checks passed
@JamesKane
JamesKane deleted the fix/archaic-asset-staging branch August 3, 2026 10:31
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