bakery: pair Snapper snapshots around package transactions #47

Closed
opened 2026-09-30 18:51:56 +08:00 by Breadway · 2 comments
Owner

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.

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.
Author
Owner

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.

Implemented and pushed: https://git.breadway.dev/Breadway/bread-ecosystem/pulls/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.
Author
Owner

Independent review of PR #49 at bf39797cac9c75b88916d4ad93e6bec3fa408b84

Acceptance 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-176 selects package-changing commands and explicitly closes the transaction with the command result. bakery/src/snapshots.rs:47-104 records 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 at snapshots.rs:108-157; Snapper errors are warnings at snapshots.rs:62-74,99-103. Capabilities for BOS duplicate suppression are at snapshots.rs:22-30. Tests assert pairing, failure labels, cleanup, opt-out, dry-run and invalid configuration behavior at snapshots.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 --all and bos-update snapshot pairs on installed BOS. This repository is release-sensitive, so no merge attempted.

## Independent review of PR #49 at `bf39797cac9c75b88916d4ad93e6bec3fa408b84` Acceptance 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-176` selects package-changing commands and explicitly closes the transaction with the command result. `bakery/src/snapshots.rs:47-104` records 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 at `snapshots.rs:108-157`; Snapper errors are warnings at `snapshots.rs:62-74,99-103`. Capabilities for BOS duplicate suppression are at `snapshots.rs:22-30`. Tests assert pairing, failure labels, cleanup, opt-out, dry-run and invalid configuration behavior at `snapshots.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 --all` and bos-update snapshot pairs on installed BOS. This repository is release-sensitive, so no merge attempted.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/bread-ecosystem#47
No description provided.