Skip to content

[#2713] Converted 'ahoy reset hard' to the 'ahoy reset --hard' option flag.#2717

Merged
AlexSkrypnyk merged 3 commits into
mainfrom
feature/2713-reset-hard-opt
Jun 25, 2026
Merged

[#2713] Converted 'ahoy reset hard' to the 'ahoy reset --hard' option flag.#2717
AlexSkrypnyk merged 3 commits into
mainfrom
feature/2713-reset-hard-opt

Conversation

@AlexSkrypnyk

Copy link
Copy Markdown
Member

Closes #2713

Summary

Converts the ahoy reset hard positional modifier to the option flag ahoy reset --hard, making the interface consistent with the option-based convention used throughout the ahoy interface. The reset script now parses arguments via an exact-token loop, matching only the literal --hard flag - the legacy positional hard is intentionally no longer honoured. Docs, tests, and the installer baseline fixture are updated to match.

Changes

Core script (.vortex/tooling/src/reset)

  • Replaced the single $1 == "hard" positional check with a loop over all arguments that tests each against --hard by exact string equality.

Ahoy interface (.ahoy.yml)

  • Updated the reset command usage text from Use with `hard` to Use with `--hard`.

Documentation (.vortex/docs/content/development/README.mdx)

  • Updated both ahoy reset hard and ./vendor/…/reset hard examples to the --hard option form.

Tests

  • Updated the BDD integration test in .vortex/tests/phpunit/Traits/Subtests/SubtestAhoyTrait.php to call ahoy reset --hard.
  • Added .vortex/tooling/tests/unit/reset.bats with three BATS unit tests: soft reset (no flag), --hard triggers the full reset path, and the legacy positional hard is explicitly verified to no longer trigger a hard reset.

Installer fixture (.vortex/installer/tests/Fixtures/handler_process/_baseline/.ahoy.yml)

  • Regenerated baseline snapshot to reflect the updated usage string.

Before / After

BEFORE
──────────────────────────────────────────────────────────────────
 Interface       ahoy reset hard
                 ./vendor/.../reset hard

 Script parse    is_hard_reset="$([ "${1:-}" == "hard" ] && echo "1" || echo "0")"
                 ↑ positional — matches any first argument of "hard"

 Legacy support  ahoy reset hard   → hard reset (positional)
                 ahoy reset --hard → soft reset (flag ignored)


AFTER
──────────────────────────────────────────────────────────────────
 Interface       ahoy reset --hard
                 ./vendor/.../reset --hard

 Script parse    is_hard_reset=0
                 for arg in "$@"; do
                   [ "${arg}" = "--hard" ] && is_hard_reset=1
                 done
                 ↑ exact-token loop — only "--hard" triggers hard reset

 Legacy support  ahoy reset hard   → soft reset (no longer honoured)
                 ahoy reset --hard → hard reset (only supported form)

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@AlexSkrypnyk, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 29 minutes and 19 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7032a428-8610-421d-9b36-8631e037aefb

📥 Commits

Reviewing files that changed from the base of the PR and between 36ab224 and 1050d8a.

⛔ Files ignored due to path filters (1)
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/.ahoy.yml is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (5)
  • .ahoy.yml
  • .vortex/docs/content/development/README.mdx
  • .vortex/tests/phpunit/Traits/Subtests/SubtestAhoyTrait.php
  • .vortex/tooling/src/reset
  • .vortex/tooling/tests/unit/reset.bats
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/2713-reset-hard-opt

Comment @coderabbitai help to get the list of available commands.

@AlexSkrypnyk AlexSkrypnyk added the A2 Working clone index A2 label Jun 25, 2026
@github-actions

Copy link
Copy Markdown

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   98.58% (208/211)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk

This comment has been minimized.

2 similar comments
@AlexSkrypnyk

This comment has been minimized.

@AlexSkrypnyk

Copy link
Copy Markdown
Member Author

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   98.58% (208/211)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@github-actions

Copy link
Copy Markdown

📖 Documentation preview for this pull request has been deployed to Netlify:

https://6a3c96c9897739de9ad42c43--vortex-docs.netlify.app

This preview is rebuilt on every commit and is not the production documentation site.

@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.22%. Comparing base (36ab224) to head (1050d8a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2717      +/-   ##
==========================================
- Coverage   86.67%   86.22%   -0.45%     
==========================================
  Files          96       89       -7     
  Lines        4719     4560     -159     
  Branches       47        3      -44     
==========================================
- Hits         4090     3932     -158     
+ Misses        629      628       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@AlexSkrypnyk AlexSkrypnyk added the Needs review Pull request needs a review from assigned developers label Jun 25, 2026
@AlexSkrypnyk AlexSkrypnyk merged commit d01b90c into main Jun 25, 2026
34 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/2713-reset-hard-opt branch June 25, 2026 03:03
@github-project-automation github-project-automation Bot moved this from BACKLOG to Release queue in Vortex 1.x Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A2 Working clone index A2 Needs review Pull request needs a review from assigned developers

Projects

Status: Release queue

Development

Successfully merging this pull request may close these issues.

Reconcile ahoy command arguments to always use options instead of positional arguments

1 participant