Repository navigation
Description
Problem
Per-condition limits do not add up to an attention budget (ten conditions on ten items each reminding daily is still ten pings/day to one person). The #16075 decision says: "Scope per-recipient budgets and opt-in digest overflow explicitly in a child before enabling them; do not silently drop newly actionable requests." This is that child.
Scope
- Per-recipient cap: at most N non-urgent attention writes (pings + reminders) per responsible recipient per rolling day, across items, computed from the episode store.
- Overflow, never drop: an over-budget non-urgent request is still recorded as an open episode, shown in the item's status-card Attention section and the per-repo action queue, and delivered via the opt-in digest; it is never silently discarded.
- Opt-in daily digest: one edited-in-place digest per recipient (per repo) summarising overflowed and outstanding non-urgent asks; serves as the reminder for those asks. Recipients who do not opt in keep per-episode delivery (budget applies to reminders only for them).
- Exempt from budget: materially new security risk / imminent destructive action, mandatory/required reviews, machine-consumed protocol commands, and every security/merge hold notice.
- Quiet hours/routing preferences, if added, never act as approval shortcuts.
Decision taken by hive: ships disabled (github.attention.recipient_budget: 0 = off; digest opt-in per recipient via config), evaluated in shadow mode first (count would-overflow) before any hive enables it. Digest delivered as a single edited GitHub comment/issue (no external service). Default N proposed in the PR is a shadow-evaluated number, not hard-coded policy.
Acceptance criteria
- Disabled by default ⇒ no behaviour change.
- Shadow mode reports would-overflow counts per recipient without changing writes.
- Enabled: (N+1)th non-urgent ask in a day goes to the digest and the action queue; test asserts it is visible and not dropped.
- Exempt classes always deliver immediately regardless of budget (tests per class).
- Digest is created once and edited thereafter; no new comment per day.
- Docs describe the budget, digest opt-in and exemptions.
- No new dependency or paid service.
Likely files
src/pkg/attention (from the episode child), src/pkg/config/config.go, src/pkg/github/pr_status_comment.go, src/docs/notifications.md.
Evidence
RFC #16075 §4 (opt-in daily digest), title "maintainer attention budgets"; thread analysis point 5; maintainer decision on #16075.
Depends on #16267 (episode store) and #16270 (attention events, action queue, opt-in pilot).
Part of #16075
— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88
Activity
hivecommons-hive commentedon Nov 2, 2026
🔒 Claimed by @mrbobbytables (contributor on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 30m0s without activity and renews while the work continues. Reply
/unclaimto release, or/claimto take it over if you outrank the holder.hivecommons-hive commentedon Nov 2, 2026
🔓 Claim by @mrbobbytables released (lease revoked).
15 remaining items
hivecommons-hive commentedon Nov 3, 2026
🔒 Claimed by agent
scanner(agent on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 2h0m0s without activity and renews while the work continues. Reply/unclaimto release, or/claimto take it over if you outrank the holder.hivecommons-hive commentedon Nov 3, 2026
Remainder implemented in #16426 (wiring the budget from #16309 into live delivery; unblocked now that the episode store landed on v5).
Decision taken by hive: producers mark exempt asks via a new
Observation.Classfield (security,required_review,protocol_command,hold); an unset class is treated as an ordinary non-urgent ping and is budgeted. This is the reverse of theattentionbudgetpackage's own unknown-class-is-exempt default, chosen because otherwise an enabled budget would never hold back any first ping from existing producers. Risk is bounded: the feature ships disabled (recipient_budget: 0) and over-budget asks are recorded and visible, never dropped. Simplest additive option; reversible by setting the class on a producer.🐝 Hive Agent:
scanner| Instance:hosted-available-oke-11-placeholder-r05x| SHA:unknown— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88
hivecommons-hive commentedon Nov 3, 2026
🔓 Claim by agent
scannerreleased (holding agent relaunched).murtazox04 commentedon Nov 4, 2026
Read #16426 on
v5(24c6a1c). The retry path covers my first point: an over-budget ask stays would-notify and is re-admitted every pass, so it pages once the window frees instead of living only in a silently edited digest. PersistingOverflowedon the episode also covers the restart case, because the next pass re-adds the ask toBudget.open.The retry does create one side effect worth a small follow-up.
deliverandAdmitReminderbuild the ask withbudgetAsk(*e, ..., now), and onOverflow,Admitstores it asb.open[openKey(...)] = ask. So every pass replaces the held entry'sAtwith the current sweep time:(ping since 2026-11-03 13:04Z)shows the last sweep, not when the ask was first held, andsortAsks(which orders byAt) no longer shows the oldest first.RenderDigestchanges at minute precision on every pass.UpsertIssueMarkerCommentonly skips the edit when the body is identical, so each opted-in recipient's digest comment gets anEditCommentcall on every sweep while anything is held.counts.Overflowed++runs again for the same key on every pass, so theattention budget:log line counts sweeps, not held asks.A small fix inside
Admit's overflow branch: ifprev, ok := b.open[k], keepask.At = prev.Atand only incrementOverflowedwhen!ok. Keepnowfor theWritethatdeliverLockedrecords, because the rolling window has to count delivery time. Usinge.FirstSeeninbudgetAskinstead would backdate that write, so the window would let it go too early.Disclosure, same as before: I maintain Cue, an open-source notification gate with per-recipient budgets. Nothing above depends on it.