Skip to content

Add 10-second initial wait for workflow runs in watch command#11

Merged
irskep merged 5 commits intomainfrom
wait-for-steps
Jul 17, 2025
Merged

Add 10-second initial wait for workflow runs in watch command#11
irskep merged 5 commits intomainfrom
wait-for-steps

Conversation

@irskep
Copy link
Owner

@irskep irskep commented Jul 17, 2025

Summary

  • Adds 10-second initial wait in watch command before showing "no workflow runs found"
  • Improves UX by preventing premature messages when CI jobs haven't registered yet
  • Displays helpful message during the wait period

Test plan

  • Added comprehensive test coverage for the new wait functionality
  • All existing tests pass (88/88)
  • Linting and formatting checks pass
  • Manual testing shows improved behavior when starting watch before CI jobs appear

🤖 Generated with Claude Code

irskep and others added 5 commits July 15, 2025 22:53
Phase 1: Extract magic numbers to constants.py
- Create centralized constants.py with all configuration values
- Replace hardcoded polling intervals, pagination limits, SHA lengths
- Replace log parsing thresholds and fallback values

Phase 2: Improve URL parsing robustness
- Replace fragile split() method with proper urllib.parse
- Add comprehensive error handling for malformed URLs
- Handle edge cases: empty URLs, missing segments, non-numeric IDs

Phase 3: Replace catch-all exception handlers
- Replace generic 'except Exception: pass' with specific error types
- Add proper handling for ValueError, TypeError, KeyError
- Improve timestamp parsing and duration calculation error handling

Includes comprehensive tests for all improvements (180 LOC).
Maintains backward compatibility with zero functional regressions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Keep todo.md, REGRESSION_PREVENTION.md, and TEST_DATA.md as local-only
development files to avoid cluttering the repository with planning docs.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Improve URL parsing to require "actions" before "runs" for more robust parsing
- Include exception type in error messages for better debugging
- Fix unrealistic test cases to match actual expected behavior
- All 86 tests now pass with 86% coverage

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Prevents premature "no workflow runs found" messages by waiting 10 seconds
on first poll before reporting no steps. Improves UX when starting watch
before CI jobs are registered.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@irskep irskep merged commit fbfd88c into main Jul 17, 2025
6 checks passed
@irskep irskep deleted the wait-for-steps branch July 17, 2025 04:04
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