← Context / issues

Some records show empty corpus in the Sort & Filter Lens despite per-funder directories existing on disk — the lineage join is healthy but the workspace-service capability has no timeout override (defaults to 5000ms), the content-ingest handler processes requests serially, and each call walks every funder directory under clients/<id>/corpus/, so late requests in the 96-row fan-out time out and the lens swallows the error silently; the durable fix is to make corpus_funder_slug (a column the records sheet already populates) the primary join key, which limits each call to one small directory and dissolves the timeout race — this supersedes the originally-proposed corpus-overrides.yaml because the override surface is now the records-sheet cell

End of 2026-06-09 session: corpus content built for ~21 new records (warm 17 → 38 between v9 and v10). Operator saw four rows showing `corpus 0` despite per-funder directories on disk — sobrato-philanthropies, stand-together-trust, steve-and-alexandra-cohen-fnd, todd-fisher. UPDATED 2026-06-10 follow-on session: a hard-refresh cleanly resolved those four but exposed three more — hewlett-foundation (2 files on disk), howard-schultz-foundation (6), kellogg-foundation (6). A second backend probe confirmed `corpus.list_for_record` is returning the correct counts for those three too. The actual bug is in the wire: `corpus.list_for_record` has no `CAPABILITY_TIMEOUTS_MS` entry so it falls through to the default 5000ms, the content-ingest handler is a serial `for await` loop, and each call walks every funder directory. With 96 visible rows firing 96 parallel requests, late ones in the burst time out and the lens `catch` block swallows the error → chip never updates. The simpler, durable fix the operator proposed — join via `corpus_funder_slug`, a column the records sheet already populates per row — dissolves all three causes at once: each request now walks one ≤13-file directory instead of 301 files, the override surface is a sheet cell instead of a new YAML format, and lineage stays as a fallback for rows without a slug. The originally-proposed `corpus-overrides.yaml` mechanism is SUPERSEDED. Backfill of `record_uuid` into 201 unstamped files stands as independent hygiene (script built this session, dry-run found zero stale conflicts).