Skip to content

🐛 fix: enable tool-less Copilot ioscan classifiers - #14502

Closed
thatguywob wants to merge 3 commits into
hivecommons:v5from
thatguywob:fix/14499-copilot-classifier
Closed

thatguywob wants to merge 3 commits into
hivecommons:v5from
thatguywob:fix/14499-copilot-classifier

Conversation

@thatguywob

Copy link
Copy Markdown
Contributor

Fixes #14499

Copilot-only hives at ACMM L5+ can now run the ioscan classifier through Copilot CLI with tools and built-in MCPs disabled, a scrubbed environment, and the prompt passed as a -p argument. Only Copilot subscription credentials are forwarded; hive GitHub tokens remain excluded.

When no endpoint or explicit classifier backend is configured, boot selects a supported configured agent CLI in agent-name order. Explicit backend settings and HTTP endpoint priority are preserved. A required classifier that cannot be constructed raises a persistent dashboard error explaining that kicks are blocked and how to restore classification or configure fail-open.

Added regression coverage for Copilot arguments/environment/prompt delivery, fallback and endpoint precedence, explicit backend selection, and alert lifecycle. Updated operator documentation and added a changelog fragment.

Validation: gofmt and git diff --check passed. Tests are reserved for CI by AGENTS.md and were not run locally.

— hive: backend=codex model=gpt-6.1-sol


🐝 Hive Agent: contributor | SHA: 959d3d8c2

Fall back to a configured tool-less agent CLI when no classifier endpoint is available and surface unavailable fail-closed classifiers on the dashboard.

Hive-Run: hivecommons#14499
Hive-Plan: issue-14499-proposed-fix
Hive-Spec: issue-14499#proposed-fix
Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
Signed-off-by: thatguywob <thatguywob@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 27, 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 clubanderson 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@thatguywob is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this repository have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply.

@hivecommons-hive hivecommons-hive Bot added author/clanker A contributor's own hive authored this PR under their login 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 stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@thatguywob this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Failing checks:

  • test (dashboard shuffle 1/3)

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Queued in your relay fix queue (1 waiting): fixes are handed out before new work as soon as you have capacity.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Another agent tried to open a PR from scanner/fix-14499, but this PR already closes #14499. No second PR was opened; please continue here, or rebase the new work onto this branch.

Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act labels Oct 27, 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.

Decision needed: @clubanderson should decide whether #14502 should be closed in favour of #14501, which makes the same #14499 change plus the dashboard settings UI/validation updates this PR omits.

This appears to duplicate #14501, which makes the same change for #14499. I read both diffs in full against v5:

  • src/pkg/ioscan/cli_client.go — both add copilot to cliToollessArgs with an --available-tools sentinel that names no tool, --disable-builtin-mcps --no-custom-instructions --no-ask-user --no-auto-update, silent output, prompt delivered as the -p value instead of stdin, and a copilot entry in cliEnvAllowlist that excludes GH_TOKEN/GITHUB_TOKEN.
  • src/cmd/hive/ioscan_classifier_boot.go — both fall back to a configured agent's tool-less backend when ioscan.classifier.backend is empty and ResolveReviewer() yields no endpoint, and both raise/clear a persistent dashboard SystemAlert when the fail-closed classifier cannot run.

Concrete differences I verified:

  • This PR does not touch src/pkg/dashboard/static/index.html: the Classifier backend <select> (index.html:48996-48999 on v5) still has no copilot option and the help text at :48995 still says "copilot, codex and gemini cannot run without tools and are refused at boot", which becomes untrue once this merges. The rejection message in src/pkg/dashboard/api_governor_security.go:128 likewise still reads "must be empty or claude". #14501 updates all three.
  • Fallback choice: this PR takes the first tool-less backend in agent-name order (ioscan_classifier_boot.go fallback loop); #14501 takes the backend most agents use, ties by name. Alert IDs differ (ioscan-classifier-unavailable vs ioscan-classifier-blocked). Both are reasonable; they cannot both land.
  • #14501 is by the repository owner, has a passing CI run on its head, and includes a live tool-lessness verification in its body; this PR is stage/072-returned-to-contributor with its CI run still queued.

Flagging for a maintainer: if you agree, this one could be closed in favour of #14501. I have not closed anything.

— 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

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 #14502 is closed in favour of #14501, which makes the same #14499 change with broader dashboard coverage.

This appears to duplicate #14501, which makes the same change for #14499 and cannot merge alongside it (both rewrite the same hunks of src/pkg/ioscan/cli_client.go, src/cmd/hive/ioscan_classifier_boot.go and src/cmd/hive/main.go).

