发布

  • [NA] [BE] feat(cipx): ingest Anthropic org seat/billing identity fields for AI-Spend (#7605)

    frostbyte_neo 发布于 2026-07-27 13:57:05 +00:00

    • feat(cipx): ingest Anthropic org seat/billing identity fields for AI-Spend

    Persist organization_type, seat_tier and billing_type from cipx trace metadata
    into cipx_trace_identities so AI-Spend can price a subscription seat exactly
    (Standard vs Premium, monthly vs annual, team vs individual) instead of inferring
    it from the rate-limit tier. Adds two additive LowCardinality columns (migrations
    000111/000112, both defaulting to '') and threads the fields through
    CipxTraceIdentityDAO's parse + bulk INSERT.

    Covers the three fields end-to-end in CostIntelligenceIngestionTest (parse +
    persist), and converts the CipxIdentityRow test DTO to @Builder rather than
    extending its positional constructor (backend @Builder convention).

    Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

    • docs(cipx): fix stale bind-count comment (22 -> 25)

    The 3 new binds bring each row tuple to 25 parameters; the explanatory comment
    still said 22. No code change.

    Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

    • [BE] Consolidate the seat-identity column adds into one migration

    Per review (Borys): merge the two additive migrations into a single file —
    000111 now adds all three cipx_trace_identities columns (organization_type,
    seat_tier, billing_type) in one ALTER, and 000112 is removed. Same columns,
    same defaults, same read/write wiring; just one changeset instead of two.

    Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com


    Co-authored-by: Claude Opus 4.8 (1M context) noreply@anthropic.com

    下载附件