From 5e482e6eeba7f6647f6d61db642e447d6da8ac7f Mon Sep 17 00:00:00 2001 From: Adam Wright Date: Fri, 30 Oct 2026 15:11:29 +0000 Subject: [PATCH 1/2] DeltaSignal on beta, from #757's review: the docs say so, and the toggle test checks it The nginx README and the e2e toggle test's header no longer say DeltaSignal cannot work on beta; the README says where its service runs and that beta's checks cover it. The toggle test now checks the button on beta as well as under the dev server. The search-answer flag's comment, also stale, names beta too. Co-Authored-By: Claude Opus 5.5 --- deploy/nginx/README.md | 14 +++++++++----- e2e/deltasignal-toggle.spec.ts | 18 ++++++++++-------- .../website-angular/src/config/environments.ts | 6 +++--- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/deploy/nginx/README.md b/deploy/nginx/README.md index 6283d53b6..acb05c6d4 100644 --- a/deploy/nginx/README.md +++ b/deploy/nginx/README.md @@ -90,11 +90,15 @@ The shared routes name `site`, `content`, `analysis`, `content_node`, absorbs both: node in this repository taking over most of what Tomcat serves, and the site being startable locally, where they become compose service names. -`/api/` for DeltaSignal exists in none of the Apache configuration, which is why -DeltaSignal cannot work on beta today — the Angular side calls it as a bare -relative path, routed only by the dev server's proxy, which does not exist in a -built artifact. Note the port on the dev box: **8090**, not the 8080 DeltaSignal's -own compose binds, because 8080 there is Tomcat. +`/api/` is DeltaSignal's: the Angular side calls `/api/pathways`, `/api/parse` and +`/api/solve` as bare relative paths, which `common/routes.conf` sends to the +`deltasignal` upstream (the dev server's proxy does the same under `ng serve`). +Beta's site profile turns the Perturb button on because of this route; a deployment +without it must leave `deltaSignal` off. The DeltaSignal service is not part of +this repository's compose: it runs from DeltaSignal's own repository on the same +host, published on loopback only, at **8090**, not the 8080 DeltaSignal's own +compose binds, because 8080 there is Tomcat. If it stops, the button's calls fail, +so it is checked with the rest of beta (`/api/pathways` answers a list). ## Connections, which is a reason this is worth doing diff --git a/e2e/deltasignal-toggle.spec.ts b/e2e/deltasignal-toggle.spec.ts index b26c05144..2ccde9669 100644 --- a/e2e/deltasignal-toggle.spec.ts +++ b/e2e/deltasignal-toggle.spec.ts @@ -1,10 +1,10 @@ /** * DeltaSignal is offered only where a deployment asks for it. * - * It is a research feature that depends on a DeltaSignal backend, and `/api` is - * routed only by proxy.conf.js -- the dev server's proxy, which does not exist in - * a built artifact. A deployment without that backend must not offer a button - * whose every call fails, so the profile decides, and absent means off. + * It is a research feature that depends on a DeltaSignal backend, reached at + * `/api` through proxy.conf.js under the dev server and through nginx on beta. A + * deployment without that route must not offer a button whose every call fails, + * so the profile decides, and absent means off. * * Both states are checked against one build by setting `window.__APP_ENV` before * the app's scripts run, which is the runtime profile override the config already @@ -54,8 +54,10 @@ test.describe('The DeltaSignal toggle', () => { await expect(page.locator('cr-deltasignal-panel')).toHaveCount(0); }); - test('offers it on a deployment that does', async ({ page }) => { - await openWithProfile(page, 'development'); - await expect(perturb(page)).toHaveCount(1); - }); + for (const profile of ['development', 'beta']) { + test(`offers it on a deployment that does: ${profile}`, async ({ page }) => { + await openWithProfile(page, profile); + await expect(perturb(page)).toHaveCount(1); + }); + } }); diff --git a/projects/website-angular/src/config/environments.ts b/projects/website-angular/src/config/environments.ts index 4476a00a0..1186eea0c 100644 --- a/projects/website-angular/src/config/environments.ts +++ b/projects/website-angular/src/config/environments.ts @@ -52,9 +52,9 @@ export interface SiteProfile { * `specs/005-search-page-answers/research.md`, D1 and D3. * * Absent means off, like `deltaSignal`, so a deployment opts in rather than - * inherits. Only `development` has it today: the endpoint is not deployed on - * beta yet, and no keypair has been exchanged, so every other profile would - * offer a button whose calls fail. + * inherits. `development` and `beta` have it: beta's route is served by + * serve-prod.js, which holds the signing key (see the beta profile); any other + * profile would offer a button whose calls fail. */ searchAnswerEndpoint?: string; /** From d3b28e9059b5c23e7b9d98c4a34eef934437191d Mon Sep 17 00:00:00 2001 From: Adam Wright Date: Fri, 30 Oct 2026 15:27:53 +0000 Subject: [PATCH 2/2] DeltaSignal on beta, from #758's review: the toggle test keeps its recording Renaming the e2e "on" case left it without the recorded backend its title keys, so CI failed; it keeps its name, and which profiles have the flag stays pinned by the unit test. The README's wording on which deployments may turn the flag on, and on checking the service, is plainer. Co-Authored-By: Claude Opus 5.5 --- deploy/nginx/README.md | 8 ++++---- e2e/deltasignal-toggle.spec.ts | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/deploy/nginx/README.md b/deploy/nginx/README.md index acb05c6d4..831ad26da 100644 --- a/deploy/nginx/README.md +++ b/deploy/nginx/README.md @@ -93,12 +93,12 @@ the site being startable locally, where they become compose service names. `/api/` is DeltaSignal's: the Angular side calls `/api/pathways`, `/api/parse` and `/api/solve` as bare relative paths, which `common/routes.conf` sends to the `deltasignal` upstream (the dev server's proxy does the same under `ng serve`). -Beta's site profile turns the Perturb button on because of this route; a deployment -without it must leave `deltaSignal` off. The DeltaSignal service is not part of +Beta's site profile turns the Perturb button on because of this route; only a +deployment with this route may turn `deltaSignal` on. The DeltaSignal service is not part of this repository's compose: it runs from DeltaSignal's own repository on the same host, published on loopback only, at **8090**, not the 8080 DeltaSignal's own -compose binds, because 8080 there is Tomcat. If it stops, the button's calls fail, -so it is checked with the rest of beta (`/api/pathways` answers a list). +compose binds, because 8080 there is Tomcat. If it stops, the button's calls fail; +`/api/pathways` answering a list confirms it is up. ## Connections, which is a reason this is worth doing diff --git a/e2e/deltasignal-toggle.spec.ts b/e2e/deltasignal-toggle.spec.ts index 2ccde9669..2e97e610d 100644 --- a/e2e/deltasignal-toggle.spec.ts +++ b/e2e/deltasignal-toggle.spec.ts @@ -54,10 +54,10 @@ test.describe('The DeltaSignal toggle', () => { await expect(page.locator('cr-deltasignal-panel')).toHaveCount(0); }); - for (const profile of ['development', 'beta']) { - test(`offers it on a deployment that does: ${profile}`, async ({ page }) => { - await openWithProfile(page, profile); - await expect(perturb(page)).toHaveCount(1); - }); - } + // One "on" case: its title keys its recorded backend, and which profiles have + // the flag (development and beta) is pinned by environments.spec.ts. + test('offers it on a deployment that does', async ({ page }) => { + await openWithProfile(page, 'development'); + await expect(perturb(page)).toHaveCount(1); + }); });