feat(data_collection): Support KeyValueCollectionBehaviour for stack_frame_variables - #7265
feat(data_collection): Support KeyValueCollectionBehaviour for stack_frame_variables#7265ericapisani wants to merge 1 commit into
Conversation
…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.
| 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) |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit dc5822c. Configure here.
Codecov Results 📊✅ 118209 passed | ⏭️ 6732 skipped | Total: 124941 | Pass Rate: 94.61% | Execution Time: 409m 29s 📊 Comparison with Base Branch
➖ Removed Tests (1)View removed tests
All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 2487 uncovered lines. 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 +1Generated by Codecov Action |


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