Conversation
- Update `countdown_timer` in `main.py` to log periodic updates every 10s in non-color mode. - Update `tests/test_ux.py` to verify the new behavior. - Fix test pollution in `tests/test_push_rules_perf.py` by using dynamic imports. - Create `.Jules/palette.md` to document the learning. Co-authored-by: abhimehro <84992105+abhimehro@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
😎 Merged manually by @abhimehro - details. |
|
👋 Development Partner is reviewing this PR. Will provide feedback shortly. |
Summary of ChangesHello @abhimehro, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the user experience in non-interactive environments, particularly CI, by addressing the issue of silent, long-duration waits. Previously, operations like waiting for deletion propagation could appear as frozen processes, causing user uncertainty. The core change introduces periodic status updates in the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
| # 1. "LongWait: 15s remaining..." (after first sleep/loop iteration) | ||
| # 2. "LongWait: 5s remaining..." (after second sleep/loop iteration) | ||
|
|
||
| assert mock_sleep.call_count == 3 |
Check notice
Code scanning / Bandit
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test
| mock_sleep.assert_any_call(10) | ||
| mock_sleep.assert_any_call(5) | ||
|
|
||
| assert mock_log.info.call_count == 2 |
Check notice
Code scanning / Bandit
Use of assert detected. The enclosed code will be removed when compiling to optimised byte code. Note test
There was a problem hiding this comment.
Pull request overview
Improves CLI UX in CI/non-interactive environments by adding periodic “heartbeat” log updates during long waits, rather than appearing to hang silently.
Changes:
- Update
countdown_timerto emit periodiclog.infoupdates in no-color mode for waits >10s. - Expand UX tests to cover both short (silent) and long (periodic log) no-color countdown behavior.
- Adjust a perf test to reference
mainviasys.modulesand add a Jules “palette” note documenting the UX lesson.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
main.py |
Adds periodic logging for long waits when USE_COLORS is false. |
tests/test_ux.py |
Splits/extends countdown timer tests to validate short vs long no-color behavior. |
tests/test_push_rules_perf.py |
Switches to using self.main derived from sys.modules to be resilient to module reloads. |
.Jules/palette.md |
Adds a short “palette” note about avoiding silent waits in CI. |
| ## 2025-01-26 - [Silent Waits in CI] | ||
| **Learning:** Long silent waits in CLI tools (especially in CI/non-interactive mode) cause user anxiety about hung processes. | ||
| **Action:** Always provide periodic heartbeat logs (e.g. every 10s) for long operations in non-interactive environments. |
There was a problem hiding this comment.
This introduces a new .Jules/ directory, but the repo already has a .jules/ directory. Having both differs only by case and can cause checkout/merge issues on case-insensitive filesystems (Windows/macOS). Consider placing this file under the existing .jules/ directory (or standardizing on one casing).
There was a problem hiding this comment.
Code Review
This pull request introduces a valuable user experience improvement for non-interactive environments by adding periodic status updates during long waits, preventing the appearance of a hung process. However, a medium-severity log injection vulnerability was identified in a new logging statement within the countdown_timer function, as it fails to sanitize the message parameter. It is recommended to apply the existing sanitize_for_log function to mitigate this risk. Additionally, a minor refinement is suggested for test_push_rules_perf.py to improve test robustness against pollution.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
👋 Development Partner is reviewing this PR. Will provide feedback shortly. |
1 similar comment
|
👋 Development Partner is reviewing this PR. Will provide feedback shortly. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
👋 Development Partner is reviewing this PR. Will provide feedback shortly. |
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
👋 Development Partner is reviewing this PR. Will provide feedback shortly. |
|
👋 Development Partner is reviewing this PR. Will provide feedback shortly. |
|
👋 Development Partner is reviewing this PR. Will provide feedback shortly. |
💡 What: Updated
countdown_timerto log periodic status updates (every 10s) instead of sleeping silently in non-color environments.🎯 Why: In CI or non-interactive terminals, long waits (e.g., 60s for deletion propagation) appeared as hung processes, causing user anxiety.
📸 Before/After: Before: Silent sleep. After: "Waiting: 50s remaining...", "Waiting: 40s remaining..."
♿ Accessibility: Improves experience for users relying on logs or screen readers in non-interactive mode.
Reference: Updated
tests/test_ux.pyand fixedtests/test_push_rules_perf.pyto handle dynamic imports.PR created automatically by Jules for task 17019950799559030425 started by @abhimehro