Skip to content

Commit 1916dfe

Browse files
committed
sync: update 2 file(s) in core/
- .gaai/core/scripts/lib/test-gate.sh - CHANGELOG.md GAAI-Source-Commit: c7bd36b8ddab5eaddbdbb017b371590215bda0a6
1 parent bcb7f0c commit 1916dfe

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

.gaai/core/scripts/lib/test-gate.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,20 @@ _test_gate_parse_junit_failures() {
238238
_test_gate_run_units() {
239239
local worktree_path="$1" units="$2"
240240
local -a failed=()
241-
local type label cmd out exit_code
241+
local type label cmd exit_code
242242

243243
while IFS='|' read -r type label cmd; do
244244
[[ -z "$type" ]] && continue
245-
out=$(cd "$worktree_path" && eval "$cmd" 2>&1)
246-
exit_code=$?
245+
# Stream live instead of buffering the whole run in a `$(...)` capture:
246+
# a full-suite unit can legitimately take longer than the wrapper's
247+
# hang-detector threshold, and `out=$(... 2>&1)` produces zero output
248+
# until the command exits — indistinguishable from a real hang on the
249+
# log-mtime signal the detector watches. PIPESTATUS[0] preserves the
250+
# actual command's exit code (not tee's).
251+
echo "[TEST-GATE] unit=${label} type=${type} starting" >&2
252+
(cd "$worktree_path" && eval "$cmd") 2>&1 | tee -a /dev/stderr >/dev/null
253+
exit_code=${PIPESTATUS[0]}
247254
echo "[TEST-GATE] unit=${label} type=${type} exit=${exit_code}" >&2
248-
printf '%s\n' "$out" | tail -40 >&2
249255

250256
case "$type" in
251257
bash|pm)

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
## [Unreleased]
1111

1212
### Changed
13+
- fix: stream test-gate unit output live instead of buffering
1314
- fix: hang-detector was blind to commit-phase activity
1415
- fix: name the entry tier Starter
1516
- fix: correct the amended rule and the core hook after review FAIL

0 commit comments

Comments
 (0)