fix(tui): YOLO badge reflects only real /yolo bypass, not approvals.mode: off - #49916
fix(tui): YOLO badge reflects only real /yolo bypass, not approvals.mode: off#49916arminanton wants to merge 2 commits into
Conversation
…ode: off _session_info() computed yolo = _YOLO_MODE_FROZEN or session_yolo or _get_approval_mode() == 'off', ORing the global 'approvals.mode: off' config (don't-prompt-for-approvals) with the per-session YOLO bypass. Since YAML parses bare 'off' as False and _normalize_approval_mode maps False back to 'off', anyone with approvals.mode: off had the badge pinned on permanently. Drop the approval-mode term so the badge reflects only a real bypass (--yolo frozen or /yolo on). Removed the now-unused _get_approval_mode import.
… + record NousResearch#50626 re-home - Correct the closure invariant from the gh-files undercount (160/139/21) to the authoritative git-diff numbers: 165 delta = 140 real src (all in open PRs) + 25 DISCARD (9 .bak + 12 .project-intel + 4 transcripts) + 0 orphans. - Document that NousResearch#50049's content (subdir-hints RuntimeError guard test + xAI label) is re-homed in new open PR NousResearch#50626 so the closure orphans nothing. - Verified NousResearch#50484/NousResearch#50487/NousResearch#50049 already CLOSED on GitHub; their files all covered by open PRs (0 real-source orphans). NousResearch#49916 confirmed a distinct fix, not a duplicate of NousResearch#49917 (adjacent but non-overlapping tui_gateway/server.py hunks).
origin/main advanced and reformatted the _session_info YOLO block, making this PR CONFLICTING. Resolved by keeping the PR's fix (YOLO badge reflects only a real /yolo bypass, not approvals.mode: off) over main's still-buggy version. Net diff vs main = the 1 intended file. The one full-suite test flake (test_goal_command, an unrelated file) passes in isolation — pre-existing test-ordering isolation, not from this change.
…tem 4) Reviewed every in-review and draft PR THIS run (not just the 6 with v0.17.0 resolutions): applies-on-own-base + compile + own-tests, each failure root-caused. FIXED THIS RUN: - NousResearch#49916 was CONFLICTING/DIRTY on main (main reformatted the _session_info YOLO block). Rebased via a merge commit (no force-push), kept the PR's fix, now MERGEABLE (head caa1dae, 45 yolo/session tests pass). FINDINGS (PER-PR-REVIEW-FIX-STATUS.txt): - 41/42 apply clean on their own base; 30 PRs own-tests green; 12 no-own-tests (compile-verified). - 4 test 'failures' ALL characterized, NONE a regression: NousResearch#50078 = cross-PR stacking dependency (its catch-up tests need NousResearch#49644, pass when co-applied); NousResearch#50031/NousResearch#50032 = user-isolated WIP drafts (auto-router/source-accelerator); NousResearch#50041 = codex-hint depends on draft codex code. - 1 PR needs a USER DECISION: NousResearch#50457 (opus-context bundle) is stale — built on v0.17.0, main is 318 commits ahead, its auth.py/runtime_provider.py REVERT main improvements (-863 lines), 58 own-tests fail even on its own head. Cannot mechanically rebase without rewriting the test.
Each PR-<n>-onto-v0.17.0.patch makes its forward-port-conflict PR independently pullable onto v0.17.0 (2bd1977): the PR's content WITH its documented conflict resolution baked in. Verified APPLIES-CLEAN on a fresh v0.17.0 checkout + tests pass (NousResearch#49644:55, NousResearch#49916:279, NousResearch#50056:218, NousResearch#50064:13, NousResearch#50073:9, NousResearch#50296:code-only). Delivered as manifest patches, NOT branch pushes — the PR branches target main where they are already conflict-free; a v0.17.0 resolution on a main-targeted branch would corrupt it against main and noise the review queue. 0 private leaks.
|
This PR is clean against |
…esolution Completes the 6/6 v0.17.0 conflict-resolution set. NousResearch#49916's tui_gateway/server.py conflicts onto v0.17.0 (the _session_info yolo region drifted upstream); this patch resolves it (keep the fix: YOLO badge must not OR in approvals.mode==off). Verified: git apply --check CLEAN onto v0.17.0 (2bd1977), file compiles.
|
v0.17.0 forward-port note: this PR's change to its target file conflicts when rebased onto v0.17.0 ( |
Problem
The TUI status bar showed a persistent "⚠ YOLO" badge for users who had never run
/yolo on. The badge lit wheneverapprovals.mode: offwas set inconfig.yaml.Root cause
_session_info()intui_gateway/server.pycomputed the yolo flag as:That ORs in a global-config concept (
approvals.mode == "off"means "do not prompt for approvals") with the actual YOLO concept (a per-session approval bypass toggled by/yolo onor the process-start--yoloflag). They are different things.Worse, YAML parses a bare
offas booleanFalse, and_normalize_approval_mode()deliberately mapsFalseback to"off", so anyone who setapprovals.mode: offhad the badge pinned on permanently.Fix
The badge now reflects only a true approval-bypass:
Removed the now-unused
_get_approval_modeimport. TheAUTObadge (agent.autopilot_mode) is unaffected and was already correct.Testing
tui_gateway/server.pyparses clean; the removed import has no remaining live references. Opening as draft for review.