Skip to content

fix(util): harden utility edge cases#214

Merged
chaoming0625 merged 1 commit into
mainfrom
worktree-util-module-audit
Jun 11, 2026
Merged

fix(util): harden utility edge cases#214
chaoming0625 merged 1 commit into
mainfrom
worktree-util-module-audit

Conversation

@chaoming0625

Copy link
Copy Markdown
Collaborator

Summary

  • repair stale util package export by binding breakpoint_if lazily
  • harden BoundedCache, DictManager, DotDict, flatten/nest helpers, filters, and struct helpers against audited edge cases
  • add regression coverage for wildcard exports, cache bounds/messages, JAX key paths, stale identity indexes, direct DotDict mutation, path conflicts, dataclass metadata, and mixed-key FrozenDict behavior

Tests

  • pytest brainstate/util -q
  • pytest brainstate/_state_test.py brainstate/transform/_debug_test.py::TestBreakpointIf brainstate/transform/_find_state_test.py brainstate/transform/_mapping_core_test.py -q
  • pytest brainstate -q

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry @chaoming0625, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@chaoming0625 chaoming0625 merged commit 3dd073a into main Jun 11, 2026
6 checks passed
@chaoming0625 chaoming0625 deleted the worktree-util-module-audit branch June 11, 2026 14:55
@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.97872% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
brainstate/util/_others.py 71.42% 2 Missing and 2 partials ⚠️
brainstate/util/__init__.py 33.33% 2 Missing ⚠️
brainstate/util/_cache.py 66.66% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

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