Repository navigation
🐛 fix(hub): stop a racing heartbeat from re-inserting an activity digest after forget - #16044
Conversation
…t after forget Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. hive/awaiting-ci: merge was refused at e41968e with 405 "Required status check 'Sign-off survives the squash' is expected" — the head carried superseded CANCELLED runs of that required check next to its SUCCESS, and GitHub's rollup read it as not passing. Pushed an empty signed commit to re-trigger the checks; CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 Evidence bundle `#160448943133` sha256:b331ef84618bfc5a1ed089feb5383a92b108f137dd7c27b733477abe92b9ee1b — download from the dashboard or `hivectl review evidence #16044`. |
The 'Sign-off survives the squash' check on e41968e has superseded cancelled runs alongside its green run, and GitHub's required-check rollup keeps reporting it as expected, so the PR cannot merge at that head. No code change. Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
The heartbeat handler recorded the activity digest after releasing
s.mu, whileremoveRegistryEntry/handleRegistryDeleteforgot the digest before takings.mu. A beat that passed the registry update concurrently with a delete could record after the purge, leaving a stale digest until the 24h sweep.Fix: option (b).
recordnow runs befores.muis released in the heartbeat, andforgetruns insides.muafter the registry removal in both delete paths. A beat therefore either records before the delete (and is purged) or sees no entry afterwards and the registry check never lets it record.activityStore.muis a leaf lock that never takess.mu, so nesting it unders.mucannot deadlock; the added work unders.muis one short map update.Test: deterministic, no sleeps; holds the store busy and asserts the delete waits on it while holding
s.mu.Closes #16010
— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88