feat(billing): dry-run usage submitter binary (CUA-1158) (#7875)
* feat(billing): add dry-run usage submitter binary (CUA-1158) New cyclops-usage-submitter command and submitter package. Selects completed hours after the cutover and settlement lag, aggregates current- revision facts per tenant-hour in Postgres numeric (truncated to six decimals), diffs against the stripe_submission ledger by fact-set hash, creates a batch with seq-based identifiers, archives the batch to S3 (JSON lines plus manifest, manifest last), then marks rows dry_run. Resumes batches left unarchived or unmarked by a killed run. Refuses a cutover earlier than any live batch. Live submission is not compiled in; SUBMIT_DRY_RUN=false is rejected. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * build(cyclops): build and ship cyclops-usage-submitter in the backend image Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fix(submitter): hash fact set on value only so a CPU-only revision does not resubmit memory Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * test(submitter): bind injected fake errors so errorswallow sees identity preserved Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> CloudCyclopsCs-RevId: 7f5e07223ca4944c986aadff799868355227dd0d
D
ddupont committed
592f6ee39e1d65101b00af756cb52b6181fdbfc8
Parent: 8cb8f6d
Committed by Copybara Sync <copybara-sync@users.noreply.github.com>
on 9/17/2026, 2:13:30 AM