Files

39 lines
2.9 KiB
Markdown

# Vertical Slice Plan: linux-system-updater
- **Slice 1 (Tracer Bullet):** Minimal end-to-end wire.
- Creates basic package layout `linux_updater/` (`__init__.py`, `__main__.py`, `models.py`, `cli.py`, `core/detector.py`, stub `managers/base.py`).
- Implements distro detection from `/etc/os-release` and basic CLI dispatch.
- Runs and verifies immediately via `python3 -m linux_updater --help` and initial test suite (`test_detector.py`).
- **Slice 2 (Pre-flight Health & Auto-Remediation):**
- Implements `core/health.py`: disk space checks (`/boot`, `/var`, `/`), active/stale lock detection (`/proc/locks` & `fcntl`), memory/OOM warnings, and AC power status.
- Implements `core/remediation.py`: safe cache cleanup and stale lock removal.
- Fully verified via unit test suite (`test_health.py` and `test_remediation.py`).
- **Slice 3 (Package Managers & Routine Updates):**
- Implements `core/runner.py` for subprocess execution (Python 3.6+ compatible).
- Implements `AptManager` (Debian/Ubuntu), `DnfManager` (RHEL 8/9/Fedora/Rocky), and `PacmanManager` (Arch Linux).
- Implements repo refresh, update simulation/parsing, full or selective package installation (`--packages`), autoremove, and reboot required checks.
- Integrates interactive prompt and `--yes` / `--non-interactive` mode.
- Verified via `test_managers.py` against mock outputs.
- **Slice 4 (Major Release Upgrade & Configuration Engine):**
- Implements `release-upgrade` subcommand with distro-specific drivers (`do-release-upgrade`, `dnf system-upgrade`, Arch rolling notice) and `--target-release` flag.
- Implements `config.py` loading `/etc/linux-updater.json` with CLI flag overrides.
- Implements structured `--json` output and strict exit codes (`0` clean, `1` error, `2` reboot required, `3` user abort).
- Verified via `test_cli.py`.
- **Slice 5 (Packaging & Distribution - .tar.gz, .deb, .rpm):**
- Implements `packaging/build_packages.py` in pure Python standard library.
- Adds Debian packaging templates (`control.template`) and RPM spec (`linux-updater.spec`).
- Adds standalone tarball builder with `install.sh`.
- Integrates installation of man page and default configuration into package trees.
- Verified via `test_packaging.py` generating valid archive artifacts.
- **Slice 6 (Documentation & MAN Pages):**
- Implements `man/linux-updater.8` (standard Section 8 troff/groff manual page for system administrators).
- Implements `README.md` (project overview, feature matrix, installation quickstart, and basic usage).
- Implements `docs/user-guide.md` (end-user manual: interactive CLI workflow, options, interpreting outputs).
- Implements `docs/admin-guide.md` (system administration guide: cron/systemd automation, JSON config, pre-flight tuning).
- Implements `docs/developer-guide.md` (developer manual: architecture, adding new package managers, running tests and packaging).