Skip to content

Record allowance: a 10% soft buffer, and usage the app can show #1522

Done

Description

@athvin

Part of #1519. Owner decision (2026-12-02): the pricing page is the policy.

/pricing promises a 10% soft buffer, a prompt to upgrade and no surprise mid-term charges (pricing-calculator.tsx:483-487). The server refuses every new delivery with 402 at records >= allowance (rust/crates/er-server/src/lib.rs ~6654-6680), and the BFF turns that 402 into a 502 "internal" (frontend/src/app/api/.../imports/route.ts:69). Connected-record usage is shown nowhere in the app.

Scope

  • Server: refuse only above allowance × 1.10; between 100% and 110% accept and mark the org as over its allowance (a header or a usage field the app can read). Contract and OpenAPI updated.
  • BFF: pass the 402 through as a plain "Your record allowance is reached" with the usage figures.
  • App: show connected records against the allowance where an admin will see it (org settings or the dashboard), with the over-allowance state said in words.
  • /docs usage section matches the new behaviour.

Activity

  1. athvin commented on Dec 2, 2026

    @athvin
    OwnerAuthor

    Not started on 2026-12-02, for an environmental reason: the work changes er-server (the refusal threshold, a new over-allowance field on GET …/usage) and so the OpenAPI contract, which needs a local make check. The build machine's disk is at 98% (24 GiB free), and a cold Rust build in a fresh worktree costs about that much on a disk other sessions share. Scope is unchanged: refuse at allowance × 1.10; between 100% and 110% accept and report over-allowance; the BFF passes the 402 through as a plain message (today it becomes a 502); the app shows usage against the allowance; /docs' usage section follows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions