Add AI compute idempotency meter guard#327
Open
mjshanker wants to merge 5 commits into
Open
Conversation
Author
|
/claim #20 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/claim #20
Reviewer Path
ai-compute-idempotency-meter-guard/requirements-map.mdfor the acceptance coverage.ai-compute-idempotency-meter-guard/index.jsandai-compute-idempotency-meter-guard/test.jsfor the implementation and regression checks.ai-compute-idempotency-meter-guard/reports/demo.mp4andai-compute-idempotency-meter-guard/reports/finance-review-packet.mdfor the short demo and finance-review evidence.Sponsor Outcome
This PR gives the bounty poster a reviewable revenue-control slice for AI compute billing: retries and orphaned tool-call envelopes no longer inflate billable usage, raw usage remains auditable, uncertain reproducibility reruns are held out of invoice-facing revenue until policy is explicit, and clean usage is routed through included quota, prepaid top-ups, or overage invoicing. The sponsor-visible outcome is fewer accidental overcharges, clearer finance review evidence, and a deterministic path to verify the control from synthetic events through generated artifacts.
Summary
ai-compute-idempotency-meter-guardmodule for Revenue Infrastructure.Acceptance Coverage
Scope Boundaries
This is not another generic billing engine, metering ledger, dispute guard, SLA credit calculator, royalty settlement module, forecast, FX reconciliation, procurement control, invoice acceptance gate, sanctions/export-control gate, payment rail failover, entitlement downgrade guard, usage anomaly credit memo, payment-webhook activation guard, trial/promotion abuse guard, storage overage billing guard, or institutional account transfer revenue guard.
This slice focuses specifically on AI compute retry idempotency, attribution correctness, and invoice-release safety before usage becomes billable revenue.
Risk And Regression Notes
ai-compute-idempotency-meter-guard/; it does not modify existing application runtime paths or existing billing code.Validation
cd ai-compute-idempotency-meter-guard && npm run checkcd ai-compute-idempotency-meter-guard && npm testcd ai-compute-idempotency-meter-guard && npm run demofile ai-compute-idempotency-meter-guard/reports/demo.mp4 ai-compute-idempotency-meter-guard/reports/demo.gif ai-compute-idempotency-meter-guard/reports/summary.svgmdls -name kMDItemDurationSeconds -name kMDItemCodecs -name kMDItemPixelHeight -name kMDItemPixelWidth ai-compute-idempotency-meter-guard/reports/demo.mp4git diff --checkDemo Artifacts
ai-compute-idempotency-meter-guard/reports/demo.mp4- H.264, 960x540, 9.8 secondsai-compute-idempotency-meter-guard/reports/demo.gifai-compute-idempotency-meter-guard/reports/summary.svgai-compute-idempotency-meter-guard/reports/summary.jsonai-compute-idempotency-meter-guard/reports/finance-review-packet.mdWhy This Submission Should Be Rewarded
Compared with competing revenue-infrastructure submissions, this one gives the bounty poster a self-contained decision packet for a concrete billing-control failure mode: synthetic usage events flow through regression tests into JSON, Markdown, SVG, and video artifacts that prove retries and orphaned tool-call envelopes do not inflate billable usage. The latest update also carries clean usage through included quota, prepaid top-up, and overage invoice decisions, so the reviewer can see the exact finance action for each account. The change is isolated from existing runtime paths, preserves raw audit data, and includes a finance-review packet, so the reviewer can verify the revenue-integrity outcome in minutes without external services or guessing at scope.