From 166efa0bc65622c1d4daef7751b98146e99f2dc8 Mon Sep 17 00:00:00 2001 From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2026 14:27:51 -0400 Subject: [PATCH] fix(fleetreport): classify the ioscan classifier fail-open warning Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- changelog.d/fixed-14620.md | 1 + src/docs/fleet-report.md | 2 +- src/pkg/fleetreport/runtime.go | 2 +- src/pkg/fleetreport/runtime_test.go | 2 ++ 4 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelog.d/fixed-14620.md diff --git a/changelog.d/fixed-14620.md b/changelog.d/fixed-14620.md new file mode 100644 index 0000000000..fb0fed598d --- /dev/null +++ b/changelog.d/fixed-14620.md @@ -0,0 +1 @@ +- The self-report classifier now files the `ioscan classifier failed open` warning under `ioscan_classifier_unavailable` instead of as an unclassified repeated error ([#14620](https://github.com/hivecommons/hive/issues/14620)); the warning itself is already logged once per process. diff --git a/src/docs/fleet-report.md b/src/docs/fleet-report.md index 551d1f1948..3c23998ed4 100644 --- a/src/docs/fleet-report.md +++ b/src/docs/fleet-report.md @@ -146,7 +146,7 @@ title is `[selfreport] : `. | `feedback_issue_refresh_failed` | the dashboard's feedback-issue watcher failed to refresh or update a feedback issue (`feedback: issue refresh failed`, `pkg/dashboard`), repeated ≥5 times in 10 min. Log-fed: same repeat threshold and idle clear as `agent_pane_timeout` | medium | | `github_app_repo_not_covered` | the GitHub App recheck (`state=repo-not-covered`) found the installation does not include every configured repo — an operator configuration condition (tick the repos in the App's repository access), not a hive defect. Log-fed: same ≥5-in-10-min repeat gate and 20-minute idle clear as `agent_pane_timeout` | low | | `github_app_not_installed` | a per-agent scoped-token mint was attempted while the GitHub App has no installation ID (`installation_id` 0): the App is not installed on the hive's org, or discovery never found it. An operator configuration condition — install the App or set `github.installation_id` — not a hive defect. Key is the agent name; reported on the first observation and cleared by the next successful mint. The runtime logs the matching WARN once per agent instead of every supervisor tick (#14186) | medium | -| `ioscan_classifier_unavailable` | the ioscan model classifier failed closed (`ioscan classifier failed closed; text withheld`, `pkg/scheduler/ioscan_enforce.go`) — typically no model endpoint resolved — so untrusted text is withheld. The scheduler logs `ioscan fail-closed blocked kick` (`pkg/scheduler/templates.go`) when it withholds a kick for the same reason, which maps to this class too. The WARN is already deduped per failure by `warnOnce` (once per process), so it is reported on the first observation (`MinCount` 1) with the normal idle clear; this is a real degradation, not noise. Log-fed | medium | +| `ioscan_classifier_unavailable` | the ioscan model classifier failed closed (`ioscan classifier failed closed; text withheld`, `pkg/scheduler/ioscan_enforce.go`) or, under `ioscan.classifier.fail_mode: open`, passed text on unclassified (`ioscan classifier failed open; text passes on unclassified`) — typically no model endpoint resolved — so untrusted text is withheld. The scheduler logs `ioscan fail-closed blocked kick` (`pkg/scheduler/templates.go`) when it withholds a kick for the same reason, which maps to this class too. The WARN is already deduped per failure by `warnOnce` (once per process), so it is reported on the first observation (`MinCount` 1) with the normal idle clear; this is a real degradation, not noise. Log-fed | medium | | `github_fetch_transient` | a non-critical GitHub fetch failed and the feature degrades gracefully (`channel commit date: fetch failed — the row will render without a timestamp`, `pkg/hub/channel_commit_date.go`) — typically a rate limit or transient API error, not a hive defect. Reported only when persistent: log-fed, same ≥5-in-10-min repeat threshold and idle clear as `agent_pane_timeout`. The sibling `SHA poll: commit message fetch non-200` has its own class, `sha_poll_commit_message_unavailable` | low | | `label_provisioning_failed` | provisioning the issue stage labels on a repo failed (`issue stage labels: provisioning failed`, `pkg/github/issue_stage_labels.go`) — typically the App lacking label permission on that repo or a transient API error; diagnostics carry the repo and scrubbed error. Log-fed: same repeat threshold and idle clear as `agent_pane_timeout` | low | | `agent_cli_restart_loop` | the agent CLI crashed (bare shell) or sat on a consent screen and the harness restarted it before the kick (`agent CLI crashed or stuck on consent screen, restarting before kick`, `crux/agent/manager_kick.go`, `kick_async.go`), repeated ≥5 times in 10 min — a restart loop, not transient noise. Log-fed: same repeat threshold and idle clear as `agent_pane_timeout` | medium | diff --git a/src/pkg/fleetreport/runtime.go b/src/pkg/fleetreport/runtime.go index 6893ffc1e7..bfdb558a85 100644 --- a/src/pkg/fleetreport/runtime.go +++ b/src/pkg/fleetreport/runtime.go @@ -192,7 +192,7 @@ var Classes = map[string]ClassSpec{ ClassSHAPollCommitMsgUnavail: {Component: "github-client", Severity: "low", MinCount: unclassifiedRepeatCount, Window: unclassifiedRepeatWindow, IdleClear: unclassifiedIdleClear, LogFed: true, Keywords: []string{"sha poll: commit message fetch non-200"}}, ClassAgentLoginRequired: {Component: "agent-runtime", Severity: "medium", MinCount: unclassifiedRepeatCount, Window: unclassifiedRepeatWindow, IdleClear: unclassifiedIdleClear, LogFed: true, Keywords: []string{"login required detected"}}, ClassPRRequestHeadUnpushed: {Component: "github-relay", Severity: "medium", MinCount: unclassifiedRepeatCount, Window: unclassifiedRepeatWindow, IdleClear: unclassifiedIdleClear, LogFed: true, Keywords: []string{"head branch is not on the remote"}}, - ClassIOScanClassifierUnavail: {Component: "inference-gateway", Severity: "medium", MinCount: 1, IdleClear: unclassifiedIdleClear, LogFed: true, Keywords: []string{"ioscan classifier failed closed", "ioscan fail-closed blocked kick"}}, + ClassIOScanClassifierUnavail: {Component: "inference-gateway", Severity: "medium", MinCount: 1, IdleClear: unclassifiedIdleClear, LogFed: true, Keywords: []string{"ioscan classifier failed closed", "ioscan classifier failed open", "ioscan fail-closed blocked kick"}}, ClassGitHubFetchTransient: {Component: "github-client", Severity: "low", MinCount: unclassifiedRepeatCount, Window: unclassifiedRepeatWindow, IdleClear: unclassifiedIdleClear, LogFed: true, Keywords: []string{"channel commit date: fetch failed"}}, ClassLabelProvisioningFailed: {Component: "github-client", Severity: "low", MinCount: unclassifiedRepeatCount, Window: unclassifiedRepeatWindow, IdleClear: unclassifiedIdleClear, LogFed: true, Keywords: []string{"issue stage labels: provisioning failed"}}, ClassAgentCLIRestartLoop: {Component: "agent-runtime", Severity: "medium", MinCount: unclassifiedRepeatCount, Window: unclassifiedRepeatWindow, IdleClear: unclassifiedIdleClear, LogFed: true, Keywords: []string{"agent cli crashed or stuck on consent screen"}}, diff --git a/src/pkg/fleetreport/runtime_test.go b/src/pkg/fleetreport/runtime_test.go index b6ce437af6..3471b91c39 100644 --- a/src/pkg/fleetreport/runtime_test.go +++ b/src/pkg/fleetreport/runtime_test.go @@ -361,6 +361,7 @@ func TestEveryRuntimeClassTriggerAndNonTriggerThresholds(t *testing.T) { {class: ClassAgentLoginRequired, message: "login required detected"}, {class: ClassPRRequestHeadUnpushed, message: "pr-request watcher: head branch is not on the remote — the agent's push did not authenticate"}, {class: ClassIOScanClassifierUnavail, message: "ioscan classifier failed closed; text withheld"}, + {class: ClassIOScanClassifierUnavail, message: "ioscan classifier failed open; text passes on unclassified"}, {class: ClassIOScanClassifierUnavail, message: "ioscan fail-closed blocked kick"}, {class: ClassGitHubFetchTransient, message: "channel commit date: fetch failed — the row will render without a timestamp"}, {class: ClassLabelProvisioningFailed, message: "issue stage labels: provisioning failed"}, @@ -943,6 +944,7 @@ func TestRecurringRuntimeMessagesAreClassified(t *testing.T) { "login required detected": ClassAgentLoginRequired, "pr-request watcher: head branch is not on the remote — the agent's push did not authenticate": ClassPRRequestHeadUnpushed, "ioscan classifier failed closed; text withheld": ClassIOScanClassifierUnavail, + "ioscan classifier failed open; text passes on unclassified": ClassIOScanClassifierUnavail, "ioscan fail-closed blocked kick": ClassIOScanClassifierUnavail, "proxy client TLS handshake failed": ClassProxyTLSHandshakeFailed, "transparent proxy TLS handshake failed": ClassProxyTLSHandshakeFailed,