Commit Graph

8272 Commits

Author SHA1 Message Date
rcourtman afbcd3023c Bound automatic Patrol inference allowances 2026-07-16 19:55:44 +01:00
rcourtman 2f6bb94ed3 Classify legacy-CIS-only vCenters as unsupported version
A vSphere 6.x target fails the connect test at the Automation session
step with a generic "HTTP 500" message, because /api on those releases
routes to the JSON-RPC servlet. When /api/session fails with a non-auth
status, probe the legacy /rest CIS session API with the same
credentials; if that login works the target predates the JSON APIs
Pulse uses, so the test now reports the unsupported-version warning
naming the vCenter 8.0U1 floor instead of pointing at credentials. The
probe deletes the session it creates. Also reword the frontend guidance
for that category in plain terms.

Related to #1585.
2026-07-16 19:52:14 +01:00
rcourtman fda64e0318 Negotiate registry pull tokens from WWW-Authenticate challenges
Update checks against registries without a hardcoded token endpoint
(lscr.io and other spec-compliant registries) failed with a blanket
"Check failed" because the manifest HEAD went out anonymously and the
401 was terminal. Parse the Bearer challenge on the 401, fetch a pull
token from the advertised realm, and retry once. Token endpoints that
answer with access_token instead of token are now accepted too.

Fixes #1583.
2026-07-16 19:50:04 +01:00
rcourtman e07e103e42 Reserve Patrol inference allowance work 2026-07-16 19:35:19 +01:00
rcourtman f68d5be4b8 Release Pro investigation efficiency work claim 2026-07-16 18:21:56 +01:00
rcourtman 676117bf27 Separate Patrol evidence and model-turn budgets 2026-07-16 17:50:08 +01:00
rcourtman 359147b771 Reserve Pro investigation efficiency work 2026-07-16 17:22:18 +01:00
rcourtman 91eaa82f2c Release Patrol qualification work claim 2026-07-16 17:18:32 +01:00
rcourtman b6e5f4d512 Align remediation qualification with Patrol policy 2026-07-16 17:01:37 +01:00
rcourtman b905bc83ea Renew Patrol qualification work claim 2026-07-16 16:37:09 +01:00
rcourtman 1397f72c1f Propagate Basic auth identity into action authorization 2026-07-16 16:34:26 +01:00
rcourtman 524aa16233 Add Go branch-coverage tests for monitoring cluster helpers and ai-tools formatting
Adds branch-coverage unit tests for previously uncovered pure functions in
internal/monitoring and internal/ai/tools. New test files only, with no source
changes.

Covers existing-cluster IP-override and fingerprint lookup, storage-summary
capacity-trend building, nouveau GPU temperature parsing, resolved-resource
control identity, and available-agent-host formatting. 32 TestBranchCov
functions in 2 files, all vet and gofmt clean.
2026-07-16 16:25:10 +01:00
rcourtman b91ba759c9 Route Claude native tool intent through Pulse 2026-07-16 16:09:48 +01:00
rcourtman a266a2e577 Renew Patrol qualification work claim 2026-07-16 15:50:10 +01:00
rcourtman d162110233 Make remediation fixtures model-neutral 2026-07-16 15:44:19 +01:00
rcourtman df59f210e5 Prevent mixed-auth configuration deadlock 2026-07-16 15:25:47 +01:00
rcourtman fb9584aae6 Add Go branch-coverage tests for alerts monitoring model-resolution ai and licensing helpers
Adds table-driven branch-coverage unit tests for previously uncovered pure
functions across internal/alerts/config, internal/ai/modelresolution,
internal/monitoring, internal/ai, internal/ai/qualification and pkg/licensing.
New test files only, with no source changes.

Covers per-subsystem alert-default normalization, configured model and provider
resolution, fleet-doctor identity and cluster-endpoint helpers, docker-state and
infrastructure-key mapping, investigation and SMART issue helpers, JSON and
autonomy normalization, and licensing feature-tier resolution. 65 TestBranchCov
functions in 7 files, all vet and gofmt clean.
2026-07-16 15:17:45 +01:00
rcourtman 43e70411a6 Normalize bounded Docker action clock skew 2026-07-16 14:36:01 +01:00
rcourtman df4e02ef89 Add Go branch-coverage tests for models config securityutil and aicontracts helpers
Adds table-driven branch-coverage unit tests for previously uncovered pure
functions across internal/models, internal/config, pkg/securityutil and
pkg/aicontracts. New test files only, with no source changes.

Covers model collection normalizers, reflect-based metric deep-copy,
removed-host agent bookkeeping, report-schedule and entitlement-billing
normalization, effective AI control and Patrol autonomy resolution,
websocket-origin host normalization, and command-safety classifiers. 61
TestBranchCov functions in 8 files, all vet and gofmt clean.
2026-07-16 14:20:13 +01:00
rcourtman cde850c686 Isolate Patrol investigation dispatch from Watch runs 2026-07-16 14:06:01 +01:00
rcourtman 3291d97a14 Reserve Patrol investigation isolation work 2026-07-16 13:57:56 +01:00
rcourtman d8557c9256 Shorten fake Google API key fixtures below secret-scanner shape 2026-07-16 13:40:38 +01:00
rcourtman 62f1986d0c Release Patrol subscription schema claim 2026-07-16 13:33:44 +01:00
rcourtman e1e1048e08 Preserve durable Patrol outcomes across Claude wrapper retries 2026-07-16 12:50:15 +01:00
rcourtman 6c8ecd2284 Constrain plain Claude completion fallback 2026-07-16 12:45:24 +01:00
rcourtman 1439495e70 Accept safe plain Claude completion turns 2026-07-16 12:42:12 +01:00
rcourtman 043ecf4c66 Stabilize Claude subscription completion transport 2026-07-16 12:38:19 +01:00
rcourtman 0719e34255 Bind subscription tool calls to native schemas 2026-07-16 12:29:14 +01:00
rcourtman 4f42632cd6 Transition Patrol claim to subscription object schemas 2026-07-16 12:26:10 +01:00
rcourtman fddcc3fefe Honor Patrol lifecycle tool ordering 2026-07-16 11:39:23 +01:00
rcourtman b40b82a07b Transition Patrol claim to lifecycle ordering 2026-07-16 11:31:10 +01:00
rcourtman 07cbdd792b Separate subscription adapter trust boundaries 2026-07-16 10:44:53 +01:00
rcourtman b83a6a6457 Reserve Patrol subscription trust-boundary work 2026-07-16 10:39:16 +01:00
rcourtman 0f8d61a696 Release Patrol subscription timeout claim 2026-07-16 10:37:13 +01:00
rcourtman 47f2bdaed4 Add Go branch-coverage tests for pure config and helper packages
Adds table-driven branch-coverage unit tests for previously untested pure
helper functions across internal/alerts/config, internal/config,
internal/ai/safety, internal/ai/modelresolution, internal/operationreceipt,
internal/models, internal/securityutil and pkg/securityutil. New test files
only, with no source changes.

