# APT-OSTree Project Todo

This file should only show things we are currently working on or still need to do.
Completed blockes should be migrated into .notes/development_phases.md

This software is in alpha state.  Assume things do not work even if they say they do. validate everything.
Make sure actions (pkg install, etc) happen on their intended target. Not this host machine. If our logic in the apt-ostree code is incorrect, refer to .notes/inspiration/rpm-ostree-main to see how rpm-ostree did it. Update notes in .notes when appropriate as we make chnages. If we need to change the original rpm-ostree logic in apt-ostree due to environment, Fedora(DNF & rpm) vs debian(apt & dpkg), make note of it! But always try to to things the same way as rpm-ostree when possible.

## 🎯 **Project Overview**
APT-OSTree is a 1:1 CLI-compatible alternative to rpm-ostree using APT package management.

## 🚀 **Next Steps**

### **Real Environment Testing**
- [x] **Basic CLI Testing**: 
  - [x] CLI compiles and runs successfully
  - [x] Status command works (shows mock data)
  - [x] List command works (shows real package data)
  - [x] Search command works (searches APT database)
  - [x] OCI commands available (build, push, pull, inspect, validate, convert) - Enhanced beyond rpm-ostree
  - [x] **rpm-ostree style OCI integration** - compose build-chunked-oci, container-encapsulate, image
- [x] **OSTree System Setup**: 
  - [x] Test environment configuration
  - [ ] Bootloader integration
  - [ ] Deployment workflow testing
- [x] **Integration Testing**:
  - [x] **✅ SUCCESS: bootc integration** - Test compatibility with bootc container images
  - [ ] **Native bootc on Ubuntu** - Test with libostree 2025.2-1 (available in Ubuntu Questing)
  - [ ] **fsverity integration** - Test filesystem integrity verification
  - [ ] **composefs integration** - Test layered filesystem composition
