Skip to content

Work - #210

Merged
KotlinIsland merged 4 commits into
mainfrom
work
Sep 25, 2026
Merged

Work#210
KotlinIsland merged 4 commits into
mainfrom
work

Conversation

@KotlinIsland

Copy link
Copy Markdown
Owner

No description provided.

…rting a transpiler panic

an edit that lands while the transpile reads the database cancels it by unwinding with
`salsa::Cancelled`. `transpile_detached` caught that unwind as a panic, so typing and then
pressing reload was refused with "the transpiler panicked". the cancellation is now resumed on
the calling thread, where the request dispatcher handles it, and `by/transpileForBuild` retries
on cancellation so the answer is about the text the editor holds after the edit
…nt to report changes

a client's `workspace/didChangeWatchedFiles` is only useful if the change is on disk when the
server reads the file. pycharm's client can send it while the save is still queued to be
written, so the server read the old text and was never told again: an open file depending on
the saved one kept stale diagnostics and hover

`by server` now runs the watcher `ty check --watch` uses, over every project's root, included
paths, module search paths outside the root and configuration files, and stops asking the
client to watch. the client is asked again when the watcher cannot start or cannot watch some
path

on macos the watcher reports changes at the resolved path, so a workspace folder named through
a symbolic link never matched the paths the server knows its files by. events are now mapped
back under the path that was watched
… is asking about

a document request is answered about whatever the server holds for the uri when it runs, which
is wrong for a client that keeps answers against its own revision: before its `didOpen` has
arrived, or while the file on disk and the client's copy disagree

a request can now carry `textHash`, a 64-bit fnv-1a hash of the text's utf-16 code units with
line endings normalised. it is answered at once when the server holds that text (the open
buffer, a notebook cell's own text, or, for `by/syntaxOutline`, `by/injections`,
`textDocument/semanticTokens/full` and `textDocument/documentSymbol`, the file on disk of a
closed document). otherwise it is held until a `didOpen`, `didChange` or file write brings the
text, and answered with `ServerCancelled` after ten seconds. a request without `textHash` is
answered as before
a default that fits only some specializations of its annotation, like
`1` for `T` in `def f[T](t: T = 1)`, is no longer invalid-parameter-default.
a call that may leave the argument out solves and checks the default as if
it had been passed, so `f()` is `Literal[1]`. one decision, `default_fit`,
is read by both the definition and every call

- still reported where written: a default no specialization fits, one for
  an enclosing function's type variable, one whose own type names the
  function's type variable (`[1]` against `list[T]`), and an inherited
  default the override's annotation can't take
- a receiver's or explicit specialization the default doesn't fit is
  reported at the call; an argument that conflicts with a default gets a
  note pointing at the default
- a parameter only an unpacked argument of uncertain length reaches, and a
  partial application, solve with the default too
- overrides, protocol implementations and callables passed for a callable
  protocol must default to a value the declared default describes, and an
  overload's initialising default must describe the implementation's
  (invalid-overload)
- ParamSpec and TypeVarTuple defaults initialise too, and forwarding a
  function through a ParamSpec keeps its default
- the `...` placeholder of stubs, overloads, abstract methods, protocols and
  TYPE_CHECKING declarations solves nothing; the overload/abstractmethod
  test is now one helper shared with the builder
@github-actions

Copy link
Copy Markdown
Contributor

ecosystem check

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@github-actions

Copy link
Copy Markdown
Contributor

by ecosystem round-trip

base: df2a124c2087dfb0b5edb5bb0d5a665460cbcc63 (merge base) → head: 210/merge

regressions: 1, changed: 27, improvements: 0, error changes: 1 (across 24796 files in 147 projects)

⚠️ 14 project(s) fail to round-trip on both base and head, so this check says nothing about them.

❌ regressions (built on base, now fails)

cloud-init —
build: killed: exceeded 11.7395GB memory budget

ℹ️ changed round-trip output

