📝 Add 1.0.1(0.6.1) change notes for wide file rotation

This commit is contained in:
Nanaloveyuki
2026-07-05 21:32:11 +08:00
parent e001315319
commit 3bdab60412
14 changed files with 234 additions and 10 deletions
+36
View File
@@ -0,0 +1,36 @@
## BitLogger Update Changes
version 1.0.1(0.6.1)
### Runtime
- feat: add an additive `file_rotation_i64(...)` path so native large-file thresholds can exceed the default `Int` contract without replacing the existing API
- feat: add `with_file_rotation_i64(...)` for file preset and config composition on the same wide-threshold path
- fix: switch native file-size checks used by rotation decisions to 64-bit file positions so wide thresholds are enforced by the runtime backend
### Config
- feat: allow logger config parsing to prefer `max_bytes_i64` when present and keep `max_bytes` as the compatibility numeric view
- feat: export wide rotation thresholds through `file_rotation_config_to_json(...)` using `max_bytes_i64` as a string for exact JSON roundtrip
- feat: propagate the same wide-threshold JSON shape through sink config, file sink policy/state, and runtime file-state helpers
### Docs
- docs: add dedicated API references for `file_rotation_i64(...)` and `with_file_rotation_i64(...)`
- docs: clarify the default `Int`-based file rotation contract versus the advanced native wide-threshold path across file sink and preset APIs
- docs: document that JSON export keeps `max_bytes` as the compatibility field and `max_bytes_i64` as the exact roundtrip field
### Test
- test: cover wide-threshold metadata preservation in direct rotation helpers and preset helpers
- test: cover logger config parse/stringify roundtrip behavior for `max_bytes_i64`
- test: cover nested wide-threshold JSON export in config, file policy, file state, and runtime file-state helpers
### Verification
- verify: keep the repository passing `moon fmt`, `moon check`, and `moon test` after the wide-threshold rotation update
### Notes
- the default public contract remains the existing `Int`-based file rotation API; the `Int64` route is additive and opt-in
- wide-threshold JSON transport now uses `max_bytes_i64` as a string to avoid precision loss in JavaScript-shaped consumers
+2 -1
View File
@@ -2,7 +2,8 @@
Versioned BitLogger change summaries.
- [1.0.0](./1.0.0.md)
- [1.0.1](./1.0.1(0.6.1).md)
- [1.0.0](./1.0.0(0.6.0).md)
- [0.5.3](./0.5.3.md)
- [0.5.2](./0.5.2.md)
- [0.5.1](./0.5.1.md)