feat(data_collection): Support KeyValueCollectionBehaviour for stack_frame_variables - #7265
Merged
Conversation
Frame source context (pre/post/context lines) now honours the data_collection experimental option's frame_context_lines setting when enabled, overriding both the default of 5 lines and the legacy include_source_context flag. 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
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.
Contributor
Codecov Results 📊✅ 118640 passed | ⏭️ 6732 skipped | Total: 125372 | Pass Rate: 94.63% | Execution Time: 421m 32s 📊 Comparison with Base Branch
➖ Removed Tests (2)View removed tests
All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 2486 uncovered lines. Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 90.24% 90.24% —%
==========================================
Files 193 193 —
Lines 25480 25483 +3
Branches 9382 9384 +2
==========================================
+ Hits 22994 22997 +3
- Misses 2486 2486 —
- Partials 1431 1430 -1Generated by Codecov Action |
sentrivana
approved these changes
Aug 27, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Allow
stack_frame_variablesto accept an allowlist/denylist dict (like other data_collection options) in addition to a plain bool. Explicitdata_collectionconfig now ignores the legacyinclude_local_variablesoption instead of falling back to it, andframe_context_linesvalidates its value and raises on invalid input.Refs PY-2578
Refs #6738