feat(agent): surface netprobe as addon:netprobe in capability status (#3425) #3490

Merged
mfreeman451 merged 1 commit from feat/netprobe-addon-status into staging 2026-06-01 05:29:52 +00:00
Owner

What

migrate-netprobe-to-native-addon §2.3 (partial). netprobe is supervised as a systemd-service, not via the go-plugin addon manager, so it reported under the bare "netprobe" sidecar name — which the core AddonStatusIngestor (ingests only addon:<id> entries) skips. Result: netprobe never appeared in the AddonStatus read model, so Edge Ops drift couldn't show it.

  • buildAgentCapabilityGatewayStatus now synthesizes an addon:netprobe capability entry when netprobe is installed as a systemd add-on (installedSystemdAddons non-empty):
    • state folded in from the live netprobe sidecar entry (else stopped = installed-not-running),
    • version from the activation current symlink (versions/<version>),
    • arch from runtime.GOARCH (the agent runs the arch-matching artifact).
    • Reuses agentaddon.ToProtoStatuses for the addon: prefix + version/arch mapping (built on #3489).
  • A running-but-incapable netprobe surfaces via state + last_error.

Why partial / capture status

Explicit capture-active reporting (the "+ capture status" in §2.3) needs a netprobe IPC signal — none exists today (Ping/PingAck only; StartRemoteCapture is a Phase-5 TODO). That's a focused follow-up (netprobe-side signal + proto + agent). This PR delivers the read-model integration + state/version/arch, which is what the Edge Ops drift card (Agent C) needs to render netprobe.

Validation

  • go build ./go/pkg/agent/... + go vet — clean
  • go test ./go/pkg/agent/ — new tests (not-installed→nil; installed+running→active w/ version+arch+pid; installed+no-sidecar→stopped) + the existing capability test green.
  • Note: the agent bazel lib is pre-existing-broken on stagingpush_loop_state.go is missing from the go_library srcs (identical failure without this PR's changes). Fixed in a separate fix(ci) PR; this PR adds no go_library files and no new deps.

🤖 Generated with Claude Code

## What `migrate-netprobe-to-native-addon` **§2.3** (partial). netprobe is supervised as a `systemd-service`, **not** via the go-plugin addon manager, so it reported under the bare `"netprobe"` sidecar name — which the core `AddonStatusIngestor` (ingests only `addon:<id>` entries) skips. Result: netprobe never appeared in the `AddonStatus` read model, so Edge Ops drift couldn't show it. - `buildAgentCapabilityGatewayStatus` now synthesizes an **`addon:netprobe`** capability entry when netprobe is installed as a systemd add-on (`installedSystemdAddons` non-empty): - **state** folded in from the live `netprobe` sidecar entry (else `stopped` = installed-not-running), - **version** from the activation `current` symlink (`versions/<version>`), - **arch** from `runtime.GOARCH` (the agent runs the arch-matching artifact). - Reuses `agentaddon.ToProtoStatuses` for the `addon:` prefix + version/arch mapping (built on #3489). - A running-but-incapable netprobe surfaces via `state` + `last_error`. ## Why partial / capture status Explicit **capture-active** reporting (the "+ capture status" in §2.3) needs a netprobe **IPC signal** — none exists today (`Ping`/`PingAck` only; `StartRemoteCapture` is a Phase-5 TODO). That's a focused follow-up (netprobe-side signal + proto + agent). This PR delivers the read-model integration + state/version/arch, which is what the Edge Ops drift card (Agent C) needs to render netprobe. ## Validation - `go build ./go/pkg/agent/...` + `go vet` — clean - `go test ./go/pkg/agent/` — new tests (not-installed→nil; installed+running→active w/ version+arch+pid; installed+no-sidecar→stopped) + the existing capability test green. - **Note:** the agent `bazel` lib is **pre-existing-broken on `staging`** — `push_loop_state.go` is missing from the `go_library` srcs (identical failure without this PR's changes). Fixed in a separate `fix(ci)` PR; this PR adds no `go_library` files and no new deps. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(agent): surface netprobe as addon:netprobe in capability status (#3425)
Some checks failed
Secret Scan / gitleaks (pull_request) Successful in 31s
lint / lint (push) Successful in 1m39s
lint / lint (pull_request) Successful in 1m44s
Golang Tests / test-go (push) Successful in 2m4s
CI / build (pull_request) Failing after 5m8s
f63bda7f09
migrate-netprobe §2.3 (partial). netprobe is supervised as a systemd-service, not
via the go-plugin addon manager, so it reported under the bare "netprobe" sidecar
name — which the core AddonStatusIngestor (only ingests `addon:<id>` entries) skips.
So netprobe never appeared in the AddonStatus read model and Edge Ops drift couldn't
show it.

- buildAgentCapabilityGatewayStatus now synthesizes an `addon:netprobe` entry when
  netprobe is installed as a systemd add-on (installedSystemdAddons non-empty):
  state folded in from the live netprobe sidecar entry (else "stopped"), installed
  version from the activation `current` symlink (versions/<version>), arch from
  runtime.GOARCH. Reuses agentaddon.ToProtoStatuses for the `addon:` prefix +
  version/arch mapping (built on #3489).
- A running-but-incapable netprobe surfaces via state + last_error. Explicit
  capture-active reporting needs a netprobe IPC signal (none today) — follow-up.
- tests: not-installed -> nil; installed+running -> addon:netprobe active w/ version
  + arch + pid; installed+no-sidecar -> stopped w/ version.

Validated: go build + go vet + go test ./go/pkg/agent/ (the new tests + the existing
capability test) green. (bazel agent lib is pre-existing-broken on staging —
push_loop_state.go missing from go_library srcs — fixed separately.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
mfreeman451 left a comment

lgtm

lgtm
mfreeman451 deleted branch feat/netprobe-addon-status 2026-06-01 05:29:53 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
carverauto/serviceradar!3490
No description provided.