Repository navigation
chore(ty): pin the checked platform to the one CI uses (#5302) - #9
Conversation
…`) - fix(providers): serve a fresh tool list from the cache - fix(middleware): bound truncated responses by the size that is actual… - fix(middleware): honour an explicit burst_capacity=0 - chore(ty): pin the checked platform to the one CI uses - chore: drop the sibling-PR changes that leaked onto this branch - chore: restore the sibling files to their merge-base content
There was a problem hiding this comment.
Tessl Reviewer
Advisory findings (1)
The configuration now makes ty evaluate the same Linux target used by CI. The real-world schema integration test nevertheless remains executable through its documented auto-clone path on Windows, where its POSIX-only lock crashes; the new target setting no longer exposes that incompatibility in the Windows ty check.
| Severity | Findings |
|---|---|
| Minor | 1 |
Advisory findings (1)
- Minor · Advisory · Non-blocking · The real-world schema integration test crashes on its documented Windows auto-clone path
pyproject.toml:176
Reviews are incremental. The first review shows every valid finding. A later round checks the latest changes and earlier findings, and adds a fresh finding when it still applies. It never repeats one you refuted or declined. Ask for a full review to inspect the whole change and show earlier findings again.
Mention @tessl-code-review to run another review.
| # host platform, and on Windows typeshed's fcntl has no flock/LOCK_EX/LOCK_UN, | ||
| # so tests/utilities/json_schema_type/test_real_world_schemas.py fails the ty | ||
| # hook for Windows contributors while ubuntu-latest stays green. | ||
| python-platform = "linux" |
There was a problem hiding this comment.
Minor · Advisory · Non-blocking · The real-world schema integration test crashes on its documented Windows auto-clone path
With RUN_REAL_WORLD_SCHEMA_TEST=1, the test's documented auto-clone path reaches _ensure_repo() when the corpus is absent and unconditionally imports and uses POSIX-only fcntl. Windows therefore raises an import error rather than running or being skipped. Pinning ty to Linux makes the Windows hook stop reporting this unsupported path, despite the test module's comment saying it is skipped there. The supported Windows invocation must either be made to run or be prevented as an explicitly unsupported test, so that a successful local validation does not imply the documented integration invocation works.
Pre-existing: this is in code the change does not modify, so it is not blocking.
Correctness And Data Integrity
Related to
#5302What
[tool.ty.environment]setpython-versionbut notpython-platform, so ty checked against the host platform. On Windows, typeshed'sfcntlhas noflock/LOCK_EX/LOCK_UN, sotests/utilities/json_schema_type/test_real_world_schemas.py(which importsfcntlinside the clone helper — correctly, it only runs on POSIX) fails thetyhook ofuv run prek run --all-files, while CI onubuntu-lateststays green. Windows contributors cannot tick that box in the PR template.Pinning the platform makes the result the same everywhere, and matches what CI checks.
Testing
With ty 0.0.84 on this machine:
fcntl-related diagnosticsty check --python-platform win32 tests/utilities/json_schema_type/test_real_world_schemas.pyty check tests/utilities/json_schema_type/test_real_world_schemas.pywithpython-platform = "linux"So the pinned platform is what decides those diagnostics. What I could not run here: the full
uv run prek run --all-fileson Windows (this machine is macOS); the remaining diagnostics in my run areunresolved-importforyaml/pydanticbecause the local environment has not installed the dev dependencies, not repository findings.