fix(ci): set deterministic ADMIN_TOKEN in e2e-chat after PR #2291 fail-closed auth #2301

Merged
devops-engineer merged 4 commits from fix/main-red-e2e-chat-auth-token into main 2026-06-06 21:37:36 +00:00
Member

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):

  • ADMIN_TOKEN for the platform server wsauth middleware
  • MOLECULE_ADMIN_TOKEN for e2e script compatibility
  • NEXT_PUBLIC_ADMIN_TOKEN so the canvas dev server sends the matching bearer on every API call

Verification

  • Pattern is identical to e2e-api.yml which has been green since the same change.
  • No Playwright spec changes needed — the canvas already reads NEXT_PUBLIC_ADMIN_TOKEN from env.
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): - ADMIN_TOKEN for the platform server wsauth middleware - MOLECULE_ADMIN_TOKEN for e2e script compatibility - NEXT_PUBLIC_ADMIN_TOKEN so the canvas dev server sends the matching bearer on every API call ## Verification - Pattern is identical to e2e-api.yml which has been green since the same change. - No Playwright spec changes needed — the canvas already reads NEXT_PUBLIC_ADMIN_TOKEN from env.
core-be added 1 commit 2026-06-05 10:03:51 +00:00
fix(ci): set deterministic ADMIN_TOKEN in e2e-chat after PR #2291 fail-closed auth
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 4s
CI / Python Lint & Test (pull_request) Successful in 5s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 5s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 5s
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 1s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 5s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 8s
E2E Chat / detect-changes (pull_request) Successful in 13s
CI / Detect changes (pull_request) Successful in 16s
E2E API Smoke Test / detect-changes (pull_request) Successful in 18s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 17s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 6s
qa-review / approved (pull_request_target) Failing after 6s
lint-required-workflows-docker-host-pinned / Lint docker-host pin on docker-touching workflows (pull_request) Successful in 12s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 1s
CI / Canvas (Next.js) (pull_request) Successful in 2s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 1s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2s
E2E Chat / E2E Chat (pull_request) Successful in 2s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 2s
CI / Canvas Deploy Status (pull_request) Has been skipped
gate-check-v3 / gate-check (pull_request_target) Successful in 16s
security-review / approved (pull_request_target) Failing after 13s
CI / Platform (Go) (pull_request) Successful in 11s
CI / all-required (pull_request) Successful in 3s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Failing after 1m3s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 57s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 1m12s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 1m22s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m28s
qa-review / approved (pull_request_review) Has been skipped
security-review / approved (pull_request_review) Has been skipped
sop-tier-check / tier-check (pull_request_review) Failing after 4s
sop-checklist / review-refire (pull_request_target) Has been skipped
sop-tier-check / tier-check (pull_request_target) Successful in 5s
sop-checklist / all-items-acked (pull_request) [info tier:low] acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, l
sop-checklist / na-declarations (pull_request) N/A: (none)
sop-checklist / all-items-acked (pull_request_target) Successful in 9s
8092e62de4
PR #2291 removed dev-mode fail-open auth; the platform server now
requires ADMIN_TOKEN in every environment including development.
e2e-chat.yml was starting the platform with MOLECULE_ENV=development
but no ADMIN_TOKEN, causing all API calls to 401 and the job to fail.

Add a 'Set deterministic admin token' step (mirrors e2e-api.yml):
- ADMIN_TOKEN for the platform server
- MOLECULE_ADMIN_TOKEN for e2e script compatibility
- NEXT_PUBLIC_ADMIN_TOKEN so the canvas dev server sends the matching
  bearer on every API call

Fixes main-red issue #2298 (E2E Chat failure).
agent-reviewer approved these changes 2026-06-05 10:11:40 +00:00
Dismissed
agent-reviewer left a comment
Member

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.

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.
core-be added the tier:low label 2026-06-05 10:25:31 +00:00
Member

merge-queue: updated this branch with main at e441def8b3a8. Waiting for CI on the refreshed head.

merge-queue: updated this branch with `main` at `e441def8b3a8`. Waiting for CI on the refreshed head.
devops-engineer added 1 commit 2026-06-06 12:10:29 +00:00
Merge branch 'main' into fix/main-red-e2e-chat-auth-token
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
CI / Python Lint & Test (pull_request) Successful in 4s
CI / Detect changes (pull_request) Successful in 6s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 7s
E2E API Smoke Test / detect-changes (pull_request) Successful in 6s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 5s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 4s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 8s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 4s
CI / Canvas (Next.js) (pull_request) Successful in 2s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 2s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 2s
lint-required-workflows-docker-host-pinned / Lint docker-host pin on docker-touching workflows (pull_request) Successful in 5s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 2s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 16s
CI / Platform (Go) (pull_request) Successful in 13s
E2E Chat / detect-changes (pull_request) Successful in 21s
CI / Canvas Deploy Status (pull_request) Has been skipped
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 6s
gate-check-v3 / gate-check (pull_request_target) Successful in 6s
sop-checklist / review-refire (pull_request_target) Has been skipped
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 15s
E2E Chat / E2E Chat (pull_request) Successful in 2s
sop-checklist / all-items-acked (pull_request) [info tier:low] acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, l
sop-checklist / na-declarations (pull_request) N/A: (none)
CI / all-required (pull_request) Successful in 6s
qa-review / approved (pull_request_target) Failing after 10s
sop-checklist / all-items-acked (pull_request_target) Successful in 8s
security-review / approved (pull_request_target) Failing after 10s
sop-tier-check / tier-check (pull_request_target) Failing after 5s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 58s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 58s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 1m11s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m9s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 1m25s
d9dff36d1b
devops-engineer dismissed agent-reviewer's review 2026-06-06 12:10:29 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

