feat(billing): include monthly investigations with Autumn-only billing - #788
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
The latest updates on your projects. Learn more about Unkey Deploy
|
Greptile SummaryThis PR moves investigation billing fully onto Autumn while introducing monthly investigation allowances and overage terms for Business and Scale. It also aligns billing controls, chat entitlements, pricing surfaces, documentation, and structured data with those terms.
Confidence Score: 5/5The PR appears safe to merge; the previously reported settlement-retry defect is fixed and no new actionable issue remains. Settlement failures no longer allow a delivered prepared result to be checkpointed as successful before billing confirmation. Worker retries and maintenance recovery both confirm the original Autumn reservation before finalization, while the persisted prepared result prevents repeated model execution or delivery. The earlier loading-layout thread and settlement thread were manually resolved. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Investigation requested] --> B[Validate explicit analysis consent]
B --> C[Autumn check with lock]
C -->|Denied| D[Reject before model execution]
C -->|Reserved| E[Generate investigation]
E -->|Incomplete or failed| F[Release reservation]
E -->|Readable result completed| G[Persist prepared result and effects]
G --> H[Confirm original Autumn reservation]
H -->|Success| I[Checkpoint job as succeeded]
H -->|Temporary failure| J[Keep job queued or failed with prepared result]
J --> K[Worker retry or maintenance finalizer]
K --> H
Reviews (5): Last reviewed commit: "fix(insights): retry native settlement b..." | Re-trigger Greptile |
|
@greptileai Please review final head f355c18. The loading placeholder finding is fixed and resolved; the final follow-up also removes an unconfigured introductory price and shortens investigation terms. |
|
@greptileai Please review final head 875f665. The additional change preserves cancellation and native prices for existing active, past-due, and scheduled paid add-ons while hiding new credit offers. The earlier layout and native-price findings remain fixed. All local required checks and the added synthetic browser scenarios pass. |
b85f4fd to
cb97d20
Compare
|
@greptileai Please review final head cb97d20 before staging merge. The settlement failure finding is fixed in generation, worker completion, and the existing maintenance finalizer. The actual-worker regression fails on the old behavior and passes on both nonfinal and final attempts with one original reservation/model/delivery. Fresh root lint, 33 type/build tasks, 27 test tasks and 96 Insights integration cases pass. The branch is rebased onto current staging, including #783. Please check the first-run outage and prepared-replay paths as well as the remaining native Autumn billing flow. |
Business and Scale currently show zero investigations alongside credit grants. Give Business 100 investigations/month for $299 and Scale 500/month for $799, with $1 per completed investigation above the allowance. Included events remain 2M and 10M respectively.
Restore the older visible public comparison table and dashboard card layout. Pricing pages, calculator, API, structured data, Markdown, billing, and investigation prompts share the same terms. Remove duplicate explanations, zero-allowance rows, unsupported introductory pricing, and credit purchase/top-up controls for accounts with included chat. Disabled settings collapse fully; pending buttons retain their width and accessible label. Legacy attached plans and purchased balances retain their actual Autumn terms.
Autumn owns investigation billing. Native check-with-lock reserves a unit; completion confirms it and failed/incomplete work releases it. Remove the staging Postgres charge table, accepted-price field, and custom billing recovery loop. The immutable 23-hour hold remains inside Autumn's default idempotency window; saved results never create replacement charges. Missing or expired holds are neutral, so uncertain recovery can leave work free. Existing product job checkpoints and maintenance handle recovery without storing financial state.
The final review found that a delivered prepared result could swallow a settlement error and stop retries. Both worker completion and the existing maintenance finalizer now require settlement first. Generation saves its ordinary completed product checkpoint before propagating a settlement outage, allowing maintenance to recover even after the final worker attempt. Partial portfolios and model failures retain their previous handling.
Validation:
Economics: 12 earlier real Luna episodes averaged $0.00531 in model charges using synthetic backing services. This does not measure total operating cost. A conservative planning reserve of $0.25 per investigation allocates $25 on Business and $125 on Scale; subscription revenue must also cover chat, analytics, infrastructure, fees, and support. At 10M events and 500 investigations, Business totals $939 versus Scale's $799.
Scope: investigation billing, included chat, and presentation. No unmerged dependency. AI-assisted implementation and review under the maintainer workflow.
Production promotion #789 remains a draft. Live Autumn Business/Scale still have legacy v1 terms as of September 14; this PR does not sync live plans, activate customers, or mutate production databases. Release compatible code before replacing live credit entitlements. Live invoice/reset behavior remains unverified.