Summary
Follow-up from review on #58 / #49 (not a merge blocker).
After #58 lands, issueOtks never re-shares OTKs already issued to a peer. The pool then pins at OTK_POOL_CEILING with issued-but-unconsumed keys. Once every row is issued, replenishment advertises zero OTKs until something is consumed or the 6h sweep fires — measured as 8,8,8,0,0,0 across unanswered sends to one peer.
Behaviour today
This is a graceful degradation, not silent loss: the peer's book empties, takeAgreementPublic falls through to the SPK, and mail still delivers. Per-message FS quietly downgrades to per-rotation FS for peers who do not reply (common on a lossy mesh: an OTK secret is only consumed when we open something sealed to it, so undelivered mail leaves keys pinned forever).
Proposed direction
When the ceiling is hit and there are no unissued OTKs left to hand out, evict the oldest issued-unconsumed OTKs (or otherwise reclaim pool slots) so replenishment can mint/assign fresh keys again — rather than starving the bundle at zero.
Out of scope
Do not fold this into #58 / #59 / #60; land those in order first (#59 → #58 → #60).
References
Summary
Follow-up from review on #58 / #49 (not a merge blocker).
After #58 lands,
issueOtksnever re-shares OTKs already issued to a peer. The pool then pins atOTK_POOL_CEILINGwith issued-but-unconsumed keys. Once every row is issued, replenishment advertises zero OTKs until something is consumed or the 6h sweep fires — measured as8,8,8,0,0,0across unanswered sends to one peer.Behaviour today
This is a graceful degradation, not silent loss: the peer's book empties,
takeAgreementPublicfalls through to the SPK, and mail still delivers. Per-message FS quietly downgrades to per-rotation FS for peers who do not reply (common on a lossy mesh: an OTK secret is only consumed when we open something sealed to it, so undelivered mail leaves keys pinned forever).Proposed direction
When the ceiling is hit and there are no unissued OTKs left to hand out, evict the oldest issued-unconsumed OTKs (or otherwise reclaim pool slots) so replenishment can mint/assign fresh keys again — rather than starving the bundle at zero.
Out of scope
Do not fold this into #58 / #59 / #60; land those in order first (
#59 → #58 → #60).References