bakery: pair Snapper snapshots around package transactions #47
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
BOS-28 requires snapshot protection for direct bakery updates and bos-settings Packages, in addition to bos-update. Add optional system-configured Snapper transaction support to bakery for install, update, self-update, remove, and rollback. Create numbered pre snapshots and matching post snapshots on success or failure for each configured Snapper configuration; warn on unavailable snapshot support without replacing the package outcome. Dry-run must not create snapshots. Keep the default user-local install unchanged.
BOS enables root and home snapshot configurations in its image config. Coordinate the BOS wrapper to avoid duplicate pairs with new bakery while supporting older builds.
Acceptance: isolated command harness verifies matching numbers, success/failure handling, missing config handling, default opt-out, and dry-run. Real BOS Snapper acceptance should confirm both direct bakery update --all and bos-update pairs after deployment. Related BOS-28.
Implemented and pushed: #49
Optional system-configured snapshots now bracket package commands with numbered pre/post pairs, including failures. Capabilities expose support and configured state for BOS duplicate prevention. All exact repository CI commands passed locally: pin lint, fmt, workspace clippy/test default plus gtk and extract separately, and extract build. Snapshot tests include pairing, failures, drop cleanup, opt-out, dry-run, and name validation. BOS-28 integration is PR77. Direct/Packages live acceptance needs the new bakery build shipped and installed BOS Snapper checks. No actual configs, installed binaries, desktop applications, VM, or release was touched.
Independent review of PR #49 at
bf39797cac9c75b88916d4ad93e6bec3fa408b84Acceptance interpretation: system-prefix install, update, self-update, remove and rollback commands get matching numbered pre/post snapshots for each configured Snapper configuration, including failed package operations; user-prefix, read-only and dry-run commands remain unsnapshotted; missing Snapper support warns without changing the package result; BOS can detect when to avoid duplicate pairs.
bakery/src/main.rs:126-176selects package-changing commands and explicitly closes the transaction with the command result.bakery/src/snapshots.rs:47-104records only successful numbered pre snapshots and pairs them with a matching post snapshot tagged for success or failure. Configuration opt-in, name validation, system-only and dry-run filtering are atsnapshots.rs:108-157; Snapper errors are warnings atsnapshots.rs:62-74,99-103. Capabilities for BOS duplicate suppression are atsnapshots.rs:22-30. Tests assert pairing, failure labels, cleanup, opt-out, dry-run and invalid configuration behavior atsnapshots.rs:198-288. The current head has green CI and the PR is mergeable.The code is ready for the bread-ecosystem release maintainer. The separate live acceptance remains: ship the bakery build, then verify direct
bakery update --alland bos-update snapshot pairs on installed BOS. This repository is release-sensitive, so no merge attempted.