Repository navigation
feat(api): a 10% soft buffer above the record allowance, and usage the app can show (#1522) - #1560
Merged
Merged
Conversation
Contributor
|
This link updates with new commits. The PR's previews are deleted when it closes or merges. |
…e app can show (#1522) /pricing promised a 10% soft buffer above a tier's record cap and a prompt to upgrade; er-server refused every delivery with 402 the moment records reached the allowance, and the BFF turned that 402 into a 502 "internal". The owner made the page the policy. er-server: - refusal_limit(allowance) = allowance + 10%, rounded up and saturating; deliveries are refused only once records reach it. - GET /v1/orgs/{org}/usage gains over_allowance (records > allowance, still accepted) and limit (where refusals start); at_limit keeps its meaning, "new deliveries are refused". Additive to the public contract; the OpenAPI documents and schema.d.ts are regenerated. - The 402's detail names the total, the allowance and the limit. - The launch proof walks the buffer: over the allowance and accepting, then at the limit and refusing, then raised and accepting. frontend: - BFF: a new allowance_reached code; an upstream 402 maps to it (shared mapping and the imports route), never to 502. - Settings → Usage: connected records against the allowance, the buffer drawn to scale in the same track, each dataset's share, and the standing in a sentence with its glyph. Any member may read it. - Dashboard: "Needs attention" says when the org is over its allowance or refusing new records, linking to Usage. - /docs' usage section describes the buffer. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…1522) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… reference (#1522) The agent-skills drift gate failed on #1560: the new /[org]/settings/usage page was missing from frontend-data-ui's generated screens list. Co-Authored-By: Claude Opus 5.5 <[email protected]>
athvin
force-pushed
the
feat/allowance-buffer
branch
from
December 3, 2026 02:56
9e75838 to
5cedb8e
Compare
This branch was successfully deployed
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.
Closes #1522
What
The 10% soft buffer the pricing page promises is now real. er-server refuses deliveries only once records reach the allowance plus 10% (
refusal_limit).GET /v1/orgs/{org}/usagegains two fields:over_allowance— the org is over its allowance and still accepting;limit— where refusals start.at_limitkeeps its meaning, "refused". In the frontend:allowance_reachedinstead of a 502 "internal";/docsdescribes the buffer.Why
Part of #1519. The owner decided (2026-12-02) that the pricing page is the policy. The code refused at 100% of the allowance, and the app showed that refusal as a generic error.
Proof
cargo fmt --checkclean.cargo clippy -p er-server --all-targets -D warningsclean.cargo test -p er-server --lib allowance_buffer: 3 passed. The overflow case caught a real+ 99overflow ati64::MAX, now saturating.pg_launch_proof.rs, Postgres-backed, CI's DuckLake e2e tier) now walks: over the allowance and accepting, then at the limit and 402, then raised and accepting.schema.d.tswere regenerated (additive).make api-launch-gate-checkself-test: 14 passed.vitest run→ 1,333 passed. New tests cover the 402 →allowance_reachedmapping, the usage card's four states, and the error vocabulary.usage-settingsscreen), dashboard, grow, steward surfaces, first results → 188 passed.Risk & rollback
The refusal threshold moves up by 10%; no data changes. The dashboard reads usage once a minute (one lake count per dataset, the same count every delivery already pays).
git revert <merge-sha>.Post-merge ledger
Closed by: unclosed
mainis green with this change on it — the merge SHA, and the runthat proves it. A later head SHA with this commit as an ancestor counts;
a cancelled run with zero jobs does not:
imagesbuilt, or correctly never ran because nothing that goes intoan image changed:
deployconverged — proved by a line the running process emitted, notby the image digest and not by the workflow conclusion:
deploy,drift,kind's nightly leg) is green, or knowingly red for a reason that is notthis change:
Donethrough the automation rather than byhand, and the issue closed:
(a skill, a reference, memory) — or nothing new was learned:
Specific to this change
Context — plan, discoveries, measurements, files
Plan
Discoveries
Measurements
Files
🤖 Generated with Claude Code