fix(sync,setup): cold-crawl index seeding, setup disk preflight, settled codepoint gate
Three findings from the full lifecycle validation (reset → cold sync →
archive → 3-profile roundtrip):
1. Cold syncs reach full coverage in ONE pass. The per-root index pass
(seed unknown pages from /tutorials/data/index/<slug>) only ran inside
the update gate, which a cold corpus (no pages) and sweep runs both
bypassed — reaching the ~35k index-only pages took three syncs. The
index pass now always runs for apple-docc (root universe from
selectRootsForAdapter, so empty corpora seed too); gating only decides
per-page check skipping. A 304 stays correct proof there is nothing new
to seed (the previous 200 already seeded its content).
2. Setup preflights disk space. Extraction transiently needs the temp tar
plus the extracted tree (~2× the decompressed size; ~22 GB for the full
snapshot) and used to die mid-extract with a partial tree ('No space
left on device', observed). extractTarZst now reads the EXACT
decompressed size from the zstd frame header (RFC 8878 FCS — verified
11.08 GB on the real archive), checks statfs, and fails up front with
the numbers and the levers (different APPLE_DOCS_HOME, or
APPLE_DOCS_SKIP_DISK_CHECK=1). tar failures now say the tree may be
partial and how to recover.
3. Codepoint retries settle instead of looping. The symbol catalog (the
running macOS's CoreGlyphs) and the released SF Symbols.app version-skew
in either direction, so some names are not resolvable by the app at
hand — v31 records codepoint_attempted_version per answered-but-null
row, the steady-state gate treats those as settled (skips the scrape +
dump), and they re-attempt when the provisioned app version changes, on
--full, or whenever a dump runs anyway for new symbols. Dump-died-early
(unanswered) rows stay unattempted and warn loudly; version-skew rows
log at info with the app version. G
Gigi committed
5a7ead506e4ed5ce3185fa578b9248273bf4656c
Parent: ae61ba6