artigraph — _by_sourcemap.py
--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -129,5 +129,5 @@
     "/tmp/tmp_38v7v8v/artigraph/build/arti/types/python.py": {"by": "sha256:f2ef1d28929dba73fb582b7f485ae85f11dda991dc2159760b725ec7885cb4de", "py": "sha256:cd5e11bd71e07caa0ab210d8bdaaa3196401bf45f64d8fd279c6a43c223567f1"},
     "/tmp/tmp_38v7v8v/artigraph/build/arti/versions/__init__.py": {"by": "sha256:fb7eac80002edaab56df17c7ed2da81ee88319b8a2c3677f6a2144b8789856f9", "py": "sha256:e78b39bb244a2476e5f4f00506116dba3d5401c3c86b9373ec6cda0c2700c09b"},
-    "/tmp/tmp_38v7v8v/artigraph/build/arti/views/__init__.py": {"by": "sha256:f947a0144e185b14ea2c49c4eda30886c12192c2ebd877c09473498dac4a6f9c", "py": "sha256:cb54ffbc5368643b5b881614b90834ab53b34c7b233d1a356c4b6234d40b6004"},
+    "/tmp/tmp_38v7v8v/artigraph/build/arti/views/__init__.py": {"by": "sha256:f947a0144e185b14ea2c49c4eda30886c12192c2ebd877c09473498dac4a6f9c", "py": "sha256:9604f68b8924b7e9fe9149064851109749707023ae348da84d5e5dd71ef8584b"},
     "/tmp/tmp_38v7v8v/artigraph/build/arti/views/python.py": {"by": "sha256:b05ec89937ba7c85eb20078f40b6e8daaa00fd0447a284b87425069363ee8b46", "py": "sha256:90c1e918092810775adc4cc8cfa0a1a6ba00cd87d1c32f920b0102fa3b1a704d"},
... 1436 characters elided ...
     "/tmp/tmp_38v7v8v/artigraph/build/tests/arti/io/test_literal_io.py": {"by": "sha256:a0c435470678cbb1d7df8a06cad6e815b652dcce3c32a4f23d7892422e810814", "py": "sha256:b988200d6a36ea47d8da7712a61eeca66e2263b443cfe7524b670a58008520d7"},
artigraph — arti/views/__init__.py
--- base/arti/views/__init__.py
+++ head/arti/views/__init__.py
@@ -68,5 +68,5 @@
     @classmethod
     def _get_kwargs_from_annotation(cls, annotation: Any) -> dict[str, Any]:
-        artifact_class = get_item_from_annotated(annotation, Artifact, kind="class")
+        artifact_class = _soundness_check(get_item_from_annotated(annotation, Artifact, kind="class"), (type, type(None)))
         if artifact_class is None:
             artifact_class = get_field_default(cls, "artifact_class")
@@ -75,5 +75,5 @@
         # Try to extract or infer the Type. We prefer: an explicit Type in the annotation, followed
         # by an Artifact's default type, falling back to inferring a Type from the type hint.
-        type_ = get_item_from_annotated(annotation, Type, kind="object")
+        type_ = _soundness_check(get_item_from_annotated(annotation, Type, kind="object"), (Type, type(None)))
         if type_ is None:
             artifact_type: Type | None = _soundness_check(get_field_default(artifact_class, "type", fallback=None), (Type, type(None)))
@@ -90,5 +90,5 @@
     @classmethod
     def get_class_for(cls, annotation: Any) -> builtins.type[Self]:
-        view_class = get_item_from_annotated(annotation, cls, kind="class")
+        view_class = _soundness_check(get_item_from_annotated(annotation, cls, kind="class"), (type, type(None)))
         if view_class is None:
             # We've already searched for a View instance in the original Annotated args, so just
artigraph — tests/arti/internal/test_utils.py
--- base/tests/arti/internal/test_utils.py
+++ head/tests/arti/internal/test_utils.py
@@ -153,8 +153,8 @@
 
 def test_one_or_none() -> None:
-    assert one_or_none([1], item_name="num") == 1
+    assert _soundness_check(one_or_none([1], item_name="num"), (int, type(None))) == 1
     assert one_or_none([], item_name="num") is None
     with pytest.raises(ValueError, match="multiple num values found"):
