Skip to content

feat: add recovery password reset menu - #34

Merged
SimonFair merged 8 commits into
mainfrom
feature/add-recovery-password-reset-menu
Jul 30, 2026
Merged

feat: add recovery password reset menu#34
SimonFair merged 8 commits into
mainfrom
feature/add-recovery-password-reset-menu

Conversation

@SimonFair

@SimonFair SimonFair commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features
    • Added a Recovery option to the graphical onboarding/user menu.
    • Included the recovery tool in generated GUI installation media and ensured it’s available during boot.
    • Introduced an interactive password recovery workflow with validation checks, confirmation prompt, progress/status updates, and clear success/failure reporting.
    • Updated boot-time persistence so the recovery asset can be refreshed during runtime media updates.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@SimonFair, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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 reviews.

How do review 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 refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c8ba8548-573c-4639-b38a-a6d995017376

📥 Commits

Reviewing files that changed from the base of the PR and between 66a7633 and 9689699.

📒 Files selected for processing (1)
  • scripts/menu_recovery.sh
📝 Walkthrough

Walkthrough

A ZFS-based password recovery menu is added, exposed through the GUI onboarding menu, staged into GUI ISO assets, made executable, and included in persistent runtime override handling.

Changes

Recovery menu

Layer / File(s) Summary
Recovery menu and password reset
scripts/menu_recovery.sh
Adds UI initialization, recovery navigation, confirmation handling, guarded boot-pool import/export, dataset mounting, config discovery, and deletion of the passwd and shadow files.
GUI menu entry
scripts/menu_gui_user.sh
Adds the R Recovery option and invokes menu_recovery.sh.
ISO staging and persistence overrides
scripts/build-iso.sh
Stages and enables menu_recovery.sh, and includes it in trusted persistent override detection and copying.

Estimated code review effort: 4 (Complex) | ~40 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant MainMenu
  participant RecoveryMenu
  participant ZFSTools
  participant BootPool
  participant ConfigFiles
  User->>MainMenu: Select Recovery
  MainMenu->>RecoveryMenu: Execute menu_recovery.sh
  RecoveryMenu->>ZFSTools: Validate and import boot pool
  ZFSTools->>BootPool: Mount datasets
  RecoveryMenu->>ConfigFiles: Locate config and delete passwd and shadow
  RecoveryMenu->>ZFSTools: Export boot pool
  RecoveryMenu-->>User: Report reset result
Loading

Possibly related PRs

Suggested reviewers: elibosley

Poem

I’m a rabbit with a recovery key,
Hopping through menus, brave and free.
ZFS gently opens the door,
Password shadows vanish from the floor.
The ISO packs my script just right—
A fluffy fix for boot-time night.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title uses a conventional commit prefix and clearly matches the recovery password reset menu change.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/add-recovery-password-reset-menu
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feature/add-recovery-password-reset-menu

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/menu_recovery.sh`:
- Around line 59-67: Update the config directory discovery in the password-reset
flow to resolve the expected boot dataset/path explicitly rather than selecting
the first match from find. If multiple possible boot config directories remain,
treat that as an error and abort before removing passwd or shadow; only proceed
with deletion after uniquely identifying the intended boot config directory.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ecda0945-0702-4f5b-87fa-62a8a33d53d2

📥 Commits

Reviewing files that changed from the base of the PR and between 2ffe1ef and e2c6083.

📒 Files selected for processing (3)
  • scripts/build-iso.sh
  • scripts/menu_gui_user.sh
  • scripts/menu_recovery.sh

Comment thread scripts/menu_recovery.sh Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/menu_recovery.sh`:
- Around line 151-153: Update the recovery menu flow around ui_menu and
ui_hotkey_select so fallback selection depends on the configured UI backend
rather than ui_menu’s exit status. For the supported menu backend, treat a
nonzero result from ui_menu as cancellation and map it to the existing “Back”
behavior; invoke ui_hotkey_select only when that backend is configured.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 542af805-46c8-422d-8f26-ac925f3a50d4

📥 Commits

Reviewing files that changed from the base of the PR and between cb03aad and ab890b9.

📒 Files selected for processing (1)
  • scripts/menu_recovery.sh

Comment thread scripts/menu_recovery.sh Outdated
@SimonFair SimonFair changed the title Add recovery password reset menu feat: add recovery password reset menu Jul 30, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/menu_recovery.sh`:
- Around line 111-115: Harden config_dir validation in the recovery flow before
any deletion: reject it when it is a symlink, canonicalize the resolved path,
and verify the canonical path remains within mount_root rather than escaping
through a pool-provided link. Only proceed with the existing deletion logic when
this validation succeeds; otherwise preserve the cleanup and error-message path.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dd15d379-9a55-4dc9-a169-52f73f8006d0

📥 Commits

Reviewing files that changed from the base of the PR and between ab890b9 and 66a7633.

📒 Files selected for processing (1)
  • scripts/menu_recovery.sh

Comment thread scripts/menu_recovery.sh Outdated
@SimonFair
SimonFair merged commit 7ed8c51 into main Jul 30, 2026
2 checks passed
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