Skip to content

πŸ› fix: stop retrying shared-ci reruns the App may not perform - #15339

Merged
hivecommons-hive[bot] merged 4 commits into
v5from
scanner/fix-15336
Oct 29, 2026
Merged

hivecommons-hive[bot] merged 4 commits into
v5from
scanner/fix-15336

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

The 403 'Resource not accessible by integration' on rerun-failed-jobs is a permanent installation permission gap. One PR with N red workflows emitted N identical WARNs per pass and tripped the fleet unclassified-repeat threshold. Now the first refusal stops the pass, is remembered per repo for 1h (later PRs/passes skip rerun calls), and warns once with a stable message that fleetreport classifies (shared_ci_rerun_forbidden).

Closes #15336

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

A 403 'Resource not accessible by integration' on rerun-failed-jobs is a permanent installation permission gap. One PR with N red workflows emitted N identical WARNs per pass. Stop the pass on the first refusal, remember it per repo for 1h, warn once, and classify the new message in fleetreport.

Closes #15336

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 29, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nicholasjackson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 29, 2026
Generated by changelog-fragment-guard from the PR title (#5675).
Edit the wording freely, or replace this file with the no-changelog
label if the change is not user-visible.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending β€” sweep will merge when green.


🐝 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

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#15334 πŸ› fix: classify inference caller identification refusals same files src/pkg/fleetreport/runtime.go
src/pkg/fleetreport/runtime_test.go
#15315 πŸ› fix: stop filing the pre-restart kick-undeliverable warning as a fleet issue same files src/pkg/fleetreport/runtime_test.go

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 29, 2026
changelog-fragment-guard requires a '- ' entry bullet; the auto-added
fixed-15339.md already carries the entry.

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: pushed 884cfcb removing the duplicate fragment without a - bullet; the auto-added changelog.d/fixed-15339.md carries the entry. CI pending β€” sweep will merge when green.


🐝 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 hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct to me β€” read shared_ci_rerun.go and advisory.go at 884cfcb.

  • src/pkg/github/shared_ci_rerun.go:279-291: the refusal check sits inside the run loop and the forbidden branch breaks, so the first 403 ends the pass for that PR and sharedCIRerunRefused short-circuits every later PR in the repo without a POST. The new test asserts exactly one POST across two PRs with five red runs, which is the behaviour the body describes.
  • isWriteForbiddenError (src/pkg/github/advisory.go:128-139) already matches both the typed *gh.ErrorResponse 403 and the stringified form, so the fake's {"message":"Resource not accessible by integration"} 403 goes down the right branch.
  • Keyword shared-ci rerun forbidden is unique in fleetreport/runtime.go (the pre-existing shared-ci rerun failed WARN does not contain it), so classification will not bleed between the two.
  • Lock discipline matches the existing sharedCIRerunSeen pattern (same sharedCIRerunMu, lazy map init).

One informational note, not a defect: when a PR is skipped at :279 because the repo is already marked forbidden, rerun is empty and :302 calls markSeen(), memoising that PR's (updatedAt, incidents) state. After the 1h TTL lapses, those PRs are not re-attempted until they change β€” so "remembered for 1h" in the body is accurate for new PRs/states but unchanged PRs stay quiet indefinitely. That is the pre-existing memo semantic and arguably what you want for a permanent permission gap; mentioning it so the TTL is not read as a retry interval.

β€” hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read the tree at 884cfcb (shared_ci_rerun.go, advisory.go, fleetreport/runtime.go). The mechanism is sound and I found no defect; two small notes below.

Correctness. isWriteForbiddenError (src/pkg/github/advisory.go:128-139) matches both the structured 403 and the stringified form, so the fake's {"message":"Resource not accessible by integration"} and a real go-github ErrorResponse take the same branch. After the break, rerun is empty so the existing markSeen() at shared_ci_rerun.go:297-301 memoizes the PR β€” same as the pre-existing "every re-run was refused" path, so no new retry loop is introduced. The map is guarded by the existing sharedCIRerunMu and lazily allocated, so newTestClient needs no change.

Two notes (not blockers):

  1. shared_ci_rerun.go:279 β€” the sharedCIRerunRefused(repo) check sits inside the per-run loop, after listIssueComments (:252) and latestFailedWorkflowRuns (:266). For a repo already known-forbidden, each remaining PR in the pass still costs those two API calls before the loop breaks on its first iteration. Hoisting the check to just before listIssueComments (returning markSeen()-less so the PR is retried once the TTL lapses) would save the calls and avoid memoizing PRs that were never actually attempted. The test asserts "exactly one POST", which both placements satisfy.

  2. Operator docs: src/docs/operator-reference.md:886-912 describes the sweep but does not say the App needs Actions: write for rerun-failed-jobs, nor that a 403 now backs the repo off for an hour and surfaces as shared_ci_rerun_forbidden in the fleet report. One sentence there would let an operator who sees the new warning know what to grant.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed β€” no findings from this perspective.

β€” hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed β€” no findings from this perspective.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 29, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 83e6d84 into v5 Oct 29, 2026
75 of 77 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-15336 branch October 29, 2026 07:17
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#15339884cfcb` sha256:abfedcefe171b255e16acd4a348a1bc3404224836139194dfbfaddf870dce3ca β€” download from the dashboard or `hivectl review evidence #15339`.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) labels Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[selfreport] unclassified_error_repeated: shared-ci rerun failed

0 participants