Skip to content

Print ttp status's AppArmor, VPN and diagnostic lines without raw markup - #190

Merged
onyks-os merged 1 commit into
mainfrom
fix/status-markup
Nov 30, 2026
Merged

onyks-os merged 1 commit into
mainfrom
fix/status-markup

Conversation

@onyks-os

Copy link
Copy Markdown
Owner

Three lines of ttp status printed the prefix as raw Rich markup, [bold cyan]\[TTP][/bold cyan] …:

  • Tor AppArmor
  • Required VPN
  • the diagnostic lines

They passed markup=False so that their values could not be read as markup, and that also turned off the markup of the [TTP] prefix. Markup now stays on, and only the values (profile name, VPN state, diagnostic reason and message) go through rich.markup.escape.

Tests

  • test_status_renders_the_apparmor_line_and_shows_its_values_literally uses the profile [red]ttp-tor. It requires the rendered prefix and the bracketed value printed as is.
  • test_status_displays_vpn_guard_without_claiming_remote_liveness now asserts the rendered prefix on the VPN and diagnostic lines.

Both tests failed before the change. The VPN test is the one that found the diagnostic line.

🤖 Generated with Claude Code

Three lines of `ttp status` passed markup=False so that their values
(an AppArmor profile name, a VPN state, a diagnostic message) could not
be read as Rich markup. That also turned off the markup of the [TTP]
prefix, so they printed `[bold cyan]\[TTP][/bold cyan] …` literally.
Markup stays on now and only the values go through rich.markup.escape.
The tests assert the rendered prefix and a bracketed value shown as is;
they failed before the change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
@onyks-os
onyks-os merged commit d22629c into main Nov 30, 2026
43 of 44 checks passed
@onyks-os
onyks-os deleted the fix/status-markup branch November 30, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant