Skip to content

feat: make billable usage delivery durable - #1669

Merged
kang-heewon merged 1 commit into
trunkfrom
fix/1518-billable-usage-journal
Aug 1, 2026
Merged

feat: make billable usage delivery durable#1669
kang-heewon merged 1 commit into
trunkfrom
fix/1518-billable-usage-journal

Conversation

@kang-heewon

@kang-heewon kang-heewon commented Aug 1, 2026

Copy link
Copy Markdown
Member

Summary

Billable usage is now journaled durably before local acceptance and becomes provider-deliverable only after the local usage or quota decision commits. Persistent Redis claims use server-time leases and fencing tokens so retries, worker loss, and concurrent delivery cannot silently duplicate accepted usage.

Meters declared with billing: "required" now fail bootstrap or request execution with stable diagnostics when a persistent journal or caller-owned event identity is unavailable. Journal backlog, age, retry, and terminal-failure diagnostics are exposed through the metering service, while @Metered remains free of provider calls.

Verification

  • pnpm check
  • pnpm typecheck
  • pnpm test
  • pnpm lint
  • pnpm docs:api:check
  • CROCO_TEST_REAL_RESOURCES=1 pnpm --dir packages/metering-core exec vitest run src/tests/RedisMetering.integration.spec.ts
  • pnpm changeset-required:check -- --base origin/trunk --head HEAD

Fixes #1518

Summary by CodeRabbit

  • 새 기능

    • 청구 가능 사용량을 안정적으로 저장하고 전달하는 저널 기능을 추가했습니다.
    • 중복 이벤트 방지, 재시도·실패 상태 관리, 작업 잠금 및 만료 복구를 지원합니다.
    • 로컬 개발용 메모리 방식과 영속적인 Redis 방식이 제공됩니다.
    • 청구 필수 미터 설정과 사용량 청구 요구사항·백로그 진단 조회를 지원합니다.
  • 오류 개선

    • 영속 저널이 필요한 미터에 저널이 없을 때 명확한 오류를 제공합니다.
  • 문서

    • 새로운 청구 저널 API와 문제 코드, 사용 및 복구 가이드를 문서화했습니다.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@kang-heewon, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1c206c45-6078-42ff-9df9-f40e3d040968

📥 Commits

Reviewing files that changed from the base of the PR and between 4864bca and eda7498.

