Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 10, 2026

The documentation for the Hyvä compatibility checker command stated "Returns exit code 1 if critical issues found, 0 otherwise" but didn't clarify that warnings alone don't trigger a non-zero exit code.

Changes

  • Updated docs/commands.md to explicitly state that warnings without critical issues return exit code 0

The command implementation (lines 214-216 of CompatibilityCheckCommand.php) returns RETURN_FAILURE only when $results['summary']['criticalIssues'] > 0. This distinction matters for CI/CD pipelines that use exit codes to determine build status.

- Returns exit code 1 if critical issues are found, 0 otherwise (even if warnings exist)

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Hyvä compatibility checker command based on feedback Clarify exit code behavior in Hyvä compatibility checker documentation Jan 10, 2026
Copilot AI requested a review from dermatz January 10, 2026 00:16
@dermatz dermatz marked this pull request as ready for review January 10, 2026 00:19
@dermatz dermatz merged commit 96ceecf into feature-hyva-compat-checker Jan 10, 2026
2 checks passed
@dermatz dermatz deleted the copilot/sub-pr-59-again branch January 10, 2026 00:19
dermatz added a commit that referenced this pull request Jan 12, 2026
* Add Hyvä compatibility checker command

- New command: mageforge:hyva:compatibility:check (aliases: m:h:c:c, hyva:check)
- Scans Magento modules for Hyvä theme incompatibilities
- Detects RequireJS, Knockout.js, jQuery, UI Components usage
- Options: --show-all, --third-party-only, --include-vendor, --detailed
- Service layer: CompatibilityChecker, ModuleScanner, IncompatibilityDetector
- Exit code 1 for critical issues, 0 for success
- Updated CI/CD workflow and documentation

* Fix: Default scan now includes third-party modules

- Changed default behavior from 0 modules to third-party modules (18)
- Without flags: Scans third-party only (excludes Magento_*)
- With --include-vendor: Scans all 394 modules including Magento core
- Updated documentation to reflect new default behavior

* Add interactive menu with Laravel Prompts

- Interactive mode activated when no options provided
- Multi-select menu for scan options:
  * Show all modules
  * Include Magento core modules
  * Detailed file-level issues
- Displays selected configuration before scan
- Falls back to direct mode if interactive fails
- Consistent with theme:build command UX

* Docs: Add interactive mode documentation

* Add 'incompatible only' option to interactive menu

- New option: Show only incompatible modules (pre-selected by default)
- Improves UX by filtering out compatible modules
- Users can still choose 'Show all' for complete overview
- Configuration display updated to reflect selection

* Remove pre-selection from 'incompatible only' option

* Update src/Service/Hyva/ModuleScanner.php

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

* Update CHANGELOG for Hyvä compatibility checker

* ✨ feat: update CHANGELOG and improve di.xml formatting

* Update src/Service/Hyva/IncompatibilityDetector.php

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

* Add actual execution tests for Hyvä compatibility checker in CI (#60)

* Initial plan

* Add actual execution tests for Hyvä compatibility checker command

Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>
Co-authored-by: Mathias Elle <m.elle@dermatz.de>

* Clarify exit code behavior in Hyvä compatibility checker documentation (#61)

* Initial plan

* Clarify exit code documentation for Hyvä compatibility checker

Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>
Co-authored-by: Mathias Elle <m.elle@dermatz.de>

* Update src/Console/Command/Hyva/CompatibilityCheckCommand.php

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

* Initial plan (#64)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Mathias Elle <m.elle@dermatz.de>

* Update src/Service/Hyva/IncompatibilityDetector.php

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

* Address code review feedback: fix duplicate config, improve regex patterns, enhance security (#65)

* Initial plan

* Apply code review feedback: fix duplicate di.xml, improve regex patterns, safer environment handling

Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>

* Replace error suppression with explicit exception handling in TTY detection

Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>

* Fix RequireJS pattern regex to properly match module references

Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
dermatz added a commit that referenced this pull request Jan 12, 2026
* Add Hyvä compatibility checker command

- New command: mageforge:hyva:compatibility:check (aliases: m:h:c:c, hyva:check)
- Scans Magento modules for Hyvä theme incompatibilities
- Detects RequireJS, Knockout.js, jQuery, UI Components usage
- Options: --show-all, --third-party-only, --include-vendor, --detailed
- Service layer: CompatibilityChecker, ModuleScanner, IncompatibilityDetector
- Exit code 1 for critical issues, 0 for success
- Updated CI/CD workflow and documentation

* Fix: Default scan now includes third-party modules

- Changed default behavior from 0 modules to third-party modules (18)
- Without flags: Scans third-party only (excludes Magento_*)
- With --include-vendor: Scans all 394 modules including Magento core
- Updated documentation to reflect new default behavior

* Add interactive menu with Laravel Prompts

- Interactive mode activated when no options provided
- Multi-select menu for scan options:
  * Show all modules
  * Include Magento core modules
  * Detailed file-level issues
- Displays selected configuration before scan
- Falls back to direct mode if interactive fails
- Consistent with theme:build command UX

* Docs: Add interactive mode documentation

* Add 'incompatible only' option to interactive menu

- New option: Show only incompatible modules (pre-selected by default)
- Improves UX by filtering out compatible modules
- Users can still choose 'Show all' for complete overview
- Configuration display updated to reflect selection

* Remove pre-selection from 'incompatible only' option

* Update src/Service/Hyva/ModuleScanner.php

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

* Update CHANGELOG for Hyvä compatibility checker

* ✨ feat: update CHANGELOG and improve di.xml formatting

* Update src/Service/Hyva/IncompatibilityDetector.php

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

* Add actual execution tests for Hyvä compatibility checker in CI (#60)

* Initial plan

* Add actual execution tests for Hyvä compatibility checker command

Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>
Co-authored-by: Mathias Elle <m.elle@dermatz.de>

* Clarify exit code behavior in Hyvä compatibility checker documentation (#61)

* Initial plan

* Clarify exit code documentation for Hyvä compatibility checker

Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>
Co-authored-by: Mathias Elle <m.elle@dermatz.de>

* Update src/Console/Command/Hyva/CompatibilityCheckCommand.php

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

* Initial plan (#64)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Mathias Elle <m.elle@dermatz.de>

* Update src/Service/Hyva/IncompatibilityDetector.php

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

* Address code review feedback: fix duplicate config, improve regex patterns, enhance security (#65)

* Initial plan

* Apply code review feedback: fix duplicate di.xml, improve regex patterns, safer environment handling

Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>

* Replace error suppression with explicit exception handling in TTY detection

Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>

* Fix RequireJS pattern regex to properly match module references

Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>

* Revert "Address code review feedback: fix duplicate config, improve regex patterns, enhance security (#65)"

This reverts commit f77c7ac.

* Update docs/commands.md

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

* ✨ feat: register Hyvä compatibility check command in di.xml

* ♻️ refactor: improve compatibility check command options and logic

---------

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

2 participants