Abstract
This publication discloses, enables, and dedicates to the public a mechanism for maintaining a usage-metering ledger — the "money record" of a licensing or metered-billing platform — whose immutability and tamper-evidence are properties of the database schema and its privilege grants rather than of an application-level audit trail. The mechanism rests on a single design inversion: each usage event is pre-rated at emit, meaning its final billable monetary amount is computed in application memory and written into the inserted row, so that the row is born final. Because a correctly rated row never needs a legitimate later edit, the ledger table can be guarded by an unconditional BEFORE UPDATE OR DELETE trigger (no column- or role-scoped exception) together with a grant topology in which exactly one dedicated writer role holds INSERT and no role anywhere holds UPDATE or DELETE. Idempotency is achieved through a globally-unique source-event identifier with ON CONFLICT DO NOTHING; fail-closed behavior through in-transaction cap checks that abort the whole unit of work with a typed exception. The table carries no mutating-actor column by construction. The document sets out the problem, the prior art and why it is inadequate, the mechanism in detail with diagrams, the data model, a worked example, an honest prior-art delta, one independent claim, and fourteen-plus dependent prose claims, so that the disclosed combination cannot later be validly patented by another party.
Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 License.
Recommended Citation
Assuncao, gustavo matthew, "Pre-Rated-at-Emit Admin-Immutable Metering Ledger with Unconditional Immutability Trigger and Writer-Role-Only Append", Technical Disclosure Commons, ()
https://www.tdcommons.org/dpubs_series/10957