Refactor Jev judgment transports into run-bound drivers - #16
Merged
Merged
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-01a0cd10-1a9d-76e4-aa2a-20042889f16f Co-authored-by: Amp <amp@ampcode.com>
… installed Amp-Thread-ID: https://ampcode.com/threads/T-01a0ad0f-c784-73ba-a506-4705ebd912c0 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a0ad0f-c784-73ba-a506-4705ebd912c0 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a0ad0f-c784-73ba-a506-4705ebd912c0 Co-authored-by: Amp <amp@ampcode.com>
…I job Oracle review of the post-APPROVE delta: the new skip guard meant the injected-transport integration test never ran in CI (unit job has no browser, e2e job ran only e2e.test.mjs). Run the transports file in the browser-installed job too. Also qualify the changelog claim to built-in providers, since injected transports can throw their own error text. Amp-Thread-ID: https://ampcode.com/threads/T-01a0ad0f-c784-73ba-a506-4705ebd912c0 Co-authored-by: Amp <amp@ampcode.com>
Step-level env does not carry between steps, so the previous env.TYPESAFE_API_KEY condition was always empty and the step never ran (Oracle round 2). Gate on the install step outcome instead; the test itself is hermetic and needs no key. Amp-Thread-ID: https://ampcode.com/threads/T-01a0ad0f-c784-73ba-a506-4705ebd912c0 Co-authored-by: Amp <amp@ampcode.com>
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.
What and why
Make the four existing Jev judgment transports self-contained drivers selected by one registry. Resolve the driver once per navigation run, validate untrusted answers before actions or usage accounting, and let library consumers supply a
JevTransportwithout changing the separate typing system. This keeps provider-specific wire details out of the navigation loop and makes malformed judgments fail closed.PlanMode task: #3982.
Design
NavigateOptions.transportoverrides the judgment provider registry and credentials, with the transport name and effective model reported in results. The package entry exports transport and result types.est_cost_usdis still a Jev-token estimate, not carrier billing for injected transports.Deliberate behavior changes
JEV_PROVIDERvalues now reject instead of falling through to auto-detection; the no-provider diagnostic now includesAI_GATEWAY_API_KEY.{}or choosing a default dropdown option. The first-option select fallback is removed.Verification
npm run typecheck: passed.npm run build: passed.npm test: 71 passed, 0 failed, 0 skipped.TYPESAFE_API_KEY="$TYPESAFE_API_KEY" npm run test:e2e: 39 passed, 0 failed, 0 skipped on final head; the live tests are unchanged.git diff --check: passed.Two earlier full E2E runs had a transient payment-submit
status: errorbefore any step; an isolated test, six direct page runs, and subsequent full suites passed. The error detail was not captured, so the cause is unresolved; validation was not relaxed.Left out intentionally: typing-provider refactoring, a generic chat-carrier helper, and merge/release. Joey gates the merge.