Repository navigation
Conversation
Add opt-in per-repo attention ownership, durable producer-independent episodes, quiet baseline recovery, and exact-attempt reconciliation before uncertain POST retries. Keep existing writers, reviews, commands and holds unchanged for the separate pilot. Hive-Run: hivecommons#16267 Hive-Plan: RFC-16075/phase-3-condition-episodes Hive-Spec: RFC-16075#2 Signed-off-by: mendezr <mendezr@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 |
|
@mendezr this PR is back in your court ( Failing checks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Your relay session received this as a |
Signed-off-by: mendezr <mendezr@users.noreply.github.com>
|
Follow-up on the coverage nudge for 2ccf4a9: head ff5de88 already adds the attention config golden fixture, YAML-only settings parity entry, and writeback-gate annotation to address the CI contract failures. CI has restarted on that head; no failing checks are currently reported, with the remaining test/coverage work still pending. No additional code changes made in this pass. Base v5 is mergeable (no DIRTY/BEHIND repair needed). 🐝 Hive Agent: |
|
@mendezr this PR is back in your court ( Failing checks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Your relay session received this as a |
Signed-off-by: mendezr <mendezr@users.noreply.github.com>
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
Correctness review (head 044c41d, read against #16267)
1. Every new item's first inventory is swallowed, not just the first after ledger loss — src/pkg/attention/episodes.go:261,289
baseline := !s.state.Items[itemKey] is true for any PR/issue the ledger has never seen, ledger intact or not. Episodes created on that report get Baseline: true permanently, and episodes.go:329 never POSTs a baseline episode. So a required job that is already red the first time a producer reports a PR gets zero attention writes (until it resolves and recurs >12h later). That contradicts the PR body ("first complete item inventory after ledger loss seeds without sending"), src/docs/attention-episodes.md ("On missing/corrupt state, the first complete inventory per item is a recovery baseline"), and #16267's scenario "same failure across pushes ⇒ one episode, one attention write". Every test only passes because it pre-seeds with an empty report(t, s, f, "owner") first (episodes_test.go TestAcrossProducersPushesAndRestart etc.); drop that line and posts==0. Real producers cannot know whether their first snapshot is "the first for this item".
History already supplies the replay guard (a key with a prior trusted marker is seeded as Baseline), and a key with no prior marker was never paged, so there is nothing to replay. Suggested fix:
e = &Episode{Key: o.Key, State: Observed, FirstSeen: now, Baseline: historical[hash]}
and drop the "Call with an empty inventory after recovery" contract from src/pkg/github/attention.go:27 / the doc, or keep the per-item baseline only when Open actually took a recovery path (missing/corrupt/zero-version), recorded in a recovered bool on Store.
2. Status-card hive:condition markers count as delivery history — src/pkg/github/attention.go:67,122, episodes.go:267-277
attentionKeyMarker matches hive:condition markers, which attentionStatus emits for every non-resolved episode, including would notify ones a non-admitter folded into the shared status comment and ones that were never paged. On the admitter's first report for that item, History returns those hashes, the episode is seeded Baseline: true, and the admitter never pages it. In the documented two-hive topology this means whichever condition a non-admitter saw first is permanently suppressed for the owner. Only hive:attention markers evidence a real POST:
var attentionKeyMarker = regexp.MustCompile(`<!-- hive:attention key=([a-f0-9]{64}) attempt=[a-f0-9]{32} -->`)
(TestAttentionMarkerLookupPaginatesAndRequiresTrustedAuthor still passes; it uses e.Marker().)
3. Resolved episodes are never pruned, so the 4096 cap is a deployment-wide dead stop — episodes.go:274,286, recovery_test.go TestRecoveryFailuresFenceDelivery
Resolved episodes (and the hash-only entries History seeds) stay in the ledger forever; once len(Episodes) == MaxEpisodes, every Report across all repos errors and no new condition can page, with no API to archive. Pruning State == Resolved && !Uncertain && now.Sub(ResolvedAt) > cfg.Window() is behaviour-preserving: a recurrence after the window already replaces such an episode with a fresh one (episodes.go:292-294) and attentionStatus already skips resolved ones. Suggest doing that prune at the top of Report (under s.mu) before the capacity checks.
Not blocking: Report holds s.mu across paginated History/Find/Post calls, so one slow GitHub listing stalls every producer and every Snapshot process-wide; fine for the pilot, worth noting for #16270.
— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. Hive filed review findings that do not block this PR as backlog items:
Cap: 10 backlog item(s) per PR per day. Review findings from Read the new package and its wiring against What I verified:
One behaviour worth knowing, not a defect: episodes seeded from history alone carry a zero Review findings from Conclusion: read 1. Capacity is a one-way door (medium). 2. Admitter handoff can double-page (medium, open question). 3. Cosmetic (low). A resolved observation Body vs diff: consistent; the rollout-boundary paragraph accurately describes what is and isn't wired. CI is green bar I have not approved or blocked anything; the decision above is for a maintainer. |
|
@mendezr this PR is back in your court ( Review asks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (2 waiting): fixes are handed out before new work as soon as you have capacity. |
…d episodes Address review findings on hivecommons#16291: - Baseline only conditions whose key appears in trusted attention delivery history. A never-paged condition on a never-seen item now notifies on its first report instead of being permanently swallowed; History remains the replay guard after ledger loss. Drop the empty-inventory baseline contract from the adapter/doc comments and docs. - Only hive:attention markers with an attempt ID count as delivery history. Status-card hive:condition markers (emitted for non-admitter and never-paged episodes) no longer seed baselines that would suppress a first page. - Prune resolved, reconciled episodes once the flap window has passed so the 4096-episode cap bounds live inventory instead of becoming a dead stop. Uncertain episodes and history-seeded baselines are retained. Tests cover first-report paging, condition-marker-only history, and pruning. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
Pushed 536c74b to this branch (maintainer edits enabled) so it can land while @mendezr is away — original commits preserved with authorship. Addresses the review findings:
Tests: |
|
@mendezr this PR is back in your court ( Failing checks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (1 waiting): fixes are handed out before new work as soon as you have capacity. |
* ✨ feature: persist single-admitter condition episodes Add opt-in per-repo attention ownership, durable producer-independent episodes, quiet baseline recovery, and exact-attempt reconciliation before uncertain POST retries. Keep existing writers, reviews, commands and holds unchanged for the separate pilot. Hive-Run: #16267 Hive-Plan: RFC-16075/phase-3-condition-episodes Hive-Spec: RFC-16075#2 Signed-off-by: mendezr <mendezr@users.noreply.github.com> * 🐛 fix: align attention rollout with CI contracts Signed-off-by: mendezr <mendezr@users.noreply.github.com> * 🧪 test: cover attention recovery and fail-closed transitions Signed-off-by: mendezr <mendezr@users.noreply.github.com> * 🐛 fix: page never-delivered conditions on first report, prune resolved episodes Address review findings on #16291: - Baseline only conditions whose key appears in trusted attention delivery history. A never-paged condition on a never-seen item now notifies on its first report instead of being permanently swallowed; History remains the replay guard after ledger loss. Drop the empty-inventory baseline contract from the adapter/doc comments and docs. - Only hive:attention markers with an attempt ID count as delivery history. Status-card hive:condition markers (emitted for non-admitter and never-paged episodes) no longer seed baselines that would suppress a first page. - Prune resolved, reconciled episodes once the flap window has passed so the 4096-episode cap bounds live inventory instead of becoming a dead stop. Uncertain episodes and history-seeded baselines are retained. Tests cover first-report paging, condition-marker-only history, and pruning. Signed-off-by: Andrew Anderson <andy@clubanderson.com> * 📝 docs: link attention episodes page, separate top-level decls Hive-Fix-Attempt: 1/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: architect <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 fix: reconcile uncertain resolved episodes, page first reopen, prune items Hive-Fix-Attempt: 2/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: architect <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🌱 chore(writeback): annotate status-comment forge plumbing for the direct-write ratchet Merging v5 (#16319, #16321) moved the hive status comment's edit/create/ delete into prstatus.Forge adapters in automerge_stage_labels.go and pr_status_comment.go without updating the write-back ratchet, so TestDirectWriteRatchet failed on every PR's merge commit. Mark the forge adapter calls writeback:gated — they are plumbing under prstatus.Write and the write-back decision lives at the ratcheted entry points — and lower the automerge_stage_labels.go baseline now that the old in-place edit is gone. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🌱 chore(notifications): inventory attentionDelivery.Post and the status-comment forge create TestNotificationWriteSitesInventory (v5, #16321) flags two untagged notification-capable writes on this branch's merge commit: attentionDelivery.Post, this PR's condition-episode page (attention), and clientStatusForge.CreateComment from #16319's status writer (status, passthrough to its caller). Tag both and mirror the rows in src/docs/notifications.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * fix(attention): mark acknowledged reopen quiet Hive-Fix-Attempt: 3/6 Signed-off-by: architect <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🐛 fix: expire stale history baselines and report status-comment writes as ungated Hive-Fix-Attempt: 4/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: architect <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 📖 docs: list attention-episodes.md in the documentation map and docs README Closes #16330 Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🌱 chore(settingsparity): collect pkg/attention so github.attention leaves are enumerated Closes #16331 Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> * 🌱 chore: retrigger CI after transient npm registry outage build/docker jobs failed in the Dockerfile cline install step with "No matching version found for @ai-sdk/openai@4.0.108"; the version is present on the registry, so this was a transient fetch failure. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --------- Signed-off-by: mendezr <mendezr@users.noreply.github.com> Signed-off-by: Andrew Anderson <andy@clubanderson.com> Signed-off-by: architect <280983584+hivecommons-hive[bot]@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: mendezr <mendezr@users.noreply.github.com> Co-authored-by: Andrew Anderson <andy@clubanderson.com> Co-authored-by: architect <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes #16267
Summary
github.attention.admitterownership. Non-admitters record would-notify and fold status only; unset ownership leaves existing behavior unchanged.Rollout boundary
Existing producers, reviews, machine commands and holds are intentionally unchanged. Producer migration and the opt-in pilot remain #16270; concurrent status routing requires #16263. The first complete item inventory after ledger loss seeds without sending. Capacity exhaustion fails closed rather than evicting history. Ownership requires one deployment per configured hive ID; marker lookup is not presented as cross-instance atomic admission.
Validation
gofmt -lon changed Go files: clean.— hive: backend=pi model=openai-codex/gpt-6.1-sol
🐝 Hive Agent:
contributor| SHA:2ccf4a9ef