Skip to content

fix: roll back bundle installs when record save fails - #4469

Open
marcelsafin wants to merge 1 commit into
github:mainfrom
marcelsafin:fix/bundle-record-save-rollback
Open

fix: roll back bundle installs when record save fails#4469
marcelsafin wants to merge 1 commit into
github:mainfrom
marcelsafin:fix/bundle-record-save-rollback

Conversation

@marcelsafin

Copy link
Copy Markdown
Contributor

Description

Include bundle provenance persistence in the install rollback boundary.

Previously, a failure while saving bundles.json occurred after the protected
install block. Newly installed components remained on disk without a
provenance record, so later bundle operations could not manage them. Record
creation and saving now trigger the existing bounded rollback for components
installed by the current call.

Testing

  • Tested locally with uv run specify --help
  • Ran existing tests with uv sync && uv run pytest
  • Tested with a sample project (if applicable)

Targeted: tests/integration/test_bundler_install_flow.py (22 passed).

Full suite: 7,532 passed, 195 skipped. One existing PowerShell-launcher test
was omitted because pwsh is unavailable locally; it fails identically on the
unchanged upstream commit.

AI Disclosure

  • I did not use AI assistance for this contribution
  • I did use AI assistance (describe below)

GitHub Copilot (GPT-5.6 Sol) autonomously reproduced the bug, wrote the
regression test and implementation, and ran verification under
@marcelsafin's direction and review.

Assisted-by: GitHub Copilot (model: gpt-5.6-sol, autonomous)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@marcelsafin
marcelsafin requested a review from mnriem as a code owner September 8, 2026 14:37
Copilot AI balanced review requested due to automatic review settings September 8, 2026 14:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃煝 Approval recommended

The rollback boundary now covers record persistence, with regression tests and no unresolved issues.

Pull request overview

Extends bundle installation rollback to cover provenance record creation and persistence failures.

Changes:

  • Moves bundle record persistence inside the existing rollback boundary.
  • Adds regression coverage for record-save failures.
File summaries
File Description
tests/integration/test_bundler_install_flow.py Verifies save failures roll back newly installed components and records.
src/specify_cli/bundler/services/installer.py Rolls back newly installed components when provenance persistence fails.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants