Make pending asset bookkeeping linear

This commit is contained in:
2026-11-01 19:29:17 +00:00
parent 078db6cbcb
commit b72af69baf
3 changed files with 60 additions and 23 deletions

View File

@@ -263,7 +263,14 @@ validation behavior across the two supported CI paths.
## 6. Make pending-asset bookkeeping linear — P3
Status: open.
Status: complete.
**Completed:** Replaced repeated slice removals with pending-map updates and a
single deferred compaction pass on every return path. Category bookkeeping is
now expected O(`n`) with O(`n`) metadata, preserving pending observation order.
Added an early-return regression with out-of-order observations for definitive
and uncertain failures. Delivery/Gitea tests and focused facade/CLI recovery
tests passed.
**Evidence:** `uploadMissingAssets`, `reconcileAssetUpload`, and
`removeIdentity` in [shared asset delivery](../../internal/delivery/remote_assets.go).