Commit Graph

321 Commits

Author SHA1 Message Date
rcourtman
88338e9a7c Preserve canonical resource ownership in Assistant
Keep selection on the registry ID through context, sessions and command
routing so same-name resources cannot cross provider boundaries.
Retain native executor coordinates, legacy inputs that resolve uniquely,
policy redaction and paid execution modes.

Refs #2681
2026-10-13 01:56:59 +01:00
pulse-triage[bot]
123652e29b Preserve reviewed monitoring repairs with upstream Discovery removal
Compose current main e2f4bdff03 additively. Retain both subsystem records and the held change-age control while withdrawing only the obsolete Discovery identification test. Reviewed identities and ancestry, canonical guest History ownership and upstream feature removal remain intact.

Change-source: pulse-maintainer
2026-10-12 10:04:58 +01:00
rcourtman
39f988b220 Remove AI Discovery
AI Discovery ran a separate model-backed service scanner beside Patrol
and the Assistant: its own store, scheduler, model route, API, tool and
drawer UI. No telemetry counter ever measured its use (the telemetry
discovery_enabled flag OR'd it with network subnet discovery), the
maintainer judged it a flop, and the context it produced is already
available to the models through pulse_query, pulse_read and the
unified-resource context sections.

This deletes internal/servicediscovery, internal/ai/infradiscovery, the
pulse_discovery tool, the /api/discovery routes, the mock Discovery
fixtures, the Discovery tabs in the resource, guest, node and Docker host
drawers, the identified-service cards, readiness badges, provenance
markers, suggested web-interface URLs, the Workloads AI Context column,
the chat "Discovery is off" hint and the AI Service Context settings page.
The old settings route redirects to Assistant settings. The model-bound
sanitizer allow-list existed only to pass Discovery context through, so it
goes too, along with the CopyableCodeRow primitive that only the
Discovery tab used.

Network subnet discovery (/api/discover, the Infrastructure discovery
settings) and the discoveryTarget agent coordinates are separate features
and stay. Stored discovery_enabled, discovery_interval_hours and
discovery_model AI settings are ignored on load; the settings API decoder
is lenient, so older frontends saving those fields still succeed.
2026-10-11 22:20:25 +01:00
pulse-triage[bot]
3732bfb92b Contain steering-test workers without weakening completion checks
The retained race attempt reached the completed agent loop but exceeded the five-second service deadline. Keep that adverse result and the deadline; cancel and observe the worker before temporary-session cleanup, and retain goroutine stacks if either completion or cancellation fails. This prevents failure-path work from silently outliving its fixture and makes the unresolved stall diagnosable.

Contract-Neutral: Test-only cancellation, bounded cleanup and failure diagnostics; production streaming, persistence, steering and completion deadlines are unchanged.
Change-source: pulse-maintainer
2026-10-11 14:04:14 +01:00
rcourtman
5d53fa7a3d Remove the Assistant mutation handlers nothing calls
pulse_control only plans typed resource actions into Pulse Actions
(executeControlResource -> typedActionPlanner). The handlers that sat
behind the retired model-authored command, file and container paths
stayed in the tree with no production caller: run command, guest
control, app-container control, Docker control and container update,
Kubernetes scale/restart/delete-pod/exec, and file append/write.
registerFileTools was never called either, so pulse_file_edit is not
registered at all; calls to it are denied by the mutation registry
before any tool lookup.

A whole-program reachability run over cmd/... lists each of them as
unreachable, and so is everything only they used: approval-record and
preflight authoring, the command and native-action audit lanes with
their remediation-lock gate and plan-hash helpers, the Docker host
resolvers, and the file write verification. The executor's autonomous
flag, whose only readers were those handlers, goes with them (the
executor's SetAutonomousMode and the flag argument of SetContext).

Delete them with their tests and the constants, types and test helpers
they stranded. The contract prose that described the removed broker now
says that plan freshness and the operator remediation lock are enforced
by internal/actionlifecycle. Two source pins that named deleted code go
(the publishActionCompleted dispatch sites and the pulse_file_edit
declaration), the standards tests drop their expectations of an
ActionPlan construction in action_audit.go and of the legacy app_container
rejection in the deleted file-edit test, and the RA35 evidence entry for
the deleted run-command test goes with them.

Left alone on purpose: the saved autonomous control level and its
entitlement and approval-admission checks, which stay as legacy
compatibility, Service.SetAutonomousMode and the chat clamp,
SetOnActionCompleted and its router wiring (no dispatcher is left, the
contract prose says so), and the protected-guests plumbing.

Rebuilt on current main: the first version had 213 commits of drift.
Two conflicts, both on code this change deletes. tools_control.go takes
the deletion over the Protected guests cleanup that landed inside
executeRunCommand. action_audit_remediation_lock_test.go goes with the
audit lanes, including the test added for the dispatch gate's read
through a succession; that gate is deleted here, and
TestLockMovedBySuccessionStillRefusesTheIDThePreviousGenerationLists in
internal/actionlifecycle covers the same refusal on the live path.
2026-10-11 12:35:28 +01:00
rcourtman
1d6d2bfcae Remove the inert Assistant Protected guests setting
Settings > Assistant offered a Protected guests list (protected_guests)
that was saved and pushed into the Assistant tool executor, but its only
reader was executeControlGuest, which nothing calls. pulse_control plans
through the shared action lifecycle and never consulted the list, so a
guest named in it (by VMID and by name) was planned like any other. The
"legacy" label added in #2765 states that limit; this removes the
setting instead of keeping a field that cannot do its job.

The canonical way to keep Pulse off a resource is its operator lock
(Never auto-remediate, or a Retired lifecycle). It is keyed by canonical
resource id, applies to every platform, and the action lifecycle refuses
dispatch for it even for approved plans. The one gap was planning: the
lifecycle plans without reading operator state, so the Assistant could
leave a plan in Actions that can never run. assistantTypedActionPlanner
now reads the state through the tenant-scoped lifecycle store (the same
read Patrol's broker uses) and declines before Plan, and pulse_control
reports the block with how to clear it. A state that cannot be read does
not refuse planning, because dispatch re-checks.

Removed: AIConfig.ProtectedGuests and its getter, the settings API
field, the executor field/setter/config, the chat service plumbing, the
Settings field and form state, and the legacy copy, pins and prose from
#2765. A stored value still loads (tolerant decode) and is dropped the
next time the settings are written; older PUT bodies that send the key
are ignored. The Settings panel points at the guest's Manage tab.
2026-10-10 07:46:45 +01:00
pulse-triage[bot]
43c4f50f42 Integrate reviewed Assistant planning controls and saved-policy compatibility
Merge exact Web tip b908be2e55 with launch upstream 0289e8b648. Preserve both independent memory-evidence and Assistant-control contract sections in two internal documentation conflicts; all reviewed frontend content remains byte-identical. Retained sensitive race, browser, build and completed source observations are adequate for the changed control boundary. Broad affected-package race remains unproved after its recorded observation timeout; no aggregate pass or publication is claimed.

Change-source: pulse-maintainer
2026-10-10 02:47:01 +01:00
pulse-triage[bot]
6488742416 Clarify legacy Assistant protection limits and contain mode menu
The current canonical resource planner does not consult the retained guest list. Label that compatibility data honestly and link its accessible limitation without discarding saved policy. Keep the review-only mode menu within the composer on phones, with geometry and resize controls.

Reconcile the old autonomous-mode test with the explicit core-owned investigation flag, preserving saved preferences and legacy approvals. Mounted settings, parent-discriminating copy/menu checks, help mirrors and final-byte browser receipts cover the existing flow.

Change-source: pulse-maintainer
2026-10-10 01:29:01 +01:00
pulse-triage[bot]
a721b3a8e0 Preserve guest memory evidence across AI queries and local observers
Carry selected memory source, state and original time through existing queries, Assistant context and condensed facts. Missing usage remains unknown, measured zero stays numeric, and resource refreshes cannot renew a local observer's retained memory sample. Historical numeric percentages retain explicit source limitations. Shared qualification keeps the existing Patrol, collector, threshold and guest-command contracts intact.

Change-source: pulse-maintainer
2026-10-10 00:46:16 +01:00
pulse-triage[bot]
1927020ba2 Make Assistant controls describe governed action planning
Project interactive Assistant controls to Read-only and Ask first without migrating legacy stored preferences or relaxing entitlement, legacy command approval, scoped execution or Patrol policy. Preserve stored policy even when an older client echoes the projected mode on an unrelated save. Explain saved Actions plans and operator review in existing Settings, Chat and help.

Add saved-client and encrypted-config compatibility, authenticated plan-only access, active-stream and scope regression controls with parent comparisons. Record inspected final-byte desktop/phone browser proof and the affected subsystem contracts.

Change-source: pulse-maintainer
2026-10-10 00:28:43 +01:00
rcourtman
2390987e12 Account Anthropic prompt-cache usage instead of dropping it
The Anthropic client logged cache_creation_input_tokens and
cache_read_input_tokens and then returned only input_tokens and
output_tokens, so every cached Patrol run reached the usage ledger, the
cost preview, the budget check and the weekly digest with its cache
buckets missing. Pulse #2350 reproduced the loss on both the Chat and
ChatStream paths, and #2118's reporter was told to trust the provider's
billing view over Pulse's totals until this was fixed.

Both response paths now carry the two buckets as fields disjoint from
InputTokens (streaming assigns them from message_start and the final
cumulative message_delta rather than summing). The agentic loops, Patrol
responses and run records sum them beside the ordinary totals, the usage
ledger and its persisted copies keep them, and cost.EstimateUsageUSD
prices each bucket at Anthropic's published cache rates (5-minute write
1.25x, read 0.1x of the input rate), falling back to the input rate for
providers without a known cache price. Spend summaries, the digest spend,
the cost projection medians and the usage export expose the buckets and
price them the same way. InputTokens keeps its meaning everywhere, so the
telemetry token buckets are unchanged.
2026-10-03 09:31:34 +01:00
pulse-triage[bot]
248ada3cc6 fix(ai): cache the stable system prompt prefix
Anthropic only received a cache breakpoint on the last tool, so the large
frozen system prompt was never cached and multi-turn Patrol investigations
repaid its full input cost every turn (#2118). Serialize the stable base plus
mode text as a system content block with its own ephemeral breakpoint, leaving
the per-turn clock and accumulated knowledge outside the cached prefix.

The system breakpoint covers the tool definitions too, so the redundant tool
breakpoint is dropped when it is present. Providers without prompt caching
ignore the new request field and send the system prompt unchanged. Cache
creation/read counters are logged at Info so effectiveness is visible in
production.

Change-source: pulse-maintainer
2026-09-19 21:06:33 +01:00
pulse-triage[bot]
536be38ac4 Merge origin/main before planner fixture publication
Change-source: pulse-maintainer
2026-09-10 18:31:05 +01:00
pulse-triage[bot]
c0967d02db test(ai): wire typed planners in control projection fixtures
Repair stale transport-only availability fixtures without weakening runtime planner or policy checks. Exercise planner removal with execute authority, transport-only provider projections, and read-only policy with an installed planner.

Change-source: pulse-maintainer
2026-09-10 18:17:48 +01:00
rcourtman
52d0aeb0cb diagnostic: run hosted lifecycle fixture on DeepSeek V4.1 Flash
Replaces google/gemini-2.5-flash with deepseek/deepseek-v4.1-flash (released 2026-09-10) as the diagnosticModel for the hosted lifecycle diagnostic and its synthetic fixture/wire tests.
2026-09-10 17:35:59 +01:00
pulse-triage[bot]
fd2327d3cf fix(ai): advertise lifecycle control from planner availability
The hosted synthetic lifecycle diagnostic offered no control tool despite an installed canonical planner: availability still depended on retired execution transports. Match exposure to the plan-only boundary while preserving read-state and control-level policy. Assert provider and gateway tool offers so scripted calls cannot hide this mismatch, and retain literal-search behaviour as separate evidence.

Change-source: pulse-maintainer
2026-09-10 17:04:01 +01:00
pulse-triage[bot]
153b80f7a1 docs(ai): clarify hosted diagnostic request budget
Distinguish logical adapter-call and provider-neutral request limits from transport retries, compatibility fallbacks, and provider billing attempts. Keep the hosted fixture behavior unchanged.\n\nChange-source: pulse-maintainer

Change-source: pulse-maintainer
2026-09-10 14:25:11 +01:00
pulse-triage[bot]
6f03c8c898 test(ai): add bounded synthetic hosted lifecycle diagnostic
Use production Assistant instructions with synthetic inventory and approval-only planning. Keep gateway inference distinct from native Gemini transport, retain adverse output, and enforce fixed session and token budgets. Hosted execution remains opt-in; local regressions cover model-owned continuation, wire planning and hard call limits.

Change-source: pulse-maintainer
2026-09-10 14:05:15 +01:00
pulse-triage[bot]
c07ef8f113 test(ai): exercise Gemini discovery and lifecycle planning
The existing scripted-provider tests do not cover Gemini wire translation after read-only discovery. Exercise the actual adapter with synthetic SSE replies to prove canonical reboot planning retains approval and to record the distinct tool-free model conclusion limitation without manufacturing actions. This is orchestration evidence, not hosted-model or customer acceptance; no production behaviour changes.

Change-source: pulse-maintainer
2026-09-10 03:22:14 +01:00
rcourtman
c501376843 Preserve canonical Patrol planning and outcome continuity
Return persisted planning acceptance or refusal inside the investigation turn.
Keep model judgment separate from action authority and preserve accepted action
identity across provider failures. Enforce actor/request idempotency atomically
and retain complete approval and independent verification context.

Preserve unknown disk evidence, stream whitespace and historical resolution
timestamps. Keep conversation scrolling inside its own panel. Record real-model,
disposable-lab and browser qualification with explicit population limits.

Refs #1782
2026-09-07 17:24:25 +01:00
rcourtman
e37353f937 Remove inferred Assistant continuation gates
Let the configured model choose investigation steps within explicit budgets.
Keep canonical planning, permissions and independent verification authoritative,
and preserve streamed conclusions in conversation history.

Expose recorded action outcomes so cached inventory cannot stand in for an
approval or execution receipt. Retain full plan context and make the exact
action review reachable from Assistant, including on narrow screens.

Refs #1782
2026-09-07 14:06:58 +01:00
rcourtman
3a4a3fd62b Preserve native filesystem evidence and Patrol action history
Expose confined, identity-bound filesystem observations through the shared
resource pipeline so investigations can distinguish an exhausted container
mount from unrelated host capacity. Keep unavailable measurements explicit.

Isolate alert-history reads from durable writes and reuse one chronological
fold across polling. Catch up through bounded durable event IDs so simultaneous
readers do not replay every retained snapshot. Retain expired actions when
investigation outcomes move back to needs attention, and keep attached
Assistant context focused.

Record live storage diagnosis, healthy and dependency controls, approved and
rejected Docker outcomes, source-bound browser proof and exact test limits.
Missing-access continuity, VM dispatch completion and remaining Assistant
orchestration defects stay open in the redesign plan.
2026-09-07 09:45:31 +01:00
rcourtman
57ead19484 Preserve Patrol evidence and surface action submission failures
Live funded qualification found hidden tool results and misleading action
submission outcomes. Share the result-bearing transcript across stored chat
and product history, render the retained evidence, and distinguish captured
proposals from broker acceptance. Keep review usable while Patrol is paused.

Record Gemini route pricing and exact qualification limits. Integrate current
main and repeat browser proof for the incoming login flow. Approved/rejected
recovery remains unqualified without the development command agent.
2026-09-06 20:09:54 +01:00
rcourtman
186ce504c8 Retire disconnected incident recording and preserve archives
The fleet sampler and coordinator had no production alert trigger and could
repeat cached values as fresh incident evidence. Preserve saved recordings
through explicit read-only lookups, propagate read failures and report the
former live incident count as unmeasured. Keep historical status and duration
units explicit without rewriting archived observations.

Integrate main's alert dispatch wording and startup replay qualification.
Canonical incident listing and real-model outcome qualification remain open.
2026-09-06 17:42:24 +01:00
rcourtman
f5f440dbad Separate command connectivity from monitoring evidence
Name command transport explicitly in shared query results and preserve
unobserved connection state in topology and Assistant inventory context.
Keep parent-node transport distinct from a direct guest connection so
monitoring evidence cannot imply command access or collection downtime.

Existing execution policy and approval checks remain authoritative.
2026-09-06 14:10:11 +01:00
rcourtman
61607333cc fix(ai): keep Patrol decisions in one evidence conversation
Remove contextless evaluator and assessment passes, signal-count budgets,
and post-finding prompt replacement. Keep evidence tools available until
explicit run limits and retain incomplete assessments and provider errors
alongside accepted decisions. Failed file reads now preserve error status
through the model, telemetry and saved Assistant history.

Full chat, AI and tools packages, focused Patrol API and race tests pass.
Real read-only and scripted browser checks preserve failed reads and linked
uncertainty. Real-model and verified action outcome qualification remain open.
2026-09-06 03:59:37 +01:00
rcourtman
668af3fe6b fix(ai): preserve uncertain investigation conclusions
Tool-call totals do not establish diagnostic sufficiency. Preserve seed-only
and failed-read conclusions, remove count-based completion instructions from
evidence, and retain configured limits and authority checks.

Keep findings grouped under alerts selectable in the shared review panel so
their investigations and access limits remain available to Assistant.
2026-09-06 02:47:55 +01:00
rcourtman
c5d2f56dda fix(ai): preserve diagnostic evidence and proposal boundaries
Keep canonical disk risk, source freshness and retained history intact when
Assistant and Patrol gather evidence. Proposal acceptance validates an action
contract and must not rewrite uncertain conclusions as established root cause.

Preserve complete subscription tool batches without exposing routing envelopes
as answers. Keep wide answer tables readable and keyboard-scrollable on mobile.
Optimize retained tier reconciliation without discarding gaps or newer samples.

Record failed real-model diagnoses and outstanding autonomous qualification
separately from passing data-path and interface checks.
2026-09-06 01:54:28 +01:00
rcourtman
b7f546f81a Repair resource evidence for Patrol and Assistant
Real homelab investigations lost metrics behind mismatched resource IDs,
queried only post-restart memory, and filtered every physical disk out.
Resolve canonical metrics targets, use retained history, preserve CPU
topology and chronological samples, and separate disk operation and format.

Keep unattached resource shortcuts blocked while allowing named resources
to be resolved through query search. Report incomplete readiness honestly,
including saved evaluations, without granting Patrol suitability.
2026-09-05 21:43:02 +01:00
rcourtman
3e8dbb8276 Preserve investigation evidence and Proxmox temperatures
Real homelab evaluation exposed missing node sensor observations and loss of
recent tool evidence before the model reached its conclusion. Project both
canonical sensor sources and retain observations while context fits.

Add source and selection regressions plus a multi-turn retention proof.
Record the live diagnosis result and the unresolved Patrol provider block.
2026-09-05 20:47:38 +01:00
rcourtman
7996848b64 Submit advertised lifecycle actions through pulse_control, not prose
A paying operator asked the Assistant to reboot five Proxmox VMs matching
a name pattern (GitHub #1782, support mail 2026-08-26 and 2026-08-29). The
model resolved the VMs and then ended with a report that invented a
prerequisite: a QEMU guest agent on 6.3.2, a "discovery binding" on stable
6.4.0. It never planned the action. Three defects made the governed path
fail whenever the model did try it, and nothing refused the prose ending
when it did not:

- pulse_control handed the session-scoped id (vm:<node>:<vmid>) to the
  action lifecycle, whose registry keys on canonical unified ids, so a
  Proxmox guest plan could never resolve.
- pulse_control gated the action on the legacy per-executor action list,
  which never carried the canonical "reboot" capability Proxmox guests
  advertise, so "reboot" was refused as not permitted before planning.
- A reference absent from the session context was refused with "resource
  discovery is required" even when the unified inventory resolved it.

pulse_control now binds its target to the canonical unified resource
(session alias first, then a unique inventory match, refusing ambiguity
with candidate ids and naming the pulse_query recovery on a miss), passes
the canonical id to the planner, and answers "not available" only from
the resource's current advertised capabilities. The FSM ordering block
and the shared operating instructions state that a recoverable block is
not a limitation to report, and the instructions require the governed
action tool for advertised capabilities. The agentic loop adds a bounded
advertised-action gate: when the operator asked for a lifecycle action,
pulse_control was offered but never submitted, and a session-resolved
resource advertises the action, a tool-free final answer is refused once
with the exact per-target calls.

Covered by tools and loop unit tests (the #1782 transcript against a
scripted provider fails on the previous code with the two exact errors
above), a prompt-contract test, and the live eval scenario
ProxmoxBulkLifecycleActionScenario.
2026-09-02 00:19:08 +01:00
rcourtman
cba1e2abeb Reconcile delivery health and Proxmox Assistant controls 2026-08-26 18:33:41 +01:00
rcourtman
5bfcd3005a Isolate chat startup failure test data 2026-08-21 16:03:18 +01:00
rcourtman
6ab45a900c Reject contradicted Patrol causal proposals 2026-08-17 20:02:48 +01:00
rcourtman
f6aa8db93a Bound Patrol subscription continuation latency 2026-08-17 20:02:47 +01:00
rcourtman
40897a46e6 Preserve causal evidence in Patrol conclusions 2026-08-16 15:48:03 +01:00
rcourtman
ab34168731 Disambiguate Docker service evidence for Patrol 2026-08-16 15:26:12 +01:00
rcourtman
17ccb8240d Preserve causal evidence before Patrol proposals 2026-08-16 11:45:24 +01:00
rcourtman
64db84a7e3 Clarify governed restart proposal policy 2026-08-16 11:32:36 +01:00
rcourtman
4195943300 Harden Patrol investigation evidence traversal 2026-08-16 10:56:34 +01:00
rcourtman
991b3cad35 Reject empty and blocked Patrol evidence 2026-08-15 22:56:51 +01:00
rcourtman
acef44e162 Restrict Patrol grounding to infrastructure evidence 2026-08-15 22:16:00 +01:00
rcourtman
b088319589 Validate all Patrol investigation manifests 2026-08-15 21:37:05 +01:00
rcourtman
b3a9edd313 Require successful Patrol investigation evidence 2026-08-15 21:19:44 +01:00
rcourtman
857af3e3cc Keep scoped Patrol investigations grounded 2026-08-15 20:58:49 +01:00
rcourtman
12aa31b506 Keep live Patrol context aligned with readiness 2026-08-15 13:05:15 +01:00
rcourtman
80027e98d6 Project Patrol tools from resource scope 2026-08-15 12:38:41 +01:00
rcourtman
2a15ccbefa Reject unadvertised Patrol tool calls 2026-08-15 12:15:17 +01:00
rcourtman
0d0456f435 Require grounded Patrol investigations 2026-08-15 11:48:51 +01:00
rcourtman
3a99f72a5c Ground Patrol fallback summaries in evidence 2026-08-15 11:01:10 +01:00