test(bundle): join across wrap points in the build output-path assertion - #4280
Open
SEPURI-SAI-KRISHNA wants to merge 1 commit into
Open
test(bundle): join across wrap points in the build output-path assertion#4280SEPURI-SAI-KRISHNA wants to merge 1 commit into
SEPURI-SAI-KRISHNA wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Makes the bundle CLI contract test deterministic across Rich console wrap points.
Changes:
- Normalizes whitespace before checking the escaped output path.
- Documents why normalization is necessary.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
tests/contract/test_bundle_cli.py::test_build_escapes_markup_in_output_pathfails or passes depending on how long the runner's temp directory path is.
The
bundle buildsuccess line prints an absolute path. Rich folds it at theconsole width, and when the fold lands inside the asserted token the substring
check misses:
Reproduced on a clean checkout of
main(27f50f7): fails under the default--basetemp, passes under a--basetemp60 characters longer, because thewrap point moves. Nothing about the escaping under test changes — only where
the line breaks.
Fix
Join across the wrap points before the substring check, the same normalization
#4166 applied to the analogous
presetsassertion:Testing
uv run specify --helpuv sync && uv run pytestFull suite on this branch:
7137 passed, 181 skippedon Linux / Python 3.14.On
mainthe same run is7136 passed, 1 failed-- the failure being this test.tests/contract/test_bundle_cli.pyon its own: 44 passed, under both thedefault
--basetemp(which fails onmain) and a deliberately long one.AI Disclosure
Code generated with Claude Code. I reviewed the change, confirmed it fails on
mainunder the default--basetemp, and understand what it does.