Skip to content

fix: log rollback errors instead of silently swallowing them - #3926

Open
Quratulain-bilal wants to merge 1 commit into
github:mainfrom
Quratulain-bilal:fix/rollback-log-errors
Open

Quratulain-bilal wants to merge 1 commit into
github:mainfrom
Quratulain-bilal:fix/rollback-log-errors

Conversation

@Quratulain-bilal

Copy link
Copy Markdown
Contributor

Problem

_rollback() caught and discarded all exceptions during component removal. If a rollback step fails, the user has no indication the rollback was incomplete.

Fix

Add debug logging so failures are visible.

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.

Pull request overview

Adds debug diagnostics for failed best-effort bundle rollbacks.

Changes:

  • Imports Python logging.
  • Logs exceptions raised while removing rollback components.
Show a summary per file
File Description
src/specify_cli/bundler/services/installer.py Adds rollback failure logging.

Review details

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

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread src/specify_cli/bundler/services/installer.py Outdated

@mnriem mnriem left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please address Copilot feedback

Quratulain-bilal added a commit to Quratulain-bilal/spec-kit that referenced this pull request Sep 1, 2026
_rollback() caught and discarded all exceptions during component removal.
If a rollback step fails, the user has no indication the rollback was
incomplete. Now logs failures at debug level with exc_info=True.

Also fixed format string bug: exc_info=True was passed as positional
arg to logger.debug() causing TypeError.

Adds regression test for rollback error logging.

Closes github#3926
@mnriem

mnriem commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

The logging-format issue from the earlier review is corrected.

This adds debug-only diagnostics rather than normal user-facing reporting of an incomplete rollback, so we’re keeping it as triage-can-wait. Please keep that distinction clear in the description.

Before further review, resolve the conflicts with current main. Please also state whether AI assistance was used and, if so, include the agent/tool, model, mode/settings, and extent of assistance.

Drafted for @mnriem with assistance from GitHub Copilot (model: GPT-6 Astra; interactive comment drafting).

@mnriem
mnriem requested a balanced review from Copilot September 16, 2026 11:29
@mnriem mnriem added triage-can-wait Verdict: valid and in-scope but deprioritized; held behind the evidence gate author-needs-disclosure AI use, or the agent/model/settings behind it, not disclosed per CONTRIBUTING author-awaiting Waiting on author response author-needs-rebase Branch conflicts with main — rebase/resolve before merge labels Sep 16, 2026

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 focused implementation correctly preserves rollback behavior while exposing failures with regression coverage.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@mnriem

mnriem commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

Please resolve conflicts. Probably needs a rebase

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.

Copilot review overview

🟡 Changes recommended

Move logger initialization below the complete import block to satisfy Ruff E402.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity

Open (1)


from . import BundlerError

logger = logging.getLogger(__name__)
@mnriem

mnriem commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Please address Copilot feedback and fix test & lint errors

This branch has not been deployed

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

Labels

author-awaiting Waiting on author response author-needs-disclosure AI use, or the agent/model/settings behind it, not disclosed per CONTRIBUTING author-needs-rebase Branch conflicts with main — rebase/resolve before merge triage-can-wait Verdict: valid and in-scope but deprioritized; held behind the evidence gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants