Skip to content

fix(tui): YOLO badge reflects only real /yolo bypass, not approvals.mode: off - #49916

Closed
arminanton wants to merge 2 commits into
NousResearch:mainfrom
arminanton:fix/tui-yolo-badge-approval-mode
Closed

fix(tui): YOLO badge reflects only real /yolo bypass, not approvals.mode: off#49916
arminanton wants to merge 2 commits into
NousResearch:mainfrom
arminanton:fix/tui-yolo-badge-approval-mode

Conversation

@arminanton

Copy link
Copy Markdown
Contributor

Problem

The TUI status bar showed a persistent "⚠ YOLO" badge for users who had never run /yolo on. The badge lit whenever approvals.mode: off was set in config.yaml.

Root cause

_session_info() in tui_gateway/server.py computed the yolo flag as:

yolo = _YOLO_MODE_FROZEN or session_yolo or _get_approval_mode() == "off"

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 on or the process-start --yolo flag). They are different things.

Worse, YAML parses a bare off as boolean False, and _normalize_approval_mode() deliberately maps False back to "off", so anyone who set approvals.mode: off had the badge pinned on permanently.

Fix

The badge now reflects only a true approval-bypass:

yolo = _YOLO_MODE_FROZEN or session_yolo

Removed the now-unused _get_approval_mode import. The AUTO badge (agent.autopilot_mode) is unaffected and was already correct.

Testing

tui_gateway/server.py parses clean; the removed import has no remaining live references. Opening as draft for review.

…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.
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/tui Terminal UI (ui-tui/ + tui_gateway/) comp/gateway Gateway runner, session dispatch, delivery labels Jun 21, 2026
arminanton added a commit to arminanton/hermes-agent that referenced this pull request Jun 22, 2026
… + 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.
arminanton added a commit to arminanton/hermes-agent that referenced this pull request Jun 22, 2026
…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.
arminanton added a commit to arminanton/hermes-agent that referenced this pull request Jun 22, 2026
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.
@arminanton

Copy link
Copy Markdown
Contributor Author

This PR is clean against main (its base). When forward-porting it onto the v0.17.0 release tag (2bd1977d8), tui_gateway/server.py has one conflict; the resolution is take-theirs (this PR's change removes the or approval_mode==\"off\" term). A ready-to-apply git apply patch with that resolution baked in (verified apply-clean + tests pass on a fresh v0.17.0 checkout) is in the re-application manifest #50111 at v017-patches/PR-49916-onto-v0.17.0.patch.

arminanton added a commit to arminanton/hermes-agent that referenced this pull request Jun 22, 2026
…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.
@arminanton

Copy link
Copy Markdown
Contributor Author

v0.17.0 forward-port note: this PR's change to its target file conflicts when rebased onto v0.17.0 (2bd1977d8) because upstream advanced that file. A verified resolution patch is tracked on the campaign manifest #50111 at v017-conflict-resolutions/tui_gateway_server.py.v017.patch (applies clean via git apply --check on fresh v0.17.0; the integrated 39-PR set builds + tests green there). No action needed to review this PR against main; the note is for anyone pulling the set onto a later release.

@arminanton

Copy link
Copy Markdown
Contributor Author

Superseded by #51500, which combines this backend gateway change with the frontend status-bar badge (#50068) into one PR, since they are the two halves of the same YOLO indicator.

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

Labels

comp/gateway Gateway runner, session dispatch, delivery comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants