Skip to content

fix: preserve repeated empty tuples during traversal - #505

Open
Shubham-Padkonde wants to merge 1 commit into
rollbar:masterfrom
Shubham-Padkonde:fix/serialize-repeated-empty-tuples
Open

Shubham-Padkonde wants to merge 1 commit into
rollbar:masterfrom
Shubham-Padkonde:fix/serialize-repeated-empty-tuples

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

Description of the change

Empty built-in tuples share an identity. Memoizing that identity made later empty logging argument tuples become CircularReference strings instead of empty JSON arrays. Skip memoizing only empty built-in tuples, while still invoking their handlers at each occurrence. Non-empty tuples and recursive containers retain the existing reference handling.

Fixes #402.

Type of change

  • Bug fix (non-breaking change that fixes an issue)

Validation

  • Three regression subcases fail before the fix and pass afterward; both traversal orders and batched/unbatched serialization are covered.
  • A tuple containing a recursive list still receives the circular-reference label.
  • 44 focused tests and 4 subtests pass.
  • Full base suite: 309 passed, 85 skipped, one Windows-only /tmp versus \tmp path assertion failed. The same failure was reproduced with the original traversal implementation. Optional framework integration suites were not run.
  • mypy: no issues in 52 source files; git diff --check passes.

Checklists

  • Changed behavior is covered with tests.
  • All tests related to the changed code pass.
  • Descriptive title and review context provided.
  • Changes reviewed by another engineer.
@danielmorell
danielmorell self-requested a review October 23, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant