Skip to content

test(e2e): cover user auth after service principal error - #1263

Open
ruiconti wants to merge 1 commit into
mainfrom
rui/current-user-auth-after-service-trigger
Open

test(e2e): cover user auth after service principal error#1263
ruiconti wants to merge 1 commit into
mainfrom
rui/current-user-auth-after-service-trigger

Conversation

@ruiconti

@ruiconti ruiconti commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What

  • require the service-triggered turn to call connection_search, record the expected user-principal failure, and finish on the next model step
  • continue the same session as a human and require a fresh ClickState search to emit authorization.required for that current user
  • mirror the ClickState URL, read-only tool allowlist, and user-scoped authorization contract in a self-contained fixture

An automated investigation can fail to load a user-scoped connection because its active principal is service. That failed tool call remains in session history. The eval checks the event order directly: failed action.result, next step.started, then the terminal service reply.

When a human continues the session, the model must be offered connection_search again. If it calls the tool, eve must resolve auth.current to the human instead of reusing the service principal.

The fixture uses deterministic interactive authorization instead of @vercel/connect/eve, because e2e fixtures cannot depend on Vercel OIDC, connector installation, or an external MCP server. Its authorization challenge includes the resolved principal ID, so the assertion proves the human became current.

This covers the eve history and authorization contract under the existing Sol and Opus e2e matrix. It does not add Terra to every fixture or independently prove a Terra-only tool-selection regression. Fixture-only; no runtime change or changeset.

@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
eve-docs Ready Ready Preview, Comment, Open in v0 Jul 28, 2026 12:48am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
eve-docs-1644 Skipped Skipped Open in v0 Jul 28, 2026 12:48am
eve-docs-4759 Skipped Skipped Open in v0 Jul 28, 2026 12:48am

@ruiconti
ruiconti force-pushed the rui/current-user-auth-after-service-trigger branch 2 times, most recently from b6a2704 to 0abe5f3 Compare July 27, 2026 22:01
@vercel
vercel Bot temporarily deployed to Preview – eve-docs-4759 July 27, 2026 22:01 Inactive
@vercel
vercel Bot temporarily deployed to Preview – eve-docs-1644 July 27, 2026 22:02 Inactive
@ruiconti ruiconti changed the title fix(e2e): cover user auth after service trigger test(e2e): cover user auth after service principal error Jul 27, 2026
Signed-off-by: Rui Conti <ruiconti@gmail.com>
@ruiconti
ruiconti force-pushed the rui/current-user-auth-after-service-trigger branch from 0abe5f3 to ea6d1f8 Compare July 28, 2026 00:46
@vercel
vercel Bot temporarily deployed to Preview – eve-docs-4759 July 28, 2026 00:46 Inactive
@vercel
vercel Bot temporarily deployed to Preview – eve-docs-1644 July 28, 2026 00:46 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant