test(e2e): stabilize real flow run - #401
Draft
rksharma-owg wants to merge 1 commit into
Draft
Conversation
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.
Description of the Change
Problem
The scheduled Tier-2 flow test is intermittent on unchanged commits. In the September 1 run, both attempts created and ran their backend flows, but Chromium aborted the in-flight
createFlowGraphQL request withnet::ERR_NETWORK_CHANGEDwhen Docker created the nested sandbox network endpoint. The page remained on/flows/newand timed out.A clean local run also exposed the adjacent fixture race: the deterministic mock can issue its terminal command and final messages before the newly routed flow page has attached its live subscriptions. This leaves persisted input visible while the streamed stdout or final result is absent.
Solution
DOCKER_NETWORK=hostmode, avoiding bridge-interface creation while Chromium is connected.Production Compose defaults, CLI/API behavior, schemas, dependencies, and persisted data are unchanged.
No issue is closed by this PR. I found no open issue or PR covering this nightly failure.
Type of Change
Areas Affected
Testing and Verification
Test Configuration
Test Steps
CI=1 ./frontend/e2e/tools/run-local-tier.sh --grep 'runs a flow end-to-end'on unmodified main and inspect the failed Playwright traces and Compose log.Test Results
pnpm run prettier: passed.pnpm run lint: passed with zero warnings.pnpm run typescript: passed.pnpm run test: 78 files, 1,365/1,365 tests passed when run alone. One timing-sensitive WebSocket-mock test failed during an earlier concurrent gate run and passed on the isolated rerun.pnpm run build: passed.docker compose ... config --quiet: passed; resolvedDOCKER_NETWORK: host.CGO_ENABLED=0backend builds: passed.CGO_ENABLED=0 go test ./pkg/docker -run '^TestRunContainerHostNetworkSkipsPortPublishing$' -count=1: passed.go test ./...: not clean because the existinggithub.com/shoenig/go-m1cpuCGo initializer crashes before affected packages run; disabling CGo then exposes expectedgo-sqlite3stub failures and missing untracked installer assets. No Go files are changed here.Security Considerations
hostnetworking reduces isolation for the worker container, so the override is deliberately confined todocker-compose.e2e.yml. The Tier-2 scenario uses a fixed prompt, a local deterministic mock, a dummy provider key, and executes onlyuname -a; the runner also blocks.envloading and cleans its sandbox afterward. Production workers retain their existing network configuration. No credentials, external model calls, or new dependencies are introduced.Performance Impact
The mock-only terminal rule waits one second. This adds about one second to the local Tier-2 flow path; it does not affect production. The fixed flow assertion completed in about 5.1 seconds versus 90-second assertion timeouts before the change.
Documentation Updates
No user documentation changes are required because commands and production configuration are unchanged. Inline comments document both non-obvious test choices.
Deployment Notes
None. This only changes the isolated Tier-2 test override and mock fixture.
Checklist
Code Quality
go fmtandgo vet(for Go code)pnpm run lint(for TypeScript/JavaScript code)Security
Compatibility
Documentation
Additional Notes
The public failing scheduled run used the same main SHA as alternating successful runs: https://github.com/vxcontrol/pentagi/actions/runs/33466020033