feat: add recovery password reset menu - #34
Conversation
|
Warning Review limit reached
Next review available in: 55 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA 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. ChangesRecovery menu
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
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
✨ Simplify code
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (3)
scripts/build-iso.shscripts/menu_gui_user.shscripts/menu_recovery.sh
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
scripts/menu_recovery.sh
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
scripts/menu_recovery.sh
Summary by CodeRabbit