Skip to content

ci: pass the Vercel automation bypass to the assistant LLM smoke - #1359

Merged
tyhonchik merged 1 commit into
mainfrom
fix/assistant-llm-smoke-vercel-bypass
Sep 2, 2026
Merged

ci: pass the Vercel automation bypass to the assistant LLM smoke#1359
tyhonchik merged 1 commit into
mainfrom
fix/assistant-llm-smoke-vercel-bypass

Conversation

@tyhonchik

@tyhonchik tyhonchik commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Every Assistant LLM Smoke run has been red since mid-July — two stacked breakages, the first masking the second.

Access. Both assistant domains sit behind the project firewall: Bot Protection (Challenge) stops non-browser sources and the assistant-origin-guard rule denies POSTs without an app Origin, so the script's plain fetch calls died with 403/429 before reaching the service — even /health. Real browsers pass, so the production widget was never affected; only automation was locked out.

Scenarios. Once past the firewall, the script still tested the retired deterministic pipeline (POST /issues/preview, POST /issues) — those routes are gone since the v2 assistant-ui migration, and their 404 Not Found text surfaced as a cryptic JSON parse error.

Changes

  • llmSmoke.mjs sends the Vercel bypass — every request carries x-vercel-protection-bypass when VERCEL_AUTOMATION_BYPASS_SECRET is set. It is matched by the new assistant-smoke-bypass firewall rule (already created, first in the chain, action Bypass — also exempts the origin guard and the edge rate limits for smoke traffic). Without the secret the header is omitted and behavior is unchanged.
  • The workflow loads the secret from 1Password (op://kv_assistant_infra/VERCEL_AUTOMATION_BYPASS_SECRET/credential) with continue-on-error, so a missing vault item degrades to today's 403s instead of failing the job with a new error.
  • Scenarios rewritten for the v2 tool-approval flow — the agent drafts a createLinearTicket tool call, the stream pauses on tool-approval-request, and an approval resume (history re-sent ending on the assistant message whose tool part carries approval: { approved: true }, mirroring the chat route's unit-test fixture) executes the creation. Off-topic asserts no draft is offered; the bug report approves the draft and checks the created ticket's identifier/url; feedback checks the draft intent without approving, so it creates nothing. One clarifying question from the model is tolerated before failing.

Verified against dev with the real secret: health passes, draft + approval-request chunks confirmed live. The full creation path could not be finished from my IP — probing exhausted the dev per-IP new-session budget (10/day) — the first CI run (fresh runner IP) will confirm it.

Remaining manual step

Store the firewall rule's secret in 1Password: vault kv_assistant_infra, item VERCEL_AUTOMATION_BYPASS_SECRET, field credential (Andrii has the value). Then merge and workflow_dispatch the smoke.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

🚀 Preview Deployment: View Here
🤖 Assistant Preview: View Here (app preview points at it)

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

E2E results (preview)

Smoke

Base URL https://app-next-6lo0pu2i6-aragon-app.vercel.app
Suite smoke
Playwright result ⚠️ completed with flaky tests
Summary 80 passed, 2 flaky
HTML report View report
GitHub job ✅ completed

View run #5106

Every LLM smoke run has been red since mid-July for two stacked reasons.

Access: the assistant domains sit behind the project firewall — Bot
Protection challenges non-browser sources and the assistant-origin-guard
rule denies POSTs without an app Origin — so the script's plain fetches
died with 403/429 before reaching the service. The smoke now sends
x-vercel-protection-bypass, matched by the assistant-smoke-bypass firewall
rule (first in the chain, action Bypass); the workflow loads the secret
from 1Password as VERCEL_AUTOMATION_BYPASS_SECRET with continue-on-error,
so a missing vault item degrades to today's failure instead of a new one.

Scenarios: the 403 masked that the script still tested the retired
deterministic pipeline (POST /issues/preview, POST /issues) — those routes
are gone since the v2 assistant-ui migration, and their 404 text surfaced
as a JSON parse error. The scenarios now exercise the real v2 flow: the
agent drafts a createLinearTicket tool call, the stream pauses on a
tool-approval-request, and an approval resume (the history re-sent ending
on the assistant message whose tool part carries approval) executes the
creation. Off-topic asserts no draft is offered; the bug report approves
the draft and checks the created ticket's identifier/url; the feedback
scenario checks the draft intent without approving, so it creates nothing.
A one-turn clarifying question from the model is tolerated before failing.

Verified against dev: health and draft/approval chunks live; the resume
wire format mirrors the chat route's unit-test fixture. The full creation
path needs a fresh IP (the dev per-IP new-session budget was exhausted
while testing) — first CI run will confirm.

@thekidnamedkd thekidnamedkd 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.

LGTM 🧪

@linear-code

linear-code Bot commented Sep 2, 2026

Copy link
Copy Markdown

APP-1131

@tyhonchik
tyhonchik merged commit 80b3a86 into main Sep 2, 2026
21 checks passed
@tyhonchik
tyhonchik deleted the fix/assistant-llm-smoke-vercel-bypass branch September 2, 2026 13:29
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.

2 participants