feat(data-structures): stabilize RollingCounter - #7257
Open
tomas-zijdemans wants to merge 2 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7257 +/- ##
==========================================
- Coverage 95.03% 95.03% -0.01%
==========================================
Files 619 619
Lines 51499 51752 +253
Branches 9301 9349 +48
==========================================
+ Hits 48940 49180 +240
- Misses 2021 2030 +9
- Partials 538 542 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
RollingCounteris feature-complete and the API has settled, so this promotes it to stable. It has been unstable since March (#7028), and every follow-up moved it toward patterns its stable siblings already use: serialization (#7074),at()andtoArray()alignment (#7102), and theReadonlyRollingCounterview plus instance clone path (#7234). What remains on the wishlist is convenience helpers, all addable post-stabilization as non-breaking additions. Same argument that stabilizedDequein #7092.Mechanics, mirroring #7092:
unstable_rolling_counter.tstorolling_counter.ts(and the test file), drop theunstable-prefix from the export, re-export frommod.ts@experimentaltagsasync/unstable_circuit_breaker.tsat the stable specifierOne thing deserves a hard look: stabilizing freezes
RollingCounterSnapshotas a wire format, forever. It is a single field (segments, oldest to newest), andfrom()already accepts non-canonical layouts, but this is the one part of the API we cannot fix additively later. If the shape is wrong, now is the time.No behavior changes. All 52 tests and the doc tests pass unchanged, and
check_unstable_deps.tsconfirms no stable module depended on the unstable specifier.🤖 Generated with Claude Code