Skip to content

πŸ› fix(ci): port DCO provider-unavailable classification to v6 policy script - #16467

Merged
hivecommons-hive[bot] merged 1 commit into
v6from
backport/v6-16404-dco-provider-unavailable
Nov 3, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
v6from
backport/v6-16404-dco-provider-unavailable

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Backport of the policy-script half of #16442 (head 0ac19dfa36e6fbe46e50120ddced291fac3a7bdb) to v6, so that v6 receives it before #16442's workflow change becomes the default-branch definition.

Why this has to land first. .github/workflows/native-queue-policy.yml has never existed on v6, yet native-queue-policy runs on v6-base PRs (e.g. run 41684812577 on #16378: path: .github/workflows/native-queue-policy.yml, checkout ref: refs/heads/v6). GitHub takes the pull_request_target workflow definition from the default branch (v5) and the job then checks out the PR base branch's scripts. #16442's yml does const { evaluate, PendingEvidence, ProviderUnavailable } = require(...) and error instanceof ProviderUnavailable inside the catch; against v6's current script ProviderUnavailable is undefined, which throws TypeError: Right-hand side of 'instanceof' is not an object and replaces the bounded wait for pending evidence on every v6-base PR. With this port in place v6's script exports the class, and a v6-base PR hitting the DCO App's 250-commit enumeration ceiling reports DCO provider unavailable / verdict UNKNOWN instead of a bare DCO: failure.

What is included (identical content to #16442 at 0ac19dfa3):

  • .github/scripts/native-queue-policy.cjs: ProviderUnavailable + dcoEnumerationUnavailable, thrown only after the App-1861 / exact-head trust check and the completed check. Admission still fails; an unrecognised summary still falls through to DCO: failure.
  • .github/scripts/native-queue-policy.test.cjs: the two regression tests.
  • .github/scripts/diagnose-dco-provider.cjs + test: read-only enumeration reproducer, wired only into node --test.
  • docs/operations/dco-provider-unavailable.md: operator runbook referenced by the error message.

Deliberately excluded on v6: the yml (not present on v6; v5's definition is what runs), pr-auto-update-test.yml wiring and the src/docs/native-merge-queue.md paragraph (v6's copies have diverged; the v5β†’v6 top-up #16378 carries them).

No workflow, permission, protection or trust change. UNKNOWN still fails admission. This does not unblock #16378 by itself; a genuine current-head App-1861 DCO success is still required there.

Refs #16404

…script

Backport of the policy-script half of #16442 (head 0ac19df) to v6:
native-queue-policy.cjs gains ProviderUnavailable and the narrow
dcoEnumerationUnavailable classifier (applied only after the App-1861 /
exact-head / completed checks; still fails admission), its regression
tests, the read-only diagnose-dco-provider reproducer and its tests, and
the operator runbook.

Why v6 first: .github/workflows/native-queue-policy.yml exists only on
v5 and is the default-branch definition GitHub uses for every
pull_request_target run, while the job checks out the PR base branch's
scripts. Once #16442's yml lands on v5 it imports ProviderUnavailable
from the checked-out script; on a v6 base that must exist, otherwise
'error instanceof undefined' throws inside the catch and breaks the
bounded wait for pending evidence on every v6-base PR. Landing this
first keeps v6-base admission intact and lets v6 report the ceiling
case as UNKNOWN honestly.

No workflow, permission, protection or trust change. Refs #16404.

Signed-off-by: clubanderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 3, 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 kellyaa 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

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v6

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

PR Title Relation Files
#16378 🌱 Top up v6 with the latest v5 snapshot CONFLICT .github/scripts/native-queue-policy.cjs
.github/scripts/native-queue-policy.test.cjs

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 3, 2026

@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.

Read this against v6 at the merge-base and against #16442's head 0ac19dfa3. The backport is faithful and looks correct to me.

What I verified

  • The native-queue-policy.cjs and .test.cjs hunks applied here are line-for-line identical to #16442's hunks against v5 (git diff origin/v6 e2f84dd vs git diff origin/v5 0ac19dfa3, added/removed lines compared). The remaining difference between the two resulting files (closedNoop, isTransientAPIError/evaluateOnce) is pre-existing v5/v6 divergence, not something this port dropped.
  • diagnose-dco-provider.cjs, its test and docs/operations/dco-provider-unavailable.md are byte-identical to #16442.
  • Guard ordering in .github/scripts/native-queue-policy.cjs:92-96: dcoEnumerationUnavailable is only consulted after the App-1861/exact-head check and the completed check, and it can only throw β€” there is no path by which the summary text becomes passing evidence. An unmatched failure summary still reaches the plain DCO: failure throw (covered by the last assertion in the new UNKNOWN reporting requires… test).
  • node --test .github/scripts/ on this head: 26 pass, 0 fail.
  • The sequencing claim in the body holds: .github/workflows/native-queue-policy.yml does not exist on v6, and v5's current definition (line 41) destructures only { evaluate, PendingEvidence }. Once #16442 lands on v5 it destructures ProviderUnavailable and does error instanceof ProviderUnavailable in the catch; with v6's script not exporting it that is instanceof undefined β†’ TypeError on every v6-base run. With this port merged first, v6 exports the class and the check degrades to the intended UNKNOWN message. Until #16442 merges, a ProviderUnavailable thrown on v6 just propagates as a non-PendingEvidence failure β€” admission stays blocked either way.
  • diagnose-dco-provider.cjs shells out via execFileSync('gh', args) with owner/repo restricted to [\w.-]+ and number to a positive safe integer, so no argument injection; the GraphQL document is a read-only query.

No workflow, permission or protection surface changes in this diff. Sequencing (this before #16442, and how #16378 picks up the excluded yml/doc paragraph) is a maintainer call; nothing in the code blocks it.

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

@hivecommons-hive

hivecommons-hive Bot commented Nov 3, 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-2 (folded here because this head already carries its hive review):

Read the v6 tree at the PR head (e2f84dd) rather than only the diff; this looks correct to me, and the body's claims check out.

What I verified

  • The hunks added to .github/scripts/native-queue-policy.cjs and .test.cjs are line-for-line the same as πŸ› fix(ci): report unavailable DCO enumeration without weakening admissionΒ #16442's hunks against v5 (compared +/- lines of both diffs). The whole files differ only because v6 is already 29/59 lines behind v5 in these two files (the evaluateOnce/isTransientAPIError/closedNoop drift that 🌱 Top up v6 with the latest v5 snapshotΒ #16378 carries) β€” pre-existing, not introduced here. diagnose-dco-provider.cjs, its test and docs/operations/dco-provider-unavailable.md are byte-identical to πŸ› fix(ci): report unavailable DCO enumeration without weakening admissionΒ #16442.
  • Guard order in evidenceForHead (native-queue-policy.cjs:91-96): the new ProviderUnavailable throw sits after the run.app?.id !== app || run.head_sha !== head check and the status !== 'completed' pending check, and before the generic ${name}: ${run.conclusion} failure. So the classification can only ever turn an authoritative App-1861 exact-head failure into a different failure β€” there is no path from it to a success return, and a plain sign-off failure still falls through to DCO: failure (covered by the last assertion in the new "UNKNOWN reporting requires…" test).
  • node --test .github/scripts/ at the head: 26/26 pass, including the two new policy tests and the diagnose test.
  • Premise of the ordering argument: origin/v5:.github/workflows/native-queue-policy.yml:41 currently requires only { evaluate, PendingEvidence }; πŸ› fix(ci): report unavailable DCO enumeration without weakening admissionΒ #16442's yml (:41,:49) adds ProviderUnavailable and does error instanceof ProviderUnavailable. With v6's script lacking the export that would be instanceof undefined β†’ TypeError on every v6-base PR hitting the catch. Landing this before πŸ› fix(ci): report unavailable DCO enumeration without weakening admissionΒ #16442 does avoid that.
  • diagnose-dco-provider.cjs: execFileSync('gh', …) with owner/repo gated by /^[\w.-]+$/, PR number by Number.isSafeInteger, parent limit by [2,100].includes β€” no shell, no interpolation of unvalidated input. Read-only endpoints only.

One sequencing note (not a defect)

conflicts-with-open-pr is accurate: #16378 also edits the module.exports block of native-queue-policy.cjs and the import block of the test (git merge-tree pr16378 pr16467 β†’ conflict). Both are additive, so whichever lands second needs a trivial rebase that keeps both export lists; no semantic clash.

No workflow, permission or protection file changes; UNKNOWN still fails admission as stated.

Evidence bundle `#16467e2f84dd` sha256:9067839e5b43f5eadaf5bc262f4f4620944f887992b9ad6ee0943178b2f52f25 β€” download from the dashboard or `hivectl review evidence #16467`.

@hivecommons-hive
hivecommons-hive Bot merged commit 5c963b7 into v6 Nov 3, 2026
81 of 84 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the backport/v6-16404-dco-provider-unavailable branch November 3, 2026 21:07
@github-actions

github-actions Bot commented Nov 3, 2026

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

clubanderson added a commit that referenced this pull request Nov 3, 2026
…the top-up

Plain merge of origin/v6 (5c963b7) into the v5->v6 top-up; the only
conflicts were the additive export/import lists in
.github/scripts/native-queue-policy.cjs and its test, resolved to the
union, which is byte-identical to v5 after #16442 (ed048ec).

Signed-off-by: clubanderson <andy@clubanderson.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicts-with-open-pr Open PR has a merge conflict with another open PR dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant