Skip to content

Conversation

@vovka
Copy link
Owner

@vovka vovka commented Jun 28, 2025

No description provided.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @vovka, 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 introduces a major refactoring of the parallel matrix formatter, focusing on simplifying the architecture, improving output suppression, and enhancing inter-process communication. The changes aim to provide a more robust and maintainable solution for parallel test result formatting.

Highlights

  • Formatter Class Refactor: The Formatter class has been significantly refactored to streamline output suppression and orchestrate test result rendering in parallel testing environments. The previous implementation relied on complex logic for early suppression, role-based suppression, and process management. The new implementation simplifies this by using an OutputSuppressor and an IpcClient for inter-process communication.
  • Introduction of IPC Components: Introduced IpcClient and IpcServer classes for inter-process communication. The IpcClient is responsible for sending test status updates to the orchestrator process, while the IpcServer receives these updates and triggers the rendering of the test results.
  • Orchestrator Class Update: The Orchestrator class has been updated to manage the display of test results. It now uses an IpcServer to receive updates from the test processes and an UpdateRenderer to format the output. A blank orchestrator is used for non-primary processes.
  • Output Suppression: The OutputSuppressor class is introduced to handle output suppression, replacing the previous SuppressionLayer. It redirects $stdout to a NullIO object to prevent output from interfering with the parallel test execution.
  • Update Renderer: The UpdateRenderer class is introduced to handle rendering updates to the output based on test statuses. It uses color-coded symbols to represent test results.
  • Configuration: The ConfigLoader and SuppressionLayer classes have been removed, and a Config class has been added using the Singleton pattern.
Using Gemini Code Assist

The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and 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 to provide feedback.

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. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a refactoring of the RSpec formatter, creating an orchestrator and using IPC for communication. The review identified critical issues like missing dependencies and potential runtime errors, along with other improvements.

@vovka vovka changed the title [WIP} V0.1.0 [WIP] V0.1.0 Jun 28, 2025
@vovka
Copy link
Owner Author

vovka commented Jun 28, 2025

@gemini-code-assist would you review once more?

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a significant refactoring of the formatter, extracting responsibilities into new classes. The move to an orchestrator model with IPC is a solid architectural improvement. The review focuses on enhancing robustness and maintainability by addressing potential crash scenarios, improving error logging, and ensuring portability.

@vovka vovka force-pushed the v0.1.0 branch 7 times, most recently from 24505c6 to c24f0bd Compare June 28, 2025 17:14
vovka added 6 commits June 28, 2025 20:56
- Move config and parser to config/ directory and update requires
- Add support for advanced progress column formatting via config:
  - Allow width, alignment, pad symbol, and color to be set in YAML
  - Support random katakana padding and color for progress columns
  - Parse format like "{v}%:^10" for percentage columns
- Refactor UpdateRenderer#progress_update into smaller private methods
- Remove legacy config.rb, update suppressor and requires for new config location
- Add AnsiColor class for colorized output
- Update example config and comments for clarity
…ns and improved testability

- Refactor Config: remove nested Config::Config, simplify to single Config class, update parser usage
- Update Formatter: inject config, pass to suppressor and renderer, remove class variable suppressor
- Refactor Output::Suppressor: remove singleton, use instance and class variable for suppression, accept config
- Refactor UpdateRenderer: delegate progress and status rendering to ProgressUpdater and StatusRenderer, add helpers
- Add FormatHelper, ProgressUpdater, and StatusRenderer classes for modular rendering logic
- Update config and parser to support progress_column.percentage and flexible formatting
- Update and improve specs for new config and rendering structure
- Add AnsiColor class for colorized output
- Update $LOAD_PATH and RSpec config for better test isolation
This commit introduces descriptive comments for all relevant Ruby classes within the
 directory, enhancing code readability and
maintainability.

Additionally, the  file has been updated to include new coding
conventions regarding file requirements, class/method line limits, and line
character limits, providing clearer guidelines for future development.
  This commit refactors the configuration loading and parsing mechanism to enhance modularity and separation of concerns.

  Key changes include:
   - Introduced a new ParallelMatrixFormatter::Config class as the central configuration manager, replacing the previous Config::Config.
   - Extracted ProgressColumnParser into its own dedicated class, responsible for parsing progress column-related settings.
   - Updated Formatter and Output::Suppressor to directly receive relevant configuration sections, simplifying their dependencies on the main Config object.
   - Adjusted config/parallel_matrix_formatter.yml to include output_suppressor settings.
   - Updated related specs to reflect the new configuration structure and interactions.
vovka and others added 3 commits July 4, 2025 23:26
* Refactor test a bit

* Fix progress line formatting with katakana symbols and improve documentation

- Fix configuration parsing to handle nested update_renderer section
- Add symbol/string key fallback logic for robust config access
- Implement proper katakana character sampling for progress padding
- Fix AnsiColor module references to use full qualified names
- Add comprehensive test coverage for progress line formatting
- Create detailed CLAUDE.md documentation for future development
- Update task documentation with post-implementation notes

Resolves issue where progress displayed as =17%=== instead of キニォ50%ホメモシ
All 83 tests pass. Matrix Digital Rain effect now works as expected.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Add space between progress string and test statuses. Fix digits config

* Add demo image

* Handle review comments

---------

Co-authored-by: Claude <noreply@anthropic.com>
…ith IPC server (#23)

* Initial plan

* Fix output suppression in formatter initialization

Co-authored-by: vovka <127781+vovka@users.noreply.github.com>

* Improve IPC client synchronization with faster retry parameters

Co-authored-by: vovka <127781+vovka@users.noreply.github.com>

* Fix race condition in formatter output suppression by synchronizing with IPC server

Co-authored-by: vovka <127781+vovka@users.noreply.github.com>

* Exclude test service file

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: vovka <127781+vovka@users.noreply.github.com>
Co-authored-by: Volodymyr Shcherbyna <scherbina.v@gmail.com>
vovka and others added 5 commits July 5, 2025 00:00
…ntation

- Fix configuration parsing to handle nested update_renderer section
- Add symbol/string key fallback logic for robust config access
- Implement proper katakana character sampling for progress padding
- Fix AnsiColor module references to use full qualified names
- Add comprehensive test coverage for progress line formatting
- Create detailed CLAUDE.md documentation for future development
- Update task documentation with post-implementation notes

Resolves issue where progress displayed as =17%=== instead of キニォ50%ホメモシ
All 83 tests pass. Matrix Digital Rain effect now works as expected.

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

Co-Authored-By: Claude <noreply@anthropic.com>
…ummary and exiting (#25)

* Initial plan

* Implement orchestrator waiting for all processes before summary

Co-authored-by: vovka <127781+vovka@users.noreply.github.com>

* Fix single process mode to not buffer dump messages

Co-authored-by: vovka <127781+vovka@users.noreply.github.com>

* Apply review change requests

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: vovka <127781+vovka@users.noreply.github.com>
Co-authored-by: Volodymyr Shcherbyna <scherbina.v@gmail.com>
commit 9504ae2b39ed0635232bb2e2cf697eccf9d342a9
Author: Volodymyr Shcherbyna <scherbina.v@gmail.com>
Date:   Sat Jul 5 19:16:55 2025 +0300

    refactor: Clean up formatter and orchestrator output

    - Remove commented-out debug `puts` statements from `Formatter` and `Orchestrator`.
    - Adjust newlines in `Orchestrator` summary output for better formatting.
    - Comment out redundant `render_consolidated_summary` call in `Orchestrator`'s message processing.
    - Remove "files took" duration from summary output.

commit afc7af8
Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Date:   Sat Jul 5 12:39:16 2025 +0000

    Complete consolidated summary implementation with comprehensive testing

    Co-authored-by: vovka <127781+vovka@users.noreply.github.com>

commit 38927aa
Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Date:   Sat Jul 5 12:29:35 2025 +0000

    Implement consolidated summary rendering and timeout handling in Orchestrator

    Co-authored-by: vovka <127781+vovka@users.noreply.github.com>

commit 090cf4c
Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Date:   Sat Jul 5 12:21:15 2025 +0000

    Implement summary data collection and IPC transmission in Formatter

    Co-authored-by: vovka <127781+vovka@users.noreply.github.com>

commit ba3fadb
Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Date:   Sat Jul 5 12:16:49 2025 +0000

    Initial analysis and planning for consolidated summary feature

    Co-authored-by: vovka <127781+vovka@users.noreply.github.com>

commit 0988e08
Author: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Date:   Sat Jul 5 12:12:35 2025 +0000

    Initial plan
* Refactoring: made Orchestrator's  method private

* feat: Implement flexible progress update policies

Introduces new configuration options for controlling when progress updates are rendered:
- `update_always`: Forces continuous progress updates.
- `update_percentage_threshold`: Triggers updates when progress for any process changes by a specified percentage.

Refactors the progress update logic into a dedicated `ProgressUpdatePolicy` class, improving modularity and testability.

Also adds a `chars_replacement` configuration for custom character substitutions in the renderer.

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply review suggestions.

refactor: Improve ProgressUpdatePolicy logic and correctness

- Refactor `ProgressUpdatePolicy` to use a hash for `@previous_progress_update` for better tracking of individual process progress.
- Correct `percentage_update_configured?` to allow a 100% threshold.
- Extract percentage-based update logic into a dedicated `threshold_reached?` helper method for improved readability and maintainability.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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