docs(changelog): record gb32960 body parser block isolation

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
kkfluous
2026-04-20 15:18:26 +08:00
parent f9b9c2a6a7
commit ce87c8ee26

View File

@@ -10,6 +10,25 @@
--- ---
## [Unreleased]
### Changed —— GB/T 32960 Body Parser 单块异常隔离
- `Gb32960BodyParser` 主循环对单信息块的 parser 异常不再放弃整帧:
- 固定长度块(`fixedLength ≥ 0`):回滚 reader → 按 `fixedLen` 截取字节兜成
`InfoBlock.Raw``continue` 继续解析后续块;
- 变长块(`fixedLength == -1`)或剩余字节不足:剩余字节全部兜成 `Raw` 后终止循环;
- `parser` 契约违反(声明 `fixedLen=X` 但实际读了 `Y`)仍抛 `DecodeException`
以暴露 parser bug不走 lenient 兜底,避免静默误解析长期误判;
- 只捕获 `DecodeException` / `BufferUnderflowException` / `IndexOutOfBoundsException`
`RuntimeException` 继续向上抛,保留 bug 可见性。
- 新增配置 `lingniu.ingest.gb32960.parse.lenient-block-failure`(默认 `true`
需要回退严格模式时设为 `false`
- `InfoBlock.Raw` record 结构**未变**,下游 `Gb32960EventMapper``findBlock(Class)`
类型匹配,新增 Raw 不影响业务事件映射。
- 新增测试 `Gb32960BodyParserIsolationTest` —— 3 种隔离场景 + 严格模式回退,共 4 case。
---
## [0.1.0] — 2026-04-15 ## [0.1.0] — 2026-04-15
初始基线。多模块 Spring Boot 车辆遥测接入服务。 初始基线。多模块 Spring Boot 车辆遥测接入服务。