Fix #156: hooks cap + bounded sweep #162

Merged
crueber merged 2 commits from fix/issue-156 into main 2026-09-05 21:38:12 +00:00
Owner

Cap hooks per repo (DefaultMaxHooksPerRepo=20, over-cap create → 409 plain-text) and make the minute sweep incremental: quiet repos cost one collab_state GET, passes run only on allocator advance or lagging cursors, create/activate arms the gate. Regression tests bound quiet-sweep cost independent of hook count and pin the retry contract. internal/notify 95.9% cover, -race green, vet/fmt clean. Docs: 06 §1.4/§5.3/§6 + Decisions.

Cap hooks per repo (DefaultMaxHooksPerRepo=20, over-cap create → 409 plain-text) and make the minute sweep incremental: quiet repos cost one collab_state GET, passes run only on allocator advance or lagging cursors, create/activate arms the gate. Regression tests bound quiet-sweep cost independent of hook count and pin the retry contract. internal/notify 95.9% cover, -race green, vet/fmt clean. Docs: 06 §1.4/§5.3/§6 + Decisions.
06 §1.4/§5.3: DefaultMaxHooksPerRepo (20) enforced in CreateHook
(over-cap → 409 plain-text); minute sweep gates on collab_state
(1 GET for quiet repos) and re-passes only allocator-advanced or
lagging-cursor repos; create/activate arms the gate. Regression
tests bound the quiet-sweep cost and pin the retry contract.
Sign in to join this conversation.
No description provided.