Covers alert-config normalization and validation, sensitive-path and
redaction classifiers, URL normalizers, provider model resolution,
operation-receipt decoding, credential masking, and account-to-org role
mapping. 57 TestBranchCov functions in 12 files, all vet and gofmt clean.
2026-07-16 10:19:51 +01:00
rcourtman 4dcba3a1d8 Name the actual OIDC token verification failure on the login page
Every ID token verification failure rendered the issuer-mismatch
advice, sending users with audience or clock problems down the wrong
path and telling users with a genuine issuer mismatch nothing they had
not already checked (#1533). Map the distinct verification failures
(issuer, audience, expiry) to their own error codes and give each
accurate login-page copy pointing at the server log's got/want detail.
2026-07-16 10:15:42 +01:00
rcourtman 506d2e5b7e Serve agent config from continuity state during reload windows
A full monitor reload tears the state down and rebuilds it empty, so
agent-reported host rows vanish until each agent's next report lands.
Config fetches in that window 404ed with a perfectly valid token, which
showed up as rare correlated agent_config_fetch failures across
unrelated agents (#1570).

When the live snapshot has no match, resolve the host from the
persisted continuity store with the same semantics as the live path. A
report-scoped token resolves only its bound host and manage-scoped
tokens resolve by host ID. Deliberately removed hosts stay 404 because
removal deletes their continuity entry.
2026-07-16 10:13:14 +01:00
rcourtman cdae56df0f Align qualification wait with subscription preflight 2026-07-16 10:05:20 +01:00
rcourtman b84f650e77 Allow bounded subscription-agent preflights 2026-07-16 09:54:34 +01:00
rcourtman 2bc48774c2 Let deleted hosts re-enroll with a freshly generated token
Deleting a host writes a machine-id-keyed removal block that rejected
every future report with HTTP 400, and the error pointed at an Allow
reconnect control that is not wired into the UI, leaving the machine
permanently unable to enroll without changing its machine-id (#1581).

Three holes made the block effectively immortal:
- The 24h TTL sweep only iterated the in-memory removal maps, which
  reset on every restart, so persisted blocks never expired. Sweep the
  persisted entries by their own RemovedAt for host agents, Docker
  hosts, and Kubernetes clusters.
- AllowHostAgentReenroll (and the Docker and Kubernetes equivalents)
  bailed out when the ID was missing from the in-memory map, so even
  the API escape hatch stopped clearing persisted blocks after a
  restart. Check and clear the persisted store independently.
- A report presenting an API token created after the removal is
  explicit re-add intent (the user generated a fresh install command),
  so clear the block and accept it. A still-running old agent keeps
  presenting its pre-removal token and stays blocked.

Also reword the rejection to describe the two working recovery paths
instead of the unwired Settings control.
2026-07-16 09:50:04 +01:00
rcourtman 5867d439a3 Reconcile recovery points against source enumerations
The recovery store was upsert-only: backups and snapshots deleted at
the source lingered as recovery_points rows until the 90-day retention
prune. ListRollups kept returning a rollup with a frozen LastSuccessAt,
so the backup-age alert for a deleted guest re-raised every poll cycle
and acknowledging or clearing it could never stick (#1580).

Each backup poll already publishes a complete per-instance enumeration
(partial failures early-return or carry previous entries forward), so
attach a reconcile scope to that ingest batch. After the upsert, points
in the scope (provider + id class + instance) that were not part of the
enumeration are deleted, which lets the existing per-cycle alert sweep
resolve the alert. An empty enumeration is meaningful and clears the
scope, covering the delete-all-backups case from the report.

Also make the async ingest queue batches instead of overwriting the
single pending slot, which silently dropped a full poll cycle whenever
two sources coalesced behind an active batch.
2026-07-16 09:38:53 +01:00
rcourtman 99cb04fb89 Reserve Patrol subscription timeout qualification 2026-07-16 09:35:30 +01:00
rcourtman 4bd9b0c079 Show timezone on alert email start times
Alert start times are stored in UTC and the email templates rendered
them with no zone conversion or label, so the Started line read as a
local clock while showing UTC (#1582). Convert to the server's local
zone and include the zone name.
2026-07-16 09:29:01 +01:00
rcourtman c70431caaf Honor configured availability poll interval in the scheduler
An availability target's configured poll interval only seeded the
adaptive scheduler: BuildPlan derived every instance's cadence from the
global adaptive bounds, and a failing probe raised the staleness score
and error penalty, collapsing the probe interval toward the global
5-second minimum. With interval 120s and failure threshold 4 the alert
was promised after ~8 minutes of downtime but fired within the first
minute because the four consecutive failures accumulated at the
collapsed cadence (#1582).

Availability checks promise pollInterval x failureThreshold as the
detection window, so the cadence is a user contract, not a scheduling
hint. Add a FixedIntervalPollProvider extension that pins an instance
to its configured interval, implement it for availability targets, and
bypass adaptive selection wherever the next run is computed (plan
building, rescheduling, and the non-adaptive fallback paths).
2026-07-16 09:26:53 +01:00
rcourtman 4421945e9b Normalize v prefix in install.ps1 agent version check
The Windows installer compared the downloaded agent's --version output
(v6.0.5) against the server's /api/version value (6.0.5) literally, so
every matching install still warned about a version mismatch (#1527).
Strip the leading v from both sides before comparing, matching what
install.sh already does.
2026-07-16 09:16:51 +01:00
rcourtman 84d43e16e4 Release Patrol reporting reliability claim 2026-07-16 07:27:26 +01:00
rcourtman 362b96dbca Repair rejected Patrol finding batch siblings 2026-07-16 07:22:13 +01:00
rcourtman b397896be3 Harden Patrol multi-finding report guidance 2026-07-16 06:42:53 +01:00
rcourtman 7a8a090d37 Harden Patrol multi-finding report guidance 2026-07-16 06:40:17 +01:00
rcourtman 2614c39270 Reserve Patrol reporting reliability work 2026-07-16 06:32:42 +01:00