Repository navigation
refactor(evi): dedupe git, gateway and capture wiring shared with lib - #761
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
4 Skipped Deployments
|
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
|
Thank you for following the naming conventions! 🙏 |
commit: |
This branch was successfully deployed
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.
Batch of
dedupefindings from the repo-health-sweep at revision7f4a26fa192faaf0a359140c97b9c1e294609344, all parent-verified againstmain.Problem. Three pieces of Eve wiring under
apps/evi/agent/tools/duplicated logic thatagent/lib/already owns with colocated tests:tools/git.tsdefined its owncanShip(auth)that was character-identical tocanAccessAdminToolsinlib/trust.ts, used at four call sites.tools/ai-gateway.tskept a privategatewayFetchplusBASE_URL/FETCH_TIMEOUT_MSconstants whilelib/gateway.tsowns the Gateway client (now the single owner, exported, with tests).tools/capture.tskept a privatecaptureFrame,SCREENSHOT_DIRandFrameRequesttype whilelib/capture.tsowns the frame pipeline (now the single owner, exported, with tests).Preserved behavior. Same git gating decision for every session type, same Gateway request shape (URL params, bearer token, 10s timeout,
evi.AI_GATEWAY_REQUEST_FAILEDon non-ok), same capture frame sequence (viewport, settle wait, target probe, scroll-into-view marker, screenshot). The moved comment ("Maintainer and schedule-app turns ship code...") stays onresolveGitToolswhere the gate is checked.New coverage.
lib/gateway.test.tsgains agatewayFetchdescribe (params + bearer header + parsed body; non-ok response maps to the structured error with the response body ininternal), andlib/capture.test.tsgains acaptureFramedescribe covering the unresolved-target error, the settle wait, and the scroll-into-view marker sequence.Verification.
pnpm run lint,pnpm run typecheck,pnpm run testall exit 0 on the branch; evi suite 289 passed (41 files), evlog suite 2008 passed. No changeset: the change is confined toapps/*.ELI5
Evi's own agent code had three places where a tool file kept a second copy of logic that already lives in a shared library folder with tests next to it: who is allowed to run git commands, how AI Gateway requests are sent, and how a screenshot frame is captured. This deletes the copies and points at the shared one. How the agent behaves is unchanged, and the shared logic gained direct tests.