Repository navigation
Make the pre-push gate test the working tree, not port 4200 - #245
Merged
Merged
Conversation
`playwright.config.ts` had `reuseExistingServer: !process.env['CI']`, and this
host always has `serve-prod.js` on :4200 serving beta out of `dist/`. So a local
run tested the last deployed build rather than the commit about to be pushed.
It showed up as `diagram-behaviour.spec.ts:48` failing on a clean `main` while
CI was green on the same commit. The served build predated the fix that test
asserts by eight hours:
dist/reactome/browser/index.html 2026-09-17 13:14:18
b11c0e3 (#236, the fix asserted) 2026-09-17 21:43:58
Today's failure direction was harmless -- red on good code -- and it cost a
`--no-verify` push on a branch that was fine. The same mechanism passes on a
tree that is broken, which is the direction that matters.
E2E_PORT now asks for a server of our own. Preflight sets 4201, so it builds and
serves the tree under test while beta keeps 4200. A distinct port rather than
`reuseExistingServer: false`, because that aborts on "port already in use" and
would mean stopping beta before every push.
Measured, same two specs, same commit:
reusing :4200 (beta's build) 1 failed, 21 passed
own server on :4201 17 passed, 5 skipped, exit 0
The five new skips are the point rather than a loss. They are the
render-service tests, which skip with a reason when `/RenderService/health` does
not answer -- so `RENDER_TARGET=127.0.0.1:1` had been silently ineffective all
along. The reused server proxied to this box's real render service, so the local
smoke exercised the *present*-service path while its own comment said it existed
to reproduce CI's absent one. It now reproduces it, and matches CI, which has no
render service either.
Interactive runs keep the reuse: one `ng serve` with hot reload and many test
runs is the right trade while developing. It is only the gate that must not.
Refs #243
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #243.
playwright.config.tshadreuseExistingServer: !process.env['CI'], and this host always hasserve-prod.json :4200 serving beta out ofdist/. So a local e2e run tested the last deployed build, not the commit about to be pushed.It surfaced as
diagram-behaviour.spec.ts:48failing on a cleanmainwhile CI was green on the same commit. The served build predated the fix that test asserts by eight hours:Today's failure direction was the harmless one — red on good code, costing a
--no-verifypush on a branch that was fine. The same mechanism passes on a tree that is broken, and that is the direction that matters for a gate.The fix
E2E_PORTasks for a server of our own. Preflight sets4201, so it builds and serves the tree under test while beta keeps 4200.A distinct port rather than
reuseExistingServer: falseon 4200: the latter makes Playwright abort with "port already in use", which on this host would mean stopping beta before every push. Interactive runs keep the reuse — oneng servewith hot reload and many test runs is the right trade while developing. It is only the gate that must not reuse.Verified that npm forwards the argument rather than assuming it:
which matters because the staging steps are what the search specs need — a bare
ng servewould skip them.Measured, same two specs, same commit
This PR is its own test. The previous push was rejected by this gate; this one went through it with no
--no-verify, and the only change on the branch is the gate.The five new skips are the point, not a loss
They are the render-service tests, which skip with a stated reason when
/RenderService/healthdoes not answer. SoRENDER_TARGET=127.0.0.1:1had been silently ineffective all along: the reused server proxied to this box's real render service, so the local smoke exercised the present-service path while its own comment said it existed to reproduce CI's absent one. It now reproduces it, and matches CI, which has no render service either.That is the second bug the reuse was hiding, and it was hiding it in the dangerous direction — a check that claimed to cover a path it never took.
Not in scope
#243 also suggested having
e2e/support/backend.tsreport when it serves a request from another spec's recording. That is not the cause here —pool()doesreaddirSyncover the whole directory, so a subset run has the same pool as a full one, which is where my first diagnosis of this was wrong. It is still worth doing and it is the same piece of work as #232, so it stays there.🤖 Generated with Claude Code