feat(recipes): dependency ordering, dry-run, and cloudinit post-boot apply - #43
Conversation
- Item 1 now includes cloudinit v2 conversion (coupled, not independent) - Item 4 (stage field) reduced to validation-only rejection - Item 2 adds dependency satisfaction rules and apply-time cycle check - Item 3 moves up in priority (fixes broken backend) - Migration section fixed (sweepV1 already runs) - Added missing files-to-modify for ErrAppliedAtBoot removal - dry-run works on stopped VMs - Hash discovery note added
…apply Implements docs/specs/2026-08-10-recipe-system-fixes-design.md. - Delete the v1 metadata parser and wire cloudinit to v2 scripts: MatchesVM (via MatchReason) is the sole capability checker; Prepare and clone build seeds through ManifestFor+ScriptContent+WrapScripts; sweepV1 warns when it moves a recipe it does not recognise as stoat's. - Add recipe dependency ordering: a `depends` manifest field, TopoSort with cycle detection, apply-time satisfaction checks, create/CLI validation, and TUI auto-add of missing dependencies. - Cloudinit post-boot path: drop ErrAppliedAtBoot, write a marker per recipe from runcmd, and rebuild v.Applied over ssh after first boot. - Add `stoat apply --dry-run [--json]`: PlanApply reports the run/skip plan host-side, without starting the VM. - Document the single-reboot behaviour in docs/recipe-spec-v2.md. - Reject `stage = "install"` at add time until BYO ISO support lands.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (34)
WalkthroughThe change moves recipe execution to v2 manifests, adds dependency validation and ordering, supports cloud-init post-boot state recovery, introduces host-side apply planning with CLI dry-run output, and documents disk-mode reboot behavior. ChangesRecipe Apply System
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Poem
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Implements docs/specs/2026-08-10-recipe-system-fixes-design.md.
MatchesVM(via newMatchReason) is the sole capability checker.cloudinit.Prepareandclone.gobuild seeds throughManifestFor+ScriptContent+WrapScripts.sweepV1warns when it moves a recipe it does not recognise as stoat's own.dependsmanifest field,recipes.TopoSortwith cycle detection, apply-time satisfaction checks, create/CLI validation (CheckDependencies), and TUI auto-add (ResolveDependencies, "Added docker (required by devtools)").ErrAppliedAtBoot; each recipe's runcmd writes a marker;discoverCloudInitAppliedreads them over ssh to rebuildv.Applied.stoat apply --dry-run [--json]viaPlanApply, computed host-side (works on stopped VMs).## Reboot Behaviorsection in docs/recipe-spec-v2.md.stage = "install"at add time until BYO ISO lands.Excludes an unrelated concurrent
apkovl.gobanner change in the working tree.Summary by CodeRabbit
apply --dry-runto preview planned recipe actions in human-readable or JSON format.