Make require_confirmation configurable on UnitOfWork so that when
the --yes flag is passed to agents init, the migration runner skips
the confirmation prompt entirely rather than calling a prompt that
always returns True. The previous approach (injecting a prompt
callback that auto-approves) was a workaround that left the
require_confirmation=True hardcoded in _ensure_database_initialized,
meaning the prompt code path was still exercised unnecessarily.
Changes:
- Add require_confirmation parameter to UnitOfWork constructor
(default True for backward compatibility)
- Pass self._require_confirmation to MigrationRunner.init_or_upgrade
instead of hardcoded True
- Update init_command to pass require_confirmation=False when --yes
is set, with the prompt callback retained as belt-and-suspenders
The TDD bug-capture tests from #842 (features/tdd_init_yes_no_input.feature,
robot/tdd_init_yes_no_input.robot) now run as normal regression tests
with @tdd_expected_fail already removed.
All nox quality gates pass:
- lint, typecheck: clean
- unit_tests: 12230 scenarios passed
- integration_tests: all passed
- coverage_report: 98.38% (threshold >97%)
ISSUES CLOSED: #783