fix(e2e): wire admin bearer token into chat-seed workspace creation #2377
Reference in New Issue
Block a user
Delete Branch "fix/chat-seed-admin-auth"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes E2E chat fixture auth breakage after PR #2291 fail-closed auth.
seedWorkspace now sends the same admin bearer (E2E_ADMIN_TOKEN || ADMIN_TOKEN) that mintWorkspaceToken uses in the POST /workspaces Authorization header. Prevents unauthenticated workspace creation from silently 401ing in E2E runs.
No AdminAuth loosening — narrow diff, auth header only.
Reviewed current head
e2e4e49685. Merge-base diff is narrow: only canvas/e2e/fixtures/chat-seed.ts (+6/-1), no workflow/router/AdminAuth changes. Verified seedWorkspace now sends Authorization: Bearer using the same E2E_ADMIN_TOKEN ?? ADMIN_TOKEN source as mintWorkspaceToken when creating the workspace, so the seed POST can satisfy admin auth without loosening server gates. E2E Chat is green on this head; merge-tree clean; no auth bypass or coverage weakening found. APPROVED.APPROVED on current head
e2e4e49685. Merge-base diff is narrow and limited tocanvas/e2e/fixtures/chat-seed.ts.seedWorkspace()now derivesadminTokenfromE2E_ADMIN_TOKEN ?? ADMIN_TOKENand sendsAuthorization: Bearer ...onPOST /workspaceswhen present. This fixes the advisory E2E Chat regression at the fixture call site; no AdminAuth/router/middleware loosening or product auth weakening is in the diff. Required-lens checks are green for CI/all-required, E2E Chat, E2E API Smoke, and Handlers Postgres on this head; remaining red governance contexts are review/SOP pre-approval noise.