spec log spool batch uploads

This commit is contained in:
npc0-hue
2026-08-10 18:32:31 +08:00
parent ba2b1a9d9f
commit bd444f04b9
5 changed files with 114 additions and 0 deletions
@@ -0,0 +1,21 @@
## 1. Durable Batch Aggregation
- [x] 1.1 Add bounded same-stream entry aggregation to the Run log spool while preserving contiguous sequence and checksum validation.
- [x] 1.2 Flush partial aggregation state at lifecycle/process completion and durable-uploader shutdown.
## 2. Backlog Delivery
- [x] 2.1 Update the log uploader to keep draining pending batches within its bounded log-channel work budget.
- [x] 2.2 Preserve retry, acknowledgement, and old one-entry spool segment compatibility.
## 3. Verification
- [x] 3.1 Add unit coverage for aggregation boundaries, restart/retry behavior, and multi-entry acknowledgement cleanup.
- [x] 3.2 Add runtime coverage proving a high-volume stream catches up through bounded aggregated uploads.
- [x] 3.3 Run `go test ./...` in `run/`, `scripts/check-structure.sh`, and `openspec validate batch-run-log-spool-upload --strict`.
## Evidence
- 2026-08-10: `go test ./...` from `run/` passed.
- 2026-08-10: `scripts/check-structure.sh` passed.
- 2026-08-10: `openspec validate batch-run-log-spool-upload --strict` passed.