fix(cli): bypass migration prompt entirely when --yes flag is passed #1139
No reviewers
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cleveragents/cleveragents-core!1139
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bugfix/m3-init-yes-no-input"
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?
Summary
Fixes the root cause of
agents init --yesstill invoking the migration confirmation prompt path. Makesrequire_confirmationconfigurable onUnitOfWorkso that when--yesis passed, the migration runner skips the prompt entirely rather than calling a prompt that always returns True.Closes #783
Changes
UnitOfWork.__init__: Addedrequire_confirmation: bool = Trueconstructor parameter (backward compatible default).UnitOfWork._ensure_database_initialized: Usesself._require_confirmationinstead of hardcodedTruewhen callingMigrationRunner.init_or_upgrade().init_command: When--yesis set, passesrequire_confirmation=Falsealongside the existingprompt_for_migrationcallback (retained as belt-and-suspenders fallback).Motivation
The previous fix (commit
620adfee, issue #522) worked around the bug by injecting aprompt_for_migration=lambda _: Truecallback, but leftrequire_confirmation=Truehardcoded. This meant the prompt function was still called — it just auto-approved. The correct behavior is to bypass the prompt entirely when the user has explicitly passed--yes.TDD Workflow
747d8d3c), providing@tdd_bug @tdd_bug_783tagged tests in both Behave and Robot Framework.@tdd_expected_failtags were previously removed on master (commit051ee7c2).Quality Gates
nox -e lintnox -e typechecknox -e unit_testsnox -e integration_testsnox -e coverage_reportReview: APPROVED
Clean, minimal fix (2 files, +16/-6 lines). The
require_confirmation=Falseparameter cleanly propagates toMigrationRunner.init_or_upgrade(), and the belt-and-suspenders approach with the lambda callback fallback is sound defensive design. Comments reference bug #783 for traceability. No concerns.f2b6c59e04eb3b7477c7eb3b7477c7c082c8f022