Skip to content

🐛 fix(ci): native-queue-policy names a red provider as a per-PR verdict - #18281

Merged
hivecommons-hive[bot] merged 2 commits into
v5from
fix/native-queue-policy-provider-verdict-18280
Nov 15, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
v5from
fix/native-queue-policy-provider-verdict-18280

Conversation

@Danathar

Copy link
Copy Markdown
Contributor

Summary

native-queue-policy was red on #17512, #18273, #18275 and #18278, and the scanner filed that as one shared-CI incident (#18280). It isn't one. The gate gave the right verdict on every PR, and each failure traces back to that PR's own provider. The real problem is how the failure was reported: a red provider was thrown as a bare Error('DCO: action_required'), which prints as Unhandled error with a stack trace and looks like a broken workflow. #18128 / #18134 fixed the same kind of misfiling for the ineligibility path; this covers the provider-verdict path.

Root cause per PR

PR Base Log line Underlying state Gate correct?
17512 v5 #17512: head/base moved, draft, closed, or held (run 42751483260, 2026-11-10, before #18134) draft, do-not-merge/work-in-progress yes
18273 v5 Error: DCO: action_required (run 43730603419) probot DCO check is fail on the head yes
18275 v6 Error: DCO: action_required (run 43730709304) probot DCO is fail. The head is topup/v5-to-v6-20261115, opened by a human, so the narrow sync/v5-to-v6 forward-merge path (Decision B on #17030) correctly doesn't apply yes
18278 v5 Error: changelog-fragment-guard: failure (run 43730895376) changelog-fragment-guard is fail on the head yes

No base-branch run exists because the workflow triggers only on pull_request_target and merge_group, so that's expected. The four PRs don't share a cause.

Change

  • .github/scripts/native-queue-policy.cjs: evidenceForHead and assertProwDCO now throw a new ProviderVerdict instead of a plain Error. The message keeps the <provider>: <conclusion> prefix, so existing greps and the forward-merge [DCO path: ...] suffix still work. It then adds the head and per-PR provider verdict, not a shared CI incident: fix it on this PR; the next push re-evaluates.
  • .github/workflows/native-queue-policy.yml: the evidence-wait step handles ProviderVerdict the same way it already handles ProviderUnavailable. It writes a job summary (Admission blocked: DCO is action_required on this PR) and calls core.setFailed, instead of rethrowing into an unhandled stack trace.
  • Tests: a new node test checks four providers and conclusions (subclass, not PendingEvidence, prefix, note) and that path-scoped skipped build checks still pass. The three exact-message assertions now expect the new wording. A new Python workflow test asserts the step reports ProviderVerdict through setFailed before the pending/rethrow branch.

Deliberately unchanged: the conclusion stays failure. This is a required check, and neutral/skipped would count as passing. ProviderVerdict is not PendingEvidence, so a completed red verdict still fails at once and doesn't hold the job for 22.5 min.

Testing: per AGENTS.md, CI is the verdict. Locally I only ran node --check on both .cjs files, a parse of the workflow YAML and Python test, and a smoke check of the new error class. The workflow's own Test policy behavior step runs the node suite, but it checks out base-branch scripts, so this PR's run still uses the old code. The updated node tests show up in the unit-test CI job.

No changelog fragment: everything changed is under .github/, which the fragment guard exempts automatically.

Fixes #18280

🤖 Generated with Claude Code

— hive: backend=claude model=claude-opus-5-5


🐝 Hive Agent: contributor | SHA: 1d30d135c

native-queue-policy went red on #17512, #18273, #18275 and #18278 and the
scanner filed it as one shared-CI incident (#18280). The gate was right
every time: #17512 is a draft carrying do-not-merge/work-in-progress,
#18273 and #18275 have probot DCO action_required, and #18278 has
changelog-fragment-guard failure. The defect was the surface. A red
provider was thrown as a bare `Error('DCO: action_required')` and printed
as "Unhandled error" with a stack trace, which reads like a broken workflow.

evidenceForHead and assertProwDCO now throw a ProviderVerdict naming the
provider, its conclusion, the head, and that this is a per-PR verdict and
not a shared CI incident. The evidence-wait step reports it with a job
summary and core.setFailed instead of rethrowing. The conclusion stays
failure: this is a required check.

Hive-Run: #18280
Hive-Plan: shared-ci incident triage
Hive-Spec: native-queue-policy#provider-verdict
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 15, 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 Nov 15, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor
1d30d13

ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blocked

Hive flagged this PR (author @Danathar, head 1d30d135cd16) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • sensitive_path — changes 1 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • .github/workflows/native-queue-policy.yml

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Decision needed: @clubanderson should decide whether a change to the required native-queue-policy workflow (.github/workflows/native-queue-policy.yml) may land, since it alters how a red admission provider is reported on a required check.

I read the changed workflow step at the PR head (native-queue-policy.yml:71-107) and the two throw sites in native-queue-policy.cjs (evidenceForHead, assertProwDCO). I found no defect.

  • The new ProviderVerdict catch sits before the PendingEvidence branch and returns after core.setFailed, so the job still fails on a red provider. It cannot turn a failure into a pass.
  • ProviderVerdict is not a PendingEvidence, so a completed red verdict does not enter the 90×15s wait. That matches the old plain Error, which was rethrown at once.
  • The <provider>: <conclusion> prefix is preserved, and the forward-merge [DCO path: …] suffix is still appended, as the updated test regex expects.
  • The tests cover the subclass, the non-pending property and the path-scoped skipped case.

I'm routing it only because it edits a workflow on a required check, which is a trust surface. As the PR says, its own run exercises the old base-branch script, so the new behaviour is not self-verified.

— hive: agent=reviewer-2 backend=claude model=claude-sonnet-5-5 claude=2.1.325

@hivecommons-hive

hivecommons-hive Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

Review findings from reviewer (folded here because this head already carries its hive review):

The change looks correct to me; it routes to a human only because it edits the admission workflow, which is a trust surface.

What I verified (read at the PR head):

  • native-queue-policy.cjs:151-154 now throws ProviderVerdict where it threw a bare Error for a completed non-success provider; the path-scoped skipped exemption for BUILD_CHECKS is unchanged, and the new test covers it.
  • ProviderVerdict is not a PendingEvidence, so native-queue-policy.yml still fails immediately on a red provider rather than polling 90 × 15 s. Before, the bare Error also fell through to throw error, so the retry behaviour is unchanged. Only the message and the job summary change.
  • The new branch sits before the PendingEvidence check, and test-native-queue-workflows.py pins that order.
  • The workflow's permissions, triggers and pinned actions are untouched.

Suggestion, not a defect: the existing assertions on 'DCO: failure' and 'DCO: action_required' were updated in the diff, so any other consumer matching those exact strings would need the same update. I searched only the files in this diff.

Evidence bundle `#1828178930be` sha256:c62ff1b89870af63bf581643778449f99231d9f1ad03e69a6d6c3f719dab338f — download from the dashboard or `hivectl review evidence #18281`.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Decision needed: @clubanderson @Danathar (CODEOWNERS for .github/workflows/**) should confirm this change to the native-queue-policy admission gate is acceptable to land, since it edits a trust-surface workflow.

I read the change in the tree at the PR head. The code looks correct to me; it is routed only because it edits .github/workflows/native-queue-policy.yml, which CODEOWNERS assigns to a human.

What I checked:

  • .github/workflows/native-queue-policy.yml:93: the new ProviderVerdict branch sits inside the same catch as ProviderUnavailable (line 85) and returns after core.setFailed. It precedes the PendingEvidence/rethrow check at line 104, so a completed red provider still fails at once and does not wait out the 90 × 15 s loop. The conclusion stays failure, so the required check does not turn green.
  • .github/scripts/native-queue-policy.cjs:267 appends [DCO path: …] to error.message after construction. That still works on a ProviderVerdict, and the updated test regex (prow dco: failure on .*per-PR provider verdict.*DCO path: prow dco) matches that ordering.
  • The earlier catch at workflow line 62 belongs to the cosmetic-label replay step, which never calls evidenceForHead, so it is unaffected.
  • The PR body says the new tests do not exercise the new workflow code on this run, because the step checks out base-branch scripts. I agree; the new Python test (test-native-queue-workflows.py) asserts only the ordering of the setFailed call against the PendingEvidence check, as text.

No defects found. Open question for the owner: the wording not a shared CI incident in a failure message is a policy statement shown to every contributor, so the owners may want to confirm they are happy with it.

— hive: agent=reviewer-2 backend=claude model=claude-sonnet-5-5 claude=2.1.325

@hivecommons-hive
hivecommons-hive Bot merged commit 4da44cf into v5 Nov 15, 2026
84 of 85 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/native-queue-policy-provider-verdict-18280 branch November 15, 2026 16:03
@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @Danathar holds role owner and GitHub permission maintain on repo; CI green at 78930be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

[shared-ci] native-queue-policy failing across hivecommons/hive

1 participant