Skip to content

nightly-e2e: runtime-overrides-e2e baseline capture race — tee flush vs container teardown #4926

@hunglp6d

Description

@hunglp6d

Nightly E2E Failure Report

Run: nightly-e2e #27109353827
Job: runtime-overrides-e2e (job 80004075918)
Commit: 0cb2c84 (main)
Date: 2026-06-08

Failure Classification

Field Value
Class flaky_test
Confidence high
Related PR #4924

Root Cause

The runtime-overrides-e2e test captures baseline openclaw.json by running cat inside a sandbox container. The entrypoint redirects stdout through a tee process substitution:

exec 3>&1
exec > >(tee -a "$_START_LOG" >&3)

When PID 1 exits quickly (baseline case — no overrides to apply), Docker may SIGTERM the tee subprocess before it flushes its buffer to fd 3 (the real Docker stdout). This race condition leaves $BASELINE empty in the test harness.

Cascade

Test Symptom Cause
Test 6 (CORS origin) [: : integer expression expected $BASELINE_ORIGINS is empty → arithmetic comparison fails
Test 14 (config unchanged) Empty-string comparison always passes trivially $BASELINE_MODEL and $BASELINE_CTX are empty

Why override tests pass

Override-bearing containers (Tests 2–5, 7–13) do more work before exiting — applying config patches, recomputing hashes — which gives the tee process enough settling time to flush its buffer before Docker tears down the container.

Evidence

  • All baseline jq extractions return empty strings; override tests pass consistently
  • No relevant code changes between the passing nightly (2026-06-07, 8d9c573) and this failure
  • The only delta in the entrypoint between the two nightlies is two _TOOL_REDIRECTS entries (npm_config_offline, NPM_CONFIG_OFFLINE) which are no-ops for the baseline path
  • No stdout-polluting code found in the entrypoint's baseline (no-override) execution path

Fix

PR #4924 modifies run_override() in test/e2e/test-runtime-overrides.sh to write directly to fd 3 inside the container, bypassing the tee pipe entirely:

bash -c 'cat /sandbox/.openclaw/openclaw.json >&3; printf "\n" >&3'

Fixes #4925 is unrelated (Docker Hub timeout in a different job).

Suggested Labels

type:flaky-test, area:e2e, priority:medium


Auto-generated by nemoclaw-diagnosis for nightly-e2e run 27109353827.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions