feat(jev): advisory Jev layer v0.1 (shared client + routing core) - #39
Merged
Merged
Conversation
First slice of the foundry-jev-integration spec: the reusable, deterministic core that later phases (review pre-filter, tool-call triage) build on. - scripts/jev/client.mjs: JevProvider port lifted from jev-triage (TypeSafe + Cloudflare adapters, postJson with 429/529 backoff) + providerFromEnv, which returns null with no key so every caller fails open. Honors TYPESAFE_AI_BASE_URL. - scripts/jev/route.mjs: pure routing/triage core (routeReview, triageToolcall, question templates). Fail-open invariant: a missing or low-confidence answer always widens review, never narrows it. - scripts/jev/boundary.test.mjs: mechanical guard for the spec's core invariant - reds the build if any CI workflow or mise gate verb references scripts/jev, so a ~68%-accurate model can never reach the deterministic oracle. - 18 tests via node:test (zero deps). docs/FEATURES.md + module README. Advisory only, opt-in via JEV_API_KEY, no change to any gate. Later: review depth/lens pre-filter and per-turn tool-call triage in cmaintz-skills.
Completes the advisory Jev layer so v0.1 is actually usable, not just a library. - scripts/jev/review.mjs: runnable review pre-filter. `node scripts/jev/review.mjs [baseRef]` parses the diff, asks Jev per changed file which warrant deep review and on which lens, and prints routing JSON. Fail-open: no key or a small diff reviews everything. Exported routeFiles/parseDiff are unit-tested with a fake provider. - jev-scripts.yml: runs `node --test scripts/jev/*.test.mjs` on change, so the suite - including the boundary guard - actually executes in CI and has teeth. - boundary.test.mjs now scans the gate-defining files explicitly (gate/security/_ts/ _java/_dotnet/_php/_guards/_semgrep + mise verbs) rather than every workflow, so the test-runner workflow above is allowed while Jev-in-the-gate is still a red build. - FEATURES + README updated. 22 node:test cases, all green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First slice of
SPECS/foundry-jev-integration.md- the reusable, deterministic core that later phases build on.What lands
scripts/jev/client.mjs- theJevProviderport lifted from jev-triage (TypeSafe + Cloudflare adapters,postJsonwith 429/529 backoff) plusproviderFromEnv, which returnsnullwhen no key is set so every caller fails open to current behavior. HonorsTYPESAFE_AI_BASE_URLfor self-host/proxy/mock.scripts/jev/route.mjs- pure, no-network routing/triage core:routeReview,triageToolcall, and the batched question templates. Fail-open invariant: a missing or low-confidence answer always widens review, never narrows it.scripts/jev/boundary.test.mjs- the mechanical guard for the spec's central invariant. Reds the build if any CI workflow or mise gate verb referencesscripts/jev, so a ~68%-accurate model can never reach the deterministic oracle.node:test(zero deps):node --test scripts/jev/*.test.mjs.docs/FEATURES.mdentry + moduleREADME.md.Boundary
Advisory only. Opt-in via
JEV_API_KEY; absent key is a no-op. No change to any gate verb or workflow - Jev lives strictly on the proposer side.Next phases (not in this PR)
reviewskill (cmaintz-skills), behind a flag, fail-open.Refs
SPECS/foundry-jev-integration.md.