-        one_or_none([1, 2], item_name="num")
+        _soundness_check(one_or_none([1, 2], item_name="num"), (int, type(None)))
comtypes — _by_sourcemap.py
--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -211,5 +211,5 @@
     "/tmp/tmpeblujrcr/comtypes/build/comtypes/test/test_bctx.py": {"by": "sha256:d94f5aa36b6f5d8c3825531fc1f889887606b4f8381ec4aaf1cb2fbbcb34cd54", "py": "sha256:f9bdc6b1aa38d51bdb87fcc4e5d62b835d11720b00fb746b58b00a79a5fcace2"},
     "/tmp/tmpeblujrcr/comtypes/build/comtypes/test/test_casesensitivity.py": {"by": "sha256:a6454fe603bbc54f2835de316617e4377ee6a9e207840771786f3cbeacd8b76f", "py": "sha256:d14b97da900e8d5dc4e6a13e0242b08ca377a2f383807be795d79c256932e00e"},
-    "/tmp/tmpeblujrcr/comtypes/build/comtypes/test/test_classfactory.py": {"by": "sha256:f54e6e1b276ffda8e81fb56665eb6dc74c15fa291bcbe34fd73fa9aef998e3af", "py": "sha256:8731c07c72aef1a47e5c89431b547135359f9dfd7fdbcc42f64f585266df0bb6"},
+    "/tmp/tmpeblujrcr/comtypes/build/comtypes/test/test_classfactory.py": {"by": "sha256:f54e6e1b276ffda8e81fb56665eb6dc74c15fa291bcbe34fd73fa9aef998e3af", "py": "sha256:666d76e6d98b3eda18d0f7a405f1ebceb47eac866f999f8cd9f2069370fab39a"},
     "/tmp/tmpeblujrcr/comtypes/build/comtypes/test/test_clear_cache.py": {"by": "sha256:f9ecf50d64112ff4d9fa61ae898bb1bd95a354187ca7c661890bf7a1a825e1c0", "py": "sha256:4a33e4cbf525f2b0fbe032f0e3996c90167ab4741ab90754a839f8dafb4ab4e4"},
     "/tmp/tmpeblujrcr/comtypes/build/comtypes/test/test_client.py": {"by": "sha256:c549cb50159f45fe7985beda8de8a2f8c77bc88419e33e55b9cb2a4e56fee5e4", "py": "sha256:04d6e993c81035107d1b692af3bc6a1b1c3710edc7bfd6951b320d2be8d55a5b"},
comtypes — comtypes/test/test_classfactory.py
--- base/comtypes/test/test_classfactory.py
+++ head/comtypes/test/test_classfactory.py
@@ -24,5 +24,5 @@
         class_factory = _soundness_check(CoGetClassObject(CLSID_ShellLink), IClassFactory)
         self.assertIsInstance(class_factory, IClassFactory)
-        punk = class_factory.CreateInstance()
+        punk = _soundness_check(class_factory.CreateInstance(), IUnknown)
         self.assertIsInstance(punk, IUnknown)
         self.assertNotIsInstance(punk, shelllink.IShellLinkW)
graphql-core — _by_sourcemap.py
--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -224,5 +224,5 @@
     "/tmp/tmpeblujrcr/graphql-core/build/tests/pyutils/test_gather_with_cancel.py": ("/tmp/tmpeblujrcr/graphql-core/tests/pyutils/test_gather_with_cancel.by", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129]),
     "/tmp/tmpeblujrcr/graphql-core/build/tests/pyutils/test_group_by.py": ("/tmp/tmpeblujrcr/graphql-core/tests/pyutils/test_group_by.by", [None, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55]),
... 4688 characters elided ...
     "/tmp/tmpeblujrcr/graphql-core/build/tests/pyutils/test_is_awaitable.py": {"by": "sha256:88a24e1d4940acd347647845a0ce2f317154703596637368986b06d189a5a3e9", "py": "sha256:4e37fdf350a235703829c4f2a372c12dfacc6441eaf16492de88f247cd979535"},
graphql-core — tests/pyutils/test_identity_func.py
--- base/tests/pyutils/test_identity_func.py
+++ head/tests/pyutils/test_identity_func.py
@@ -1,2 +1,3 @@
+from tests._by_runtime import _soundness_check
 lazy from graphql.pyutils import Undefined, identity_func
 
@@ -4,5 +5,5 @@
 def describe_identity_func():
     def returns_the_first_argument_it_receives():
-        assert identity_func() is Undefined
+        assert _soundness_check(identity_func(), str) is Undefined
         assert identity_func(Undefined) is Undefined
         assert identity_func(None) is None
