Developer
Vladimir Matveev
vladima@meta.com
Performance
Key patterns and highlights from this developer's activity.
Breakdown of growth, maintenance, and fixes effort over time.
Bugs introduced vs. fixed over time.
Reclassifies engineering effort based on bug attribution. Commits that introduced bugs are retrospectively counted as poor investments.
Investment Quality reclassifies engineering effort based on bug attribution data. Commits identified as buggy origins (those that introduced bugs later fixed by someone) have their grow and maintenance time moved into the Wasted Time category. Their waste (fix commits) remains counted as productive. All other commits retain their standard classification: grow is productive, maintenance is maintenance, and waste (fixes) is productive.
The standard model classifies commits as Growth, Maintenance, or Fixes. Investment Quality adds a quality lens: a commit that introduced a bug is retrospectively counted as a poor investment — the engineering time spent on it was wasted because it ultimately required additional fix work. Fix commits (Fixes in the standard model) are reframed as productive, because fixing bugs is valuable work.
Currently computed client-side from commit and bug attribution data. Ideal server-side endpoint:
POST /v1/organizations/{orgId}/investment-quality
Content-Type: application/json
Request:
{
"startTime": "2025-01-01T00:00:00Z",
"endTime": "2025-12-31T23:59:59Z",
"bucketSize": "BUCKET_SIZE_MONTH",
"groupBy": ["repository_id" | "deliverer_email"]
}
Response:
{
"productivePct": 74,
"maintenancePct": 18,
"wastedPct": 8,
"buckets": [
{
"bucketStart": "2025-01-01T00:00:00Z",
"productive": 4.2,
"maintenance": 1.8,
"wasted": 0.6
}
]
}Latest analyzed commits from this developer.
| Hash | Message | Date | Files | Effort |
|---|---|---|---|---|
| 3ffce37 | This commit introduces a **bug fix** within the **`pyrefly/lib/query.rs`** module, specifically addressing an incorrect index used during type argument extraction. Previously, the `get_kind_and_field_type` function was erroneously retrieving the second type argument instead of the first for `classproperty` and `cached_classproperty` descriptors. This correction ensures that the system now accurately identifies the intended result type, aligning with how these properties are typed and preventing potential type misinterpretations in downstream analysis. The change improves the **semantic correctness** of type resolution for these Python-like constructs. | Feb 16 | 1 | waste |
| b185f4a | This commit introduces a **performance optimization** for **class attribute type lookup** within the `pyrefly` system, specifically impacting the `pyrefly/lib/query.rs` module and its `get_class_attributes` function. It **refactors** the type resolution mechanism to avoid expensive position-based queries, which previously relied on `get_type_at(range.start())`. The new approach directly accesses type information by prioritizing annotation types, then expression trace from the value, and finally falling back to `ClassField.ty()`, resulting in **more efficient type determination** for class fields. | Jan 21 | 1 | maint |
| ae16f6f | This commit introduces significant **performance optimizations** by **reducing memory allocations** in **type formatting and caching hot paths** across the `pyrefly_types` crate and `pyrefly` library. It refactors string literal escaping in `literal.rs` to batch character writes and eliminates intermediate `String` allocations in `display.rs` by using direct writes, enabled by a new `write_fmt` method in the `TypeOutput` trait. Additionally, the `query.rs` module now avoids redundant `Type` object cloning during caching by leveraging `entry().or_insert_with()`. These changes collectively improve the **efficiency of type representation and display**, particularly for frequently accessed types and long strings, by minimizing unnecessary memory churn. | Jan 10 | 4 | maint |
| 05cf714 | This commit introduces a **new configuration option** `always_display_expanded_unions` within the **type display system** (`TypeDisplayContext`) to control the rendering of union types. This **feature enhancement** allows for union types to be consistently displayed in their **expanded form**, rather than using potentially abbreviated display names. The change primarily affects the `pyrefly_types` crate's display logic and is immediately utilized by the **query module** (`pyrefly/lib/query.rs`), which now enables this option by default when converting types to strings. This ensures that query results will always present union types with full clarity, improving the user experience by providing more explicit type information. | Dec 4 | 2 | grow |
| 46bd18f | This commit introduces a **new capability** to the **`pyrefly` library's query system**. Specifically, the **`attributes` query** in `pyrefly/lib/query.rs` now includes an `is_final` field within its `Attribute` struct results. This enhancement allows consumers of the query to programmatically determine if a class field is marked as final, providing more comprehensive metadata for reflection or analysis tools. | Nov 7 | 1 | grow |
| 76120e7 | This commit establishes the foundational **TypeCache infrastructure** within the **query system** to enable future **type resolution optimization**. It introduces a new `TypeCache` struct, backed by a thread-safe `DashMap`, and integrates it into the `Query` struct, ensuring proper initialization in `Query::new()` and clearing in `change_files()` to maintain correctness. This **new capability** lays the groundwork for caching expensive type materialization, particularly for `is_subtype` checks, without immediately altering existing behavior. The change is a **preparatory step** that will facilitate significant performance improvements in type-related queries in subsequent commits. | Oct 30 | 1 | maint |
| 2b6c385 | This commit introduces a significant **performance optimization** to the **type resolution system** by integrating a `TypeCache` into the `is_subtype` function. It **refactors** the type checking logic to intelligently cache individual types and generate minimal snippets, thereby **eliminating redundant type computations**. This change primarily affects the core **type checking mechanism**, including **TypedDict** queries, and results in a substantial **reduction in execution time** for `is_subtype` calls. The optimization achieves a ~50% speedup by reusing resolved types and only computing what's necessary. | Oct 30 | 1 | maint |
| 5ac4453 | This commit introduces a **performance optimization** to the **type resolution system** by pre-warming the `TypeCache` during `get_types_in_file` operations. It modifies the `pyrefly/lib/query.rs` module to ensure that all types encountered while analyzing a file are immediately inserted into the `TypeCache`. This strategy provides **immediate cache hits for subsequent `is_subtype` queries**, significantly reducing the cold start penalty for common types and improving overall type checking performance. As the final change in a series of optimizations, this results in a notable speedup for type-related operations. | Oct 30 | 1 | maint |
| f1904cf | This commit introduces a **refactoring** within the `pyrefly` library to **optimize memory usage** when handling file change transactions. Specifically, the `pyrefly/lib/query.rs` file's `change_files` function was updated to store only minimal transaction information, preventing significant memory increases. Additionally, an **unused `change` function** and its associated endpoint were **removed** as part of this cleanup, further streamlining the codebase. This change directly improves the **performance and efficiency of `pyrefly`** by reducing its memory footprint. | Oct 10 | 1 | maint |
| 70c4396 | This commit introduces a **new capability** to the **`pyrefly` library**, enhancing its **querying logic** for code definitions. It extends the `class_name_from_def_kind` function within `pyrefly/lib/query.rs` to correctly extract class names from definitions identified as `FunctionKind::CallbackProtocol`. This **enhancement** ensures that the system can accurately process and identify classes associated with callback protocol functions, improving the completeness and reliability of code analysis within `pyrefly`. | Oct 8 | 1 | grow |
| c98de85 | This commit **refactors** the **Pyrefly type checker**'s `is_subtype` query and related type detection mechanisms, such as identifying typed dictionaries. It replaces the previous **heavyweight, multi-pass snippet-based type checking** approach with a more efficient **single-pass method**. The new implementation directly converts type names to Pyrefly's internal type representation and then utilizes a **solver** for subtype checks or directly identifies typed dicts, significantly **improving the performance** of these type resolution queries. This change primarily impacts the `pyrefly/lib/query.rs` module, making type analysis more efficient by reducing redundant parsing and checking overhead. | Oct 1 | 1 | maint |
| a09ef3f | This commit introduces a **new capability** to the **`pyrefly` query engine**, enabling it to correctly recognize and process `TypeVar` instances with constraints when they are used as a callee target. The system now accurately treats such calls as if they were made on a union of the constraint types (e.g., `type[C1 | C2...]`), improving the precision of **type analysis**. This **feature addition** is implemented in `pyrefly/lib/query.rs` by iterating over constraint types and leveraging new helper functions like `class_info_from_type_var_restriction` and `init_or_new_from_union`. This change significantly enhances the accuracy of call graph resolution and type inference for generic Python code, leading to more robust static analysis. | Sep 29 | 1 | grow |
| fab110b | This commit introduces a **feature enhancement** to the `pyrefly/lib/query.rs` module by extending its **property type recognition** capabilities. Previously, the system only recognized `classproperty`; now, it also correctly identifies `cached_classproperty` as a valid property type. This **new capability** ensures that `pyrefly` can accurately parse and interpret Python code that utilizes the `cached_classproperty` decorator, thereby improving the overall robustness and understanding of Python object models within the query system. | Sep 25 | 1 | grow |
| fd7c28e | This commit **refactors** the **callee finding logic** within the **`pyrefly` library** by extracting previously local helper functions and their associated state into a new **`CalleesWithLocation` struct** and its methods. This significant internal restructuring in `pyrefly/lib/query.rs` aims to improve code organization and facilitate easier sharing of common state across the callee finding operations. The change enhances the maintainability and extensibility of the query capabilities by centralizing related functionality, without altering the external behavior or API of the `pyrefly` module. | Sep 25 | 1 | maint |
| ce7c3a5 | This commit **adjusts the callee identification logic** within the **`pyrefly` static analysis tool** to explicitly include `prod_assert` calls. Previously, `pyrefly` had special handling that would omit these calls from the list of callees, but this change in `pyrefly/lib/query.rs`'s `process_expr` function **overrides that behavior**. This **behavior adjustment** ensures that `prod_assert` invocations are now correctly recognized as callees. The **`pyrefly` query engine** will now provide more comprehensive and accurate dependency analysis results for expressions, as `prod_assert` calls will no longer be silently ignored. | Sep 25 | 1 | waste |
| 1f0dc5a | This commit introduces a **new feature** to the **PyreFly static analysis tool**, enhancing its query capabilities for call graph analysis. It adds a `location` argument to the `callees_with_location` query function in `pyrefly/lib/query.rs`, enabling users to retrieve precise callee information at a specified code location. This **improves the accuracy and specificity** of code analysis, allowing for more targeted inquiries into function calls. The change leverages PyreFly's existing data collection, providing a more direct and explicit way to query callee information without relying on less precise methods. | Sep 25 | 1 | grow |
| 1642e89 | This commit **refactors** the internal representation of code locations within **Pyrefly** to be fully compatible with the **Python AST** standard. Previously, `DisplayPos` and `DisplayRange` used character-based offsets, which caused issues with Unicode; now, locations are reported using 1-based line numbers and 0-based byte offsets. This **enhancement** introduces `PythonASTRange` and updates numerous functions in `pyrefly/lib/query.rs`, such as `serialize`, `deserialize`, and various call site/type annotation methods, to leverage this new, accurate system. A supporting `line_index` function is added to `crates/pyrefly_util/src/lined_buffer.rs`, allowing for the removal of previous location adjustment workarounds in `py2hack`. This ensures robust and consistent handling of all Python source code across **Pyrefly**'s analysis capabilities. | Sep 22 | 2 | grow |
| b7e9ca7 | This commit introduces a **new capability** to the `pyrefly` library, specifically within the `pyrefly/lib/query.rs` module, to enhance its code analysis capabilities. It modifies the attribute kind determination logic to correctly recognize `classproperty` as a property decorator. This ensures that functions like `get_kind_and_field_type` and `get_attributes_for_class` accurately identify attributes decorated with `classproperty`, thereby improving the overall **static analysis** and understanding of Python codebases. | Sep 22 | 1 | grow |
| 9562843 | This commit **fixes a semantic bug** within the **`pyrefly` library's query processing logic**. It corrects the `get_callees_from_mro` function in `pyrefly/lib/query.rs` to accurately identify the presence of the `__init__` method. The change replaces an incorrect check using `dunder::NEW` with the proper `dunder::INIT` constant. This ensures correct **Python object introspection** and **call graph analysis**, preventing misidentification of constructors within the method resolution order. | Sep 22 | 1 | waste |
| 0272656 | This commit **refactors** the `find_init_or_new` function within the **`pyrefly/lib/query.rs`** module to accurately identify synthesized `__init__` methods. Previously, the system might incorrectly infer the presence of a synthesized `__init__` based on general dataclass metadata in class hierarchies, leading to potential misidentification. The updated logic now explicitly checks for truly synthesized `__init__` methods using `KeyClassSynthesizedFields`, ensuring correct introspection for **dataclass inheritance** scenarios. This **improves the precision of code analysis** by preventing misidentification of initializer methods in complex class structures. | Sep 20 | 1 | maint |
This commit introduces a **bug fix** within the **`pyrefly/lib/query.rs`** module, specifically addressing an incorrect index used during type argument extraction. Previously, the `get_kind_and_field_type` function was erroneously retrieving the second type argument instead of the first for `classproperty` and `cached_classproperty` descriptors. This correction ensures that the system now accurately identifies the intended result type, aligning with how these properties are typed and preventing potential type misinterpretations in downstream analysis. The change improves the **semantic correctness** of type resolution for these Python-like constructs.
This commit introduces a **performance optimization** for **class attribute type lookup** within the `pyrefly` system, specifically impacting the `pyrefly/lib/query.rs` module and its `get_class_attributes` function. It **refactors** the type resolution mechanism to avoid expensive position-based queries, which previously relied on `get_type_at(range.start())`. The new approach directly accesses type information by prioritizing annotation types, then expression trace from the value, and finally falling back to `ClassField.ty()`, resulting in **more efficient type determination** for class fields.
This commit introduces significant **performance optimizations** by **reducing memory allocations** in **type formatting and caching hot paths** across the `pyrefly_types` crate and `pyrefly` library. It refactors string literal escaping in `literal.rs` to batch character writes and eliminates intermediate `String` allocations in `display.rs` by using direct writes, enabled by a new `write_fmt` method in the `TypeOutput` trait. Additionally, the `query.rs` module now avoids redundant `Type` object cloning during caching by leveraging `entry().or_insert_with()`. These changes collectively improve the **efficiency of type representation and display**, particularly for frequently accessed types and long strings, by minimizing unnecessary memory churn.
This commit introduces a **new configuration option** `always_display_expanded_unions` within the **type display system** (`TypeDisplayContext`) to control the rendering of union types. This **feature enhancement** allows for union types to be consistently displayed in their **expanded form**, rather than using potentially abbreviated display names. The change primarily affects the `pyrefly_types` crate's display logic and is immediately utilized by the **query module** (`pyrefly/lib/query.rs`), which now enables this option by default when converting types to strings. This ensures that query results will always present union types with full clarity, improving the user experience by providing more explicit type information.
This commit introduces a **new capability** to the **`pyrefly` library's query system**. Specifically, the **`attributes` query** in `pyrefly/lib/query.rs` now includes an `is_final` field within its `Attribute` struct results. This enhancement allows consumers of the query to programmatically determine if a class field is marked as final, providing more comprehensive metadata for reflection or analysis tools.
This commit establishes the foundational **TypeCache infrastructure** within the **query system** to enable future **type resolution optimization**. It introduces a new `TypeCache` struct, backed by a thread-safe `DashMap`, and integrates it into the `Query` struct, ensuring proper initialization in `Query::new()` and clearing in `change_files()` to maintain correctness. This **new capability** lays the groundwork for caching expensive type materialization, particularly for `is_subtype` checks, without immediately altering existing behavior. The change is a **preparatory step** that will facilitate significant performance improvements in type-related queries in subsequent commits.
This commit introduces a significant **performance optimization** to the **type resolution system** by integrating a `TypeCache` into the `is_subtype` function. It **refactors** the type checking logic to intelligently cache individual types and generate minimal snippets, thereby **eliminating redundant type computations**. This change primarily affects the core **type checking mechanism**, including **TypedDict** queries, and results in a substantial **reduction in execution time** for `is_subtype` calls. The optimization achieves a ~50% speedup by reusing resolved types and only computing what's necessary.
This commit introduces a **performance optimization** to the **type resolution system** by pre-warming the `TypeCache` during `get_types_in_file` operations. It modifies the `pyrefly/lib/query.rs` module to ensure that all types encountered while analyzing a file are immediately inserted into the `TypeCache`. This strategy provides **immediate cache hits for subsequent `is_subtype` queries**, significantly reducing the cold start penalty for common types and improving overall type checking performance. As the final change in a series of optimizations, this results in a notable speedup for type-related operations.
This commit introduces a **refactoring** within the `pyrefly` library to **optimize memory usage** when handling file change transactions. Specifically, the `pyrefly/lib/query.rs` file's `change_files` function was updated to store only minimal transaction information, preventing significant memory increases. Additionally, an **unused `change` function** and its associated endpoint were **removed** as part of this cleanup, further streamlining the codebase. This change directly improves the **performance and efficiency of `pyrefly`** by reducing its memory footprint.
This commit introduces a **new capability** to the **`pyrefly` library**, enhancing its **querying logic** for code definitions. It extends the `class_name_from_def_kind` function within `pyrefly/lib/query.rs` to correctly extract class names from definitions identified as `FunctionKind::CallbackProtocol`. This **enhancement** ensures that the system can accurately process and identify classes associated with callback protocol functions, improving the completeness and reliability of code analysis within `pyrefly`.
This commit **refactors** the **Pyrefly type checker**'s `is_subtype` query and related type detection mechanisms, such as identifying typed dictionaries. It replaces the previous **heavyweight, multi-pass snippet-based type checking** approach with a more efficient **single-pass method**. The new implementation directly converts type names to Pyrefly's internal type representation and then utilizes a **solver** for subtype checks or directly identifies typed dicts, significantly **improving the performance** of these type resolution queries. This change primarily impacts the `pyrefly/lib/query.rs` module, making type analysis more efficient by reducing redundant parsing and checking overhead.
This commit introduces a **new capability** to the **`pyrefly` query engine**, enabling it to correctly recognize and process `TypeVar` instances with constraints when they are used as a callee target. The system now accurately treats such calls as if they were made on a union of the constraint types (e.g., `type[C1 | C2...]`), improving the precision of **type analysis**. This **feature addition** is implemented in `pyrefly/lib/query.rs` by iterating over constraint types and leveraging new helper functions like `class_info_from_type_var_restriction` and `init_or_new_from_union`. This change significantly enhances the accuracy of call graph resolution and type inference for generic Python code, leading to more robust static analysis.
This commit introduces a **feature enhancement** to the `pyrefly/lib/query.rs` module by extending its **property type recognition** capabilities. Previously, the system only recognized `classproperty`; now, it also correctly identifies `cached_classproperty` as a valid property type. This **new capability** ensures that `pyrefly` can accurately parse and interpret Python code that utilizes the `cached_classproperty` decorator, thereby improving the overall robustness and understanding of Python object models within the query system.
This commit **refactors** the **callee finding logic** within the **`pyrefly` library** by extracting previously local helper functions and their associated state into a new **`CalleesWithLocation` struct** and its methods. This significant internal restructuring in `pyrefly/lib/query.rs` aims to improve code organization and facilitate easier sharing of common state across the callee finding operations. The change enhances the maintainability and extensibility of the query capabilities by centralizing related functionality, without altering the external behavior or API of the `pyrefly` module.
This commit **adjusts the callee identification logic** within the **`pyrefly` static analysis tool** to explicitly include `prod_assert` calls. Previously, `pyrefly` had special handling that would omit these calls from the list of callees, but this change in `pyrefly/lib/query.rs`'s `process_expr` function **overrides that behavior**. This **behavior adjustment** ensures that `prod_assert` invocations are now correctly recognized as callees. The **`pyrefly` query engine** will now provide more comprehensive and accurate dependency analysis results for expressions, as `prod_assert` calls will no longer be silently ignored.
This commit introduces a **new feature** to the **PyreFly static analysis tool**, enhancing its query capabilities for call graph analysis. It adds a `location` argument to the `callees_with_location` query function in `pyrefly/lib/query.rs`, enabling users to retrieve precise callee information at a specified code location. This **improves the accuracy and specificity** of code analysis, allowing for more targeted inquiries into function calls. The change leverages PyreFly's existing data collection, providing a more direct and explicit way to query callee information without relying on less precise methods.
This commit **refactors** the internal representation of code locations within **Pyrefly** to be fully compatible with the **Python AST** standard. Previously, `DisplayPos` and `DisplayRange` used character-based offsets, which caused issues with Unicode; now, locations are reported using 1-based line numbers and 0-based byte offsets. This **enhancement** introduces `PythonASTRange` and updates numerous functions in `pyrefly/lib/query.rs`, such as `serialize`, `deserialize`, and various call site/type annotation methods, to leverage this new, accurate system. A supporting `line_index` function is added to `crates/pyrefly_util/src/lined_buffer.rs`, allowing for the removal of previous location adjustment workarounds in `py2hack`. This ensures robust and consistent handling of all Python source code across **Pyrefly**'s analysis capabilities.
This commit introduces a **new capability** to the `pyrefly` library, specifically within the `pyrefly/lib/query.rs` module, to enhance its code analysis capabilities. It modifies the attribute kind determination logic to correctly recognize `classproperty` as a property decorator. This ensures that functions like `get_kind_and_field_type` and `get_attributes_for_class` accurately identify attributes decorated with `classproperty`, thereby improving the overall **static analysis** and understanding of Python codebases.
This commit **fixes a semantic bug** within the **`pyrefly` library's query processing logic**. It corrects the `get_callees_from_mro` function in `pyrefly/lib/query.rs` to accurately identify the presence of the `__init__` method. The change replaces an incorrect check using `dunder::NEW` with the proper `dunder::INIT` constant. This ensures correct **Python object introspection** and **call graph analysis**, preventing misidentification of constructors within the method resolution order.
This commit **refactors** the `find_init_or_new` function within the **`pyrefly/lib/query.rs`** module to accurately identify synthesized `__init__` methods. Previously, the system might incorrectly infer the presence of a synthesized `__init__` based on general dataclass metadata in class hierarchies, leading to potential misidentification. The updated logic now explicitly checks for truly synthesized `__init__` methods using `KeyClassSynthesizedFields`, ensuring correct introspection for **dataclass inheritance** scenarios. This **improves the precision of code analysis** by preventing misidentification of initializer methods in complex class structures.
Commit activity distribution by hour and day of week. Shows when this developer is most active.
Developers who frequently work on the same files and symbols. Higher score means stronger code collaboration.