fix(ci): set deterministic ADMIN_TOKEN in e2e-chat after PR #2291 fail-closed auth #2301
Reference in New Issue
Block a user
Delete Branch "fix/main-red-e2e-chat-auth-token"
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 #2298.
Problem
PR #2291 removed dev-mode fail-open auth. The platform server now requires ADMIN_TOKEN in every environment, including MOLECULE_ENV=development.
e2e-chat.yml was starting the platform with MOLECULE_ENV=development but no ADMIN_TOKEN, causing all API calls to 401 and the E2E Chat job to fail on every push/main run.
Fix
Add a 'Set deterministic admin token' step (mirrors the proven pattern in e2e-api.yml):
Verification
5-axis review: APPROVED.
Correctness: this directly addresses the post-#2291 fail-closed auth requirement by setting a deterministic per-run ADMIN_TOKEN before the e2e-chat platform/canvas path starts, and mirrors it into MOLECULE_ADMIN_TOKEN and NEXT_PUBLIC_ADMIN_TOKEN so the server, scripts, and Canvas client agree.
Robustness: token is scoped to the ephemeral CI run and only emitted into the job environment when the chat path is active. Security: no static secret is introduced; the value is deterministic but per-run and local to CI. Performance/readability: no runtime cost beyond one setup step; comments clearly explain the auth pairing.
merge-queue: updated this branch with
mainate441def8b3a8. Waiting for CI on the refreshed head.New commits pushed, approval review dismissed automatically according to repository settings
merge-queue: updated this branch with
mainat31283a292a34. Waiting for CI on the refreshed head.merge-queue: updated this branch with
mainatd768d8667b0f. Waiting for CI on the refreshed head.APPROVED. Churn re-review on current head
f2d1a525. Merge-base diff is scoped to .gitea/workflows/e2e-chat.yml. Adds a deterministic per-run admin token and exports ADMIN_TOKEN/MOLECULE_ADMIN_TOKEN/NEXT_PUBLIC_ADMIN_TOKEN before starting platform/canvas, matching the fail-closed auth requirement. No collateral.Re-reviewed current head
f2d1a525. Researcher 9229 is on this head. Merge-base diff is scoped to e2e-chat.yml only: sets deterministic ADMIN_TOKEN/MOLECULE_ADMIN_TOKEN/NEXT_PUBLIC_ADMIN_TOKEN for the paired ephemeral platform+canvas after fail-closed auth. CI / all-required is green; no secret leakage or fail-open path found.