Skip to content

High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.

fix: the e2e bridge services run at info while every server runs at debug, so the process holding the CDP session is the quiet one (PIN-152)

Luigi Agosti70c56fc1c58c
diff --git a/tests/e2e/docker-compose-multi.yml b/tests/e2e/docker-compose-multi.yml
index 36aeeebc..5d67a540 100644
--- a/tests/e2e/docker-compose-multi.yml
+++ b/tests/e2e/docker-compose-multi.yml
@@ -26,14 +26,13 @@
# makes the trap quiet: it would silently hand the level back to a flag whose meaning
# has already migrated once, which is the drift this file exists to prevent.
#
-# The `pinchtab bridge` services deliberately pass no log flags and therefore run at
-# info. Read that as a scope boundary, not as a judgement that info is right for
-# them: `pinchtab bridge` accepts `--log-level` today, and the bridge is the process
-# holding the CDP session, so target crashes, instance lifecycle and selector
-# resolution are logged there — exactly what a failing browser scenario needs
-# explained. By the principle stated above they arguably want debug too. Raising them
-# is a separate decision, tracked on PIN-152, because the card that named the server
-# level was scoped to leave the bridges untouched.
+# The `pinchtab bridge` services run `--log-level debug` and NOT `--verbose`, and the
+# asymmetry with the servers is deliberate. Debug for the same reason the servers have
+# it, only more so: the bridge holds the CDP session, so target crashes, instance
+# lifecycle and selector resolution are logged there — the half a failing browser
+# scenario most needs explained. No `--verbose` because its sole contribution is the
+# startup banner and the bridge has none to print; `pinchtab bridge --help` says so.
+# Adding it would make the two rules look identical when they are not.
x-pinchtab-base: &pinchtab-base
# All pinchtab variants share the same image — only the pinchtab service
# carries `build:` so compose builds it once. The 6 variants differ only
@@ -131,7 +130,7 @@ services:
- ./config/pinchtab-ghostchrome.json:/fixture-config/pinchtab-ghostchrome.json:ro
ports:
- "127.0.0.1:9997:9999"
- command: ["/bin/sh", "-lc", "mkdir -p /data/e2e-config && cp /fixture-config/pinchtab-ghostchrome.json /data/e2e-config/pinchtab-ghostchrome.json && exec /usr/local/bin/docker-entrypoint.sh pinchtab bridge"]
+ command: ["/bin/sh", "-lc", "mkdir -p /data/e2e-config && cp /fixture-config/pinchtab-ghostchrome.json /data/e2e-config/pinchtab-ghostchrome.json && exec /usr/local/bin/docker-entrypoint.sh pinchtab bridge --log-level debug"]
healthcheck: *pinchtab-healthcheck
pinchtab-bridge:
@@ -142,7 +141,7 @@ services:
- ./config/pinchtab-bridge.json:/fixture-config/pinchtab-bridge.json:ro
ports:
- "127.0.0.1:9996:9999"
- command: ["/bin/sh", "-lc", "mkdir -p /data/e2e-config && cp /fixture-config/pinchtab-bridge.json /data/e2e-config/pinchtab-bridge.json && exec /usr/local/bin/docker-entrypoint.sh pinchtab bridge"]
+ command: ["/bin/sh", "-lc", "mkdir -p /data/e2e-config && cp /fixture-config/pinchtab-bridge.json /data/e2e-config/pinchtab-bridge.json && exec /usr/local/bin/docker-entrypoint.sh pinchtab bridge --log-level debug"]
healthcheck:
# Bridge-mode pinchtab uses a different auth token. Same tightened
# cadence as the shared healthcheck anchor above.
diff --git a/tests/e2e/docker-compose.yml b/tests/e2e/docker-compose.yml
index baa0a440..16be393c 100644
--- a/tests/e2e/docker-compose.yml
+++ b/tests/e2e/docker-compose.yml
@@ -25,15 +25,6 @@
# Dropping `--log-level` would not change the level observed today, which is what
# makes the trap quiet: it would silently hand the level back to a flag whose meaning
# has already migrated once, which is the drift this file exists to prevent.
-#
-# The `pinchtab bridge` services deliberately pass no log flags and therefore run at
-# info. Read that as a scope boundary, not as a judgement that info is right for
-# them: `pinchtab bridge` accepts `--log-level` today, and the bridge is the process
-# holding the CDP session, so target crashes, instance lifecycle and selector
-# resolution are logged there — exactly what a failing browser scenario needs
-# explained. By the principle stated above they arguably want debug too. Raising them
-# is a separate decision, tracked on PIN-152, because the card that named the server
-# level was scoped to leave the bridges untouched.
services:
pinchtab:
build:
diff --git a/tests/tools/runner/internal/e2e/e2e_test.go b/tests/tools/runner/internal/e2e/e2e_test.go
index 92d391f8..4a44b37d 100644
--- a/tests/tools/runner/internal/e2e/e2e_test.go
+++ b/tests/tools/runner/internal/e2e/e2e_test.go
@@ -1072,11 +1072,17 @@ func TestEmptyLogSuffixMarksZeroByteArtifacts(t *testing.T) {
// cfg.VerboseBanner and absent from the artifact without it; the netguard allowlist
// is printed by neither, at any level. Both flags are required together: --verbose
// contributes only the banner WHILE --log-level is set, and would govern the level again if
-// --log-level were dropped. Bridge services are expected to carry neither, which
-// leaves them at info; that is this guard's scope, not a finding that info is the
-// right level for them.
+// --log-level were dropped.
+//
+// Bridge services carry --log-level debug and NOT --verbose, and the asymmetry is the
+// rule rather than an omission: the bridge holds the CDP session, so it logs what a
+// failing browser scenario most needs, while --verbose contributes only a startup
+// banner the bridge does not have.
func TestComposeServerServicesNameTheirLogLevel(t *testing.T) {
- const wantFlags = "pinchtab server --log-level debug --verbose"
+ const (
+ wantFlags = "pinchtab server --log-level debug --verbose"
+ wantLevel = "--log-level debug"
+ )
for _, tc := range []struct {
file string
@@ -1098,10 +1104,11 @@ func TestComposeServerServicesNameTheirLogLevel(t *testing.T) {
}
case strings.Contains(svc.command, "pinchtab bridge"):
bridges++
- for _, flag := range []string{"--verbose", "--log-level"} {
- if strings.Contains(svc.command, flag) {
- t.Errorf("bridge service %s gained %s, which this guard expects the bridges not to carry — they run at info by scope, not because info is known to be right for them. Raising the bridge level is a separate decision, tracked on PIN-152; if it has been made, update this guard and the compose header together rather than only here: %s", svc.name, flag, svc.command)
- }
+ if !strings.Contains(svc.command, wantLevel) {
+ t.Errorf("bridge service %s does not run %q, so the process holding the CDP session is the quiet one — target crashes, instance lifecycle and selector resolution are logged there, and a failing scenario needs them explained: %s", svc.name, wantLevel, svc.command)
+ }
+ if strings.Contains(svc.command, "--verbose") {
+ t.Errorf("bridge service %s carries --verbose, whose only contribution is the startup banner — the bridge has none to print, so it adds nothing and makes the bridge rule look identical to the server rule when it is not: %s", svc.name, svc.command)
}
default:
t.Errorf("service %s uses the pinchtab image but runs neither server nor bridge, so no flag rule covers it: %s", svc.name, svc.command)