pytest-autoprofile — lib/pytest_autoprofile/__init__.py
(only produced on base)
pytest-autoprofile — lib/pytest_autoprofile/_doctest.py
(only produced on base)
pytest-autoprofile — lib/pytest_autoprofile/_json.py
(only produced on base)
pytest-autoprofile — lib/pytest_autoprofile/_multiprocessing.py
(only produced on base)
pytest-autoprofile — lib/pytest_autoprofile/_patches.py
(only produced on base)
pytest-autoprofile — lib/pytest_autoprofile/_test_util_capture_warnings.py
(only produced on base)
pytest-autoprofile — lib/pytest_autoprofile/_test_utils.py
(only produced on base)
pytest-autoprofile — lib/pytest_autoprofile/_typing.py
(only produced on base)
pytest-autoprofile — lib/pytest_autoprofile/_warnings.py
(only produced on base)
pytest-autoprofile — lib/pytest_autoprofile/_xdoctest.py
(only produced on base)
pytest-autoprofile — lib/pytest_autoprofile/importers.py
(only produced on base)
pytest-autoprofile — lib/pytest_autoprofile/option_hooks.py
(only produced on base)
pytest-autoprofile — lib/pytest_autoprofile/plugin.py
(only produced on base)
pytest-autoprofile — lib/pytest_autoprofile/profiler.py
(only produced on base)
pytest-autoprofile — lib/pytest_autoprofile/rewriting.py
(only produced on base)
pytest-autoprofile — lib/pytest_autoprofile/setup.py
(only produced on base)
pytest-autoprofile — lib/pytest_autoprofile/startup_hook.py
(only produced on base)
pytest-autoprofile — lib/pytest_autoprofile/utils.py
(only produced on base)
starlette — _by_sourcemap.py
--- base/_by_sourcemap.py
+++ head/_by_sourcemap.py
@@ -159,5 +159,5 @@
     "/tmp/tmpeblujrcr/starlette/build/tests/test_background.py": {"by": "sha256:8a4b85753dd52a57c978f309fde83b7263866c44b018de5cc82f5c989f692100", "py": "sha256:28de2f22dc23932cbc68ad43700ba8ced3a367ccb507cf0ba0fb95e5d834ef59"},
     "/tmp/tmpeblujrcr/starlette/build/tests/test_concurrency.py": {"by": "sha256:25c9a36c313c5b2f5c9498d211ed3bc876872c799dbdb2ce06cea3b7c6c3d6f0", "py": "sha256:3b6b1a962bc9707d73f2377ab3ac4988b8829c5fae79230560bfddb473276e67"},
-    "/tmp/tmpeblujrcr/starlette/build/tests/test_config.py": {"by": "sha256:0f95331e21b9b1b7974b59d9420ca502e975ce0c1efeab170a90ff2585847c9a", "py": "sha256:90cbafdd9f08441fd06732e76b4635b88891bc7c970e6625478ee6f7b6cdc2e2"},
+    "/tmp/tmpeblujrcr/starlette/build/tests/test_config.py": {"by": "sha256:0f95331e21b9b1b7974b59d9420ca502e975ce0c1efeab170a90ff2585847c9a", "py": "sha256:393da0009b7489c5aa371d61da631e1a06cb122125809e8480772c485b46126b"},
     "/tmp/tmpeblujrcr/starlette/build/tests/test_convertors.py": {"by": "sha256:9c4b9979918905e68b399d49ff795f3396bca0740f95d2613aa9ecfb94f41eaf", "py": "sha256:442e1fa531c1493559f876b50144197ba4d461ac781363261a00365da17b9b03"},
     "/tmp/tmpeblujrcr/starlette/build/tests/test_datastructures.py": {"by": "sha256:8bf6b7a8202296c7bbd071c91656a0adfd40f1def66cc71425c6e6aeb7599e74", "py": "sha256:0d3c0955a03c625572674b4f2a758cb2a2b094a1fc2b2f75ff449a04c44e4050"},
starlette — tests/test_config.py
--- base/tests/test_config.py
+++ head/tests/test_config.py
@@ -18,10 +18,10 @@
     _soundness_check(assert_type(config("STR"), str), str)
     _soundness_check(assert_type(config("STR_DEFAULT", default=""), str), str)
