fix(ingest): stop attributing unkeyed spans to an arbitrary batch project

convertResourceSpansToOtelLogs fell back to `snd (V.head pids)` when a
resource-span's API key matched nothing and carried no at-project-id — in a
multi-project (multi-tenant) batch that silently mis-attributes spans to
whichever project happened to be first, a cross-tenant data leak. The logs
converter never had this fallback (it drops). Restrict the fallback to the
unambiguous single-project batch; drop otherwise, matching the logs path.

Regression guard belongs at integration level (the converter is unexported and
needs protobuf ResourceSpans fixtures); owed to CI while the live-test-dev
watcher is unusable (pre-existing GHCi linker bug).
This commit is contained in:
Anthony Alaribe 2026-07-12 16:24:50 -07:00
commit a6ce1ab7f3