⛔ Files ignored due to path filters (1)
  • packages/problems-core/src/generated/problem-code-registry.ts is excluded by !**/generated/**
📒 Files selected for processing (42)
  • .changeset/bright-badgers-journal.md
  • docs/problem-code-registry.json
  • packages/docs/src/content/docs/api/metering-core/src/classes/BillableUsageJournalRequiredProblem.md
  • packages/docs/src/content/docs/api/metering-core/src/classes/InMemoryBillableUsageJournal.md
  • packages/docs/src/content/docs/api/metering-core/src/classes/MeterRegistry.md
  • packages/docs/src/content/docs/api/metering-core/src/classes/MeteringService.md
  • packages/docs/src/content/docs/api/metering-core/src/classes/RedisBillableUsageJournal.md
  • packages/docs/src/content/docs/api/metering-core/src/interfaces/BillableUsageJournal.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/BillableUsageAppendResult.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/BillableUsageClaim.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/BillableUsageClaimOptions.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/BillableUsageDeliveryState.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/BillableUsageEvent.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/BillableUsageFailure.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/BillableUsageJournalDiagnostics.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/BillableUsageJournalEntry.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/MeterDefinition.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/MeteredMetadata.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/MeteredOptions.md
  • packages/docs/src/content/docs/api/problems-core/src/classes/Problem.md
  • packages/docs/src/content/docs/api/problems-core/src/variables/CROCO_PROBLEM_CODE_REGISTRY.md
  • packages/docs/src/content/docs/en/reference/problem-recovery-cookbook.md
  • packages/metering-core/README.md
  • packages/metering-core/src/index.ts
  • packages/metering-core/src/libs/BillableUsageJournal.ts
  • packages/metering-core/src/libs/MeterRegistry.ts
  • packages/metering-core/src/libs/MeteringService.ts
  • packages/metering-core/src/libs/RedisBillableUsageJournal.ts
  • packages/metering-core/src/libs/decorators/Metered.ts
  • packages/metering-core/src/libs/problems/BillableUsageJournalRequiredProblem.ts
  • packages/metering-core/src/libs/redisKey.ts
  • packages/metering-core/src/libs/types.ts
  • packages/metering-core/src/tests/BillableUsageJournal.spec.ts
  • packages/metering-core/src/tests/MeterRegistry.spec.ts
  • packages/metering-core/src/tests/MeteringService.spec.ts
  • packages/metering-core/src/tests/RedisBillableUsageJournal.spec.ts
  • packages/metering-core/src/tests/RedisMetering.integration.spec.ts
  • packages/metering-core/src/tests/decorators/Metered.spec.ts
  • packages/metering-core/src/tests/problems/Problems.spec.ts
  • public-api-surface.snapshot.json
  • scripts/package-entrypoint-smoke.mts
  • scripts/problem-registry.mts
📝 Walkthrough

Walkthrough

청구 가능 사용량을 위한 BillableUsageJournal 계약과 인메모리·Redis 구현이 추가되었습니다. MeterRegistry, MeteringService, Metered decorator가 청구 필수 미터와 이벤트 식별자를 검증합니다. lease, fencing token, 재시도, terminal failure 및 진단 API가 공개되었습니다.

Changes

청구 가능 사용량 저널

Layer / File(s) Summary
저널 계약과 공개 API
packages/metering-core/src/libs/BillableUsageJournal.ts, packages/metering-core/src/index.ts, public-api-surface.snapshot.json
이벤트, 상태, claim, 실패, 진단 계약과 공개 export를 추가했습니다.
인메모리 저널과 상태 전이 검증
packages/metering-core/src/libs/BillableUsageJournal.ts, packages/metering-core/src/tests/BillableUsageJournal.spec.ts
중복·충돌 판정, lease 만료, fencing, 재시도, terminal failure 및 backlog 진단을 구현하고 검증했습니다.
미터 등록과 사용량 기록 연동
packages/metering-core/src/libs/MeterRegistry.ts, packages/metering-core/src/libs/MeteringService.ts, packages/metering-core/src/libs/decorators/Metered.ts, packages/metering-core/src/tests/*
billing: "required" 미터에 영속 저널을 요구합니다. 이벤트 ID와 멱등성 키를 정규화하고, 사용량 저장과 저널 상태 전이를 연결했습니다.
Redis 영속 저널과 동시 전달
packages/metering-core/src/libs/RedisBillableUsageJournal.ts, packages/metering-core/src/tests/RedisBillableUsageJournal.spec.ts, packages/metering-core/src/tests/RedisMetering.integration.spec.ts
Redis Lua 스크립트로 원자적 append, claim, 상태 전이 및 진단을 구현했습니다. 만료 lease와 fencing token 동작을 통합 테스트로 검증했습니다.
API 문서와 문제 복구 문서
packages/docs/src/content/docs/api/metering-core/..., packages/docs/src/content/docs/en/reference/problem-recovery-cookbook.md, packages/metering-core/README.md
새 API, Problem 코드, durable delivery 설정 및 worker 상태 전이를 문서화했습니다.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related issues

  • croco-dev/framework issue 1522 — 새 저널의 idempotent 전달 상태를 Polar 이벤트 전달에서 사용할 수 있습니다.
  • croco-dev/framework issue 1527 — 중복, 재시도, terminal failure 및 전달 결과에 대한 conformance coverage와 직접 연결됩니다.
  • croco-dev/framework issue 1511 — durable billable usage journal과 전달 복원력 기반을 구현합니다.

Possibly related PRs

  • croco-dev/framework#839LlmMeteringService의 quota 처리와 새 billable usage journal 및 meter billing 요구사항이 연결됩니다.
  • croco-dev/framework#1130 — 다른 패키지에서 idempotency, lease, retry 및 failure state 전이를 구현합니다.
  • croco-dev/framework#1555MeteringService, Metered 및 billable meter 계약을 함께 변경합니다.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 영속적인 billable usage delivery를 구현한다는 PR의 핵심 변경을 정확히 요약합니다.
Linked Issues check ✅ Passed 구현과 테스트가 #1518의 저널 계약, 상태 전이, fencing, 진단, bootstrap 검증 요구사항을 충족합니다.
Out of Scope Changes check ✅ Passed 변경 사항은 #1518의 구현과 관련 API, 문서, 테스트, changeset 범위에 포함됩니다.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/1518-billable-usage-journal

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

📊 Benchmark Results

✅ All benchmarks passed

Benchmark p75 Threshold Baseline vs Baseline Status Notes
CrocoApp constructor 7.2μs 30.0ms 8.2μs -12.3% -
CrocoApp lambdaHandler (10 controllers) 231.7μs 50.0ms 258.4μs -10.4% -
Lambda cold-start simulation 360.5μs 80.0ms 418.1μs -13.8% -
Lambda cold-start with headers 283.3μs 80.0ms 369.7μs -23.4% -
Lambda cold-start with binary body 251.6μs 80.0ms 339.1μs -25.8% -
Lambda cold-start with query params 235.5μs 80.0ms 301.3μs -21.8% -
Lambda cold-start with authorizer context 227.4μs 80.0ms 299.8μs -24.2% -
Lambda cold-start realistic scenario 218.0μs 80.0ms 299.2μs -27.1% -
EventBusConfig.start (10 handlers) 1.3μs 10.0ms 1.4μs -9.6% -
EventPublisher.publishNow single event 1.5μs 2.0ms 1.7μs -8.6% -
DefaultHandlerResolver.resolve × 10 0.1μs 5.0ms 0.1μs -18.7% -
Container.get singleton (cold) 53.4μs 5.0ms 70.3μs -24.0% -
Container.register × 50 components 2.7ms 10.0ms 3.2ms -16.8% -
Container.validate (50 components) 3.2ms 20.0ms 3.4ms -5.7% -
Container.get singleton (warm) 1.3μs 500.0μs 1.6μs -17.6% -
TelemetryRuntime.init (lambda preset) 1.9μs 200.0ms 1.1ms -99.8% -
lambdaPreset config creation 1.3μs 2.0ms 1.4μs -10.8% -

Updated: 2026-08-01T17:24:11.785Z · Commit: a473174

@kang-heewon
kang-heewon force-pushed the fix/1518-billable-usage-journal branch from 044e20d to 4864bca Compare August 1, 2026 15:58

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 20

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@packages/docs/src/content/docs/api/metering-core/src/interfaces/BillableUsageJournal.md`:
- Around line 8-10: Update the original documentation comment for
BillableUsageJournal in BillableUsageJournal.ts so request-process-independent
persistence is required only when durability is "persistent", while retaining
the atomic-transition requirement for implementations generally; then regenerate
the corresponding API Markdown without editing the generated file directly.
- Line 11: Update the BillableUsageJournal claim contract documentation to state
that a claim is valid only when its lease has not expired, using server time as
the reference, in addition to matching ownerId and a monotonically increasing
fencingToken. Apply the change to the source API comment and regenerate the
generated documentation.

In `@packages/docs/src/content/docs/en/reference/problem-recovery-cookbook.md`:
- Around line 5846-5863: Update the `metering/billable-usage-journal-required`
documentation to describe a configuration validation failure from
`MeterRegistry.assertJournalConfigured`, triggered when billing is `"required"`
without a persistent `billableUsageJournal`, including during `loadAll`, lazy
`get`, or `register`. Replace the incorrect upstream-failure and retry-later
guidance with operator/user actions to connect a persistent journal or change
the meter billing contract before retrying.

In `@packages/metering-core/src/index.ts`:
- Around line 165-177: Move the InMemoryBillableUsageJournal and
RedisBillableUsageJournal exports out of the Events section in the index barrel.
Add a dedicated journal/storage section header, keep the value exports together,
and place the related BillableUsage* type export block immediately after them.

In `@packages/metering-core/src/libs/BillableUsageJournal.ts`:
- Around line 197-204: Update the claim return in the surrounding claim method
to explicitly construct a BillableUsageClaim object with state, ownerId,
fencingToken, leaseExpiresAt, and the remaining required entry fields, rather
than returning copyEntry(candidate) with a type assertion. Preserve the existing
field values and remove reliance on the type assertion so missing claim fields
are caught by the compiler.

In `@packages/metering-core/src/libs/decorators/Metered.ts`:
- Around line 174-193: Update the validation around Metered.record so a cached
"unknown" result caused by an expired billing cache does not throw before the
original method executes, especially for billing: "local". Route expired-cache
cases through the existing asynchronous synchronization path used by
MeterRegistry.getOrThrow(), or restrict the unknown check to genuinely
cache-only lookups; preserve rejection for billable meters when the required
service or contract is unavailable.

In `@packages/metering-core/src/libs/MeteringService.ts`:
- Around line 135-151: Extract the duplicated billing-required condition from
recordUsage and persistUsage into a shared private helper method in
MeteringService. Have both flows call the helper using meter and billableMeter,
preserving the existing InvalidUsageEnvelopeProblem validation and persistence
behavior.

In `@packages/metering-core/src/libs/MeterRegistry.ts`:
- Around line 29-33: Update the MeterRegistry DI wiring so billableUsageJournal
is included when constructing MeterRegistry, rather than only passing
repository. Adjust the construction paths in the metering entrypoint and package
smoke setup, or route creation through the existing MeteringService factory,
ensuring billing configuration reflects whether the journal is actually injected
and record() does not require an unavailable persistent journal.
- Around line 91-94: Update the save flow around repository.save and addToCache
in MeterRegistry to validate the returned MeterDefinition with the same
journal-configuration check after saving and before caching or returning it;
preserve the existing validation of options.

In `@packages/metering-core/src/libs/RedisBillableUsageJournal.ts`:
- Around line 70-72: Update the APPEND_SCRIPT and terminal-transition logic in
RedisBillableUsageJournal so accepted and terminal-failed entries receive the
configured retention TTL via the entry key’s EXPIRE operation. Remove the unused
allKey index and its writes, or define equivalent cleanup/TTL behavior if it
must remain; ensure terminal indexes are also bounded according to the retention
policy.
- Around line 1-14: Update the imports in RedisBillableUsageJournal so the
BillableUsage symbols use a dedicated import type declaration, removing the
inline type modifiers; preserve the existing value imports separately.
- Around line 16-27: Update the StoredEntry type by adding deliverableAt to the
Omit key list, so its explicit string | number property overrides the original
Date type and accurately represents the Redis-stored format.
- Around line 63-73: Redis Lua의 append 저장 흐름에서 cjson.decode(ARGV[2])와
cjson.encode(entry)를 제거해 원본 event payload를 재직렬화하지 마십시오. client가 전달한 ARGV[2]를 별도
field 또는 key에 원문 그대로 저장하고, createdAt·createdAtEpochMs·updatedAt 같은 mutable 상태만
별도로 추가하거나 갱신하십시오. RedisBillableUsageJournal의 append 관련 Lua 반환값과 저장 구조가 원본 event
및 eventFingerprint를 그대로 보존하도록 조정하십시오.

In `@packages/metering-core/src/libs/types.ts`:
- Around line 22-24: Update MeterDefinition.aggregation in types.ts to use the
existing MeterAggregation type from MeterRef.ts instead of declaring the inline
"COUNT" | "SUM" union, preserving the current allowed values and eliminating the
duplicate definition.

In `@packages/metering-core/src/tests/BillableUsageJournal.spec.ts`:
- Around line 18-52: Update the InMemoryBillableUsageJournal tests to initialize
a shared journal in beforeEach instead of constructing it inside each it block.
In the conflicting-event test, validate the rejected Problem with
rejects.toThrow while preserving the existing code assertion for
"metering/transition-conflict".

In `@packages/metering-core/src/tests/MeteringService.spec.ts`:
- Around line 460-501: Extract the repeated
InMemoryBillableUsageJournal-to-persistent BillableUsageJournal wrapper into a
shared test helper, preserving all method bindings and overriding durability to
"persistent". Replace the duplicate wrapper construction in both the “should
retain a pending intent after local commit and process loss” test and the
corresponding test around the second occurrence, so future BillableUsageJournal
interface changes require updating only the helper.

In `@packages/metering-core/src/tests/MeterRegistry.spec.ts`:
- Around line 40-54: Extend the MeterRegistry tests near “should reject a
required billing meter without a persistent journal” to cover a
BillableUsageJournal with durability set to “volatile”. Assert that
registry.loadAll() rejects with code “metering/billable-usage-journal-required”,
preserving the existing no-journal and persistent-journal cases.

In `@packages/metering-core/src/tests/RedisBillableUsageJournal.spec.ts`:
- Around line 116-130: Update the RedisBillableUsageJournal diagnostics tests
around getDiagnostics to add coverage for an empty backlog where the Lua result
uses -1 and oldestPendingAgeMs resolves to null. Remove the script-text
assertion expect(script).not.toContain("0, -1"), while preserving the existing
diagnostics and Redis eval argument assertions.
- Around line 111-113: Update the ordering assertion in
RedisBillableUsageJournal.spec.ts to first verify that both SET and ZREM call
strings are present before comparing their positions. Keep the existing order
requirement, but ensure a missing or changed script fragment causes the test to
fail instead of allowing indexOf’s -1 result to pass.

In `@packages/metering-core/src/tests/RedisMetering.integration.spec.ts`:
- Around line 297-307: Replace the fixed 120 ms delay in the competing claim
test with short-interval retries that call journal.claimNext for worker-3 until
the expired lease is reclaimed, using a bounded timeout or retry limit. Preserve
the fencingToken assertion and ensure the retry failure clearly indicates that
the lease was not reclaimed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7b7b52ee-433c-4968-89e8-276ee991c1dd

📥 Commits

Reviewing files that changed from the base of the PR and between 64af41f and 4864bca.

⛔ Files ignored due to path filters (1)
  • packages/problems-core/src/generated/problem-code-registry.ts is excluded by !**/generated/**
📒 Files selected for processing (41)
  • .changeset/bright-badgers-journal.md
  • docs/problem-code-registry.json
  • packages/docs/src/content/docs/api/metering-core/src/classes/BillableUsageJournalRequiredProblem.md
  • packages/docs/src/content/docs/api/metering-core/src/classes/InMemoryBillableUsageJournal.md
  • packages/docs/src/content/docs/api/metering-core/src/classes/MeterRegistry.md
  • packages/docs/src/content/docs/api/metering-core/src/classes/MeteringService.md
  • packages/docs/src/content/docs/api/metering-core/src/classes/RedisBillableUsageJournal.md
  • packages/docs/src/content/docs/api/metering-core/src/interfaces/BillableUsageJournal.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/BillableUsageAppendResult.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/BillableUsageClaim.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/BillableUsageClaimOptions.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/BillableUsageDeliveryState.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/BillableUsageEvent.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/BillableUsageFailure.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/BillableUsageJournalDiagnostics.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/BillableUsageJournalEntry.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/MeterDefinition.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/MeteredMetadata.md
  • packages/docs/src/content/docs/api/metering-core/src/type-aliases/MeteredOptions.md
  • packages/docs/src/content/docs/api/problems-core/src/classes/Problem.md
  • packages/docs/src/content/docs/api/problems-core/src/variables/CROCO_PROBLEM_CODE_REGISTRY.md
  • packages/docs/src/content/docs/en/reference/problem-recovery-cookbook.md
  • packages/metering-core/README.md
  • packages/metering-core/src/index.ts
  • packages/metering-core/src/libs/BillableUsageJournal.ts
  • packages/metering-core/src/libs/MeterRegistry.ts
  • packages/metering-core/src/libs/MeteringService.ts
  • packages/metering-core/src/libs/RedisBillableUsageJournal.ts
  • packages/metering-core/src/libs/decorators/Metered.ts
  • packages/metering-core/src/libs/problems/BillableUsageJournalRequiredProblem.ts
  • packages/metering-core/src/libs/redisKey.ts
  • packages/metering-core/src/libs/types.ts
  • packages/metering-core/src/tests/BillableUsageJournal.spec.ts
  • packages/metering-core/src/tests/MeterRegistry.spec.ts
  • packages/metering-core/src/tests/MeteringService.spec.ts
  • packages/metering-core/src/tests/RedisBillableUsageJournal.spec.ts
  • packages/metering-core/src/tests/RedisMetering.integration.spec.ts
  • packages/metering-core/src/tests/decorators/Metered.spec.ts
  • packages/metering-core/src/tests/problems/Problems.spec.ts
  • public-api-surface.snapshot.json
  • scripts/package-entrypoint-smoke.mts

Comment thread packages/metering-core/src/index.ts
Comment thread packages/metering-core/src/libs/BillableUsageJournal.ts
Comment thread packages/metering-core/src/tests/MeteringService.spec.ts
Comment thread packages/metering-core/src/tests/MeterRegistry.spec.ts
Comment thread packages/metering-core/src/tests/RedisBillableUsageJournal.spec.ts Outdated
Comment thread packages/metering-core/src/tests/RedisBillableUsageJournal.spec.ts
Comment thread packages/metering-core/src/tests/RedisMetering.integration.spec.ts Outdated
@kang-heewon
kang-heewon force-pushed the fix/1518-billable-usage-journal branch from 4864bca to 13df9bd Compare August 1, 2026 16:37
@kang-heewon

Copy link
Copy Markdown
Member Author

@coderabbitai resolve

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown
✅ Action performed

Comments resolved and changes approved.

@kang-heewon
kang-heewon force-pushed the fix/1518-billable-usage-journal branch from 13df9bd to eda7498 Compare August 1, 2026 17:19
@kang-heewon
kang-heewon merged commit 99ace13 into trunk Aug 1, 2026
12 checks passed
@kang-heewon
kang-heewon deleted the fix/1518-billable-usage-journal branch August 1, 2026 18:39
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.

[metering-core] Add a durable journal for billable usage delivery

1 participant