-    _soundness_check(assert_type(config("STR_CAST", cast=str), str), str)
+    assert_type(config("STR_CAST", cast=str), str)
     _soundness_check(assert_type(config("STR_NONE", default=None), str | None), (str, type(None)))
     _soundness_check(assert_type(config("STR_CAST_NONE", cast=str, default=None), str | None), (str, type(None)))
     _soundness_check(assert_type(config("STR_CAST_STR", cast=str, default=""), str), str)
 
-    _soundness_check(assert_type(config("BOOL", cast=bool), bool), bool)
+    assert_type(config("BOOL", cast=bool), bool)
     _soundness_check(assert_type(config("BOOL_DEFAULT", cast=bool, default=False), bool), bool)
     _soundness_check(assert_type(config("BOOL_NONE", cast=bool, default=None), bool | None), (bool, type(None)))

⚠️ build error changed (failed before and after)

jax —
base: build: killed: timed out after 900s
head: build: killed: exceeded 11.7365GB memory budget

💥 fails to round-trip (unchanged from base)

  • alerta: build: killed: timed out after 900s
  • apprise: build: killed: exceeded 11.7365GB memory budget
  • cryptography: build: killed: exceeded 11.7395GB memory budget
  • dedupe: build: killed: timed out after 900s
  • manticore: reverse: killed: exceeded 11.7365GB memory budget
  • meson: build: killed: exceeded 11.7365GB memory budget
  • openlibrary: reverse: killed: timed out after 900s
  • pandas: build: killed: timed out after 900s
  • pandas-stubs: build: killed: timed out after 900s
  • scikit-learn: build: killed: exceeded 11.7365GB memory budget
  • scipy: build: killed: exceeded 11.7358GB memory budget
  • setuptools: build: killed: exceeded 11.7358GB memory budget
  • sympy: reverse: thread '' (5241) has overflowed its stack
  • xarray: build: killed: exceeded 11.7365GB memory budget

⏭️ skipped

  • AutoSplit: setup failed: setup_primer_project.py failed for 'AutoSplit': Cloning into '/tmp/tmpdd9lxt1n/AutoSplit'... Using CPython 3.12.3 interpreter at: /home/runner/work/_temp/setup-uv-cache/environments-v2/…
  • CPython (Argument Clinic): skipped: 2343 .py files exceeds --max-project-py-files (2000); by build would not fit in the runner's memory
  • CPython (cases_generator): skipped: 2343 .py files exceeds --max-project-py-files (2000); by build would not fit in the runner's memory
  • CPython (peg_generator): skipped: 2343 .py files exceeds --max-project-py-files (2000); by build would not fit in the runner's memory
  • core: skipped: 18910 .py files exceeds --max-project-py-files (2000); by build would not fit in the runner's memory
  • dd-trace-py: skipped: 3043 .py files exceeds --max-project-py-files (2000); by build would not fit in the runner's memory
  • ecosystem-analyzer: setup failed: setup_primer_project.py failed for 'ecosystem-analyzer': Cloning into '/tmp/tmp8nitw_m7/ecosystem-analyzer'... Using CPython 3.12.3 interpreter at: /home/runner/work/_temp/setup-uv-cach…
  • mongo-python-driver: setup failed: setup_primer_project.py failed for 'mongo-python-driver': Cloning into '/tmp/tmpdd9lxt1n/mongo-python-driver'... Updating files: 92% (1953/2109) Updating files: 93% (1962/2109) Updating…
  • pylint: skipped: 2485 .py files exceeds --max-project-py-files (2000); by build would not fit in the runner's memory
  • rotki: skipped: 2654 .py files exceeds --max-project-py-files (2000); by build would not fit in the runner's memory
  • spack: skipped: known to spike past the runner's memory during by build (faster than the watchdog can react)
  • streamlit: setup failed: setup_primer_project.py failed for 'streamlit': Cloning into '/tmp/tmpx3p7xw7n/streamlit'... Updating files: 35% (3581/9976) Updating files: 36% (3592/9976) Updating files: 37% (3692/99…
  • zulip: skipped: 2032 .py files exceeds --max-project-py-files (2000); by build would not fit in the runner's memory

@KotlinIsland
KotlinIsland merged commit 5c76d8a into main Sep 25, 2026
63 of 68 checks passed
@KotlinIsland
KotlinIsland deleted the work branch September 25, 2026 09:03
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