Skip to content

fix(evi): trust local eve dev sessions as the maintainer - #541

Merged
HugoRCD merged 2 commits into
mainfrom
fix/evi-local-dev-trust
Aug 9, 2026
Merged

fix(evi): trust local eve dev sessions as the maintainer#541
HugoRCD merged 2 commits into
mainfrom
fix/evi-local-dev-trust

Conversation

@HugoRCD

@HugoRCD HugoRCD commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Asking the local eve dev REPL anything admin-gated (Vercel MCP, the new Linear MCP, ai-gateway, captures, push) failed with "This tool is not available in the current session": the REPL caller is neither a maintainer principal nor the schedule app principal, so every gate refused it — which made the admin surface untestable from the machine it runs on.

isMaintainer now returns true when environment() resolves to local: an eve dev session runs on the maintainer's own machine. Deployments resolve to their VERCEL_ENV and eval runs to eval, so nothing changes there — covered by a dedicated test, and the existing trust/label tests now pin VERCEL_ENV=production explicitly so they keep modeling deployed behavior.

No changeset: confined to apps/evi. Verified: tsc, 54 unit tests, eve build.

Summary by CodeRabbit

  • Bug Fixes
    • Local development sessions are now automatically trusted.
    • Deployed and evaluation environments continue to enforce configured maintainer access.
    • Improved handling of unset environment configuration values.

@vercel
vercel Bot temporarily deployed to Preview – evlog-render-lab August 9, 2026 17:06 Inactive
@vercel
vercel Bot temporarily deployed to Preview – evlog-telemetry August 9, 2026 17:06 Inactive
@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
evi Ready Ready Preview Aug 9, 2026 5:17pm
4 Skipped Deployments
Project Deployment Actions Updated (UTC)
evlog-docs Skipped Skipped Aug 9, 2026 5:17pm
evlog-render-lab Skipped Skipped Aug 9, 2026 5:17pm
evlog-telemetry Skipped Skipped Aug 9, 2026 5:17pm
just-use-evlog Skipped Skipped Aug 9, 2026 5:17pm

Request Review

@vercel
vercel Bot temporarily deployed to Preview – just-use-evlog August 9, 2026 17:06 Inactive
@vercel
vercel Bot temporarily deployed to Preview – evlog-docs August 9, 2026 17:06 Inactive
@changeset-bot

changeset-bot Bot commented Aug 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5901771

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added the bug Something isn't working label Aug 9, 2026
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@HugoRCD, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 27 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b8ab7f60-2174-4b48-a781-41acf1900aec

📥 Commits

Reviewing files that changed from the base of the PR and between af95370 and 5901771.

📒 Files selected for processing (3)
  • apps/evi/agent/lib/github/label-approval.test.ts
  • apps/evi/agent/lib/trust.test.ts
  • apps/evi/agent/lib/trust.ts
📝 Walkthrough

Walkthrough

isMaintainer now grants local-environment sessions maintainer trust. Tests set deployed behavior by default, clear undefined environment variables, and verify local, evaluation, and deployed trust outcomes.

Changes

Environment-Based Trust

Layer / File(s) Summary
Local maintainer trust
apps/evi/agent/lib/trust.ts
isMaintainer returns true for local-environment sessions before evaluating authentication principals.
Environment-specific test coverage
apps/evi/agent/lib/trust.test.ts, apps/evi/agent/lib/github/label-approval.test.ts
Tests default to VERCEL_ENV=production, remove undefined environment variables, and cover local anonymous trust plus evaluation and deployed behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change and follows the repository's conventional commit format with the valid evi scope.
Description check ✅ Passed The description explains the problem, implementation, environment behavior, tests, build verification, and rationale for omitting a changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/evi-local-dev-trust

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions! 🙏

@pkg-pr-new

pkg-pr-new Bot commented Aug 9, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@evlog/cli@541
npm i https://pkg.pr.new/evlog@541
npm i https://pkg.pr.new/@evlog/nuxthub@541
npm i https://pkg.pr.new/@evlog/telemetry@541

commit: 5901771

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/evi/agent/lib/trust.test.ts`:
- Around line 16-22: Clear EVE_RUN_MODE in the trust loaders before importing
modules: update loadTrust() in apps/evi/agent/lib/trust.test.ts (lines 16-22)
and load() in apps/evi/agent/lib/github/label-approval.test.ts (lines 16-17) to
reset it alongside VERCEL_ENV, ensuring eval mode cannot leak into subsequent
cases.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: cf10b8e6-1a0d-4b28-aeb2-a116ad80510f

📥 Commits

Reviewing files that changed from the base of the PR and between 9e268c2 and af95370.

📒 Files selected for processing (3)
  • apps/evi/agent/lib/github/label-approval.test.ts
  • apps/evi/agent/lib/trust.test.ts
  • apps/evi/agent/lib/trust.ts

Comment thread apps/evi/agent/lib/trust.test.ts
@vercel
vercel Bot temporarily deployed to Preview – evlog-render-lab August 9, 2026 17:17 Inactive
@vercel
vercel Bot temporarily deployed to Preview – evlog-telemetry August 9, 2026 17:17 Inactive
@vercel
vercel Bot temporarily deployed to Preview – evlog-docs August 9, 2026 17:17 Inactive
@vercel
vercel Bot temporarily deployed to Preview – just-use-evlog August 9, 2026 17:17 Inactive
@HugoRCD HugoRCD self-assigned this Aug 9, 2026
@HugoRCD
HugoRCD merged commit 96e4cba into main Aug 9, 2026
18 checks passed
@HugoRCD
HugoRCD deleted the fix/evi-local-dev-trust branch August 9, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant