Skip to content

fix(billing): surface unmatched EMU billing usernames - #439

Open
karpikpl wants to merge 1 commit into
mainfrom
copilot/fix-issue-432
Open

fix(billing): surface unmatched EMU billing usernames#439
karpikpl wants to merge 1 commit into
mainfrom
copilot/fix-issue-432

Conversation

@karpikpl

Copy link
Copy Markdown
Collaborator

Fixes #432

Summary

  • Adds NUXT_BILLING_USER_ALIASES JSON mapping for EMU billing username -> metrics login attribution.
  • Applies aliases in DB-mode per-user billing queries and live fan-out requests.
  • Surfaces unmatched billing usernames with spend in the billing UI so attribution gaps are visible.

Tradeoff

The unmatched list is computed from DB billing usernames against the currently loaded per-user query batch; alias mapping is the supported way to resolve known EMU identifier divergences.

Validation

  • npm test -- tests/billing-credit-reader.spec.ts --run --silent
  • npm test -- --run --silent (root tracked suite; local unrelated nested worktrees were present)
  • npm run build
  • npm run lint (fails before linting due existing dependency issue: brace-expansion export mismatch)

…s mapping (#432)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: bbf27d66-9aca-451b-85ee-3a32e0775d52
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.

Per-user billing silently drops attribution when the metrics login differs from the billing username (EMU handle vs. hash)

1 participant