- [ ] **Complete Application Testing**:
  - [x] Basic CLI commands working (status, list, search, install, upgrade)
  - [x] OCI commands available (build, push, pull, inspect, validate, convert)
  - [x] Compose commands available (tree, install, commit, image, etc.)
  - [x] **rpm-ostree style compose commands** - build-chunked-oci, container-encapsulate, image (matches rpm-ostree exactly)
  - [ ] Start with clean OSTree environment (no packages)
  - [ ] Build up complete system using apt-ostree (similar to ublue's kionite)
  - [ ] Test full workflow: compose → deploy → package management → upgrades
  - [ ] Validate against rpm-ostree workflow for feature parity
- [ ] **End-to-End Testing**: 
  - [ ] Complete workflow validation
  - [ ] Error scenario testing
  - [ ] Performance benchmarking

### **Bootable System with Desktop Environment (Aurora-style)**
- [ ] **Phase I: OS Image Build (Server-Side)**
  - [x] **Step 1: Image Definition**
    - [x] Create Containerfile for apt-ostree base system
    - [x] Define Ubuntu/Debian base with apt-ostree integration
    - [x] Add desktop environment packages (GNOME/KDE)
    - [x] Configure system services and display manager
  - [x] **Step 2: Image Build**
    - [x] Test apt-ostree compose build-chunked-oci functionality (command available)
    - [x] Test apt-ostree compose tree functionality (command available)
    - [x] Test OCI build/push/pull commands (commands available)
    - [x] **✅ SUCCESS: Built chunked OCI archive from Ubuntu image**
    - [x] **✅ SUCCESS: Generated 1.5GB OCI archive with 15 chunks**
      - [x] **✅ SUCCESS: Created bootc-compatible OCI image**
  - [x] **✅ SUCCESS: Verified bootc compatibility flag works**
  - [x] **✅ SUCCESS: Comprehensive bootc compatibility testing completed**
  - [x] **✅ SUCCESS: Multiple base image support (Ubuntu, Debian)**
  - [x] **✅ SUCCESS: Configuration options (format version, reference)**
  - [x] **✅ SUCCESS: Created real OSTree commit from treefile**
  - [x] **✅ SUCCESS: Verified OSTree commit creation and validation**
  - [x] **✅ SUCCESS: Treefile parsing and validation (real)**
  - [x] **✅ SUCCESS: Compose commit command working (real)**
  - [x] **✅ SUCCESS: REAL package installation working (downloads and extracts actual .deb packages)**
  - [x] **✅ SUCCESS: Package merging and conflict resolution working**
  - [x] **✅ SUCCESS: Package metadata tracking and logging**
  - [x] **✅ SUCCESS: Full treefile processing with real package installation**
  - [x] **✅ SUCCESS: Build actual OCI image from OSTree commits**
  - [x] **✅ SUCCESS: Build actual OCI image from rootfs directories**
  - [x] **✅ SUCCESS: Verify image layers and bootable configuration**
  - [x] **✅ SUCCESS: Test bootc compatibility in OCI image**
  - [x] **✅ SUCCESS: Validate OCI images with podman and skopeo**
  - [x] **✅ SUCCESS: Fix OCI schema version and field naming issues**
  - [x] **✅ SUCCESS: Install and test bootc in distrobox container**
  - [x] **✅ SUCCESS: Create comprehensive bootc compatibility test suite**
  - [x] **✅ SUCCESS: Validate apt-ostree OCI images are bootc compatible**
  - [x] **Step 3: Image Push**
    - [x] Test OCI push/pull commands (commands available)
    - [ ] Set up container registry (ghcr.io, quay.io, or local)
    - [ ] Push apt-ostree OCI image to registry
    - [ ] Test image pull and validation
    - [ ] Verify image signing and integrity

- [ ] **Phase II: OS Deployment (Client-Side)**
  - [ ] **Step 4: Image Pull**
    - [ ] Test bootc pull from apt-ostree OCI image
    - [ ] Verify registry authentication and image verification
    - [ ] Test network connectivity and fallback mechanisms
  - [ ] **Step 5: OSTree Conversion**
    - [ ] Verify bootc converts OCI layers to OSTree commits
    - [ ] Test apt-ostree integration with bootc conversion
    - [ ] Validate package database and system state
  - [ ] **Step 6: Deployment**
    - [ ] Test apt-ostree deployment from bootc-managed commits
    - [ ] Verify atomic deployment and rollback capability
    - [ ] Test system state preservation across deployments
  - [ ] **Step 7: Bootloader Configuration**
    - [ ] Test bootc bootloader integration with apt-ostree
    - [ ] Verify GRUB/systemd-boot configuration
    - [ ] Test multi-boot scenarios and rollback options
  - [ ] **Step 8-10: Boot and Customization**
    - [ ] Test system boot from apt-ostree deployment
    - [ ] Verify desktop environment functionality
    - [ ] Test user customization via Flatpak/Toolbox/podman
    - [ ] Validate mutable state initialization (/var setup)

- [ ] **Phase III: Ongoing Management**
  - [ ] **Step 11: Update Workflow**
    - [ ] Test automatic update checking via systemd timers
    - [ ] Verify apt-ostree upgrade integration with bootc
    - [ ] Test atomic updates and rollback functionality
    - [ ] Validate package management within immutable system
  - [ ] **Real-World Validation**
    - [ ] Build complete system similar to Aurora but with apt-ostree
    - [ ] Test full user workflow (login → apps → updates → reboot)
    - [ ] Performance comparison with rpm-ostree equivalent
    - [ ] Validate against traditional Ubuntu/Debian package management

### **Production Readiness (Optional)**
- [ ] **Deployment Tools**: 
  - [ ] Package distribution
  - [ ] Installation scripts
  - [ ] Configuration management
- [ ] **Documentation**: 
  - [ ] User manual
  - [ ] API documentation
  - [ ] Deployment guide



 