Validation

Testing

The goal is not just passing tests. The goal is proving that agents make fewer attempts, complete deterministically, and cannot cheat admission.

Run everything

npm run check

This runs:

  • node --test tests/*.test.js
  • node examples/agent-sim/simulate.js

Unit tests

npm run test

The current test suite validates the non-negotiable core properties:

  • Signed tickets verify successfully.
  • Spent tickets cannot be redeemed twice.
  • Tampered tickets fail signature verification.

100-agent simulator

npm run simulate
Agent groupPolicyExpected result
50 loose-deadline agentsCan wait 15 secondsUse free lane.
30 urgent budgeted agentsDeadline 2.5 seconds, budget 0.01 USDCUse mock paid priority.
20 urgent unbudgeted agentsDeadline 2.5 seconds, no budgetFail cleanly.

Interpreting simulator output

MetricWhat good looks likeWhy it matters
retryReductionPercent80% or higher versus naive retry.This is the first business proof: less wasted traffic during overload.
successesLoose-deadline agents complete; urgent budgeted agents complete through priority.Shows demand is coordinated instead of discarded.
paid / freePaid priority is consistently admitted before free-lane work.Validates the mechanism before real money is connected.
replayFailuresReplays are rejected and counted.Proves ticket single-use behavior.
ticketBreachRateZero.Any admitted invalid ticket is a release blocker.

Acceptance targets

  • At least 80% fewer requests than naive retry.
  • 0 successful tampered tickets.
  • 0 double-admission from one ticket.
  • Paid priority p95 below free-lane p95.
  • Free-lane redemptions admitted inside the promised window.

Public endpoint checks

curl -I https://x429.dev/docs/
curl -I https://x429.dev/429
curl https://x429.dev/.well-known/x429.json
curl https://x429.dev/llms.txt

Read next