Keep observer composition storage proportional to selected callbacks

This commit is contained in:
2026-11-14 14:29:39 +00:00
parent 64cf84c9b5
commit 892cb74e6e
3 changed files with 47 additions and 5 deletions

View File

@@ -140,7 +140,13 @@ statically. Do not add public allocation guarantees or exact-allocation tests.
## 3. Size Observer Storage For Selected Callbacks
**Priority:** P3. **Status:** For consideration. **Plan stage:** 9.
**Priority:** P3. **Status:** Complete. **Plan stage:** 9.
**Completion:** Observer composition counts selected callbacks before allocating,
sizes retained storage to that count, and handles zero/single selections without
a fan-out closure. Sparse-selection ownership and duplicate-delivery tests pass.
The complete offline race suite, maintained examples, vet, and diff checks passed
with Go 1.27.3 after all remediations.
**Location:** [`Compose`](../../internal/observation/compose.go).