Commit Graph

4 Commits

Author SHA1 Message Date
89f57fca22 Fix CI auth: set cookie via /api/v1/health, not /login
Some checks failed
CI/CD / detect-changes (pull_request) Successful in 4s
CI/CD / test-frontend (pull_request) Successful in 5s
CI/CD / e2e-smoke (pull_request) Failing after 1m18s
CI/CD / test-runners (pull_request) Failing after 1m18s
CI/CD / test-go-pg (pull_request) Failing after 2m39s
CI/CD / build-and-deploy (pull_request) Has been cancelled
CI/CD / test-sqlite (pull_request) Has been cancelled
Navigating to /login triggers SDK boot which loads stale localStorage
tokens, attempts /auth/refresh (fails with 401), and clears all auth
state including the cookie we just set.

Fix: navigate to /api/v1/health (JSON endpoint, no SPA boot), set
arm_token cookie via document.cookie, then navigate to real surfaces.
The Go page-auth middleware reads the cookie on subsequent requests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 16:24:15 +00:00
b1a8568bff Fix CI auth: inject token via localStorage + document.cookie
Some checks failed
CI/CD / detect-changes (pull_request) Successful in 4s
CI/CD / test-frontend (pull_request) Successful in 5s
CI/CD / e2e-smoke (pull_request) Failing after 1m31s
CI/CD / test-runners (pull_request) Failing after 2m40s
CI/CD / test-go-pg (pull_request) Successful in 3m17s
CI/CD / test-sqlite (pull_request) Successful in 3m27s
CI/CD / build-and-deploy (pull_request) Has been skipped
Playwright's addCookies (both domain-based and url-based) fails to
send SameSite=Strict cookies in Docker DNS environments. The server
middleware reads arm_token from cookies, but the cookie is originally
set by client-side JS (document.cookie with SameSite=Strict).

New approach: navigate to /login first, then inject the token into
localStorage (key: arm_auth) and set the cookie via document.cookie
in page context — exactly how the real login flow works. This ensures
the cookie attributes match what the server expects.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 16:18:01 +00:00
431291b31b Fix Playwright cookie auth in Docker CI environment
Some checks failed
CI/CD / test-frontend (pull_request) Successful in 25s
CI/CD / e2e-smoke (pull_request) Failing after 3m7s
CI/CD / test-go-pg (pull_request) Successful in 3m11s
CI/CD / test-runners (pull_request) Failing after 3m30s
CI/CD / test-sqlite (pull_request) Successful in 3m36s
CI/CD / build-and-deploy (pull_request) Has been skipped
CI/CD / detect-changes (pull_request) Successful in 4s
Both test drivers (surface-test-driver.js, e2e-smoke-driver.js) set
the arm_token cookie using domain: hostname, which fails in Docker
where the hostname is a DNS name like "armature". Playwright's
addCookies with a bare domain doesn't reliably match the request
origin in this environment.

Switch to url-based cookie setting which matches the full origin
and works reliably across local and Docker environments. Also wait
for .sw-topbar with waitForSelector instead of immediate DOM check
to handle Preact SPA boot timing.

This fixes the v0.7.2 "Run All button not found" issue — the root
cause was auth redirect to /login, not a rendering problem.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 16:04:36 +00:00
d6c7b21713 Feat v0.7.2 package runners ci gate (#56)
All checks were successful
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-runners (push) Has been skipped
CI/CD / test-frontend (push) Successful in 6s
CI/CD / test-go-pg (push) Successful in 2m39s
CI/CD / test-sqlite (push) Successful in 2m55s
CI/CD / build-and-deploy (push) Successful in 29s
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com>
Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
2026-04-02 12:10:57 +00:00