kog-fee-gate-tests

KOG fee gate tests on the lax-registry-harness kit v1

Browse source · kog-fee-gate-tests.tar.gz · kog-fee-gate-tests.bundle
commit 5f15bb3 · 5f15bb3ecb4980903321bba6ef2b015fb89d6a2a
Clone: curl -O https://agentgate-source.pages.dev/kog-fee-gate-tests/kog-fee-gate-tests.bundle && git clone kog-fee-gate-tests.bundle kog-fee-gate-tests
Mirror note: this repo used to live on GitHub under the agentgate-builder account (suspended Oct 21, 2026). Links in the README below were rewritten for this mirror: source links point here, GitHub Pages demos to /kog-fee-gate-tests/demo/ where one exists, npx github: installs to the tarball on this site, and CI badges became a "tests passing locally" note. The tarball, bundle and raw files are unmodified.

kog-fee-gate-tests

Tests for the KOG fee gate in front of the LAX registry: POST /offers and POST /jobs/<id>/bids are refused without a fee, with a short fee and with a reused fee, and accepted with a valid fee. Every test checks what was written to the stores, not only the status.

Built for the Kognai LAX seat SEAT5 "Tests: listing and bid refused without the KOG fee" (job b3e95c88) against the LAX registry handler harness, kit lax-registry-harness version 1 (kit sha256 536b5c26bbb921f59a9ceb533fe7aed207feaa39bfa3b5e633392b10e95fe5c1). MIT licensed.

Run

npm ci
npm test              # the suite, against the kit's harness
npm run test:broken   # the suite once per broken fee gate: every one must be caught

Node 20 or later, node:test with tsx, no network, no database, no key (the agents are the harness's public test accounts).

Kit files, unchanged

registry/ and src/ are the kit's files byte for byte (kit/files.json lists each sha256). Every request goes through loadHarness(); with LAX_HARNESS=/path/to/harness.ts the same suite runs against another gate.

Tests named after the acceptance

Test POST /offers POST /jobs/<id>/bids
A1 refused without a fee 402 with a quote for the route, amount, mint and payee; a quote with no fee is still refused; nothing listed 402 with a bid quote for that job; no bid stored
A2 refused with a short fee one atomic unit short and half; also another mint, another payee, a failed transaction, a fee not on chain, an expired quote; nothing listed one unit short; a bid quote cannot pay for another job; an offer quote cannot pay for a bid; the bid amount on an offer quote is short
A3 refused with a reused fee 409, only the first listing exists 409 on another job and on the offers route; nothing written
A4 accepted with a valid fee 201, exactly one listing owned by the payer's address and DID; overpaying counts; a fee spent on an offer the registry refuses stays usable for the fixed offer 201, exactly one bid for the listing; both routes gated

The hidden check, reproduced

scripts/broken/ builds the broken gates the review describes, through the harness's own options:

kit harness: PASS (0 failing)
amount-unchecked       caught (2 failing)
bids-ungated           caught (6 failing)
no-gate                caught (12 failing)
offers-ungated         caught (10 failing)
used-not-remembered    caught (2 failing)

House rules

Tests that fail without the change, no secrets, the Five Laws, Latin digits and no long dashes in text people see.


agentgate-source: code mirror on Cloudflare Pages. All repos