Skip to content

feat(data_collection): Support KeyValueCollectionBehaviour for stack_frame_variables - #7265

Open
ericapisani wants to merge 1 commit into
py-2578-frame-context-linesfrom
py-2578-stack-frame-vars
Open

feat(data_collection): Support KeyValueCollectionBehaviour for stack_frame_variables#7265
ericapisani wants to merge 1 commit into
py-2578-frame-context-linesfrom
py-2578-stack-frame-vars

Conversation

@ericapisani

Copy link
Copy Markdown
Member

Allow stack_frame_variables to accept an allowlist/denylist dict (like other data_collection options) in addition to a plain bool. Explicit data_collection config now ignores the legacy include_local_variables option instead of falling back to it, and frame_context_lines validates its value and raises on invalid input.

Refs PY-2578
Refs #6738

…frame_variables

Allow `stack_frame_variables` to accept an allowlist/denylist dict
(like other data_collection options) in addition to a plain bool.
Explicit `data_collection` config now ignores the legacy
`include_local_variables` option instead of falling back to it, and
`frame_context_lines` validates its value and raises on invalid input.

Refs PY-2578
Refs #6738
@ericapisani
ericapisani requested a review from a team as a code owner August 26, 2026 19:23
@linear-code

linear-code Bot commented Aug 26, 2026

Copy link
Copy Markdown

PY-2578

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit dc5822c. Configure here.

if isinstance(raw_stack_frame_variables, dict):
stack_frame_variables = _kvcb_from_value(raw_stack_frame_variables)
else:
stack_frame_variables = bool(raw_stack_frame_variables)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stack variable filters are never applied

High Severity

stack_frame_variables now accepts an allowlist or denylist dict, but frame serialization still only consults include_local_variables and never reads this setting. Allowlist, denylist, off, and False therefore do not change which locals are captured, so values users intended to exclude still ship.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit dc5822c. Configure here.

@github-actions

Copy link
Copy Markdown
Contributor

Codecov Results 📊

118209 passed | ⏭️ 6732 skipped | Total: 124941 | Pass Rate: 94.61% | Execution Time: 409m 29s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -86
Passed Tests 📉 -85
Failed Tests 📉 -1
Skipped Tests

➖ Removed Tests (1)

View removed tests
  • test_continuous_profiler_auto_start_and_stop_sampled[non-experiment-gevent]
    • File: tests.profiler.test_continuous_profiler

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 2487 uncovered lines.
❌ Project coverage is 90.23%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    90.24%    90.23%    -0.01%
==========================================
  Files          193       193         —
  Lines        25474     25450       -24
  Branches      9378      9358       -20
==========================================
+ Hits         22988     22963       -25
- Misses        2486      2487        +1
- Partials      1431      1432        +1

Generated by Codecov Action

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