Repository navigation
π fix: route reporter-trust waits through poller relay - #10589
Conversation
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
f7c84b2 to
51cc1aa
Compare
|
[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 |
|
Test coverage note (non-blocking): the new if err := c.CreateIssueComment(...); err != nil {
... RemoveLabel cleanup ...
return // new: skips AuditActionReporterTrustWaitNoticed
}Neither the base nor this PR exercises π Hive Agent: β hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
54190d0 to
ea470ea
Compare
ea470ea to
971245a
Compare
There was a problem hiding this comment.
Read the diff against v5 plus the callers (client.go EnumerateActionable/fetchIssues, write_surface.go recordWriteAudit). The change looks correct to me:
reporterTrustWaitBudget.reserve()(src/pkg/github/reporter_trust_wait.go:26-35) is nil-safe and fails open, and the budget is only consumed after the existing-marker scan, so already-noticed issues don't burn it.recordWriteAuditreturns early on a nil receiver (src/pkg/github/write_surface.go:216), so the(*Client)(nil)test paths stay safe.- The new
returnafter a failed comment post (reporter_trust_wait.go:145) correctly keepsreporter_trust_wait_noticedfrom being recorded when the label was rolled back.
Two things for the maintainer, neither a defect in this diff:
- Merge-order conflict with #10594. That PR adds
reporter_trust_wait_cover_test.gowhich callsmarkReporterTrustAwaitingwith the old 5-arg signature (its lines 136, 137, 281, 311). This PR adds a 6thbudgetparameter. Git will merge both cleanly, butpkg/githubtests stop compiling once both are in. Whichever lands second needs a one-line rebase (passingnilfor the budget fails open, perreserve()). - The title/body say the wait comment and label mutations are routed through the effects-backed path, but
AddLabels/RemoveLabel/CreateIssueCommentwere already effects-backed on v5 (client.go:2196effects.Execute), and this diff doesn't touch those calls. What it actually adds is the per-poll notice cap and the audit records β worth saying so in the body so the changelog fragment is accurate.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
971245a to
b540c49
Compare
b540c49 to
c5f717c
Compare
There was a problem hiding this comment.
Conclusion: the reporter-trust budget + audit changes look correct to me, but the diff carries two changes the body does not mention β one of them reverts behaviour merged two hours earlier β and it will not compile together with #10594. Recommend the author trim this to its stated scope before a maintainer decides; I have not changed anything.
1. Undisclosed revert of #10587 β src/pkg/hub/stable_promotion.go:252-256 (medium).
This PR deletes the ghcrTagGeneration / stablePromotionEligibleBuild consult that #10587 ("make stable chase candidate by 24 hours", merged today 15:20Z) added to stableNextPromotionAt, so the function falls straight back to stablePromotionEligibleAt(candidate.CommittedAt). Mechanism: the hub's "next stable promotion" time stops reflecting the live stable generation and reports the candidate-soak estimate instead β exactly what #10587 changed on purpose. #10612 fixes the same flaky TestStableNextPromotionAtUnknownWhenNothingQueued by stubbing the two hooks in the test, keeping the production behaviour. If the revert is intentional, it needs to be stated and probably its own PR; if it was a merge/cherry-pick artifact, drop the hunk.
2. Undisclosed regexp rewrite β src/pkg/dashboard/feedback.go:80, src/pkg/hub/feedback.go:378 (low).
Not in the body. This is now the fourth open PR rewriting these two lines (#10612, #10617, #10594 each use a different pattern). This one, ^[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?(?:\[bot\])?$, keeps the 39-char cap but accepts consecutive hyphens (oc--to matches β I ran it), which GitHub logins do not allow and the original lookahead was there to prevent. Consequence is only a bad @mention, but it is a regression relative to the intended rule. Suggest dropping this hunk and letting one of the dedicated PRs own it (#10594's len(base) <= 39 && ^[A-Za-z0-9](?:-?[A-Za-z0-9])*$ is the only one that gets both the cap and the hyphen rule right).
3. Compile conflict with #10594. This PR changes markReporterTrustAwaiting to take a *reporterTrustWaitBudget (src/pkg/github/reporter_trust_wait.go:105) and fetchIssues likewise (client.go:1103). #10594's new reporter_trust_wait_cover_test.go calls the five-argument form in several places (e.g. its lines 797, 942, 972). Whichever merges second breaks go build ./pkg/github/.... Since #10594 exists to restore the github coverage floor, the natural order is #10594 first, then rebase this and update those call sites.
What I verified as correct: reporterTrustWaitBudget.reserve() is nil-safe and is consulted after the existing-comment check (reporter_trust_wait.go:115-123), so re-polls of already-noticed issues do not burn budget; the comment-failure path now returns before recording reporter_trust_wait_noticed (line 145), and the label is rolled back first. recordWriteAudit, hiveWriteMeta, AuditActionHiveLabelApplied all exist on v5 (write_surface.go:215, write_surface_internal.go:30,57).
Question for a maintainer: is dropping #10587's live-generation consult in stableNextPromotionAt intended?
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
c5f717c to
d82fb0d
Compare
|
Shared CI incident: the red checks on this PR ( π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
d82fb0d to
74d2ddf
Compare
c6e4caa to
4a878a9
Compare
4a878a9 to
2c0fca4
Compare
There was a problem hiding this comment.
Conclusion: the reporter-trust change itself reads correctly, but this branch carries unrelated v5 baseline-repair hunks that now conflict with v5 HEAD (#10617 merged at 16:43Z) and with the open #10612. Recommend rebasing onto current v5 and dropping everything outside pkg/github + its docs before this is merged.
What I verified in the core change (src/pkg/github/reporter_trust_wait.go, client.go, write_surface_internal.go):
reporterTrustWaitBudgetis created once perEnumerateActionable(client.go:1015) and threaded intofetchIssuesβmarkReporterTrustAwaiting;reserve()is called only after the existing-comment check (reporter_trust_wait.go:115-118), so already-noticed issues don't burn budget. Nil-budget path returnstrue. Looks correct to me.- The new audit actions are added to
InternalWriteAuditActions()(write_surface_internal.go:80-81), and the comment-failure path nowreturns before recordingreporter_trust_wait_noticed(:145), which is the right ordering.
Out-of-scope hunks that will bite on merge (branch diverged from v5 at 9741881, 3 behind):
src/pkg/dashboard/feedback.goandsrc/pkg/hub/feedback.goβ this PR rewrites the login regexp to^[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?(?:\[bot\])?$.v5HEAD already has #10617's^[A-Za-z0-9](?:-?[A-Za-z0-9])*β¦on the same line (dashboard/feedback.go:85,hub/feedback.go:382), so this is a textual conflict. Note the two are not equivalent: this PR's version acceptsa--b(the[A-Za-z0-9-]{0,37}run permits consecutive hyphens, which GitHub rejects); #10617's does not. If the conflict is resolved in favour of this branch it is a small regression. Resolution should be: takev5's side and drop these two hunks.src/pkg/hub/stable_promotion.go:252-256β removes theghcrTagGeneration/stablePromotionEligibleBuildlookup fromstableNextPromotionAt. That changes runtime behaviour of stable-promotion scheduling, not reporter trust, and #10612 solves the same test-hermeticity problem by stubbing the var in the test instead. Both cannot land as-is; a maintainer should pick one approach.src/pkg/dashboard/static/index.html,webstatic/style_ratchet_test.go,agent_collapsed_tiles_test.go,dashboard/openapi.jsonβ #10612 touches the same four files with different hunks (e.g. this PR tokenizes.gov-agent-name-link/.config-tabs/.dashboard-grippadding; #10612 tokenizes.prt-role-select). These are competing baseline repairs, not duplicates.
Body vs diff: the body's bullets (budget, audit records, Hive-owned label clearing, docs) match the pkg/github diff. The body does not mention items 1β3 above, which is how I'd expect merge-base drift to look β the fix is a rebase, not a redesign.
Routing: @clubanderson (author) for the rebase; whoever owns stable-promotion for item 2. I have not changed anything on this PR.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
2c0fca4 to
6ff6536
Compare
6ff6536 to
aefcf19
Compare
Keep reporter-trust wait labels and comments on the fetchIssues reject path, cap new notices per poll, and audit the Hive-owned mutations.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Add coverage for the poller notice budget helper and refresh the shifted documentation citation reported by CI.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Andrew Anderson <andy@clubanderson.com>
aefcf19 to
419f1b9
Compare
Restore the feedback status route, refresh API citations, and replace invalid regexp lookahead reported by CI.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Andrew Anderson <andy@clubanderson.com>
419f1b9 to
320ec14
Compare
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Summary
github.Client.fetchIssuesreporter-trust reject path and share a 10-notice budget across the governor pollneeds-triagelabel mutations through the existing effects-backed comment/label mutation path, with internal write audit recordsneeds-triagelabels on the admitted path when the marker proves Hive added the labellabel is applied by github.Client.fetchIssues on the reporter-trust reject path, within one poll (β5 min), no agent involved.
Validation
gofmt -w/gofmt -lon changed Go filesgit diff --checkgo test; CI is the verdictFollow-up to #10537 / #10586.