Skip to content

fix(e2e): fix the quick-actions deep link and stop cold-dev timeouts in the v0.6.5 E2E run (CHE-1968) [squash] - #359

Merged
congvc-dev merged 8 commits into
mainfrom
agent/x99-claude-sonnet/e5352d126852
Oct 22, 2026
Merged

congvc-dev merged 8 commits into
mainfrom
agent/x99-claude-sonnet/e5352d126852

Conversation

@congvc-bot-x99

@congvc-bot-x99 congvc-bot-x99 Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Status

Draft. Base is main (PR #325 merged on 22 October 2026). main 3dcd45fab is merged into this branch.

Candidate head: 52628dfa60860f8f780236b235cda316e30a9106. x99-codex-sol (OpenAI, non-author) reviewed e4e24f58242845180cd4b6c95f70bd99506da0e5 (scoped code review PASS) 219c4a85f2d97a005366cda9846d07b8aa1b786a (CHANGES REQUESTED: R1 false PASS, R2 test regression) and d45155cfea76779fc10a484a83c25fba779d0b2e (CHANGES REQUESTED: R1 still open when no listener PID is available). 52628dfa60860f8f780236b235cda316e30a9106 closes that R1 and has no independent review yet, so ready is NOT-RUN.

Change

  • fix(chat): the chat page re-applies the ?session= thread after a workspace rehydration. The workspace layout publishes the workspace in an effect, and the persisted chat store rehydrates one microtask later. A chat page that mounted in that commit lost its selection, and the store-to-URL effect stripped the deep link. This is the only product bug found. It fixes quick-actions.
  • fix(e2e): apps/web/next.config.ts sets onDemandEntries so next dev keeps compiled routes for the whole run.
  • test(e2e): e2e/global-setup.ts also loads each route once in a signed-in browser, so client chunks compile before the specs run.
  • test(e2e): local-search waits for the sync response of its own workspace only. quick-actions gets a variant where the workspace list arrives 3000 ms late.
  • test(e2e): scripts/check.sh builds apps/web (next build --webpack) and runs the E2E step against next start. It refuses a frontend port that accepts connections whatever HTTP status it answers (R1), stops if the launched frontend exits, and requires the listener to belong to the frontend it started. If neither ss nor lsof can name the listener, it fails instead of trusting that the process is alive. It never reuses or kills a foreign listener. E2E_WEB_MODE=dev keeps the next dev smoke run. The database, serial workers, zero retries and the assertions are unchanged.

Evidence

Host X99. Private pgvector/pgvector:pg17 container, fresh _test database per run, --workers=1 --retries=0, cold server. Raw output is on X99 in /mnt/ssd2/che1968-evidence/.

Red then green, observed:

  • apps/web/next.config.test.ts: red 1 failed | 2 passed (3), then 3 passed (3).
  • packages/views/chat/chat-page.test.tsx: red 2 failed | 58 passed (60), expected null to be 'session-5', then 60 passed (60).
  • bash scripts/check.test.sh (the command CI runs): red at 219c4a85f with the new 503-listener case, foreign frontend answering 503 is refused: status 0, want 1 (a false All checks passed.). Red again at d45155cfe with the new no-listener-PID race case: unprovable ownership after losing the bind race fails: status 0, want 1. Green at 52628dfa60860f8f780236b235cda316e30a9106: 15 cases PASS, exit 0 (R2: the old frontend-reuse expectations are replaced; the cleanup and failure cases are kept).
  • Real processes: port_in_use is true for a listener answering 503 and false for a free port; the ownership check fails for a foreign listener and passes for the launched one.
  • At head 219c4a85f: pnpm typecheck 10 of 10 successful; both unit files above pass.

E2E at head 219c4a85f, step 4 and 5 of scripts/check.sh (production frontend, whole suite, 93 tests): 92 passed, 1 failed (issue-wakeups "a member waits for a condition the platform checks"). The run used a copy of check.sh with steps 0 to 3 removed. A full check.sh run from step 0 is NOT-RUN.

All 8 original cases pass in that run: agent-mcp, auth-callback-locale (2 cases), auth, local-search, navigation, quick-actions, settings. The two specs that failed in the earlier production run (issue-content-disclosure, issue-table) also pass.

The issue-wakeups failure is not caused by this PR. It is an intermittent timeout ("element is not stable", then "detached from the DOM", 150s). On this head, 4 repeats of the spec: 2 failed. On main 3dcd45fab without this PR, 4 repeats: 3 failed. The cause is not investigated.

At head d45155cfe, the same step 4 and 5 (real next build and next start) on the 7 original-case specs, run at d45155cfe before the fail-closed change: 18 passed, 0 failed, All checks passed., with ss naming the listener. That real flow was not rerun at 52628dfa60860f8f780236b235cda316e30a9106. The whole suite was not rerun on this head.

Earlier runs on the previous head e4e24f582: next dev whole suite 86 passed, 7 failed; production build 91 passed, 2 failed. The next dev failures were timeouts against slow client rendering; check.sh now avoids next dev by default.

Refs: CHE-1968, CHE-1900, PR #325

Changelog: none

congvc-bot[bot] added 6 commits October 22, 2026 19:48
next dev evicts a compiled page after 60s idle and keeps only a few, so the global-setup warm-up was undone before the specs that needed it.
…-1968)

The workspace layout publishes the workspace in an effect and the persisted chat store rehydrates a microtask later. A chat page mounting in that commit lost its ?session= selection and the store-to-URL effect stripped the deep link.
The fetch warm-up compiles server routes only. The dashboard layout and search worker chunks stayed cold, so the first spec to open a workspace waited 30s+ on the compiler.
…the late-workspace-list quick-actions path (CHE-1968)

The previous page can still be syncing its own workspace when the test navigates away, so any search-index response satisfied the wait.
…1968)

next dev compiles each route on first visit and serves a slow client bundle, so the specs' 5 to 10s waits timed out. check.sh now builds and starts next start, refuses a listener already on the frontend port, and keeps E2E_WEB_MODE=dev for the dev smoke run.
@congvc-bot-x99
congvc-bot-x99 Bot changed the base branch from agent/x99-claude-sonnet/529e13bdbf3b to main October 22, 2026 18:21
congvc-bot[bot] added 2 commits October 23, 2026 01:56
…ontend owns it (CHE-1968)

A foreign listener answering 503 slipped past curl -sf, the new frontend lost the bind, and a later 200 from the foreign listener passed the readiness probe. The runner now refuses a port that accepts connections whatever its status, stops when the launched frontend exits, and requires the listener to belong to the frontend it started. check.test.sh covers the foreign 503 listener, an early exit, a foreign owner, the production build failure and dev smoke mode.
…ed (CHE-1968)

With no listener PID from ss or lsof, the runner trusted that the launched frontend was still alive. A foreign listener that wins the bind during the build leaves the frontend alive until it exits with EADDRINUSE, so the probe passed on the foreign listener. The runner now fails when ownership cannot be established. check.test.sh covers the race and the stays-alive case.
@congvc-bot-x99
congvc-bot-x99 Bot marked this pull request as ready for review October 22, 2026 19:18
@congvc-dev
congvc-dev merged commit 07151e7 into main Oct 22, 2026
22 of 24 checks passed
@congvc-dev
congvc-dev deleted the agent/x99-claude-sonnet/e5352d126852 branch October 22, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant