Skip to content

FE-1467: Lint and type-check the Python packages in CI - #9261

Merged
kube merged 4 commits into
mainfrom
cf/fe-1467-python-lint-and-type-check
Aug 21, 2026
Merged

FE-1467: Lint and type-check the Python packages in CI#9261
kube merged 4 commits into
mainfrom
cf/fe-1467-python-lint-and-type-check

Conversation

@kube

@kube kube commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Note

Replaces #9260, which GitHub's stack automation marked as merged during a stack reorder. Same commits, same branch; review history lives on the old PR.

🌟 What is the purpose of this PR?

The two Python packages had no linter, no formatter, and no type checker; CI ran their pytest suites and nothing else. This PR configures ruff and basedpyright in both packages and runs them in CI.

There are no editor-specific files: every editor reads the configuration from pyproject.toml, and both tools are pinned as uv dev dependencies so an editor and CI resolve the same versions from uv.lock.

Sits on FE-1270 (#9228) in stack #9269; FE-1468 (#9262) is above.

🔗 Related links

🔍 What does this change?

Configuration, in each package's pyproject.toml:

  • ruff lints with E, F, I, UP, B, SIM, RUF, TRY, DTZ, PTH and formats with ruff format.
  • basedpyright runs at typeCheckingMode = "standard" over src. FE-1468 raises it to strict.
  • Three rules are ignored, each with its reason in the file: TRY003 (error messages here name the value that failed), TRY004 (a non-conforming protocol response raises ValueError, not TypeError), and E501 (ruff format owns line width; it cannot split long strings or the single-line @role annotation).

Four bugs the type checker found:

  • telemetry.py annotated its exporters as LogExporter, which the OTLP exporters do not implement; the runtime base is LogRecordExporter.
  • __enter__ returned PetrinautSession, so with OptimizationSession(...) as session lost the optimization methods. It now returns the calling type.
  • petrinaut_optimizer.py shadowed its callback parameter with a nested function of the same name.
  • OptimizationSession.__init__ passed Mapping | None where Mapping was required; the branches now narrow it.

One root change: !**/.venv joins the workspace globs in package.json. basedpyright bundles a Node binary, so its package.json inside each .venv was discovered as a yarn workspace and the two copies broke Turborepo entirely.

CI: lint:ruff and lint:types scripts in both packages, declared in the root turbo.json, detected by the per-package task check in lint.yml, which reports false for every non-Python package.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • modifies a workspace but not a publishable library.

📜 Does this require a change to the docs?

The changes in this PR:

  • do not require changes to docs. Tool configuration lives in pyproject.toml.

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • affected the execution graph, and the turbo.json's have been updated to reflect this: lint:ruff and lint:types are declared with no dependencies, since uv run syncs each package's environment from its own lockfile.

🛡 What tests cover this?

  • turbo run lint:ruff lint:types passes for both packages — exactly what the new CI steps run.
  • Both pytest suites pass, including the OpenAPI regenerate-and-diff check.

❓ How to test this?

  1. turbo run lint:ruff lint:types --filter @local/petrinaut-python --filter @apps/petrinaut-opt
  2. Open apps/petrinaut-opt/src/telemetry.py in an editor with the ruff and basedpyright language servers: diagnostics appear with no editor configuration in the repository.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview Aug 21, 2026 12:17pm
hashdotdesign-tokens Ready Ready Preview Aug 21, 2026 12:17pm
petrinaut Ready Ready Preview Aug 21, 2026 12:17pm
petrinaut-docs Ready Ready Preview Aug 21, 2026 12:17pm

@github-actions github-actions Bot added area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team area/tests New or updated tests area/apps labels Aug 21, 2026
@kube
kube deployed to pull-request August 21, 2026 00:09 — with GitHub Actions Active
@kube
kube deployed to pull-request August 21, 2026 00:09 — with GitHub Actions Active
@kube
kube marked this pull request as ready for review August 21, 2026 00:14
Copilot AI balanced review requested due to automatic review settings August 21, 2026 00:14
@cursor

cursor Bot commented Aug 21, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches CI lint detection and a few production type/control-flow paths (session context manager, Optuna callback, telemetry exporter types). Behavior should be equivalent, but a misconfigured turbo/CI skip could miss Python lint until noticed.

Overview
Adds ruff and basedpyright to @local/petrinaut-python and @apps/petrinaut-opt, and runs them in the existing per-package lint workflow via new lint:ruff / lint:types turbo tasks.

Config lives in each package’s pyproject.toml (standard type-checking on src only). Yarn now ignores **/.venv so basedpyright’s bundled Node binary is not treated as a workspace.

Type checking also drove a few real fixes: LogRecordExporter in telemetry, PetrinautSession.__enter__ returning the subclass type, no more nested callback shadowing in the study worker, UTC-aware study names, and narrower OptimizationSession constructor branches.

Reviewed by Cursor Bugbot for commit 554f741. Bugbot is set up for automated code reviews on this repo. Configure here.

@kube kube changed the title cf/fe 1467 python lint and type check FE-1467: Lint and type-check the Python packages in CI Aug 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codspeed-hq

codspeed-hq Bot commented Aug 21, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 98 untouched benchmarks


Comparing cf/fe-1467-python-lint-and-type-check (554f741) with cf/fe-1270-create-python-bindings-to-petrinaut-core (7f897d7)

Open in CodSpeed

YannisZa
YannisZa previously approved these changes Aug 21, 2026
Adds libs/@local/petrinaut-python: a stdlib-only, POSIX-only package
wrapping the CLI's JSON-lines protocol. PetrinautSession serves a model
(from a file or over stdin) with healthz/metadata/run plus a generic
request method; OptimizationSession adds describe/evaluate/objective over
an opaque manifest, and evaluate returns per-seed replicates when the
manifest asks for more than one seed. The code comes from petrinaut-opt's
client: spawn scrubbing, bounded reads, and process-group shutdown are
unchanged.

petrinaut-opt consumes the package as an editable uv path dependency,
mirrored as a workspace:* edge so Turbo pruning and change detection see
it; its codegen inputs, the Docker python-deps/runner stages, and the
deploy path filter follow. The old src/petrinaut_client.py, the
PYTHON_INTEGRATION.md walkthrough, and examples/python_stdio.py are
retired, and MODEL_EXAMPLES.md now uses the bindings. Two end-to-end
pytests drive the real built CLI bundle, one per session type.
kube added 3 commits August 21, 2026 13:58
The method sat on a class already named OptimizationSession, while its
siblings evaluate() and objective() carry no prefix. describe() maps 1:1
to the protocol's optimization.describe. The previous name remains as a
class-level alias. Raised in review on #9228.
Encoding failures happen before anything is written: params or a
bootstrap payload that will not serialize to JSON raise TypeError, and a
payload over the line cap raises ValueError. Both previously raised
PetrinautClientError, whose contract says the process or transport is no
longer usable — a caller treating it as terminal would discard a healthy
session. The request id is now consumed only after a successful encode,
so a rejected request leaves the session exactly as it was. Raised by
Cursor and in review on #9228.
ruff and basedpyright are configured in each package's pyproject.toml and pinned as uv dev dependencies, so an editor and CI resolve the same versions with no editor-specific files. New lint:ruff and lint:types tasks are wired into the per-package probe in lint.yml.
@github-actions

Copy link
Copy Markdown
Contributor

Benchmark results

@rust/hash-graph-benches – Integrations

policy_resolution_large

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2002 $$26.1 \mathrm{ms} \pm 276 \mathrm{μs}\left({\color{gray}-2.179 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.44 \mathrm{ms} \pm 22.8 \mathrm{μs}\left({\color{gray}-0.498 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 1002 $$12.6 \mathrm{ms} \pm 123 \mathrm{μs}\left({\color{lightgreen}-5.194 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 3314 $$43.2 \mathrm{ms} \pm 403 \mathrm{μs}\left({\color{gray}-2.325 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$14.5 \mathrm{ms} \pm 123 \mathrm{μs}\left({\color{lightgreen}-6.013 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 1527 $$24.0 \mathrm{ms} \pm 218 \mathrm{μs}\left({\color{lightgreen}-6.254 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 2078 $$26.8 \mathrm{ms} \pm 234 \mathrm{μs}\left({\color{gray}-1.837 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.75 \mathrm{ms} \pm 25.7 \mathrm{μs}\left({\color{gray}-1.278 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 1033 $$13.4 \mathrm{ms} \pm 114 \mathrm{μs}\left({\color{lightgreen}-6.349 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_medium

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 102 $$3.76 \mathrm{ms} \pm 26.2 \mathrm{μs}\left({\color{gray}2.17 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$3.04 \mathrm{ms} \pm 21.3 \mathrm{μs}\left({\color{gray}0.400 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 52 $$3.34 \mathrm{ms} \pm 16.3 \mathrm{μs}\left({\color{gray}-0.481 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 269 $$5.11 \mathrm{ms} \pm 33.0 \mathrm{μs}\left({\color{gray}-0.747 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.53 \mathrm{ms} \pm 18.5 \mathrm{μs}\left({\color{gray}-0.932 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 108 $$4.21 \mathrm{ms} \pm 42.9 \mathrm{μs}\left({\color{gray}1.95 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 133 $$4.36 \mathrm{ms} \pm 31.8 \mathrm{μs}\left({\color{gray}0.324 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$3.45 \mathrm{ms} \pm 17.1 \mathrm{μs}\left({\color{gray}-1.950 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 63 $$4.05 \mathrm{ms} \pm 26.3 \mathrm{μs}\left({\color{gray}0.695 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_none

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 2 $$2.61 \mathrm{ms} \pm 14.8 \mathrm{μs}\left({\color{gray}-3.683 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.50 \mathrm{ms} \pm 11.1 \mathrm{μs}\left({\color{gray}-1.245 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 2 $$2.59 \mathrm{ms} \pm 17.4 \mathrm{μs}\left({\color{gray}-4.184 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 8 $$2.87 \mathrm{ms} \pm 16.3 \mathrm{μs}\left({\color{gray}-3.649 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.66 \mathrm{ms} \pm 14.6 \mathrm{μs}\left({\color{lightgreen}-6.743 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 3 $$2.89 \mathrm{ms} \pm 20.5 \mathrm{μs}\left({\color{gray}-2.474 \mathrm{\%}}\right) $$ Flame Graph

policy_resolution_small

Function Value Mean Flame graphs
resolve_policies_for_actor user: empty, selectivity: high, policies: 52 $$3.00 \mathrm{ms} \pm 15.7 \mathrm{μs}\left({\color{gray}-1.070 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: low, policies: 1 $$2.78 \mathrm{ms} \pm 18.5 \mathrm{μs}\left({\color{gray}-1.374 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: empty, selectivity: medium, policies: 26 $$3.03 \mathrm{ms} \pm 25.8 \mathrm{μs}\left({\color{gray}3.66 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: high, policies: 94 $$3.45 \mathrm{ms} \pm 27.2 \mathrm{μs}\left({\color{gray}-0.114 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: low, policies: 1 $$3.04 \mathrm{ms} \pm 23.5 \mathrm{μs}\left({\color{gray}0.870 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: seeded, selectivity: medium, policies: 27 $$3.31 \mathrm{ms} \pm 22.6 \mathrm{μs}\left({\color{gray}-0.430 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: high, policies: 66 $$3.34 \mathrm{ms} \pm 22.9 \mathrm{μs}\left({\color{gray}-1.306 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: low, policies: 1 $$2.98 \mathrm{ms} \pm 20.2 \mathrm{μs}\left({\color{gray}0.462 \mathrm{\%}}\right) $$ Flame Graph
resolve_policies_for_actor user: system, selectivity: medium, policies: 29 $$3.28 \mathrm{ms} \pm 17.7 \mathrm{μs}\left({\color{gray}0.199 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_complete

Function Value Mean Flame graphs
entity_by_id;one_depth 1 entities $$43.0 \mathrm{ms} \pm 307 \mathrm{μs}\left({\color{gray}-4.030 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 10 entities $$33.6 \mathrm{ms} \pm 163 \mathrm{μs}\left({\color{gray}-2.958 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 25 entities $$36.0 \mathrm{ms} \pm 236 \mathrm{μs}\left({\color{gray}-4.284 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 5 entities $$39.0 \mathrm{ms} \pm 1.06 \mathrm{ms}\left({\color{lightgreen}-11.139 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;one_depth 50 entities $$42.9 \mathrm{ms} \pm 194 \mathrm{μs}\left({\color{gray}-1.085 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 1 entities $$50.1 \mathrm{ms} \pm 261 \mathrm{μs}\left({\color{gray}-1.336 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 10 entities $$40.5 \mathrm{ms} \pm 326 \mathrm{μs}\left({\color{gray}-4.253 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 25 entities $$90.3 \mathrm{ms} \pm 582 \mathrm{μs}\left({\color{lightgreen}-5.386 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 5 entities $$34.1 \mathrm{ms} \pm 233 \mathrm{μs}\left({\color{lightgreen}-20.983 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;two_depth 50 entities $$277 \mathrm{ms} \pm 925 \mathrm{μs}\left({\color{gray}-2.485 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 1 entities $$11.0 \mathrm{ms} \pm 85.2 \mathrm{μs}\left({\color{gray}0.283 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 10 entities $$11.1 \mathrm{ms} \pm 63.3 \mathrm{μs}\left({\color{gray}-1.305 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 25 entities $$11.2 \mathrm{ms} \pm 68.8 \mathrm{μs}\left({\color{gray}0.382 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 5 entities $$11.1 \mathrm{ms} \pm 69.6 \mathrm{μs}\left({\color{gray}-0.424 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id;zero_depth 50 entities $$11.0 \mathrm{ms} \pm 73.2 \mathrm{μs}\left({\color{gray}-1.755 \mathrm{\%}}\right) $$ Flame Graph

read_scaling_linkless

Function Value Mean Flame graphs
entity_by_id 1 entities $$11.1 \mathrm{ms} \pm 91.1 \mathrm{μs}\left({\color{gray}-0.396 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10 entities $$11.2 \mathrm{ms} \pm 59.5 \mathrm{μs}\left({\color{gray}-0.583 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 100 entities $$11.3 \mathrm{ms} \pm 97.6 \mathrm{μs}\left({\color{gray}1.96 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 1000 entities $$11.3 \mathrm{ms} \pm 68.4 \mathrm{μs}\left({\color{lightgreen}-7.588 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id 10000 entities $$11.4 \mathrm{ms} \pm 75.0 \mathrm{μs}\left({\color{lightgreen}-5.744 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity

Function Value Mean Flame graphs
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/block/v/1 $$11.5 \mathrm{ms} \pm 58.6 \mathrm{μs}\left({\color{gray}-2.572 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/book/v/1 $$11.9 \mathrm{ms} \pm 91.3 \mathrm{μs}\left({\color{gray}1.53 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/building/v/1 $$12.0 \mathrm{ms} \pm 88.5 \mathrm{μs}\left({\color{gray}2.67 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/organization/v/1 $$11.7 \mathrm{ms} \pm 72.9 \mathrm{μs}\left({\color{gray}-1.486 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/page/v/2 $$12.2 \mathrm{ms} \pm 172 \mathrm{μs}\left({\color{gray}4.81 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/person/v/1 $$11.8 \mathrm{ms} \pm 80.4 \mathrm{μs}\left({\color{lightgreen}-5.058 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/playlist/v/1 $$11.9 \mathrm{ms} \pm 81.6 \mathrm{μs}\left({\color{gray}0.807 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/song/v/1 $$11.6 \mathrm{ms} \pm 73.3 \mathrm{μs}\left({\color{gray}-2.688 \mathrm{\%}}\right) $$ Flame Graph
entity_by_id entity type ID: https://blockprotocol.org/@alice/types/entity-type/uk-address/v/1 $$11.5 \mathrm{ms} \pm 88.6 \mathrm{μs}\left({\color{gray}-4.380 \mathrm{\%}}\right) $$ Flame Graph

representative_read_entity_type

Function Value Mean Flame graphs
get_entity_type_by_id Account ID: bf5a9ef5-dc3b-43cf-a291-6210c0321eba $$8.48 \mathrm{ms} \pm 47.0 \mathrm{μs}\left({\color{gray}-0.946 \mathrm{\%}}\right) $$ Flame Graph

representative_read_multiple_entities

Function Value Mean Flame graphs
entity_by_property traversal_paths=0 0 $$56.6 \mathrm{ms} \pm 452 \mathrm{μs}\left({\color{lightgreen}-11.862 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$107 \mathrm{ms} \pm 604 \mathrm{μs}\left({\color{lightgreen}-8.244 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$65.9 \mathrm{ms} \pm 554 \mathrm{μs}\left({\color{lightgreen}-8.784 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$74.2 \mathrm{ms} \pm 549 \mathrm{μs}\left({\color{lightgreen}-8.819 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$82.7 \mathrm{ms} \pm 640 \mathrm{μs}\left({\color{lightgreen}-8.150 \mathrm{\%}}\right) $$
entity_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$87.3 \mathrm{ms} \pm 792 \mathrm{μs}\left({\color{lightgreen}-8.176 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=0 0 $$43.6 \mathrm{ms} \pm 257 \mathrm{μs}\left({\color{lightgreen}-5.629 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=255 1,resolve_depths=inherit:1;values:255;properties:255;links:127;link_dests:126;type:true $$74.0 \mathrm{ms} \pm 593 \mathrm{μs}\left({\color{gray}-2.837 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:0;link_dests:0;type:false $$49.7 \mathrm{ms} \pm 282 \mathrm{μs}\left({\color{lightgreen}-5.490 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:0;links:1;link_dests:0;type:true $$60.9 \mathrm{ms} \pm 441 \mathrm{μs}\left({\color{gray}-1.457 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:0;properties:2;links:1;link_dests:0;type:true $$62.1 \mathrm{ms} \pm 320 \mathrm{μs}\left({\color{lightgreen}-6.143 \mathrm{\%}}\right) $$
link_by_source_by_property traversal_paths=2 1,resolve_depths=inherit:0;values:2;properties:2;links:1;link_dests:0;type:true $$62.7 \mathrm{ms} \pm 469 \mathrm{μs}\left({\color{gray}-3.362 \mathrm{\%}}\right) $$

scenarios

Function Value Mean Flame graphs
full_test query-limited $$122 \mathrm{ms} \pm 650 \mathrm{μs}\left({\color{gray}-2.082 \mathrm{\%}}\right) $$ Flame Graph
full_test query-unlimited $$132 \mathrm{ms} \pm 558 \mathrm{μs}\left({\color{gray}-4.439 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-limited $$18.7 \mathrm{ms} \pm 108 \mathrm{μs}\left({\color{lightgreen}-5.585 \mathrm{\%}}\right) $$ Flame Graph
linked_queries query-unlimited $$551 \mathrm{ms} \pm 1.17 \mathrm{ms}\left({\color{gray}1.85 \mathrm{\%}}\right) $$ Flame Graph

@kube
kube added this pull request to the merge queue Aug 21, 2026
Base automatically changed from cf/fe-1270-create-python-bindings-to-petrinaut-core to main August 21, 2026 14:49
@kube
kube requested a review from a team as a code owner August 21, 2026 14:49
@github-actions github-actions Bot added area/deps Relates to third-party dependencies (area) type/eng > frontend Owned by the @frontend team type/legal Owned by the @legal team labels Aug 21, 2026
Merged via the queue into main with commit bf42b43 Aug 21, 2026
224 of 244 checks passed
@kube
kube deleted the cf/fe-1467-python-lint-and-type-check branch August 21, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps area/deps Relates to third-party dependencies (area) area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) area/tests New or updated tests type/eng > backend Owned by the @backend team type/eng > frontend Owned by the @frontend team type/legal Owned by the @legal team

Development

Successfully merging this pull request may close these issues.

3 participants