Repository navigation
Description
Problem Description
The commit hook openspec-gate stops devops ci --only openspec after 90 s (.pre-commit-config.yaml). On a busy host the gate needs about that time or more, so the hook refuses a commit whose change folder is valid.
Reproduction Steps
- On a 16-core devcontainer with other test runs in progress (load average about 35), commit a change under
openspec/. - The hook
openspec gate (change folders and generated skills)fails with exit code 124.
Expected vs Actual Behavior
Expected: the hook gives the verdict of the gate on a busy host, in a time well below its limit.
Actual, on 2026-11-30:
- Two commits in a row failed with
openspec validation (stopped after 1m 27s)and(stopped after 1m 25s). - The same commit passed when the load average was about 10.
- Outside the hook, beside other gates, the gate passed in 1m 25s and 1m 4s.
Environment Diagnostics
devops-cli 0.264.1, Python 3.14.10, devcontainer.
Proposed design
Problem statement
The openspec-gate commit hook stops after 90 seconds. On a busy host the OpenSpec check takes about 91 seconds, so the hook refuses a valid commit. The devops-ci-pre-push hook has the same problem at 40 seconds. The change raises both limits and keeps the pre-push stage under its 120 second bound.
Acceptance criteria
Requirement: OpenSpec hook gives the gate more time
The openspec-gate hook MUST allow the OpenSpec gate to finish when the host load makes the gate take 91 seconds.
Scenario: Busy host OpenSpec gate
- WHEN The host load makes the OpenSpec gate take 91 seconds, as the issue reports.
- THEN
pre-commit run openspec-gate --all-filesexits 0 and prints no timeout message.
Requirement: Pre-push hook gives the fast checks more time
The devops-ci-pre-push hook MUST allow the fast static checks to finish when the host load makes swallowed-failures take 37 seconds.
Scenario: Busy host pre-push check
- WHEN The host load makes the
swallowed-failurescheck take 37 seconds, as the reply reports. - THEN
pre-commit run devops-ci-pre-push --hook-stage pre-push --all-filesexits 0 and prints no timeout message.
Existing Tool Considered
No alternatives check has run. The existing pre-commit hook runner covers hook execution but lacks a per-hook timeout. The existing GNU coreutils timeout command covers the limit but has no default that fits a busy host. The change sets the limits in .pre-commit-config.yaml and builds no code, so the cost is zero tokens and zero time.
Key questions
- Which hooks need a larger limit?: Both
openspec-gateanddevops-ci-pre-pushneed a larger limit. The reply reports the same class of failure fordevops-ci-pre-push. (best practice) [sources: .pre-commit-config.yaml]- Chosen: Raise both hook limits. Both hooks show the same timeout class in the issue and the replies, and one file holds both limits.
- Rejected: Raise only
openspec-gate. It leaves the reported 40 second failure ofdevops-ci-pre-pushunfixed. - Rejected: Remove both timeouts. A hung hook would block a commit or a push with no bound.
- Which limit does
openspec-gateget?: Theopenspec-gatehook getstimeout 180. (best practice) [sources: .pre-commit-config.yaml]- Chosen: 180 seconds. The reported worst case is 91 seconds, so 180 seconds gives about a 2x margin.
- Rejected: 120 seconds. The reported worst case is 91 seconds, and a load spike can add more than 29 seconds.
- Rejected: 90 seconds. This is the current limit that failed in the issue.
- Which limit does
devops-ci-pre-pushget?: Thedevops-ci-pre-pushhook getstimeout 60. (best practice) [sources: .pre-commit-config.yaml]- Chosen: 60 seconds. The reported worst case is 37 seconds, and the pre-push stage sum is 114 seconds, below the 120 second bound.
- Rejected: 75 seconds. The pre-push stage sum becomes 129 seconds, above the 120 second bound.
- Rejected: 40 seconds. This is the current limit that failed in the reply.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 30, 2026
The hook blocks valid commits and forces developers to retry under load, increasing error rate and rework.Both describe a pre-commit hook that times out under high host load and refuses a valid operation, but they target different hooks and different commands.dan-petty commentedon Nov 30, 2026
The pre-push hook
devops-ci-pre-pushhas the same class of failure. On 2026-11-30, with a host load of about 26 on 16 cores, it hit its 40 s limit two times while the push of the branch of #7911 ran: the checkswallowed-failureswas stopped after 37 s and 34 s. The same check passed alone in 32 s.dan-petty commentedon Nov 30, 2026
Two more cases on 2026-11-30, in a worktree on the branch of #7923. The hook
openspec-gatefailed with exit code 124 two times:openspec validation (stopped after 1m 29s)and(stopped after 1m 31s). The host had 16 cores, and other gate runs were in progress. The load average was 47 just after the first case. In the same session, anotherdevops cirun waited for the one CI gate slot, which a run of a different worktree held. Each commit passed on a later try with no change of the OpenSpec result.dan-petty commentedon Nov 30, 2026
Two more cases on 2026-11-30 on the branch of #7923:
openspec validation (stopped after 1m 29s)and(stopped after 1m 25s), load average about 30 on 16 cores. Directly after them,uv run devops openspec checkalone passed in 76 s at load average 36, so the check itself comes close to the 90 s limit of the hook. The next commit passed with no change.devops-cli-service commentedon Dec 1, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.
dan-petty commentedon Dec 1, 2026
Observed the same
devops-ci-pre-pushtimeout (exit code: 124) onfix/5453-implement-shell-usage-errorswhile pushing on a 16-core host at load average 28.7-42.3 (swallowed-failuresstopped after 30-38 s, and at load 41.1deptry,constructs,lint,uv-check, andswallowed-failuresstopped after 18 s). Runninguv run --no-sync devops ci --check --only lint,format,constructs,swallowed-failures,deps,uv-check,domainwithout the 40 s limit passed all 8 checks (swallowed-failurestook 1m 34s concurrently, 33s alone).dan-petty commentedon Dec 1, 2026
More cases on 2026-12-01, on the branch of #8045, in a 16-core devcontainer with test runs of other worktrees: 4 or more commits failed in
openspec-gatewith exit 124, 2 of them at a 1-minute load of 12 to 13 with no pytest-xdist worker (stopped after 1m 29s and 1m 24s).uv run devops ci --only openspecwith no hook limit then passed in 2m 33s, while the load rose from 7 to 30. The gate runsopenspec validate --all --strictandopenspec validate --archived; the checkout holds 399 specs, 25 active changes and 2,107 archived changes. I did not time each run alone. The archive grows with each delivery, so a higher limit will be reached again; see also #8041.