docs: add AI SRE credit package agreement - #206
Open
ysyneu wants to merge 29 commits into
Open
Conversation
…t-agent-sync docs: sync monit-agent target guides
…20260723-031705 docs(api): sync monit tool contracts
…0723-031823 docs: sync source-backed review findings
…20260724-031712 docs(api): sync public API contracts
…0724-031820 docs: sync source-backed review findings
…ntation Audited every checkable claim in this agreement against the credits code on feat/ai-sre-credits rather than against the handoff notes. Four claims were wrong and three material terms were missing. Wrong: - The PAYG overshoot warning said letting an in-flight run finish "可能使最终 消耗超过...已设置的按量上限". It cannot: allocateCredits draws PAYG at min(cap, remaining) and diverts the rest to alloc_platform_nano, so the customer's billed amount is hard-capped and the overflow is absorbed by Flashduty. The agreement was warning of an overcharge the code prevents — the one direction a money document must never get wrong. Now states the actual behaviour, which is better for the customer. - "沙箱异常、无效或无法归属到已准入运行的异常区间,不计沙箱费用" described a carve-out that does not exist. `sandbox_error` appears only in three DDL/doc comments as an illustrative example; discoverSandboxFacts has no error branch at all, and sandbox billing is deliberately not tied to any admitted run. Replaced with what actually happens: billed per online minute, paused time free, independent of whether a task is running. - "内部结算金额和 credits 精确到小数点后 5 位" conflated the pgy wire boundary with the ledger. Every internal column is *_nano at 1e9 (9 decimals); 5 decimals is only ToAmountE5 at the settlement boundary. - "使用人持有可用 AI SRE License" named a SKU that does not exist. The per-person gate is real but draws on the shared Flashduty license pool. Missing: - What actually consumes credits. The section listed only exclusions and only ever mentioned model tokens. Three billable kinds exist — model tokens, sandbox online time, and web search per call — and the last two were invisible to the reader. Added the dimensions, units and current unit prices, plus the "price binds to the model tier, not the supplier" guarantee. - The third PAYG state. monthly_limit_nano is NULL/0/positive and the console exposes all three, including "禁止按量付费"; the agreement described only set-vs-unset, hiding the one setting a cost-averse customer most wants. - Arrears. An exhausted wallet disables postpaid resources including AI SRE itself, and packages (prepaid) survive it. Implemented in fc-pgy's logic/charge/arrears.go, and the agreement said nothing about it. Also warns to enable AI SRE before buying: an unprovisioned account is never metered, so a package bought first sits idle while its 365 days run out. Search billing is now real (per-call metering of the built-in web_search tool), so the "检索请求失败时不计费" line describes shipped behaviour rather than an intention — and it now also says the case it left ambiguous: a search that succeeds with zero results is still a charged call.
…e period Metering starts at enablement. That was already the intent behind the warning above it — an account without AI SRE enabled consumes no credits at all — but the agreement never said what becomes of that usage AFTER enabling, and the accounting engine, until a companion fix in fc-safari, priced an account's entire pre-enable history on its first run. Saying it makes the guarantee a term of the agreement rather than an implementation detail a customer has to take on trust.
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.
Doc Review — 2026-07-25
Mode: audit (AI SRE billing agreement)
Findings: 1 total — 1 high
Changes
zh/en/compliance/ai-sre-credit-package-purchase-agreement.mdxReview checklist
Mapping warnings
None
Skipped
None