Commit Graph

8292 Commits

Author SHA1 Message Date
rcourtman 61cdc46ff8 Add branch-coverage tests for four alert and settings presentation modules
These presentation helpers had partial coverage and had grown functions their
existing tests never reached. alertWebhookPresentation goes from 14 to 23 covered
functions, organizationSettingsPresentation from 34 to 42, alertIncidentPresentation
from 37 to 39 with its remaining branches, and ssoProviderPresentation closes its
last four uncovered branches. The new cases exercise the fallback, boundary,
per-role and error-precedence arms the primary tests omit.

Four new test-only files with distinct branchcov0717 suffixes alongside the
existing suites. No source changed. Verified with vitest and type-check, and each
measured to raise branch or function coverage over the pre-existing suite.
2026-07-17 07:41:36 +01:00
rcourtman fe09420bcb Add coverage tests for agentexec lifecycle codec and aicontracts pure helpers
The docker container lifecycle codec in agentexec had a contract test that never
exercised the codec functions at runtime, leaving decode, bind, validate and
identity helpers at zero coverage. This adds a table-driven test taking each to
near or full coverage including every validation error arm. In aicontracts,
CloneActionReference, IsNilAlertPayload and DefaultEngineConfig were uncovered,
so this covers the nil and populated arms and asserts CloneActionReference
produces an independent deep copy.

Both are new test-only files. No source changed. Verified with go test, gofmt
and go vet, with each target function confirmed to move off zero coverage.
2026-07-17 06:53:16 +01:00
rcourtman 4745b34b51 Add branch-coverage tests for three changed frontend model modules
containerUpdateBadgeModel gained update icon and button helpers since its prior
branchcov test, so this covers the three previously-uncovered functions and
their state arms (idle, confirming, updating, success, error and the default).
aiProviderPresentation route-label formatting had fourteen uncovered branches,
now exercised through the four exported entry points. dockerIdentityConflict
conflict collection reaches full branch coverage including the hostnames
fallback and the name fallback chain.

All three are new test-only files under existing __tests__ directories. No source
changed. Each was confirmed with vitest and type-check, and measured to raise
branch or function coverage over the pre-existing suite.
2026-07-17 06:35:00 +01:00
rcourtman 909153a398 Close v6.1.0-rc.2 release claim 2026-07-17 02:17:10 +01:00
rcourtman bb369235d1 Stabilize v5 license migration fixtures v6.1.0-rc.2 2026-07-17 01:02:05 +01:00
rcourtman 2d38cfb9ef Stabilize legacy license exchange test 2026-07-17 00:27:56 +01:00
rcourtman a857c7e783 Prepare v6.1.0-rc.2 release 2026-07-16 23:45:31 +01:00
rcourtman e384c2d762 Release Patrol finding completion claim 2026-07-16 23:06:10 +01:00
rcourtman 76201e89ce Add deep-copy independence and qualification render coverage tests
Two more newly added *_w0716_coverage_test.go files from the same
branch-coverage wave, touching no source and no existing test.

- internal/models deep-copy clone independence for Docker, Kubernetes,
  ZFS and PBS clones, each mutating the original and asserting the clone
  stays unchanged
- internal/ai/qualification lab shell-quoting and resource-name
  rendering plus report replay predicates and markdown renderers
2026-07-16 22:56:24 +01:00
rcourtman e23448df7b Allow Patrol to record sequential findings 2026-07-16 22:50:11 +01:00
rcourtman 82d971d8f0 Reserve Patrol finding completion fix 2026-07-16 22:39:57 +01:00
rcourtman c2b8d6b9a0 Add pure branch-coverage tests for the fresh Patrol and Docker drop
Cover previously-unexecuted branches in modules that gained behavior
since the last wave. All six are newly added *_w0716_coverage_test.go
files that modify no source and no existing test.

- internal/ai/chat investigation-budget injection plus the agentic
  tool-event and string helpers
- internal/ai/qualification manifest Validate error arms and the Patrol
  docker-predicate and finding-prerequisite validators
- internal/unifiedresources adapters transforms and ContractResourceType
- internal/config AIConfig nil-receiver default branches
- pkg/aicontracts orchestrator error methods and investigation config
2026-07-16 22:27:29 +01:00
rcourtman b782cf1165 Release Patrol restart-loop qualification claim 2026-07-16 21:04:56 +01:00
rcourtman 72c409743d Warn when two machines share one Docker agent identity
Cloned VMs that keep the same /etc/machine-id collapse into a single
Docker host in Pulse, with each clone's report silently overwriting the
other (#1584). The server now tracks per-identity hostname and machine
ID observations and flags a conflict when a value flaps back to one
already seen inside a 15-minute window, a signature a one-time rename
never produces. The conflict rides the DockerHost model through unified
resources, and the Docker page shows a warning naming the flapping
hostnames with the machine-id remedy. The warning self-clears once one
clone stops reporting for the window.
2026-07-16 20:55:09 +01:00
rcourtman 4d80e53588 Align restart-loop qualification with Patrol threshold 2026-07-16 20:53:02 +01:00
rcourtman aff5bb4e93 Reserve Patrol restart-loop qualification alignment 2026-07-16 20:50:57 +01:00
rcourtman cd050c2f18 Release Patrol replay compatibility work claim 2026-07-16 20:32:57 +01:00
rcourtman cae8477128 Preserve Patrol replay safety outcomes 2026-07-16 20:30:37 +01:00
rcourtman d69d56ff74 Reserve Patrol replay compatibility work 2026-07-16 20:22:57 +01:00
rcourtman 53ee6b86e7 Release Patrol inference allowance work claim 2026-07-16 20:03:27 +01:00
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