mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-11-30 09:32:45 +01:00
Stacked on rcourtman/Pulse#4222. Until that merges this diff shows its two commits as well. Only the last commit is new. A run on a host whose agent has commands off ends "needs attention", and the only explanation was whatever the model wrote. Nothing on the Patrol page said that on a default install Patrol can read logs and run fixes on no host at all. ## What changes - **The hand-back is Pulse's.** A stored run carries `commands_disabled` (host, reason, step). The orchestrator writes it from the catalog. No model text sets it. A finding review leads with it: what Patrol could not do on that host, the step, and a link to the install command. The model's summary stays below, as written. - **The Patrol page says where Patrol can only watch.** One row in the control section: how many agent hosts have commands off, the first three by name, the rest one click away, and the same link. It is absent in Watch only, during setup, and when every host is ready. - **The one step is one click.** `/settings/infrastructure?add=agent&commands=1` opens the agent installer with "Allow Pulse to run commands on this host" ticked, once per arrival. Every other way in keeps it unticked. No agent is changed: the owner still runs the command on the host. - **Docker update badge.** It reads the server's `host_commands_disabled` code, so it keeps naming the fix. ## Why re-run the install command Pulse cannot enable commands from the server on a default install. The installer marks the agent monitoring-only, that profile refuses a remote enable, and the default token has no exec scope. The installer's own help text already says so. ## Judged as a user would - Job, in their words: "Patrol said it needs me. Why didn't it fix this, and what do I do?" - Exercised live on a private mock stack: the row collapsed and expanded, the link into the installer, unticking the box, the finding review, Watch only, light theme, a 390px phone. - Distance: the count and three names need no click. All names need one. The installer with the box ticked needs one. - Cut after the first pass: a ready/total bar that repeated the count pill, and an icon that did nothing. - Words: "commands" is the installer's own checkbox word. No "command agent", "channel" or "execution". - Evidence: #1728, #1615 and #1891 ("fails but no recourse action offered"). ## Proof - `InvestigationSection.test.tsx`: the notice, its link, its place above the summary, and no notice for a running run or a run without the fact. - `PatrolIntelligenceHeader.render.test.tsx`: the row's count, names, expansion and link, and the four cases where it stays quiet. - `patrolCommandAccessModel.test.ts`: which hosts count (a stale agent and an integration-only host do not). - Browser receipt in `frontend-modern/browser-verification/`. Draft until #4222 merges. Auto-merge is off: this follows #4222 and the fault-set score.