Repository navigation
π fix: skip ok-to-test post from the read-only eligibility probe - #17674
Conversation
The read-only eligibility probe reached the ok-to-test post, where the mutation guard refused each tick and the caller logged a WARN, tripping unclassified_error_repeated. Skip before the first-seen mark so the live sweep still posts. Closes #17673 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 |
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. hive/awaiting-ci: CI pending β sweep will merge when green. π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 Review findings from Correctness review (read head The change itself is sound: Two notes for whoever triages #17673:
Review findings from Security perspective (read at head Advisory β branch/incident alignment (not a security blocker): the WARN quoted in #17673 ( Review findings from The code change is correct, but it lands on the wrong release line for the issue it closes. What I verified in the tree (PR head
Intent gap β the diagnostic in #17673 is not produced by v5 code. The issue's scrubbed WARN reads The good news: the v6 observe-only pass does set Changelog nit (low): I have not changed anything on this PR; flagging for a maintainer decision on the branch/issue-link question above. Evidence bundle `#176744a371ea` sha256:ee679a23a2c44c585aabb9caadebe9af0fc53f3ff135d3e0bcf2e702b7db5a60 β download from the dashboard or `hivectl review evidence #17674`. |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
Mutation testingAll 1 mutant(s) in changed files were killed. Verdict: |
There was a problem hiding this comment.
Read the tree, not just the diff. The fix is correct and minimal.
Why the WARN fired every tick: IntegrationEligibility builds an isolated engine via New(c.transport, options) (automerge_integration_eligibility.go:67), so its workflowApprovalCommands map is always empty. markWorkflowApprovalCommandSeen therefore returned first == true on every probe, postWorkflowApprovalCommand ran, and integrationEligibilityReadOnlyBoundary.Execute (:35) refused the KindIssueComment claim β the WARN at automerge_held_runs.go:426. Returning before the mark (automerge_held_runs.go:213) removes the attempt, and it also skips the ListComments scan and the postWorkflowApprovalUntrustedNote mutation on the same path, both of which the probe could never use anyway.
Probe reason is unaffected downstream: the caller at automerge_integration_eligibility.go:135 treats any reason other than integrationEligibilityCaptured as "not eligible", so always returning the required prefix from the probe (instead of occasionally untrusted-commenter) changes no decision.
One wording note (info): the changelog fragment says "the first-seen mark could swallow the real post". Because the probe engine is a separate Engine with its own maps, the live sweep's first-seen state was never touched by the probe in production, so that part did not happen; the real harm was the repeated refused post / WARN. The new test models a shared engine, which is fine as a regression guard, but the fragment overstates the symptom. Not blocking.
Looks correct to me.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
Review on #17674 found the WARN in #17673 ("observe-only pass on a repo whose auto-merge is off cannot mutate issue_comment") comes from the v6-only observeOnlyBoundary, not from the v5 eligibility probe, and that the probe runs on an isolated engine so its first-seen mark never swallowed the live post. Reword the changelog fragment and code comment as eligibility-probe hardening and remove the #17673 reference; the #17673 fix belongs on v6. Hive-Fix-Attempt: 1/6 Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Read workflowApprovalAttention and its two callers (automerge_held_runs.go:162,206), postWorkflowApprovalCommand (:415), and the probe plumbing in automerge_integration_eligibility.go. Looks correct to me.
- The early return at
automerge_held_runs.go:213sits beforemarkWorkflowApprovalCommandSeen, the comment-state scan,postWorkflowApprovalUntrustedNoteandpostWorkflowApprovalCommandβ i.e. before everyeffects.Executeon this path. UnderintegrationEligibilityReadOnlyBoundary(automerge_integration_eligibility.go:34-36) each of those would have returnedNotAppliedand hit the WARN at:432. - One thing worth having on record:
IntegrationEligibilitybuilds a fresh engine (New(c.transport, options),automerge_integration_eligibility.go:63), so the probe never sharedworkflowApprovalCommandswith the live sweep. That means there was no first-seen poisoning of the live path before this change; the fresh engine simply sawfirst=trueon every probe tick and attempted the refused post each time. The fix is therefore purely the WARN/attempt suppression the body describes, and the live sweep's behaviour is unchanged β consistent with the existing probe short-circuit pattern atautomerge_sweep_queued.go:648. - The returned reason (
workflowApprovalRequiredPrefix) matches what a fresh probe engine would have produced on its first tick anyway (untrusted/grace state can never be set on it), so eligibility output is unaffected.
The test exercises probe-then-live on one engine, which is stricter than production (separate engines) and still passes by construction, since the mark is skipped entirely.
Body is candid that this does not close #17673 (the WARN there comes from the v6 observeOnlyBoundary); I have not verified the v6 side.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
The read-only integration eligibility probe could reach the
/ok-to-testworkflow-approval post inworkflowApprovalAttention; the probe's mutation boundary refuses the comment and the caller WARNs on every tick. The probe now returns before the first-seen mark so no refused post is attempted; the live sweep still posts. Live behaviour is unchanged.Note: this is eligibility-probe hardening on v5 only. The fleet WARN in #17673 (
observe-only pass on a repo whose auto-merge is off cannot mutate issue_comment) is emitted by the v6-onlyobserveOnlyBoundary, so this PR does not close #17673 β that needs a separate fix on v6 gatingworkflowApprovalAttentiononc.observeOnly/integrationEligibilityProbe(ctx).Related: #17673
β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88