Nobody read PR #471. It shipped your Stripe key.

Agents open more pull requests than anyone reads, and whatever slips through ships. Ratsia holds each one to the laws your org enacts. Break one, and its check fails until the code is fixed.

Sign in See how
Architecture

The agent put SQL in a handler. Again.

You wrote the same review comment last week and the week before. The agent agreed both times. Its next session starts with no memory of it.

You have had this argument three times. It was settled the first time.

Without RatsiaThe rule lives in your head and in old comment threads.
Week 1PR #412 handlers/payout.ts db.query("UPDATE payouts …")

youNo SQL in handlers. Use the repository.

fixed after review
Week 2PR #437 handlers/invoice.ts db.query("SELECT … invoices")

youNo SQL in handlers. Use the repository.

same comment, again
Week 3PR #458 handlers/refund_webhook.ts db.query("UPDATE refunds …")

agentIt needs the same transaction.

youFine, merge it.

exception, lost in a thread
Week 4PR #471 handlers/payout.ts db.query("UPDATE payouts …")

tom-hMerged at 23:40. Nobody read it.

rule broken, unseen
Four weeks, the same argument three times, and SQL in four handlers.
With RatsiaThe law is in Ratsia. Breaking it fails the check. A person rules once.
Week 1PR #412 handlers/payout.ts db.query("UPDATE payouts …")

ratsiaCharged: handlers-no-sql. Check failed.

agentIt needs the same transaction.

youConvicted. Use a repository method that takes a tx.

verdict by a judge · on record
Week 2PR #437 handlers/invoice.ts invoices.findOpen(tx)

ratsiaNo charge.

no charge
Week 3PR #458 handlers/refund_webhook.ts refunds.recordRetry(tx)

agentSame transaction, passed in as tx.

no charge
Week 4PR #471 handlers/payout.ts payouts.markPaid(tx)

tom-hMerged at 23:40. Nothing to read.

no charge
One decision in week 1. The law held for the next three weeks, without you.
Money

The agent stores money as a float. It says it rounds later.

Maybe it does. To know, you open the PR, find the file, follow the call and check. Or a teammate merges it at 23:40 without looking.

Some invoices end up a cent off, and nobody knows since when.

northwind/billing #481· Proration for annual plans
RatsiaCheck failing · 1 charge, waiting for a verdict
Finding · money-integer-cents

billing/proration.ts multiplies a float price by a day ratio and stores the result without rounding to cents.

Dispute · agent

The value is rounded to cents when the invoice is built.

Verdict · convicted by maria-k

Rounding later means storing a float now. Store cents.

Pull request checkfailing until the code is fixed
Your account

The agent merged it. With your account.

Agents push, comment and merge with the same GitHub login as you. Afterwards nothing in the history says whether a person decided.

“Approved by you” no longer means you approved it.

maria-kmerged #466person or agent?
maria-kmerged #467person or agent?
Convicted billing #481maria-k · judge role in Ratsia · 14:31

An agent can push, comment and dispute as you. It cannot give a verdict: only a judge signed in to Ratsia can.

Day one

You turn it on. Old code is not charged.

Ratsia judges only the lines a pull request adds or changes. Old code is never charged, so turning a law on does not fail every check.

A gate everyone ignores is worse than no gate.

northwind/search #512Add refund webhook
RatsiaCheck failing · 1 new violation in lines this PR adds
Charged · handlers-no-sql

handlers/refund_webhook.ts:41 runs db.query in a handler.

handlers-no-sqlold · not in this PR
i18n-all-stringsold · not in this PR
secrets-from-configold · not in this PR
index-queries-testedold · not in this PR
Pull request checkfailing until the new violation is fixed

Law, justice, order.

The same three parts as anywhere people, and now machines, live by rules.

LawYour org enacts the law.

Each law is one sentence and why. Ratsia enforces nothing your org has not enacted.

JusticeEvery charge gets a hearing.

A pull request that breaks a law is charged. A person on the PR, or an agent working under a person's login, can answer in plain text. Bots cannot. The prosecutor rules on the answer: if the code bears it out, the charge closes; otherwise a judge rules. Every verdict is kept on the case record.

OrderNothing gets past the gate.

A charged pull request fails its check until the code is fixed or a judge acquits. A gate that did not finish fails too. It never shows as a pass.

Ratsia enforces only what your org enacts.

Sign in to see the cases on your repos.

Sign in