Skip to content

feat(usage): add auditable usage ledger - #20

Merged
cnjack merged 3 commits into
codex/jtype-agent-work-prdfrom
codex/usage-ledger
Jul 31, 2026
Merged

feat(usage): add auditable usage ledger#20
cnjack merged 3 commits into
codex/jtype-agent-work-prdfrom
codex/usage-ledger

Conversation

@cnjack

@cnjack cnjack commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • capture normalized Run and Device Cloud Model Proxy usage without retaining prompts, responses, headers, or encrypted relay payloads
  • add immutable pricing revisions, UTC hourly rollups, durable request-id deduplication, retention, and honest Reported / Estimated / Uncosted summaries
  • surface usage on Runs, Projects, Automations, JType Cards, Devices/Account, and the model catalog with responsive page-scoped prototypes
  • preserve Cron create-card provenance while keeping ordinary Card work out of Automation totals

Verification

  • cd orchestrator && go test ./...
  • cd orchestrator && go test -race ./internal/api ./internal/store ./internal/provenance ./internal/reconciler
  • cd orchestrator && go vet ./...
  • cd console && pnpm test (75 files, 601 tests)
  • cd console && pnpm typecheck
  • cd console && pnpm lint:tokens
  • browser-verified Usage prototypes at 1440px and 390px; zero console errors

PostgreSQL-gated rollup and pricing-deletion tests are included; they skip locally when JCLOUD_PG_DSN is not configured.

Stacked on #19.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c86d1344-d8f3-4d08-a990-a9f9a630ff76

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

Base automatically changed from codex/automation-execution-ledger to codex/jtype-agent-work-prd July 31, 2026 15:16
@cnjack
cnjack merged commit 8ad332c into codex/jtype-agent-work-prd Jul 31, 2026
3 checks passed
@cnjack
cnjack deleted the codex/usage-ledger branch July 31, 2026 15:16
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.

1 participant