fix(e2e): bound codex live failure logs · openclaw/openclaw@e5a9c60
vincentkoc
·
2026-06-07
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -73,7 +73,7 @@ prepare_codex_plugin_spec() {
|
73 | 73 | done < <(find "$CODEX_PLUGIN_PACK_DIR" -maxdepth 1 -type f -name '*.tgz' | sort) |
74 | 74 | if [ "${#pack_output[@]}" -ne 1 ]; then |
75 | 75 | echo "Expected one packed Codex plugin tarball; found ${#pack_output[@]}." >&2 |
76 | | -cat /tmp/openclaw-codex-plugin-pack.log >&2 || true |
| 76 | +docker_e2e_print_log /tmp/openclaw-codex-plugin-pack.log >&2 |
77 | 77 | exit 1 |
78 | 78 | fi |
79 | 79 | source_path="${pack_output[0]}" |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -300,7 +300,7 @@ if ! "$NPM_CONFIG_PREFIX/bin/codex" exec \
|
300 | 300 | echo "ERROR: Codex auth cannot extract accountId from the available token; refresh OPENCLAW_CODEX_AUTH_JSON or use OPENCLAW_LIVE_CODEX_HARNESS_AUTH=api-key." >&2 |
301 | 301 | exit 1 |
302 | 302 | fi |
303 | | - cat "$codex_preflight_log" >&2 |
| 303 | + tail -c 262144 "$codex_preflight_log" >&2 || true |
304 | 304 | exit 1 |
305 | 305 | fi |
306 | 306 | node scripts/test-live.mjs -- ${OPENCLAW_LIVE_CODEX_TEST_FILES:-src/gateway/gateway-codex-harness.live.test.ts} |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1960,6 +1960,8 @@ grep -Fxq 'printf "heredoc reached docker\\n"' "$TMPDIR/docker-stdin-seen"
|
1960 | 1960 | expect(assertions).toContain(".slice(0, MAX_TRANSCRIPT_FILES)"); |
1961 | 1961 | expect(assertions).toContain("scannedBytes + readableBytes > MAX_TRANSCRIPT_SCAN_BYTES"); |
1962 | 1962 | expect(assertions).not.toContain('const content = fs.readFileSync(filePath, "utf8")'); |
| 1963 | +expect(runner).toContain("docker_e2e_print_log /tmp/openclaw-codex-plugin-pack.log"); |
| 1964 | +expect(runner).not.toContain("cat /tmp/openclaw-codex-plugin-pack.log"); |
1963 | 1965 | expect(runner).toContain("tail -n 120 /tmp/openclaw-codex-agent-after-uninstall.err"); |
1964 | 1966 | expect(runner).not.toContain("cat /tmp/openclaw-codex-agent-after-uninstall.err"); |
1965 | 1967 | }); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -118,4 +118,11 @@ describe("scripts/test-live-codex-harness-docker.sh", () => {
|
118 | 118 | ); |
119 | 119 | expect(script).not.toMatch(/Failed to extract accountId from token[\s\S]{0,180}exit 0/u); |
120 | 120 | }); |
| 121 | + |
| 122 | +it("bounds Codex preflight failure diagnostics", () => { |
| 123 | +const script = fs.readFileSync(SCRIPT_PATH, "utf8"); |
| 124 | + |
| 125 | +expect(script).toContain('tail -c 262144 "$codex_preflight_log"'); |
| 126 | +expect(script).not.toContain('cat "$codex_preflight_log"'); |
| 127 | +}); |
121 | 128 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。