Skip to content

chore(ty): pin the checked platform to the one CI uses (#5302) - #9

Merged
sjmaple merged 1 commit into
mainfrom
cr/pr-5303
Oct 7, 2026
Merged

sjmaple merged 1 commit into
mainfrom
cr/pr-5303

Conversation

@sjmaple

@sjmaple sjmaple commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Related to #5302

What

[tool.ty.environment] set python-version but not python-platform, so ty checked against the host platform. On Windows, typeshed's fcntl has no flock / LOCK_EX / LOCK_UN, so tests/utilities/json_schema_type/test_real_world_schemas.py (which imports fcntl inside the clone helper — correctly, it only runs on POSIX) fails the ty hook of uv run prek run --all-files, while CI on ubuntu-latest stays 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:

check fcntl-related diagnostics
ty check --python-platform win32 tests/utilities/json_schema_type/test_real_world_schemas.py 8 (the failure the report describes)
ty check tests/utilities/json_schema_type/test_real_world_schemas.py with python-platform = "linux" 0

So the pinned platform is what decides those diagnostics. What I could not run here: the full uv run prek run --all-files on Windows (this machine is macOS); the remaining diagnostics in my run are unresolved-import for yaml/pydantic because the local environment has not installed the dev dependencies, not repository findings.

…`)

- 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

@tessl-reviewer tessl-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread pyproject.toml
# 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"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@sjmaple
sjmaple merged commit e381238 into main Oct 7, 2026
1 check 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