Skip to content

feat(boot-start): support system level register#397

Merged
jdx merged 2 commits into
jdx:mainfrom
gaojunran:feat-boot-system
Apr 28, 2026
Merged

feat(boot-start): support system level register#397
jdx merged 2 commits into
jdx:mainfrom
gaojunran:feat-boot-system

Conversation

@gaojunran

Copy link
Copy Markdown
Contributor

No description provided.

@greptile-apps

greptile-apps Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR upgrades auto-launcher to 1.0.0 and adds system-level (root) boot registration alongside the existing user-level path. The dual-launcher design (current / other) resolves all previously-flagged compile issues (missing MacOSLaunchMode/LinuxLaunchMode imports, missing #[cfg] guards, Clone on AutoLaunch), the disable() swallowing-errors bug, the status false-positive, and the enable() early-return bypassing the cross-level conflict check.

Confidence Score: 4/5

Safe to merge; all prior P0/P1 issues are addressed. Two P2 UX/robustness concerns remain around partial-disable and missing guidance in the dual-enabled status message.

All previously-flagged blocking compile errors and logic bugs are resolved. The two remaining findings are P2: a partial-disable edge case that requires both levels to be simultaneously registered (prevented by the new enable() guard going forward) and a minor status message UX gap.

src/boot_manager.rs (disable() partial-state on cross-level permission failure); src/cli/boot.rs (both-levels status branch)

Important Files Changed

Filename Overview
src/boot_manager.rs Core change: dual-launcher design (current + other) with platform-guarded nix UID checks, cross-level conflict guard in enable(), and cross-level cleanup in disable(). Previous compile/import issues are addressed; partial-disable edge case remains.
src/cli/boot.rs BootEnable now uses is_current_level_enabled(), BootStatus uses a 4-way match on (current, other) — both previously-flagged issues addressed. BootDisable still uses is_enabled() (correct intent) but partial-disable on error is an inherited edge case.
Cargo.toml auto-launcher bumped from 0.6.0 → 1.0.0; nix added as Unix-only dependency. Straightforward version bump.
docs/guides/boot-start.md Documentation updated with user-level vs system-level table, sudo examples, and supervisor.user config guidance. No issues.

Reviews (5): Last reviewed commit: "fix: misc" | Re-trigger Greptile

Comment thread src/boot_manager.rs Outdated
@gaojunran gaojunran marked this pull request as draft April 28, 2026 11:04
Comment thread src/boot_manager.rs Outdated
Comment thread src/boot_manager.rs
Comment thread src/cli/boot.rs
Comment thread src/boot_manager.rs
Comment thread src/boot_manager.rs Outdated
@gaojunran

Copy link
Copy Markdown
Contributor Author

P2-1: disable() partial state
Removes current before other. If other then fails (permission denied), current is already gone — half-cleaned with no
indication.

P2-2: (true, true) status branch
Reports both levels enabled but gives no remediation hint, unlike the (false, true) branch.

Both findings assume a both-levels-registered (user / system) state can exist. It cannot — system-level was never supported before this PR, and this PR avoids this case,
so no legacy state exists and enable() prevents it going forward. These finding are wrong.

@jdx ready for a review!

@gaojunran gaojunran marked this pull request as ready for review April 28, 2026 13:54
@jdx jdx merged commit b4db386 into jdx:main Apr 28, 2026
3 checks passed
jdx pushed a commit that referenced this pull request Apr 28, 2026
## 🤖 New release

* `pitchfork-cli`: 2.7.0 -> 2.8.0

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

## [2.8.0](v2.7.0...v2.8.0)
- 2026-04-28

### Added

- *(boot-start)* support system level register
([#397](#397))

### Fixed

- *(tui)* remove blocking loading
([#394](#394))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).
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