Skip to content

test: bind every toolchain contract to the shared acceptance vectors - #2000

Merged
kim-em merged 5 commits into
mainfrom
toolchain-vectors
Oct 7, 2026
Merged

kim-em merged 5 commits into
mainfrom
toolchain-vectors

Conversation

@kim-em

@kim-em kim-em commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

This PR adds contracts/toolchain-vectors-v1.json, the canonical list of benchmark toolchain strings every lean-eval contract must accept or reject identically, and tests binding the completion builder, the replay orchestrator and the other scripts with their own toolchain pattern, every schema that states the general toolchain grammar, and the Worker's evaluation-completion decoder, State event validator and submission-view decoder to it (schema patterns are evaluated as ECMA-262 regular expressions, so the trailing-newline vector pins the difference from Python's lenient $). This repository is public, so it holds the canonical copy; https://github.com/leanprover/lean-eval-state (private) will mirror it in a reviewed State contract bump, and leanprover/lean-eval#661 checks the benchmark's pinned toolchain against it, so a pin that any contract rejects fails in lean-eval's own CI. Edits to the vectors also trigger the Worker's check and deploy workflow.

🤖 Prepared with Claude Code

kim-em and others added 2 commits October 7, 2026 10:06
State owns schema/toolchain-vectors-v1.json; this copy is what the
offline Python tests and the Worker's vitest suite bind to, and CI diffs
it against protected State main. The completion builder, the replay
orchestrator, the live replay schemas, the Worker's completion decoder
and the submission view decoder now all accept and reject the same
toolchain strings.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
lean-eval-state is private, so neither this repository's CI nor
lean-eval's can fetch its copy anonymously. The public copy here is
canonical; State mirrors it with a drift check in its own CI.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
kim-em and others added 3 commits October 7, 2026 10:35
Schema patterns are evaluated as ECMA-262 regular expressions, where
\$ is the end of input, so the trailing-newline vector pins the
difference from Python's lenient \$. The Worker's State event
validator, the historical replay schemas that state the general
grammar, and the historical scripts' own patterns are bound too; only
the fixed-toolchain public replay smoke stays out. Edits to the vectors
now also trigger the Worker's check and deploy workflow.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
scripts/historical_replay_controller.py loads every JSON file in
schemas/ as a JSON Schema resource, and the vectors are data, not a
schema. They live in contracts/ instead.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@kim-em
kim-em merged commit 511d3b1 into main Oct 7, 2026
9 checks passed
@kim-em
kim-em deleted the toolchain-vectors branch October 7, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant