Files
CodeWhale Bot 1e8227a556 tui: finish YOLO — parse alias only, no enum variant
Audit slice: dead/pretender mode abstractions (item 2).

Delete the AppMode::Yolo variant. parse() keeps accepting the legacy
spellings ("yolo" | "4" | "bypass" | "bypass-permissions" |
"bypasspermissions") and now returns AppMode::Agent directly: YOLO was
a permission change (Full Access + trust + shell), never a mode. The
posture split already lives at the edges and is untouched there:
settings load rewrites default_mode=yolo into Act + full-access
posture (crates/tui/src/settings.rs), the runtime wire reader re-derives
Bypass from the raw legacy spelling (crates/tui/src/runtime_policy.rs),
and --yolo keeps working through the launch flag plus the new
set_mode_yolo_compat elevation.

Mode-shaped entry points keep their behavior through the posture:
- set_mode loses the Yolo fold; the transient full-access elevation
  moves to App::set_mode_yolo_compat / App::select_yolo_compat with the
  same lock refusal, baseline capture, and once-per-install toast.
- Alt+Y routes through apply_yolo_compat_update; /mode yolo and /zidong
  route through the compat path before parse folds the alias.
- authority/engine drop the mode==Yolo disjuncts; auto_approve and
  ApprovalMode::Bypass carry the posture, so sandbox, shell, tool
  approval, and narrowing behavior are unchanged.

CommandMode::Yolo dies with it (no external consumers of the
command-contract enum).

Tests updated (not weakened): yolo spellings now assert parse -> Agent;
set_mode_yolo_compat/select_yolo_compat cover the elevation, baseline
restore, locked-policy refusal, and startup-default persistence the
variant tests pinned; engine posture tests pass Agent + explicit
full-access flags instead of the retired Yolo mode.

Gates: cargo fmt --check; nextest codewhale-tui 11908 passed;
codewhale-config 639 passed; codewhale-command-contract 29 passed;
dead-code budget PASS 425; vocabulary gate exit 0.
2026-09-02 12:18:12 -07:00
..