Skip to content

test(e2e): improve runner portability and timeout handling#8437

Merged
jdx merged 6 commits intojdx:mainfrom
mackwic:mackwic/test-e2e-runner-portability
Mar 2, 2026
Merged

test(e2e): improve runner portability and timeout handling#8437
jdx merged 6 commits intojdx:mainfrom
mackwic:mackwic/test-e2e-runner-portability

Conversation

@mackwic
Copy link
Copy Markdown
Contributor

@mackwic mackwic commented Mar 2, 2026

Summary

Improve e2e runner portability and robustness across local environments (macOS/Linux, shell/tool availability, GitHub rate-limit handling).

Changes

  • e2e/run_all_tests:
    • Add portable test-file discovery fallback chain (fd -> rg -> find).
    • Resolve local debug mise binary automatically.
    • Make GitHub rate-limit wait optional and resilient when helper is unavailable.
  • e2e/cli/test_exec_wrapper_recursion:
    • Remove hard dependency on GNU timeout with an internal timeout helper.
  • e2e/assert.sh:
    • Add portable timeout helper (timeout / gtimeout / shell fallback).

Why

The e2e suite should run reliably on developer machines and CI without requiring GNU-specific tools.

Scope

  • Tests/harness only; no production runtime logic changes.
  • Independent from the static DAG + interactive tasks feature.

Commits

  • e077e71c7
  • 2d98389ac
  • 81328859a
  • ed74023d1

Copilot AI review requested due to automatic review settings March 2, 2026 20:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves the e2e test harness’ portability across developer environments by reducing reliance on GNU-specific tools and making GitHub rate-limit waiting optional.

Changes:

  • Add portable test-file discovery (fdrgfind) and auto-resolve a local debug mise binary in e2e/run_all_tests.
  • Replace a hard dependency on external timeout in an e2e test with a shell-based timeout implementation.
  • Add a portable timeout helper (preferring timeout/gtimeout, else shell fallback) to e2e/assert.sh.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
e2e/run_all_tests Adds portability helpers for locating mise, waiting for GH rate limits optionally, and discovering test files without fd.
e2e/cli/test_exec_wrapper_recursion Replaces external timeout usage with an internal timeout helper for recursion detection.
e2e/assert.sh Introduces a shared portable timeout function and shell fallback implementation for tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread e2e/run_all_tests Outdated
Comment thread e2e/assert.sh Outdated
Comment thread e2e/cli/test_exec_wrapper_recursion Outdated
Comment thread e2e/run_all_tests Outdated
@mackwic mackwic force-pushed the mackwic/test-e2e-runner-portability branch from 5e34178 to 51e0e53 Compare March 2, 2026 21:03
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 2, 2026

Greptile Summary

Enhanced e2e test portability across different environments by removing dependencies on GNU-specific tools and adding intelligent fallbacks.

Key improvements:

  • Added portable timeout implementation with fallback chain (system timeout → gtimeout → shell implementation)
  • Implemented flexible test discovery (fd → rg → find fallback)
  • Added automatic mise binary resolution with environment variable override support
  • Made GitHub rate-limit handling optional and resilient to missing helper tools

Minor issue:

  • test_exec_wrapper_recursion contains a duplicate run_with_timeout implementation that's now available in assert.sh

Confidence Score: 5/5

  • This PR is safe to merge - test infrastructure improvements only, no production code changes
  • The changes are well-implemented with proper fallback chains, correct timeout logic, and good error handling. Only minor code duplication issue that doesn't affect functionality. All changes are confined to the test harness with no impact on runtime behavior.
  • No files require special attention - the code duplication in test_exec_wrapper_recursion is a minor cleanup opportunity

Important Files Changed

Filename Overview
e2e/assert.sh Added portable timeout helpers (run_with_timeout, parse_timeout_seconds, timeout) to eliminate GNU timeout dependency - implementation is clean and correct
e2e/cli/test_exec_wrapper_recursion Replaced GNU timeout with local run_with_timeout implementation, but creates code duplication since assert.sh now provides this function
e2e/run_all_tests Added portable test discovery fallback (fd → rg → find), automatic mise binary resolution, and optional GitHub rate-limit handling - well-designed changes

Last reviewed commit: 51e0e53

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment thread e2e/cli/test_exec_wrapper_recursion Outdated
@jdx jdx merged commit 0c8e180 into jdx:main Mar 2, 2026
33 checks passed
mise-en-dev added a commit that referenced this pull request Mar 3, 2026
### 🐛 Bug Fixes

- **(swift)** fallback to system pkgutil path on macOS by @mackwic in
[#8435](#8435)
- **(task)** skip depends_post when pre-dependency fails and main task
never runs by @jdx in [#8426](#8426)
- Fix regex for tar version check by @autarch in
[#8430](#8430)

### 🧪 Testing

- **(e2e)** improve runner portability and timeout handling by @mackwic
in [#8437](#8437)

### 📦 Registry

- fix julia version_expr closure syntax by @jdx in
[#8420](#8420)

### Chore

- **(ci)** tighten docker workflow tag filter to v[0-9]* by @jdx in
[#8422](#8422)
- remove devcontainer and docker development setup by @jdx in
[#8421](#8421)
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.

3 participants