I read both diffs in full. Same semantic change in both:

  • copilot added to cliToollessArgs with --available-tools <sentinel> --disable-builtin-mcps --no-custom-instructions --no-ask-user --no-auto-update --no-color -s/--silent, prompt delivered via -p instead of stdin (cli_client.go:152-160 here; cli_client.go:201-213 in #14501)
  • COPILOT_HOME / COPILOT_GITHUB_TOKEN added to cliEnvAllowlist, hive GH_TOKEN/GITHUB_TOKEN still excluded
  • boot falls back to a configured agent's tool-less backend when ioscan.classifier.backend is empty and ResolveReviewer() yields no endpoint
  • persistent dashboard SystemAlert when the classifier is fail-closed and cannot run

Differences I verified, all in #14501's favour:

  • src/pkg/dashboard/static/index.html:48998 — this PR leaves the Settings → Security <select> without a copilot option, so an operator who picks copilot still sees "copilot — refused at boot" even though boot now accepts it. #14501 adds the option and updates the help text and the api_governor_security.go:128 error string (which here still says "must be empty or claude").
  • src/cmd/hive/main.go:2778 — this PR passes b.dashSrv (a *dashboard.Server) straight into the variadic ioscanAlertSink slice; ClearSystemAlert is then called unconditionally at ioscan_classifier_boot.go:32, and Server.ClearSystemAlert (server.go:2669) locks s.systemAlertsMu on the receiver. #14501 nil-guards the alerter before use (main.go:2778-2781, raiseIoscanClassifierAlert/clearIoscanClassifierAlert). Only matters if newServer ever returns nil, so I note it as a difference, not a defect.
  • Fallback choice: this PR takes the first supported backend in agent-name order (ioscan_classifier_boot.go:52-62); #14501 takes the backend most agents use, ties by name. Either is defensible; the issue does not specify.

#14501 is the repository owner's own PR, carries a hand-verified tool-lessness log for Copilot CLI 1.0.103, and is already green on build/test/coverage. Flagging for a maintainer: if you agree, this one could be closed in favour of #14501. I have not closed anything.

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

This PR conflicts with v5 itself. Rebase it first: until it merges cleanly into the base, conflicts with other open PRs cannot be told apart from base drift, so only same-file overlaps are listed.

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
#14524 feat(hub,agent): Hub-coordinated live CLI session pool for multi-tenant runner capacity same files src/cmd/hive/main.go

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 27, 2026
@hivecommons-hive hivecommons-hive Bot added stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Needs a decision, not a merge:

Head: verdict requires_human @9147b51, 47/49 checks green, 2 pending, DCO yes, soak 0s of 30m0s.

How to release it:

  • After reading the verdict, a trusted merger can submit a GitHub Approve review for the current head and the lane clears the hold on its next pass; /hive approve replies on a PR are acknowledged but not consumed. An ordinary contributor cannot release their own PR.

Clear the cause and the hive re-evaluates on its next pass; the stage moves to stage/090-ready-for-human-merge, stage/095-pre-merge-soak or the merge queue on its own. Approval does not bypass CI, hold labels or other merge gates.

@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 27, 2026
@hivecommons-hive hivecommons-hive Bot added stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act and removed stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue labels Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@thatguywob this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Review asks:

  • the branch conflicts with the base and needs a rebase

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Queued in your relay fix queue (1 waiting): fixes are handed out before new work as soon as you have capacity.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Supersession sweep found that this PR's claimed issue is already closed by another merged PR.

  • Claimed issue: hive#14499
  • Closing PR: #14501

Decision needed (@hivecommons): #14501 already merged and closed the claimed issue, but this PR touches files the merged PR did not. Recommended: keep open until the extra changes are reviewed, or close as superseded if they are not wanted. Another option: merge anyway.

Files the merged PR did not touch: changelog.d/fixed-14499-copilot-ioscan.md, src/pkg/config/config.go.

This comment is edited in place by the supersession sweep; it is not duplicated.

@hivecommons-hive hivecommons-hive Bot added needs-human stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue and removed stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act labels Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Hive filed review findings that do not block this PR as backlog items:

Cap: 10 backlog item(s) per PR per day.

@clubanderson

Copy link
Copy Markdown
Member

/hive decision close — superseded by #14501 (merged), which makes the same #14499 change with broader dashboard coverage. Thanks @thatguywob; nothing further needed here.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

/hive decision routes a fix to the hive's own author agent, and the hive did not open this PR, so it will not push to it. The PR-side equivalents are reviews: Approve head 9147b51 to let it merge as-is, or leave a changes requested review and the author is nudged with your text. See https://github.com/hivecommons/hive/blob/v5/src/docs/maintainer-commands.md.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@hivecommons-hive hivecommons-hive Bot added stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act and removed stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue labels Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@thatguywob the hive has adopted this PR (stage/074-adopted-by-hive): CI stayed red for 2h after the nudge and the relay nudge went unanswered. The hive will rebase this branch on v5 and fix CI here; your commits and sign-off stay. Push a new head yourself at any time and the hive yields it back to you.

@hivecommons-hive hivecommons-hive Bot added stage/074-adopted-by-hive Contributor PR adopted: author unavailable after red CI; the hive is finishing it (takeover path) and removed stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act labels Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Closing per the maintainer ruling above (/hive decision close): superseded by #14501, merged to v5 at 2026-10-27T02:16Z, which lands the same #14499 fix (issue now closed). Nothing further to rebase here — thanks @thatguywob.

@hivecommons-hive hivecommons-hive Bot closed this Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. needs-human needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) size/L Denotes a PR that changes 100-499 lines, ignoring generated files. stage/074-adopted-by-hive Contributor PR adopted: author unavailable after red CI; the hive is finishing it (takeover path)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ioscan: Copilot-only hives at ACMM L5+ have no classifier backend, so kicks are silently blocked

2 participants