test: compare resolved paths where the product resolves - #154
Open
Hasnain2430 wants to merge 1 commit into
Open
Conversation
Two assertions compared a product-returned path against an unresolved
temporary-directory path. The product resolves deliberately at both
boundaries, so the comparisons hold only when no path component is
rewritten during resolution:
- `verified_local_path` in `artifact_delivery.py` calls
`path.resolve(strict=True)` before an artifact path reaches the caller.
- `_validated_marketplace_root` in `codex_plugin.py` calls
`.expanduser().resolve()` before the Codex marketplace root is used.
On Windows, `TMP` commonly holds an 8.3 short component when the user
profile name contains a space. Resolution expands it, and both
assertions fail on the short-versus-long form of the same path:
AssertionError: WindowsPath('C:/Users/Hasnain Ibrar Butt/AppData/
Local/Temp/tmpzyyjwosm/clip.mp4') != WindowsPath('C:/Users/
HASNAI~1/AppData/Local/Temp/tmpzyyjwosm/clip.mp4')
AssertionError: assert 'C:\Users\HASNAI~1\...\marketplace.json'
== 'C:\Users\Hasnain Ibrar Butt\...\marketplace.json'
Compare the resolved form on both sides, which is what each boundary
documents and returns.
CI does not reach either assertion. The full suite runs on
ubuntu-latest, and the windows-2025 provider job runs only
`test_models.py` and `test_indexing.py`. `test_codex_plugin.py` is
additionally never collected by CI at all, because it defines
module-level pytest functions and CI discovers tests with
`python -m unittest discover -s tests`.
Internal-only, test scope. No product behavior changes: both delivered
paths were already correct and are still asserted, now in the form the
boundaries actually return.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Author
|
Adding a complete validation run, now that I have the scene model artifacts prepared locally. Full suite on this branch, Windows 11, Python 3.12.14, No failures. That covers both assertions changed here, and it includes the 85 tests in the eight files that CI's For completeness on the two unrelated failures I flagged in the description: they were environmental, not defects. |
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.
Related issue
None.
Summary
Two test assertions compared a product-returned path against an unresolved
TemporaryDirectorypath. The product resolves deliberately at both boundaries, so the comparisons hold only when no path component is rewritten during resolution:verified_local_pathinsrc/vidxp/artifact_delivery.pycallspath.resolve(strict=True)before an artifact path reaches the caller._validated_marketplace_rootinsrc/vidxp/codex_plugin.pycalls.expanduser().resolve()before the Codex marketplace root is used.On Windows,
TMPcommonly contains an 8.3 short component when the user profile name contains a space. Resolution expands it, and both assertions fail on the short-versus-long form of the same path:The change compares the resolved form on both sides, which is what each boundary documents and returns.
Internal-only, test scope. No product behavior changes: both delivered paths were already correct and are still asserted, now in the form the boundaries actually return.
Why CI does not catch these
ubuntu-latest, and thewindows-2025provider job runs onlytest_models.pyandtest_indexing.py, sotest_mcp.pyis never executed on Windows.test_codex_plugin.pyis never collected by CI at all. It defines module-level pytest functions, and CI discovers tests withpython -m unittest discover -s tests, which collects onlyunittest.TestCasesubclasses.test_native_ingestion.py(4 tests) is in the same position. That is a separate gap and I have not touched it here; happy to open an issue if it is not already known.Validation
Windows 11, Python 3.12.14 in the project venv,
TMP=C:\Users\HASNAI~1\AppData\Local\Temp.uv run --no-sync python -m pytest -q tests/test_codex_plugin.py tests/test_mcp.py— 60 passed, 7 subtests passed. Both assertions fail onupstream/mainwith the errors quoted above, so this exercises the real failure rather than a mock.uv run --no-sync python -m pytest -qonupstream/mainbefore the change — 4 failed, 731 passed, 5 skipped. Two failures are the assertions fixed here.uvx "ruff~=0.16.1" check src tests— all checks passed.The other two pre-existing failures on
upstream/mainaretest_native_ingestion.py::test_local_ingestion_automatically_indexes_and_becomes_searchableand::test_streamable_http_browser_upload_indexes_in_one_session, bothAssertionError: Autonomous indexing did not finish without status polling. They are unrelated to this change and I have not prepared model artifacts locally, so I cannot tell whether they are environmental or a real defect. Flagging rather than claiming.