UNIT COST IS A CODE REVIEW CONCERN

Catch unit-cost
regressions before
they reach production.

MarginCI runs the same declared operation against two revisions, meters supported paid APIs, and fails CI when cost per successful operation exceeds your threshold.

LOCAL CLI / YOUR CI RUNNER / NO ACCOUNT REQUIRED

02 / THE ECONOMIC CHECK

Your tests pass.
Your unit cost
just went up.

This declared workload completes 20 cases on both revisions. The candidate costs 72.96% more per success, above its 20% limit.

+72.96%MEASURED REGRESSION

Synthetic, executable fixture. Configured values, not provider prices or customer savings.

Reproduce the local fixture ↗
marginci test researchFAIL · EXIT 1
MarginCI — research

Declared workload: 20 cases

Baseline:  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Candidate: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb

                         BASELINE        CANDIDATE
successful               20/20             20/20
openai                   $1.820000       $3.110000
exa                      $0.140000       $0.280000
known value              $1.960000       $3.390000
cost / success           $0.098000       $0.169500
measured regression      72.96%
allowed regression       20.00%

Values follow frozen configured rates / allowed provider estimates; not settled invoice charges.

FAIL
Verdict applies to the declared MarginCI workload. It is not an estimate of unseen production traffic.
Exit: 1
Executed and checked by npm run example:check

03 / A SMALL, EXPLICIT CONTRACT

One operation.
Two revisions. A useful gate.

For developers shipping bounded Node and TypeScript operations that call paid APIs. Bring an operation and a meaningful success check.

01

Define success.

A small wrapper calls your real application with fixed cases and checks whether it achieved its purpose.

Write an operation ↗
02

Compare the same work.

Freeze the declared workload, rates and success wrapper. Run baseline and candidate in separate local processes.

Read the comparison contract ↗
03

Gate the change.

Only a complete PASS approves the economic check. Failed attempts keep their spend. Unknown usage stays unknown.

Add the CI check ↗

04 / INTENTIONALLY BOUNDED

V0 provider support.

Read exact endpoint support ↗
01

OpenAI-compatible

Supported completions and final-usage streams.
Explicit configured model rates.

02

Firecrawl

Supported v2 batch creation and terminal settlement.
Configured credit value.

03

Exa

Supported search responses.
Opted-in estimates or configured rates.

KNOW THE BOUNDARY

One owned Node process per attempt. Tested on macOS arm64 with Node 25.3.0. No arbitrary child work, workers, queues or browser traffic. The spend guard limits modeled value; it cannot guarantee a provider invoice cap.

PRIVATE ALPHA / OWNER APPROVAL PENDING

Start with one
real operation.

Review the setup, supported boundary and retained data before trying MarginCI in your repository. Distribution is pending a deliberate license and release decision.

Prepare for private alpha View the GitHub repository ↗Repository access depends on its owner’s visibility policy.