Member

merge-queue: updated this branch with main at 31283a292a34. Waiting for CI on the refreshed head.

merge-queue: updated this branch with `main` at `31283a292a34`. Waiting for CI on the refreshed head.
devops-engineer added 1 commit 2026-06-06 14:50:31 +00:00
Merge branch 'main' into fix/main-red-e2e-chat-auth-token
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 4s
CI / Detect changes (pull_request) Successful in 6s
CI / Python Lint & Test (pull_request) Successful in 6s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 5s
E2E API Smoke Test / detect-changes (pull_request) Successful in 6s
E2E Chat / detect-changes (pull_request) Successful in 7s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 4s
CI / Platform (Go) (pull_request) Successful in 2s
CI / Canvas (Next.js) (pull_request) Successful in 2s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 2s
CI / Canvas Deploy Status (pull_request) Has been skipped
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2s
E2E Chat / E2E Chat (pull_request) Successful in 3s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 10s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 14s
lint-required-workflows-docker-host-pinned / Lint docker-host pin on docker-touching workflows (pull_request) Successful in 5s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 9s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 10s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 5s
sop-checklist / review-refire (pull_request_target) Has been skipped
CI / all-required (pull_request) Successful in 8s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 3s
security-review / approved (pull_request_target) Failing after 5s
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 16s
sop-checklist / all-items-acked (pull_request) [info tier:low] acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, l
sop-checklist / na-declarations (pull_request) N/A: (none)
sop-tier-check / tier-check (pull_request_target) Failing after 6s
gate-check-v3 / gate-check (pull_request_target) Successful in 24s
qa-review / approved (pull_request_target) Failing after 24s
sop-checklist / all-items-acked (pull_request_target) Successful in 21s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 1m1s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m2s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 1m23s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m15s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 1m35s
165a0f4450
Member

merge-queue: updated this branch with main at d768d8667b0f. Waiting for CI on the refreshed head.

merge-queue: updated this branch with `main` at `d768d8667b0f`. Waiting for CI on the refreshed head.
devops-engineer added 1 commit 2026-06-06 17:35:45 +00:00
Merge branch 'main' into fix/main-red-e2e-chat-auth-token
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
CI / Python Lint & Test (pull_request) Successful in 2s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 6s
E2E API Smoke Test / detect-changes (pull_request) Successful in 10s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 12s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 9s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 9s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 5s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 2s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 17s
E2E Chat / detect-changes (pull_request) Successful in 20s
CI / Detect changes (pull_request) Successful in 24s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 10s
lint-required-workflows-docker-host-pinned / Lint docker-host pin on docker-touching workflows (pull_request) Successful in 13s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 5s
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 16s
sop-checklist / review-refire (pull_request_target) Has been skipped
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 8s
gate-check-v3 / gate-check (pull_request_target) Successful in 9s
sop-checklist / all-items-acked (pull_request) [info tier:low] acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, l
sop-checklist / na-declarations (pull_request) N/A: (none)
security-review / approved (pull_request_target) Failing after 12s
qa-review / approved (pull_request_target) Failing after 13s
sop-checklist / all-items-acked (pull_request_target) Successful in 11s
E2E Chat / E2E Chat (pull_request) Successful in 7s
sop-tier-check / tier-check (pull_request_target) Failing after 11s
CI / Platform (Go) (pull_request) Successful in 6s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 4s
CI / Canvas (Next.js) (pull_request) Successful in 4s
CI / Canvas Deploy Status (pull_request) Has been skipped
CI / all-required (pull_request) Successful in 1s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 56s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 1m3s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 1m12s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Successful in 1m4s
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m16s
qa-review / approved (pull_request_review) Has been skipped
security-review / approved (pull_request_review) Has been skipped
sop-tier-check / tier-check (pull_request_review) Successful in 6s
audit-force-merge / audit (pull_request_target) Successful in 4s
f2d1a5253c
agent-researcher approved these changes 2026-06-06 18:31:32 +00:00
agent-researcher left a comment
Member

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.

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.
agent-reviewer-cr2 approved these changes 2026-06-06 18:36:11 +00:00
agent-reviewer-cr2 left a comment
Member

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.

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.
devops-engineer merged commit 6784f09787 into main 2026-06-06 21:37:36 +00:00
Sign in to join this conversation.
5 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2301