SuperAPIAI Directory

evalid

github.com · AI coding

evalid is a runtime verification layer for coding agents. It does not rely on LLM judgment; instead, it verifies the test results claimed by agents through sealed test runs, replay from clean snapshots, and comparison of exit codes and failure categories. Core mechanisms include: sealed evidence (hashing the entire code tree along with the command, exit code, and output), a zero-judgment pipeline (spec clarification, code review, and test verification are all deterministic code), and a claims-and-evidence ledger (recording what was claimed, replay results, and time/token costs). It can also detect fabricated TDD evidence, skipped tests, empty assertions, and more, and supports a GitHub Action to verify sealed proofs in CI. evalid requires Node.js ≥ 22.5 and Python 3, can be installed globally via npm, and supports agents such as Codex, Claude Code, and Cursor.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

evalid is a runtime verification layer for coding agents, designed to close the gap between "claiming tests pass" and "tests actually passing." It does not rely on LLM judgment; instead, it uses deterministic code for verification, ensuring that the code delivered by agents has actually been tested and that the tests are effective.

Purpose

evalid is used to verify whether the test results claimed by coding agents (such as Codex, Claude Code, Cursor, etc.) are genuine. When an agent says the tests have passed, evalid seals that run, replays it from a clean snapshot, and shows the gap between what was claimed and what actually passes. It primarily catches the common failure modes of agents: false positives and test tampering.

Key Capabilities

  • Sealed evidence and replay: When tests run, the entire code tree is hashed and sealed together with the command, exit code, and output. During verification, the sealed snapshot is copied to a clean directory and actually re-run, comparing exit codes and failure categories. In the green phase, test files must match the hash from sealing time; if the agent edits tests after the run, the seal is broken.
  • Zero-judgment pipeline: Spec clarification, code review, and test verification are all pure deterministic code, with no LLM judgment in the chain; checks consume no tokens, and each stage leaves an inspectable artifact. Ambiguous specs are blocked before the loop begins; changes without accompanying tests are blocked at review; unproven claims are blocked at replay.
  • Claims-and-evidence ledger: Each delivery comes with a record: what was claimed, the replay result, and the time and token costs of each stage. When a stage ledger deviates from actual time by more than 5%, it is flagged as untrustworthy.
  • TDD proof checking: Red/green TDD proofs are checked via code inspection. I6a snapshots the code tree and binds the command, exit code, output hash, and failure category; I6b recomputes the binding and re-runs the command on the snapshot. Hand-edited proofs cannot pass unless the snapshot actually exits in the claimed way. Red and green must target the same test, or green must be a superset of red. Skipped, pending, and focused tests do not count toward red or green. I6c.tdd.quality_review rejects meaningless test changes, empty assertions, snapshot-only tests, mock-heavy tests without real assertions, and type-only or existence assertions.
  • Context preservation across sessions: State is preserved via the .xflow/GOAL.md project anchor, HANDOFF.md, AHA.md, and each change's status.json and proof files (located in specs/changes/<id>/).
  • ExecutableCompletion line: The verify → archive → commit/push → PR sequence is a tested atomic operation, not a textual checklist.
  • Unified multi-agent CLI: The evalid CLI drives Codex, Claude Code, and Cursor from the same workflow file.
  • GitHub Action: Verifies sealed TDD proofs in CI. Valid proofs keep the check green, seal breakage (or editing tests after sealing) turns it red, and posts the claim and evidence ledger as a PR comment.
  • evalid audit: Verifies any PR without needing an evalid workflow. Point it at any git diff or PR, extract the test runs that the changes claim to pass, replay each test in a clean clone at the change head, and compare exit codes and pass/fail counts against the claims. If the diff carries an evalid proof seal, the seal is replayed through the existing i6b verifier. Verdicts include: verified, mismatch, no claim, unverifiable.

Usage

  • Installation: Requires Node.js ≥ 22.5 (for node:sqlite) and Python 3 (atoms are small Python scripts). The evalid CLI can be installed via npm install -g evalid (the legacy xflow binary name is kept as a compatibility alias).
  • Workflows: YAML workflows (workflows/*.yaml) are validated against the atom registry before running. Phases are data, composed of small deterministic "atoms".
  • Command line: The evalid CLI can run the same workflow from Codex, Claude Code, Cursor, OpenCode, Gemini, or a plain terminal.
  • GitHub Action: Provided in action.yml at the repository root. Inputs include change-id (required), phase (default green), attempt (default 0), project-root (default .), tdd-mode (auto-detected), post-comment (default true), github-token (default $GITHUB_TOKEN), pr-number (auto-detected). Comments are upserted via a stable marker, and reruns update the same comment. The check fails (exit 1) on binding mismatch, snapshot mismatch, green tree mismatch, replay mismatch, or missing proof.
  • Local equivalent CI replay: Uses the same verifier and entry point.
  • evalid audit: --json prints a machine-readable report; --out <file> writes the report. Exit codes: 0 (verified), 1 (mismatch/unverifiable), 3 (no claim), 2 (misuse).

When to use

  • When a coding agent delivers code, its test claims need to be verified for truthfulness.
  • Teams using a TDD process want to ensure red/green proofs have not been forged or tampered with.
  • Automatically verify test evidence for PRs in CI pipelines.
  • Review code changes generated by third-party agents to check that tests actually ran and are valid.

Limitations

  • The seal is a content hash, not a cryptographic signature. A fully self-consistent forged snapshot could theoretically still pass. What the seal guarantees is: the tests did run at seal time, the test files are byte-identical to the runtime bytes at verification time, and any tampering after the run will break the hash and become visible. It is designed to catch false positives and test tampering, not to defeat a determined forger.
  • Benchmark results are based on specific versions and models, with limited sample sizes (e.g., n=1 per cell) and noise.
  • On small synthetic tasks, evalid's full pipeline is the slowest and consumes the most tokens.
  • Static gating can still miss plausible but incorrect expected values, assertions in callbacks that never run, and behavior changes hidden in claimed refactors (partially addressed by the I6d assertion-execution gate).
  • Requires a Node.js ≥ 22.5 and Python 3 environment.
  • Some features (such as the LangSmith bridge) were added after specific versions, so version compatibility must be noted.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools