Skip to content

v0.10.0

Latest

Choose a tag to compare

@Kraidle Kraidle released this 18 Nov 12:41
· 1 commit to main since this release

Release notes: v0.10.0, Genkan and the engine

The code in this repository moves ahead of the deployed service. The public endpoint is unchanged: it serves the same four
tools (attest · gate · cascade · calibrate) under contract 1.1.0, and nothing changes for a caller today. The frozen
schemas (schemas/*.json) are byte for byte those of v0.9.0; packages/contracts changes in the comments of its
sources and in its tests (names, messages, one assert.doesNotThrow).

1. Genkan, the order gate (new: apps/genkan)

  1. The kernel. A program written in Lean 4 (toolchain leanprover/lean4:v4.32.1, pinned) reads one request on stdin
    and writes one answer on stdout. Mode 1 judges an order under a context and answers allow or deny <reason>; mode 2
    decodes an order; mode 3 computes a SHA-256. A malformed request, or an input over 1 MiB, exits with code 3.
  2. The rules. A TRANSFER or an APPROVE is always denied. An order must target a listed venue. An EXIT on a listed
    venue is allowed whatever the action, the asset and the amount. Any other order needs the action commit, a listed
    asset and an amount within its cap; a SWAP also needs a listed output asset and minOut above 0.
  3. What is proved. Genkan/Theorems.lean holds 30 theorems, among them respond_allow_safe: whatever the input, an
    allow means a mode 1 request that decodes and an order that meets the rules above.
  4. How it is checked. A new blocking CI job, g3-genkan, audits the sources before any Lean runs, fetches the Lean
    release and holds it to its sha256, builds the kernel, replays each module with leanchecker, holds the axiom record
    of main and of each theorem to propext, Classical.choice and Quot.sound, and runs npm run test:genkan: the
    82 cases of kernel/vectors/judge.json and the mutants (of the 55 mutants of Genkan/Judge.lean, 49 are killed by a
    case, 6 do not compile, none survives).
  5. What it does not guarantee. The kernel knows no balance, position, price or venue rule; the lists and caps are the
    caller's; a cap holds one order, not a total; minOut above 0 is not a slippage guard; an EXIT must be executed
    reduce-only.

2. The harness (apps/harness)

  1. judge. A fifth tool runs the gate on the caller's envelope, then the kernel on the order, under the gate's own
    action and the caller's limits. It is in the code and tested against the built kernel; the public endpoint does not
    serve it yet.
  2. The paper executor (src/paper.ts, not served) passes each signal through judge and fills the allowed orders on
    paper, in a journal that replays. It places no order on any venue.
  3. Two optional gate inputs. params.calibration.aci, the online level of a class on the BYO path (a call without it
    stays on the split path), and params.suivi, a cell's tracking evidence, replayed on every call, which can only lower
    the budget B_t. Both are documented in apps/harness/README.md.
  4. Served texts. A refusal of the input schema names at most 100 errors. No message or description of the harness
    names an ADR any more (v0.9.0 had 14, among them the refusal of the retired class).
  5. Dependencies. @modelcontextprotocol/server and @modelcontextprotocol/core 2.0.0 → 2.3.1, both now under
    Apache-2.0 (MIT before), and with them zod 4.6.1 → 4.6.7; minimatch 10.2.6 → 11.0.4 through overrides, which
    brings @isaacs/nonrecursive-glob-match 1.0.3.
  6. End-to-end trace. fixtures/h5-e2e-trace.json stays the recording of v0.9.0, the one the site reads: four tools,
    as the public endpoint serves them. Recorded on this code, it differs in three values only: the tool list gains
    judge, the digest of that response changes with it, and the refusal of the retired class btc-dir-15m no longer
    cites its decision record. Every structured result is the same.

3. HIKAE (packages/hikae)

  1. The online level of a class (src/aci.ts): the update of Gibbs and Candes 2021, replayed from the caller's
    evidence, with a bound on the misses that needs no assumption on the scores, delays included. The coverage of the
    split path does not carry over to this region.
  2. Online tracking (src/suivi/, src/pari/): betting tests on the miss labels, computed in exact rationals.
  3. Its one error message that named an ADR no longer does, and the tracker refuses a non-positive step size.

4. Repository

  1. npm run test:genkan runs the Genkan tests and the harness tests that need the built kernel; npm test and
    npm run test:main now include the Genkan tests that do not.
  2. The lint ratchet ceiling goes from 69 to 44, the count measured on this tree.
  3. The README gains Genkan: its row in the components table and the component count above it, a section, its commands,
    the layout, the language line of the engineering choices and the CI job count.
  4. EXPORT-MANIFEST.json lists the synthetic data of fixtures/kata-quarter/ under excluded_data: its readers do not
    ship, so neither does it.
  5. Security updates, for advisories published after v0.9.0: next 16.3.8 → 16.4.6, the version the site declares (with
    @next/env and the @next/swc-* binaries), sharp 0.35.4 → 0.35.5 and fast-uri 3.1.8 → 3.1.9.

5. Known issue

npm audit --audit-level=high (CI job g6-compliance) still fails on one advisory published after v0.9.0,
GHSA-fc5q-39xc-vjpf against picomatch 4.0.7: no fixed version of picomatch is published yet. It is a development
dependency, reached only through the lint tooling (typescript-eslint 8.69.0, then tinyglobby and fdir); the nine
alerts of the audit all come from it.