Skip to content

Find code by asking what it does. A CLI for coding agents that uses Jev to discover relevant files and source context.

Verify merged CPython runtime and retire stale grammar gates

David Zhangae41066666aa
diff --git a/apps/cli/test/package.test.ts b/apps/cli/test/package.test.ts
index 9cfa8c7..dda3d5f 100644
--- a/apps/cli/test/package.test.ts
+++ b/apps/cli/test/package.test.ts
@@ -36,8 +36,10 @@ testInDocker(
const packed = JSON.parse(stdout)[0];
const filenames = packed.files.map((file: { path: string }) => file.path);
expect(filenames).toContain("dist/bin/index.js");
- expect(filenames).toContain("dist/assets/tree-sitter-python.wasm");
- expect(filenames).toContain("dist/assets/tree-sitter-python.LICENSE");
+ expect(filenames).toContain("dist/bin/python-worker.mjs");
+ for (const helper of ["inspect", "preview", "neighborhood"])
+ expect(filenames).toContain(`dist/assets/python/${helper}.py`);
+ expect(filenames).toContain("dist/THIRD_PARTY_NOTICES.txt");
expect(filenames).toContain("dist/skills/jevgrep/SKILL.md");
expect(filenames.some((path: string) => /^(evals|src|node_modules|test)\//.test(path))).toBe(
false,
diff --git a/bun.lock b/bun.lock
index 6bf80de..11ac162 100644
--- a/bun.lock
+++ b/bun.lock
@@ -18,8 +18,8 @@
"jg": "./dist/bin/index.js",
},
"dependencies": {
+ "pyodide": "0.25.1",
"typescript": "5.9.3",
- "web-tree-sitter": "0.25.10",
},
"devDependencies": {
"@clack/prompts": "1.8.1",
@@ -35,8 +35,8 @@
"dependencies": {
"ai": "7.0.107",
"ignore": "7.0.5",
+ "pyodide": "0.25.1",
"typescript": "5.9.3",
- "web-tree-sitter": "0.25.10",
},
"devDependencies": {
"@repo/typescript-config": "workspace:*",
@@ -169,6 +169,8 @@
"ai": ["[email protected]", "", { "dependencies": { "@ai-sdk/gateway": "4.0.87", "@ai-sdk/provider": "4.0.17", "@ai-sdk/provider-utils": "5.0.45" }, "peerDependencies": { "zod": "^3.25.76 || ^4.1.8" } }, "sha512-PVYQ3W9kR8oYiGQxbg4aFIlhQzKskZm8UV+4E0zB2uKOzFr8ju3bXQncOOZtLsOgJY8vdpgyu3cXtomsfcdQYg=="],
+ "base-64": ["[email protected]", "", {}, "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg=="],
+
"bun-types": ["[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-4N0ig0fEomHt5R0KCFWjovxow98rIoRwKolrYdCcknNwMekCXRnWEUvgu5soYV8QXtVsrUD8B95MBOZGPvr6KQ=="],
"eventsource-parser": ["[email protected]", "", {}, "sha512-EKN1vKAMcZ8MlYMpaNuxN6R9yakzH6uajHcHVTqWJzvu5pWw9DyhbP35HH8MVBQ+dZjAfDxk+A8NiR9KWaXiyQ=="],
@@ -187,6 +189,8 @@
"oxlint": ["[email protected]", "", { "optionalDependencies": { "@oxlint/binding-android-arm-eabi": "1.72.0", "@oxlint/binding-android-arm64": "1.72.0", "@oxlint/binding-darwin-arm64": "1.72.0", "@oxlint/binding-darwin-x64": "1.72.0", "@oxlint/binding-freebsd-x64": "1.72.0", "@oxlint/binding-linux-arm-gnueabihf": "1.72.0", "@oxlint/binding-linux-arm-musleabihf": "1.72.0", "@oxlint/binding-linux-arm64-gnu": "1.72.0", "@oxlint/binding-linux-arm64-musl": "1.72.0", "@oxlint/binding-linux-ppc64-gnu": "1.72.0", "@oxlint/binding-linux-riscv64-gnu": "1.72.0", "@oxlint/binding-linux-riscv64-musl": "1.72.0", "@oxlint/binding-linux-s390x-gnu": "1.72.0", "@oxlint/binding-linux-x64-gnu": "1.72.0", "@oxlint/binding-linux-x64-musl": "1.72.0", "@oxlint/binding-openharmony-arm64": "1.72.0", "@oxlint/binding-win32-arm64-msvc": "1.72.0", "@oxlint/binding-win32-ia32-msvc": "1.72.0", "@oxlint/binding-win32-x64-msvc": "1.72.0" }, "peerDependencies": { "oxlint-tsgolint": ">=0.22.1", "vite-plus": "*" }, "optionalPeers": ["oxlint-tsgolint", "vite-plus"], "bin": { "oxlint": "bin/oxlint" } }, "sha512-1rhdZIP/EvoI91ABIwNU5Q8+bWf8mjrS5UzIOZld4d4bXxJvtlUhlQvaoTogIGin/qdErMOrwaIJvCSIAKTLhA=="],
+ "pyodide": ["[email protected]", "", { "dependencies": { "base-64": "^1.0.0", "ws": "^8.5.0" } }, "sha512-y0nJ/fLA3bxD2iZRzvVTbP2O+wp4Ewm2wThfV4HF0BytQ6hsoqTJFLNY4usLOcCVBrK8TTWqFqrmsVPzHe4rsw=="],
+
"sisteransi": ["[email protected]", "", {}, "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="],
"tinypool": ["[email protected]", "", {}, "sha512-Pugqs6M0m7Lv1I7FtxN4aoyToKg1C4tu+/381vH35y8oENM/Ai7f7C4StcoK4/+BSw9ebcS8jRiVrORFKCALLw=="],
@@ -199,7 +203,7 @@
"undici-types": ["[email protected]", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
- "web-tree-sitter": ["[email protected]", "", { "peerDependencies": { "@types/emscripten": "^1.40.0" }, "optionalPeers": ["@types/emscripten"] }, "sha512-Y09sF44/13XvgVKgO2cNDw5rGk6s26MgoZPXLESvMXeefBf7i6/73eFurre0IsTW6E14Y0ArIzhUMmjoc7xyzA=="],
+ "ws": ["[email protected]", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-201TZ/kPWxoPr/OKWjquZR1SWKXcvxdH+e1xrx89b3YbmzLMFCLfnaG1HFIgWzJOEWZ7MvpK++odZufgYR50Rw=="],
"zod": ["[email protected]", "", {}, "sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q=="],
diff --git a/package.json b/package.json
index eb7388d..a80366c 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,7 @@
"format": "oxfmt --write .",
"format:check": "oxfmt --check .",
"test:reference": "bash scripts/test-reference.sh",
- "test:parser": "bash scripts/test-reference.sh node --experimental-strip-types --test test/parser/source.test.ts && bash scripts/test-installed.sh --test-name-pattern \"runtime has|local commands|parses Python\"",
+ "test:parser": "bash scripts/test-reference.sh node --experimental-strip-types --test test/parser/*.test.ts && bash scripts/test-installed.sh --test-name-pattern \"runtime has|local commands|parses Python\"",
"test:filesystem": "bash scripts/test-reference.sh bun test packages/core/test/filesystem.test.ts test/retrieval.test.ts && bash scripts/test-installed.sh --test-name-pattern \"filesystem policy\"",
"test:installed": "bash scripts/test-installed.sh",
"test:e2e": "bun run test:installed",
diff --git a/packages/core/src/gateway.ts b/packages/core/src/gateway.ts
index 9ac630e..9dd3a24 100644
--- a/packages/core/src/gateway.ts
+++ b/packages/core/src/gateway.ts
@@ -79,7 +79,7 @@ export function createEvaluator(options: {
model: "typesafe-ai/jev",
provider: options.baseURL ?? "vercel-ai-gateway",
policyVersion: options.policyVersion ?? "1",
- parserVersion: "python-0.25.0-ts-5.9.3",
+ parserVersion: "cpython-3.11.3-pyodide-0.25.1-ts-5.9.3",
promptVersion: "unit-locators-1",
},
};
diff --git a/scripts/test-suite.sh b/scripts/test-suite.sh
index c895300..cb68870 100644
--- a/scripts/test-suite.sh
+++ b/scripts/test-suite.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
bun test apps/cli/test packages/core/test test/reference test/gateway.test.ts test/retrieval.test.ts
-node --experimental-strip-types --test test/parser/source.test.ts
+node --experimental-strip-types --test test/parser/*.test.ts
node --test test/release.test.mjs
python3 -B -m unittest discover -s evals/implementation/swebench -p test_installed.py
diff --git a/specs/jevgrep/README.md b/specs/jevgrep/README.md
index 2e279f3..4ae1fe3 100644
--- a/specs/jevgrep/README.md
+++ b/specs/jevgrep/README.md
@@ -7,13 +7,13 @@ Jev classification through Vercel AI Gateway. This is the build plan; production
## Next Agent Prompt
You are implementing this spec. Status: **implementing**, updated **2026-09-26**.
-Next: integrate the bundled CPython parser and its packaging, then finish the
-merged gate and whole-product review before freezing another package or starting
-paid confirmation. Review found Python AST differences beyond the previously
-fixed evidence-order and TS/JS comment defects. The smaller grammar parser did
-not preserve the winner; use its unchanged Python helpers with bundled CPython.
-See [runtime evidence](assets/python-runtime.md). No additional paid run may
-precede a clean whole-product review.
+Next: freeze a new bundled-CPython package, verify that exact archive on the
+supported platforms, and prepare a fresh ten-task confirmation using the existing
+baselines. The merged `bun run verify` gate passed and whole-product review's
+sole finding (stale package assertions) is fixed with a clean follow-up review.
+The unchanged Python helpers now run in bundled CPython; actual computed-request,
+selection, output and recovery comparisons pass for the exercised corpus.
+See [runtime evidence](assets/python-runtime.md) for coverage and version limits.
`installed-jg-reference-parity-v1` is stopped and superseded. Requests and
scikit-learn officially solved but exceeded baseline cost; Django was interrupted
@@ -48,12 +48,12 @@ verification before ending each pass. These commands are targets to implement,
not claims about the current scaffold.
- [x] [01 — Reference and real HTTP fixture](slices/01-reference.md)
-- [ ] [02 — Bundled parser parity](slices/02-parser.md)
+- [x] [02 — Bundled parser parity](slices/02-parser.md)
- [x] [03 — Filesystem eligibility and snapshots](slices/03-filesystem.md)
- [ ] [04 — Installed CLI + skill + first real task](slices/04-checkpoint.md)
- [x] [05 — Faults, cancellation and partial results](slices/05-failures.md)
- [x] [06 — Default-on fresh cache](slices/06-cache.md)
-- [ ] [07 — Preserved output policy](slices/07-output-policy.md)
+- [x] [07 — Preserved output policy](slices/07-output-policy.md)
- [ ] [08 — Frozen quality and release verification](slices/08-release.md)
## Product and scope
diff --git a/specs/jevgrep/assets/python-runtime.md b/specs/jevgrep/assets/python-runtime.md
index e34f7b4..9aec21c 100644
--- a/specs/jevgrep/assets/python-runtime.md
+++ b/specs/jevgrep/assets/python-runtime.md
@@ -31,17 +31,31 @@ belongs in the parser and full-CLI reference tests.
Repository source is data supplied to trusted AST helpers, never executed as
Python. Interpreter streams and globals are shared state, so one owner serializes
-helper calls. A Node child process is being integrated to isolate synchronous
-execution, permit cancellation, and support both the Node product and Bun-hosted
+helper calls. A Node child process isolates synchronous
+execution, permits cancellation, and supports both the Node product and Bun-hosted
development. The attempted Bun worker-thread loader normalization did not work
and must not ship. Unrelated pending pure helper requests must survive another
query's cancellation; no interpreter pool or second parser is introduced.
-Integration is unfinished until merged tests prove unchanged computed requests,
-full stdout, cancellation, process exit and offline installed asset loading.
-Missing or corrupt runtime assets must fail truthfully without fabricated
-excerpts or stderr leakage. Helper conformance alone cannot close those gates,
-and none of these checks replaces the frozen downstream quality comparison.
+The merged component checks passed: 23 Node parser/lifecycle tests, four release
+checks, 14 benchmark-harness tests and 21 installed Docker journeys. Native macOS
+arm64 on Node 24.14.0 passed the installed local-command and Python-search smoke
+using archive SHA-256
+`cff8b8607308531c26ec8736c07102449d1b785c95421d826a95a9efd299439e`.
+This is a development artifact, not the prospective quality-cohort freeze.
+
+The first full default run passed 98 of 99 Bun tests, stopping at stale assertions
+for the removed grammar assets. The corrected package test passed independently.
+A whole-product review found that same assertion defect and no other actionable
+issue. The correction's follow-up review reported no actionable findings; the
+final `bun run verify` run passed: 99 Bun tests (933 assertions), 23 Node
+parser/lifecycle tests, four release tests, 14 harness tests and 21 installed
+journeys. Its full transcript is `/tmp/jg-cpython-final-verify.log`.
+Local transcripts: `/tmp/jg-cpython-merged-verify.log`,
+`/tmp/jg-cpython-package-regression-v2.log`, `/tmp/jg-cpython-merged-parser.log`,
+`/tmp/jg-cpython-merged-installed.log`, `/tmp/jg-cpython-native.log` and
+`/tmp/jg-cpython-whole-review.log`. No downstream quality claim follows from these
+checks; the frozen task comparison remains required.
## Upstream provenance
diff --git a/specs/jevgrep/assets/runtime-verification.md b/specs/jevgrep/assets/runtime-verification.md
index 971f72e..a1dd4b3 100644
--- a/specs/jevgrep/assets/runtime-verification.md
+++ b/specs/jevgrep/assets/runtime-verification.md
@@ -1,4 +1,9 @@
-# Installed runtime verification
+# Historical installed runtime verification
+
+This archive used the superseded source-budget and grammar-parser policy. These
+results establish only the named historical artifact; they do not verify the
+restored winner or current bundled CPython candidate. Current pickup and gates
+live in the [spec handoff](../README.md).
The frozen cohort archive has SHA-256
`98bcf47e7de30ad82c8b452a86b958505c3befe6512d00f98486101c6a9fc802`.
diff --git a/specs/jevgrep/choices.md b/specs/jevgrep/choices.md
index 0736d7d..071a316 100644
--- a/specs/jevgrep/choices.md
+++ b/specs/jevgrep/choices.md
@@ -202,6 +202,6 @@ A single Node process path avoids patching the dependency or retaining two parse
Reach: the package gains runtime assets and a child process; pure pending helper
jobs may need replay when cancellation terminates that process. The product still
-requires only Node. Verdict: provisional pending merged lifecycle and parity
-verification. Confidence: medium. Version coverage and footprint rationale live
+requires only Node. Verdict: sound; merged lifecycle, parity and installed checks passed, with a
+clean review follow-up. Confidence: medium. Version coverage and footprint rationale live
in [runtime evidence](assets/python-runtime.md).
diff --git a/specs/jevgrep/slices/02-parser.md b/specs/jevgrep/slices/02-parser.md
index 23c7e87..9706b0c 100644
--- a/specs/jevgrep/slices/02-parser.md
+++ b/specs/jevgrep/slices/02-parser.md
@@ -1,6 +1,6 @@
# Bundle source inspection without system Python
-Status: reopened for bundled CPython integration and full parity review (2026-09-26).
+Status: verified against the exercised reference corpus and installed gates (2026-09-26).
Depends on: 01.
Read [contracts](../contracts.md) first. Recognized syntax outside the reference's
Python 3.11 boundary shares one fallback across inspection, previews and
@@ -25,8 +25,9 @@ already exist. CLI transcripts replace visual/screenshot gates for this product.
Earlier grammar conformance checks passed the exercised fixtures but missed
Python AST differences found by whole-product review. They do not establish
-completion. Bundled CPython helper conformance passed the bounded probe; merged
-production, lifecycle, installed-package and whole-product gates remain required.
+completion. Bundled CPython passed the bounded helper probe, merged production and lifecycle
+comparisons, installed package checks and whole-product review.
+[Runtime evidence](../assets/python-runtime.md) records the exact coverage.
The [parser conformance guide](../../../test/parser/README.md) owns executable
coverage. Neither parser comparisons nor package checks establish task quality.
diff --git a/specs/jevgrep/slices/04-checkpoint.md b/specs/jevgrep/slices/04-checkpoint.md
index 1b8be2f..2aff648 100644
--- a/specs/jevgrep/slices/04-checkpoint.md
+++ b/specs/jevgrep/slices/04-checkpoint.md
@@ -1,7 +1,7 @@
# Deliver the installed CLI and agent workflow
-Status: installed workflow verified; full-pipeline preservation reopened for
-selection-completion order (2026-09-26). Depends on: 01, 02, 03.
+Status: deterministic installed workflow verified; current bundled-CPython
+artifact still requires its frozen cohort checkpoint (2026-09-26). Depends on: 01, 02, 03.
Read [contracts](../contracts.md) first.
## Contract and owner
@@ -26,10 +26,10 @@ needed. CLI transcripts replace visual/screenshot gates for this product.
Docker fixture exercises installed auth, help, doctor, query, skill and partial output with empty stderr and isolated HOME/XDG. Pack excludes evals, secrets and workspace dependencies. Run one explicit live Jev query, then Sol through installed skill/CLI on the saved Requests task; inspect query, stdout, subsequent reads, patch, official grade and full bill. Reuse baseline; do not rerun it. One pass proves integration only, not cohort quality.
-The restored frozen cohort's Requests cell officially resolved with complete
+The superseded reference-parity cohort's Requests cell officially resolved with complete
Sol and Jev billing. Its source blocks match the accepted spike packet; the
-live file/lead decisions differ. This verifies installed integration, not a
-cost advantage. [Restoration evidence](../assets/parity-restoration.md) owns the
+live file/lead decisions differ. This is historical integration evidence, not verification of the current
+bundled-CPython artifact or a cost advantage. [Restoration evidence](../assets/parity-restoration.md) owns the
artifact identity and measured costs.
## Delegated decisions
@@ -47,4 +47,4 @@ continue on the evidence if the user does not respond. Feedback that changes the
public contract or acceptance measure requires updating this slice before broadening
implementation. Record new choices and update the README handoff before ending.
-The installed fixture, live query and official Requests task completed. The task solved but cost more than its saved baseline. Exact query, output, follow-up behavior, grade and billing are in the [checkpoint report](../assets/installed-requests-checkpoint.md). Reproduction uses the maintained [runner workflow](../../../evals/implementation/swebench/installed.md); the frozen checkpoint retains its original runner.
+The earlier installed fixture, live query and official Requests task completed on a superseded package. The task solved but cost more than its saved baseline. Exact query, output, follow-up behavior, grade and billing are in the [checkpoint report](../assets/installed-requests-checkpoint.md). Reproduction uses the maintained [runner workflow](../../../evals/implementation/swebench/installed.md); the frozen checkpoint retains its original runner.
diff --git a/specs/jevgrep/slices/07-output-policy.md b/specs/jevgrep/slices/07-output-policy.md
index d0aa17f..03d6b4e 100644
--- a/specs/jevgrep/slices/07-output-policy.md
+++ b/specs/jevgrep/slices/07-output-policy.md
@@ -1,6 +1,6 @@
# Preserve the accepted retrieval packet
-Status: reopened after whole-product review reproduced preservation defects
+Status: verified after preservation fixes and whole-product review
(2026-09-26); live quality belongs to 08.
Depends on: 04–06.
@@ -28,8 +28,8 @@ The installed command must still handle `head -200`, byte-bounded partial units,
stdout-only failures and all admitted locations. A green deterministic parity gate
allows a new frozen official cohort; it does not itself prove cost or solve rate.
-The merged `bun run verify` gate passes, including the complete production HTTP
-comparisons and all 20 installed journeys. The preserved output contract passes
+The restored production HTTP comparisons and all 21 installed journeys pass
+in the final default `bun run verify` gate. The preserved output contract passes
both `head -200` and explicit byte-budget checks. The
[preservation matrix](../assets/parity-restoration.md) records the tested behavior
and deliberate product differences.
diff --git a/test/parser/README.md b/test/parser/README.md
index faba469..61cc284 100644
--- a/test/parser/README.md
+++ b/test/parser/README.md
@@ -2,7 +2,7 @@
The synthetic corpus in `fixtures/python-reference.json` records unmodified frozen
Python helper results, with helper hashes. Expectations are captured in a Python
-container; application tests run the production TypeScript implementation in Node.
+container; application tests run the production inspector and bundled interpreter in Node.
`capture-reference.py` reads that corpus on stdin and writes refreshed expectations
on stdout when the original helpers are mounted read-only at `/reference`. Capture
output is deliberately separate from assertion: a failing port never rewrites its
@@ -14,14 +14,11 @@ preview windows and additive neighboring-method ranges preserve the recorded Pyt
policy. Comments stay independently available for later context expansion.
The reference language boundary is CPython 3.11: the retained Requests runtime
-uses 3.11.5 and the isolated fixture oracle uses 3.11.2. The bundled grammar accepts
-syntax from other versions, so one shared compatibility check rejects recognized
-Python 2 forms and Python 3.12-only type parameters, type aliases and f-string
-expression forms. Inspection, previews and neighboring-method selection then use
-the same text fallback. Source bytes are retained; no Python executable is required
-by the product. Valid reference syntax is preserved, including print-shaped shift
-expressions and ordinary f-strings. The cases live in the parser tests; this is
-bounded conformance coverage, not a replacement implementation of CPython's grammar.
+uses 3.11.5 and the isolated fixture oracle uses 3.11.2. Production uses CPython
+3.11.3 through Pyodide and the unchanged frozen helpers. This removes the separate
+grammar and hand-written compatibility rules. Version differences remain explicit;
+the cases establish bounded conformance, not universal equivalence. Source bytes
+are retained, and no system Python executable is required by the product.
Python context expansion preserves the reference's conservative whole-line comment
matching, including hash-prefixed lines in multiline strings. TypeScript comment