You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Align profiler initializer defaults and truth conversion - #9541
Fix the concrete _lsprof.Profiler missing-signature entry in the existing whats_left report. The initializer's omitted timer had unrepresentable metadata, suppressing the whole class signature. Supply the pinned CPython Clinic display default None while preserving raw OptionalArg: omitted timer and explicitly passed None remain distinct, just as Clinic's NULL-vs-Py_None implementation does.
Also fix four related argument converters: initializer/enable subcalls and builtins now use truth conversion (ArgIntoBool) rather than integer-only Rust bool conversion. Conversion order stays unchanged and user truth callbacks occur during binding, before the operation/state locks. Extracting the resulting Rust bool under the lock is callback-free. Timer lifetime and monitoring/state bodies are otherwise unchanged.
Include the same reviewed --signature output option on the existing comparison step to measure this one report item; no additional scans/imports.
Validation and limits
Independent source review against CPython 3.15.0 d220409a, normal repository commit hooks and diff check passed.
Local Cargo compilation/tests and interpreter execution were not run due to the existing cache/network blocker. Exact-head CI, canonical profiling suites, pure test execution and the expected one-item report reduction are pending.
Source-reviewed callback/lock ordering is not a claim that custom callback runtime behavior has already been validated. Generic invalid-call error-priority parity remains outside this change.
No Lib tests/assertions, snippets or dependencies changed. #9538 changes callback names in separate hunks of _lsprof.rs; retain both during eventual integration.
Summary by CodeRabbit
Bug Fixes
Profiler options for tracking subcalls and built-in functions are now handled as boolean values, preserving their existing defaults.
Timer arguments are parsed without the previous unrestricted argument handling, improving consistency when configuring profiling.
Preserve the timer omission distinction while exposing Clinic metadata and evaluating subcalls/builtins truth values before state locks.
Assisted-by: OpenAI Codex:model version not exposed
Reviewing files that changed from the base of the PR and between f349d16 and 6506982.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The profiler argument declarations now use ArgIntoBool for subcalls and builtins, and convert those values to bool during initialization and enabling. The CI invocation of whats_left.py now includes --signature.
The changes preserve profiler defaults and add signature warnings to CI output. No actionable merge-blocking risk was identified; compilation and runtime validation remain pending.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely describes the main profiler changes: aligning initializer defaults and boolean conversion.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between ef023bc and f349d16.
Files selected for processing: 2
.github/workflows/ci.yaml
crates/vm/src/stdlib/_lsprof.rs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Retain coverage of signature infrastructure while removing tests tied to individual Python callables, as requested.
Assisted-by: OpenAI Codex:model version not exposed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Fix the concrete
_lsprof.Profilermissing-signature entry in the existingwhats_leftreport. The initializer's omitted timer had unrepresentable metadata, suppressing the whole class signature. Supply the pinned CPython Clinic display defaultNonewhile preserving rawOptionalArg: omitted timer and explicitly passed None remain distinct, just as Clinic's NULL-vs-Py_None implementation does.Also fix four related argument converters: initializer/enable
subcallsandbuiltinsnow use truth conversion (ArgIntoBool) rather than integer-only Rust bool conversion. Conversion order stays unchanged and user truth callbacks occur during binding, before the operation/state locks. Extracting the resulting Rust bool under the lock is callback-free. Timer lifetime and monitoring/state bodies are otherwise unchanged.Include the same reviewed
--signatureoutput option on the existing comparison step to measure this one report item; no additional scans/imports.Validation and limits
d220409a, normal repository commit hooks and diff check passed.No Lib tests/assertions, snippets or dependencies changed. #9538 changes callback names in separate hunks of
_lsprof.rs; retain both during eventual integration.Summary by CodeRabbit