Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .claude/.idd/attachments/issue-508/_manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"issue": 508,
"fetched_at": "2026-11-12T03:48:51Z",
"fetched_by": "idd-diagnose",
"files": []
}
16 changes: 16 additions & 0 deletions plugins/issue-driven-dev/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

Version number left to the release.

### Fixed

- **The edit-run suite has a time limit of its own (#508).** Its run time is almost all CPU time (about 65 s on
an 18-core Mac), so its wall time grows with the load of the machine. At a load of 50 it reached the 180 s
default of `scripts/run-all-tests.sh`, and the full run reported one failed suite although no check had failed.
The suite now has a `timeout` file of 480 s, which the runner already reads. The suite checks its own file: it
is there, it holds one number between 360 and 600, and the runner applies it. The upper bound keeps the limit
under half of the CI job's 20 minutes, so a hung run is still reported by the runner, with its summary, before
the job is cancelled. A longer limit buys little: at a load near 150 on the same machine, actionability-gate
alone took 193 s, so at that load the full run already fails on another suite. No other suite got a file:
apart from merge-completeness, none took more than 60 s in three full runs at ordinary load.

## [4.0.1] - 2026-11-11

Ships #499.
Expand Down
4 changes: 3 additions & 1 deletion plugins/issue-driven-dev/scripts/run-all-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
# needs longer puts the seconds in a `timeout` file next to its test.sh; the
# larger of the two applies (#399: the merge-completeness suite uses about seven
# minutes of CPU, and took 11 minutes of wall time on a Mac, where process start-up
# is slow, hours at a load of 500, and about two minutes on Linux)
# is slow, hours at a load of 500, and about two minutes on Linux; #508: the edit-run
# suite uses about 65 seconds of CPU, and at a load of 50 on 18 cores it reached the
# default and was cut off with no failing check)
# - exit 0 iff every suite passed; 1 otherwise
#
# Env:
Expand Down
28 changes: 28 additions & 0 deletions plugins/issue-driven-dev/scripts/tests/edit-run/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,34 @@ HELPER="$PLUGIN/scripts/idd-edit-helper.py"
SKILL="$PLUGIN/skills/idd-edit/SKILL.md"
FAKE="$HERE/../correct-flow/fake-gh.py"

# ── This suite's own time limit (#508) ──
# Almost all of this suite's run time is CPU time (about 65 s on an 18-core Mac), so its wall time grows with the
# load of the machine: at a load of 50 it reached the aggregator's 180 s default and was cut off with no failing
# check. The `timeout` file next to this script raises the limit for this suite only. The limit has two bounds.
# It has to be well above the default. And it has to leave the aggregator time to report a hung run, with its
# summary, before the CI job's own 20-minute limit cancels the job (the other suites take up to nine minutes there).
LIMIT_FILE="$HERE/timeout"
assert_file_exists "this suite has a timeout file" "$LIMIT_FILE"
LIMIT_SECS="$(tr -cd '0-9' < "$LIMIT_FILE" 2>/dev/null)"
assert_eq "the file holds one number and nothing else (the aggregator keeps every digit it finds)" "${LIMIT_SECS:-no number}" "$(cat "$LIMIT_FILE" 2>/dev/null)"
[ "${LIMIT_SECS:-0}" -ge 360 ] 2>/dev/null
assert_exit "the limit is at least 360 s, twice the default" 0 $?
[ "${LIMIT_SECS:-99999}" -le 600 ] 2>/dev/null
assert_exit "the limit is at most 600 s, half the CI job's limit" 0 $?
# The aggregator applies the file. The stand-in suite must not carry the name of a real suite: the aggregator
# names each suite's log after the suite alone, so a stand-in called edit-run empties the log of this very run (#518).
STANDIN="er-limit"
[ ! -e "$HERE/../$STANDIN" ]
assert_exit "the stand-in suite's name is not the name of a real suite" 0 $?
LIMIT_SB="$(mktemp -d /tmp/idd-er-limit-XXXXXX)"
mkdir -p "$LIMIT_SB/tests/$STANDIN"
printf '#!/usr/bin/env bash\nsleep 3\n' > "$LIMIT_SB/tests/$STANDIN/test.sh"
cp "$LIMIT_FILE" "$LIMIT_SB/tests/$STANDIN/timeout" 2>/dev/null
IDD_TESTS_DIR="$LIMIT_SB/tests" IDD_SUITE_TIMEOUT=1 bash "$PLUGIN/scripts/run-all-tests.sh" > "$LIMIT_SB/out" 2>&1
assert_exit "the aggregator applies this suite's limit, not the global one → 0" 0 $?
rm -rf "$LIMIT_SB"
# ── end of the time limit checks ──

WORK="$(mktemp -d /tmp/idd-er-XXXXXX)"
export TMPDIR="$(mktemp -d /var/tmp/idd-er-tmp-XXXXXX)"
cleanup() { chmod -R u+rwx "$WORK" "$TMPDIR" 2>/dev/null; rm -rf "$WORK" "$TMPDIR"; }
Expand Down
1 change: 1 addition & 0 deletions plugins/issue-driven-dev/scripts/tests/edit-run/timeout
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
480
Loading