Skip to content

Read the version test's output unstyled - #508

Merged
neuromechanist merged 1 commit into
developfrom
fix/version-test-force-color
Sep 25, 2026
Merged

neuromechanist merged 1 commit into
developfrom
fix/version-test-force-color

Conversation

@neuromechanist

Copy link
Copy Markdown
Member

Closes #507.

test_version_shows_version checked the raw CLI output, and Rich colors part of the version when FORCE_COLOR is set (OSA v0.\x1b[1;36m8.15\x1b[0m.dev4), so it failed on any shell that sets it. This machine's shell does, which is how two implementers hit it today.

Changes

  • Assert on click.unstyle(result.output), which the file already imports for the same reason elsewhere.
  • A second test swaps in a console that always styles (force_terminal=True), asserts the output really is styled, so the test cannot pass vacuously, and that the unstyled text shows the version.

Tested

  • uv run pytest tests/test_cli: 147 pass, with FORCE_COLOR=1 and without
  • Mutation: dropping unstyle fails the new test
  • ruff check and ruff format --check clean

Rich colors part of the version under FORCE_COLOR, so the raw
substring check failed on a shell that sets it (#507). Assert on
click's unstyle, and pin it with a console that always styles.

Tested: tests/test_cli (147 pass) with and without FORCE_COLOR=1;
dropping unstyle fails the new test; ruff check and format clean.
@neuromechanist
neuromechanist merged commit b2ef87d into develop Sep 25, 2026
7 checks passed
@neuromechanist
neuromechanist deleted the fix/version-test-force-color branch September 25, 2026 00:52
neuromechanist added a commit that referenced this pull request Sep 25, 2026
Brings in #502, #503 and #508. The generated runtime bundle and its integrity
line are rebuilt from the merged sources; CHANGELOG keeps both Added entries.

Tested: bun scripts/build-runtime-bundle.js --check; test-worker-core (220),
test-data-lane (106), test-runtime-bundle (25), test-widget-tools (397),
test-runtime-lifecycle and test-egress all passed.
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