Skip to content

Commit 6b64d65

Browse files
aledbfclaude
andcommitted
test(parity): runtime lane paralelismo estable por default (gate determinista)
-parallel 4 sobrecargaba el daemon docker en runners contendidos y hacía flakear casos compose/pesados transitoriamente (matchean aislados). El gate (task parity:runtime) ahora default -parallel 2, override via PARITY_PARALLEL. Quita el caveat de la corrida limpia. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 10c2028 commit 6b64d65

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

Taskfile.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ tasks:
9595
- sh: docker info >/dev/null 2>&1
9696
msg: Docker is required for runtime parity
9797
cmds:
98-
- PARITY_REPORT_FILE={{.ROOT_DIR}}/artifacts/parity-runtime.json PARITY_STRICT=true PARITY_LANE=all go test ./internal/cli -run TestParityMatrix -count=1 -parallel 4 -timeout 30m -v {{.CLI_ARGS}}
98+
# -parallel default 2 for gate determinism: higher values overload the docker
99+
# daemon on contended runners and transiently fail compose/heavy cases (they
100+
# match in isolation). Raise via PARITY_PARALLEL on beefy/idle runners.
101+
- PARITY_REPORT_FILE={{.ROOT_DIR}}/artifacts/parity-runtime.json PARITY_STRICT=true PARITY_LANE=all go test ./internal/cli -run TestParityMatrix -count=1 -parallel {{.PARITY_PARALLEL | default "2"}} -timeout 40m -v {{.CLI_ARGS}}
99102
- go test ./internal/cli -run TestPublishParity -count=1 -timeout 10m -v
100103

101104
clean:

internal/cli/parity_matrix_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
//
1010
// Recommended invocation for the full runtime lane (docker required):
1111
//
12-
// PARITY_LANE=all go test ./internal/cli -run TestParityMatrix -parallel 6 -timeout 30m
12+
// PARITY_LANE=all go test ./internal/cli -run TestParityMatrix -parallel 2 -timeout 40m
1313
//
14-
// ~5.5 min vs ~26 min sequential. Higher -parallel values increase docker
15-
// contention and transient flakes; 6 is a stable default on an 8-core host.
14+
// Higher -parallel is faster but overloads the docker daemon on contended runners
15+
// and transiently fails compose/heavy cases (which match in isolation), so the gate
16+
// (task parity:runtime) defaults to -parallel 2 for determinism; raise via
17+
// PARITY_PARALLEL on idle/beefy runners.
1618
package cli
1719

1820
import (

0 commit comments

Comments
 (0)