Skip to content

ci: stop a hung step from costing an afternoon - #47

Merged
copyleftdev merged 1 commit into
mainfrom
fix/ci-hang-guard
Aug 18, 2026
Merged

ci: stop a hung step from costing an afternoon#47
copyleftdev merged 1 commit into
mainfrom
fix/ci-hang-guard

Conversation

@copyleftdev

@copyleftdev copyleftdev commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Follow-up to #46. That PR fixed the advisory; this fixes the thing that made the same run take eighty minutes to tell us nothing.

What happened

On 3ebd3df the quality job ran for 1h20m and failed. It was not a test failure — the step timings show it never got as far as the tests:

4  Swatinem/rust-cache@v2                      success       18:27:35 -> 18:27:42
5  sudo apt-get update && apt-get install jq   in_progress   18:27:42 -> (never)
6  scripts/gates.sh                            pending       (never started)

apt-get hung, gates.sh never ran, and the job was killed before it could upload a log — so the run reported no reason at all. A re-run of the identical tree passed quality in 2m19s.

Two changes

The apt-get is gone. ubuntu-latest ships jq preinstalled, and this step said so itself on every run that got far enough to print it:

jq is already the newest version (1.7.1-3ubuntu0.24.04.2).

It installed nothing and took out a network dependency on our behalf. gates.sh genuinely needs jq (10 call sites), so the comment left behind records why we now rely on the image providing it — and if a future image drops it, gates.sh fails with jq: command not found immediately rather than stalling.

Every job is bounded. Removing the step that hung this time does not stop the next step from hanging; the missing guard was the real defect. Limits are roughly ten times observed runtime — loose enough never to interrupt real work, tight enough that a stall fails while someone is still watching:

job observed limit
quality 2m19s 30m
cross-platform 2m45s (windows) 30m
dependency-audit 39s 15m
supply-chain 34s 15m

Validation

.github/workflows/ci.yml parses and all four jobs carry a limit with no apt-get remaining. The diff is 13 added lines and 1 removed — no job logic, ordering, or toolchain pin is touched, so this run of CI is itself the test.

Summary by CodeRabbit

  • Chores
    • Added time limits to automated quality, compatibility, dependency-audit, and supply-chain checks.
    • Streamlined quality checks by relying on the tool already available in the build environment.

The quality job on 3ebd3df sat for eighty minutes and reported nothing.
It was not a test failure: `apt-get` never returned, gates.sh never ran,
and the job was killed before it could upload a log, so the only evidence
left was a step stuck in_progress with no end timestamp.

That apt-get was buying nothing. ubuntu-latest ships jq preinstalled, and
the step's own output said so on every run that got that far -- "jq is
already the newest version". It was a network dependency taken out on
behalf of a package we already had, and it could only ever cost us.

Bounding each job matters more than removing the one step that hung,
since any step can stall. The limits are near ten times observed runtime,
which is far too loose to interrupt real work and tight enough that the
next stall reports a failure while someone is still watching.
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 676903a1-b58b-4247-a4af-75899b68cb34

📥 Commits

Reviewing files that changed from the base of the PR and between 3ebd3df and 4a3a792.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The CI workflow adds explicit timeouts to quality, cross-platform, dependency-audit, and supply-chain jobs. The quality job removes its jq installation step and relies on the preinstalled tool.

Changes

CI controls

Layer / File(s) Summary
Job timeouts and quality tools
.github/workflows/ci.yml
The quality and cross-platform jobs use 30-minute timeouts. The dependency-audit and supply-chain jobs use 15-minute timeouts. The quality job no longer installs jq with apt-get.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to 4a3a7

The change removes the hanging package-install step and adds bounded job timeouts; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: preventing CI jobs from hanging without time limits.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-hang-guard

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@copyleftdev
copyleftdev merged commit f696d6c into main Aug 18, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant