Skip to content

fix(den-web): keep internal API URL out of runtime config - #4156

Merged
benjaminshafii merged 3 commits into
devfrom
fix/den-runtime-config-public-api
Aug 27, 2026
Merged

benjaminshafii merged 3 commits into
devfrom
fix/den-runtime-config-public-api

Conversation

@benjaminshafii

@benjaminshafii benjaminshafii commented Aug 27, 2026 •

Copy link
Copy Markdown
Member

Summary

  • source browser/Desktop denApiUrl from DEN_API_PUBLIC_URL, never the server-only DEN_API_BASE
  • add a reusable split-origin Kind world and real-browser sign-in proof
  • use Den Web /api/ready for Kind port-forward health and clarify private-network deployment guidance

Fixes #4153

Verification

  • bun test --conditions development tests/web-page.test.ts — 4 passed
  • ./node_modules/.bin/tsc --noEmit --pretty false in ee/apps/den-web — passed
  • node --experimental-strip-types --test evals/packages/env/test/kind-stack.test.ts — 12 passed
  • pnpm --dir evals exec vitest run --config vitest.config.ts --project pr specs/shared-world-engine.test.ts — 1 passed
  • OPENWORK_EVAL_E2E_TESTS=1 OPENWORK_EVAL_KIND_E2E=1 ... vitest ... specs/den-split-origin-runtime-config.e2e.test.ts — 1 passed, 4 assertion-evidence claims

The Kind topology is explicitly local-only because it requires the local Docker host and port-forwards, so Daytona placement is unsupported. The required local lane ran successfully and its evidence is published below.

Verdict

Passed — current-head Kind/Helm/real-browser evidence is published on this PR.

@mintlify

mintlify Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
differentai 🟢 Ready View Preview Aug 27, 2026, 4:41 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@vercel

vercel Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openwork-app Ready Ready Preview Aug 27, 2026 12:41pm
openwork-den Ready Ready Preview Aug 27, 2026 12:41pm
openwork-den-worker-proxy Ready Ready Preview Aug 27, 2026 12:41pm
openwork-diagnostics Ready Ready Preview Aug 27, 2026 12:41pm
openwork-landing Ready Ready Preview, v0 Aug 27, 2026 12:41pm

@diff-warden diff-warden Bot 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.

Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (415f7e4f299a61410a7cad40d18c2074119b5d11). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run

@benjaminshafii
benjaminshafii enabled auto-merge (squash) August 27, 2026 12:46
@benjaminshafii
benjaminshafii merged commit cc6a773 into dev Aug 27, 2026
38 of 43 checks passed
@benjaminshafii

Copy link
Copy Markdown
Member Author

Test evidence — den-web-sends-browser-auth-and-api-traffic-to-the-public-api-origin — 0/0 screenshots passed · 4 assertions

✅ 0/0 screenshots passed · 4 assertions · 4 expectations passed · 0 failed · 0 pending

ℹ️ ASSERTION — 1. The Helm ConfigMap keeps the server-only API base separate from the browser-facing API URL

DEN_API_BASE=http://openwork-ee-den-api:8788; DEN_API_PUBLIC_URL=http://127.0.0.1:8790.

ℹ️ ASSERTION — 2. Den Web can reach Den API through the server-only in-cluster DEN_API_BASE

GET /api/ready returned 200 with upstream=ok for DEN_API_BASE=http://openwork-ee-den-api:8788.

ℹ️ ASSERTION — 3. Den Web runtime config exposes only the browser-facing API URL

HTTP 200; denApiUrl=http://127.0.0.1:8790; internal hostname absent=true.

ℹ️ ASSERTION — 4. Real browser sign-in and authenticated API traffic complete on the public API origin and never use the in-cluster service

Outcome=/; successful POST auth=2; /v1/me=200 for [email protected]; token present=true; origins=["http://127.0.0.1:8790","http://127.0.0.1:3005"]; internal requests=0.

  • ✅ PASS Real browser sign-in and authenticated API traffic complete on the public API origin and never use the in-cluster service — Outcome=/; successful POST auth=2; /v1/me=200 for [email protected]; token present=true; origins=["http://127.0.0.1:8790","http://127.0.0.1:3005"]; internal requests=0.

Test run created 2026-08-27T12:43:45.515Z · Source: evals/results/test-runs/2026-08-27T12-43-45-514Z-den-web-sends-browser-auth-and-api-traffic-to-the-public-api-origin/test-run.json · Repro: pnpm --dir evals artifacts:publish -- --pr 4156 --test-run 2026-08-27T12-43-45-514Z-den-web-sends-browser-auth-and-api-traffic-to-the-public-api-origin

yomgui added a commit that referenced this pull request Sep 10, 2026
#4729)

* fix(packaging): pin the compose evaluation stack to the 0.18.45 images

den-api and den-web move from 0.18.37 to 0.18.45 (OCI index digests from
ghcr.io). den-web 0.18.45 reads DEN_API_PUBLIC_URL for the browser-facing
API origin and treats DEN_API_BASE as server-only (#4156), so the web
service now sets DEN_BASE_URL, DEN_API_BASE=http://den:8788 and
DEN_API_PUBLIC_URL; without them /api/runtime-config returns 500.

* docs(packaging): point the evaluation download at the 0.18.45 compose file

This branch was successfully deployed

6 active (1 outdated) deployments
Preview – openwork-den-worker-proxy — 415f7e4f Deployed Aug 27, 2026 by vercel[bot]
Preview – openwork-landing — 415f7e4f Deployed Aug 27, 2026 by vercel[bot]
Preview – openwork-den — 415f7e4f Deployed Aug 27, 2026 by vercel[bot]
Preview – openwork-app — 415f7e4f Deployed Aug 27, 2026 by vercel[bot]
Preview – openwork-diagnostics — 415f7e4f Deployed Aug 27, 2026 by vercel[bot]
staging - packages/docs — 4af30074 Deployed Aug 27, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant