Commit Graph

190 Commits

Author SHA1 Message Date
pulse-triage[bot]
7fcfbee5b8 Align History zoom, custom window, and upgrade banner Help with runtime
Document two recently merged runtime capabilities in shipped Help and API
reference guides:

- Document drawer History click-and-drag brush zoom, Escape cancellation,
  double-click and Reset zoom controls, paused 30-second live polling while
  zoomed, and the keyboard-accessible Select time window editor (including
  DST offset disambiguation) in docs/METRICS_HISTORY.md.
- Document GET /api/metrics-store/history exact custom window start and end
  Unix-millisecond query parameters, mutual exclusivity with range, bounds
  validation (1s to 365d, non-future end, HTTP 400 on invalid inputs), and
  custom response fields in docs/METRICS_HISTORY.md and docs/API.md.
- Document upgrade readiness checks (Update blocked, Review checks, upgrade
  warnings, Upgrade checks panel, and Install blocked) in the global update
  banner and Confirm Update dialog in docs/AUTO_UPDATE.md.
- Sync mirrors under frontend-modern/public/docs/ and add runtime-backed
  regression tests in scripts/tests/test_navigation_help_docs.py.

Contract-Neutral: Documentation, shipped Help mirror, and doc regression test updates describing already-landed runtime behaviour (#5335 and #5393) with no runtime, API, or subsystem contract changes.
Change-source: pulse-maintainer
2026-11-28 14:12:49 +00:00
pulse-triage[bot]
4f8424f868 Align Audit Logging and Audit API Help with runtime
Document all nine additional live emitted audit event types
(config_exported, config_imported, config_auto_import, node_added,
node_updated, node_deleted, websocket_multitenant_access_denied,
websocket_org_access_denied, and audit_cleanup), SQLite 90-day default
retention and 24-hour cleanup cadence, audit export format/verification
and CSV formula-neutralisation bounds, and HTTP 400/404/501/503 store
contention and unavailability responses across docs/AUDIT_LOGGING.md,
docs/API.md, their shipped mirrors, and source-bound doc tests.

Contract-Neutral: Documentation and documentation-test alignment with existing audit runtime behaviour; no runtime, API, schema, or UI contract changes.
Change-source: pulse-maintainer
2026-11-28 12:46:40 +00:00
pulse-triage[bot]
ada419c564 Align Scheduler, Update API, and Security Help with runtime
Update Help guides (with byte-for-byte in-app mirrors in
frontend-modern/public/docs/) and add source-bound doc regression tests:
- Scheduler and Alerting Help (docs/ALERTING.md, docs/API.md,
  docs/api/SCHEDULER_HEALTH.md, docs/monitoring/ADAPTIVE_POLLING.md,
  docs/monitoring/PROMETHEUS_METRICS.md,
  docs/operations/ADAPTIVE_POLLING_ROLLOUT.md,
  scripts/tests/test_watchdog_help_docs.py): document the shared worker
  execution-boundary fence landed in #5379 so operators know both local
  per-monitor workers and the POLL_TASK_WORKERS process dispatcher skip
  provider setup for claims retired after dequeue or slot admission while
  preserving any explicit replacement's own due time.
- Server update, teardown, and agent-capabilities API Help (docs/API.md,
  docs/AUTO_UPDATE.md, scripts/tests/test_api_reference_routes.py):
  document POST /api/updates/rollback, GET /api/updates/release-notes and
  its asset route, POST /api/auto-unregister, GET /api/agent/capabilities,
  and the exact scopes, body limits, cache headers, and status codes of
  the update API routes.
- Security registration Help CI repair (SECURITY.md,
  frontend-modern/public/docs/SECURITY.md,
  scripts/tests/test_security_docs.py): move the command-enabled install
  token agent:exec ceiling note out of the two-item Auto-Registration
  Security bullet list into a standalone paragraph so
  registrationSecurityGuide.test.ts passes again on main after #5383, and
  guard the two-bullet list shape in Python doc tests.

Contract-Neutral: Documentation, shipped in-app Help mirrors, and doc verification tests aligned with already-landed runtime behavior; no runtime, API, schema, or UI contract changes.
Change-source: pulse-maintainer
2026-11-28 11:21:00 +00:00
pulse-triage[bot]
95aea0c3f6 Preserve PUT /api/alerts/config phrasing in API.md for docsLinks
Keep the original PUT /api/alerts/config line untouched so docsLinks.test.ts
matches its exact phrasing while documenting the 1 MiB body limit and list
caps on the following lines, and update the mirror and doc assertion.

Contract-Neutral: Documentation phrasing preservation, mirror sync, and doc test alignment; no runtime, API, schema, or subsystem contract changes.
Change-source: pulse-maintainer
2026-11-28 10:04:00 +00:00
pulse-triage[bot]
1513179c3c Align Data Flow, Alerting, and Alert API Help with runtime
Update docs/monitoring/METRICS_DATA_FLOW.md so the Bars and live status
table covers the landed stale-telemetry UI across Proxmox Backups (#5364),
Machines and Standalone VMs (#5361), and Workloads (#5369).

Update docs/API.md and docs/ALERTING.md (with byte-for-byte in-app Help
mirrors) to document the landed alert-config update bounds (1 MiB body,
500 customRules, 100 per-rule filters, 100 escalation levels), the
bulk acknowledge/clear and incident-note request contracts and caps
(16,384 identifiers, authenticated caller enforcement, non-echoed unknown
IDs), the 16 MiB active-alert recovery checkpoint cap with SQLite
fallback, and Apprise CLI stdin/title hardening, backed by source-bound
assertions in scripts/tests/test_alerting_outage_help_docs.py.

Contract-Neutral: Help documentation, shipped docs mirrors, and doc unit tests aligned with already-landed runtime behavior; no runtime, API, schema, or subsystem contract changes.
Change-source: pulse-maintainer
2026-11-28 09:52:33 +00:00
pulse-triage[bot]
7d1131aad5 Align Scheduler and Alerting Help with retired poll claim release
Document the retired waiting-claim release behaviour landed in #5368
across unclaimed operator Help guides and bind it to internal/monitoring
source:

- docs/monitoring/PROMETHEUS_METRICS.md, docs/monitoring/ADAPTIVE_POLLING.md,
  docs/api/SCHEDULER_HEALTH.md, docs/operations/ADAPTIVE_POLLING_ROLLOUT.md,
  docs/ALERTING.md (with mirrored frontend-modern/public/docs/ALERTING.md),
  and docs/API.md (with mirrored frontend-modern/public/docs/API.md):
  document that under POLL_TASK_WORKERS a confirmed target removal releases
  a claim still waiting in stage="waiting_for_slot" without starting
  provider setup or changing the concurrency cap so another due target can
  run, preserving any explicit replacement's own due time while leaving
  already-admitted stage="running" polls to keep their claim until they
  return.
- scripts/tests/test_watchdog_help_docs.py,
  scripts/tests/test_scheduler_polling_docs.py, and
  scripts/tests/test_scheduler_health_api_help_docs.py: bind the updated
  Help prose to acquireClaim, watchClaimRetirement, canStartClaim,
  claimRetired, and retirement channel close in poll_task_workers.go and
  task_queue.go while preserving the docs-only CI allowlist.

Contract-Neutral: Documentation, mirrored in-app Help, and doc-consistency tests only with no runtime, API, polling, alert, or subsystem contract change.
Change-source: pulse-maintainer
2026-11-28 08:24:53 +00:00
pulse-triage[bot]
aed225319e Align Scheduler Progress, Rollout, API, and Data Flow Help with runtime
Update docs/monitoring/ADAPTIVE_POLLING.md,
docs/operations/ADAPTIVE_POLLING_ROLLOUT.md,
docs/monitoring/METRICS_DATA_FLOW.md, docs/API.md (and its mirrored
frontend-modern/public/docs/API.md copy), and their source-bound
regression tests to close live runtime-to-Help gaps in Monitoring
progress (Weakest Area #1) and Storage Pools staleness (Weakest Area #6):

- Document pulse_scheduler_poll_planning_age_seconds (#5348) and
  panic-recovery logging retention under the running stage of
  pulse_scheduler_claimed_poll_overdue_seconds (#5344) across
  docs/monitoring/ADAPTIVE_POLLING.md,
  docs/operations/ADAPTIVE_POLLING_ROLLOUT.md, and the shipped in-app
  Scheduler Health reference in docs/API.md so operators diagnosing a
  quiet queue during a stall check unfinished planning passes and
  workers blocked in panic recovery logging.
- Add Storage Pools stale-reading cues (#5346) to the live platform
  tables summary in docs/monitoring/METRICS_DATA_FLOW.md, matching
  rowPresentation.ts and StoragePoolRow.tsx (amber Stale for clear
  stale pools, inline Stale data cue beside preserved worse states and
  alert headlines on desktop and phones, retained usage bars).
- Bind the new claims directly to live Go and TypeScript runtime source
  in scripts/tests/test_scheduler_polling_docs.py,
  scripts/tests/test_scheduler_health_api_help_docs.py, and
  scripts/tests/test_alerting_outage_help_docs.py.

Contract-Neutral: Documentation, mirrored in-app Help, and documentation consistency tests only; no runtime, API, polling, alert, telemetry, or UI code contract changes.
Change-source: pulse-maintainer
2026-11-28 05:04:33 +00:00
pulse-triage[bot]
c2a29b1e17 Align VMware, SAML, Notification Queue, and Alert Durability API Help
Update docs/API.md, its mirrored in-app Help copy under
frontend-modern/public/docs/API.md, and source-bound regression tests in
scripts/tests/test_public_docs_claims.py to fix a freshly merged env-var
name error and close live runtime-vs-Help gaps:

- Fix the VMware opt-out environment variable in docs/API.md from the
  non-existent PULSE_FEATURE_VMWARE=false to the real
  PULSE_ENABLE_VMWARE=false defined in internal/vmware/client.go
  (FeatureVMware), and bind the test directly to that constant.
- Document all five live SAML endpoints registered in
  internal/api/router_routes_auth_security.go and implemented in
  internal/api/saml_handlers.go (/api/saml/{providerID}/metadata,
  /login, /acs, /logout, and /slo) with their HTTP methods, cookie and
  session requirements, and error codes, plus the 409
  provider_managed_by_environment refusal on environment-managed SSO
  providers.
- Correct API token scopes on GET /api/notifications/dlq (settings:read
  and monitoring:read, plus limit defaults/cap) and POST
  /api/notifications/dlq/retry (settings:write), and document the four
  live /api/notifications/rehearsals routes from
  internal/api/alerting/notifications.go.
- Document the live /api/alerts/intent-policies routes,
  /api/alerts/history/durability and
  /api/alerts/history/durability/acknowledgement endpoints, and the
  X-Pulse-History-Complete / X-Pulse-History-Gap-Revision headers from
  internal/api/alerting/alerts.go and history_durability.go.

Contract-Neutral: Documentation, mirrored in-app Help, and documentation consistency tests only; no runtime, API, polling, alert, telemetry, or UI code contract changes.
Change-source: pulse-maintainer
2026-11-28 03:34:35 +00:00
pulse-triage[bot]
b46b02f3bb Align Physical Disk, Plans, and VMware API Help with runtime
Update unclaimed in-app Help guides, their shipped public mirrors, and
source-bound regression tests to match landed Pulse runtime behaviour:

- docs/monitoring/METRICS_DATA_FLOW.md, docs/VM_DISK_MONITORING.md, and
  docs/ZFS_MONITORING.md (+ mirrors): align with physical-disk
  stale-reading cues from #5333 (20146aa2de) across Storage tables,
  Physical Disks & SMART cards, linked pool member details, guest
  physical disks, and DiskDrawerOverview (amber Stale verdict for clear
  stale disks, inline Stale data cue preserving Replace Now / Needs
  Attention, muted last-known temperatures and SSD life without live
  Running Hot, and deferred temperature/SMART history charts until live
  reporting recovers).
- docs/PULSE_PRO.md (+ mirror): align the Paid Feature Proof Map,
  Feature Matrix, Pro plan summary, and Feature Status API keys with
  pkg/licensing/features.go and self_hosted_feature_catalog.go by adding
  FeatureExternalProbe (external_probe, Pro/Cloud remote availability
  probes while local checks stay free in Community) and marking
  FeatureUnlimited as MSP/Enterprise capacity policy (Y*) rather than a
  TierCloud default.
- docs/API.md (+ mirror): document the live VMware vSphere connection
  management routes (/api/vmware/connections, /test, /{id}/test,
  /preview, /{id}/preview, and PULSE_FEATURE_VMWARE=false 404
  vmware_disabled) from internal/api/router_routes_registration.go and
  internal/api/vmware_handlers.go, and complete GET /api/resources
  source and type query values (truenas, vmware/vmware-vsphere,
  availability, docker-host, network-endpoint, network-share).
- scripts/tests/test_alerting_outage_help_docs.py and
  scripts/tests/test_public_docs_claims.py: bind each updated guide and
  shipped mirror directly to live Go and TypeScript source.

Contract-Neutral: Documentation, shipped in-app Help mirrors, and source-bound Python doc tests aligned with already-landed runtime behaviour without changing API contracts, polling, alerting, telemetry, or UI source.
Change-source: pulse-maintainer
2026-11-28 02:10:17 +00:00
pulse-triage[bot]
834d9023ba Preserve Patrol weekly digest API doc contract for docsLinks check
Keep the 'nothing new is persisted' phrasing and docs/PATROL_WEEKLY_DIGEST.md pointer alongside the in-app Help link to AI.md#weekly-summary-and-email in docs/API.md and its Help mirror so frontend-modern/src/utils/__tests__/docsLinks.test.ts passes in Mirrored Help proof.

Contract-Neutral: Documentation, Help mirror, and doc-test alignment only; preserves the in-app Help link and existing Patrol weekly digest API doc assertions.
Change-source: pulse-maintainer
2026-11-28 00:19:58 +00:00
pulse-triage[bot]
0d57e1de54 Align Architecture, Security, API, and Operations Help with runtime
Remove stale Claude OAuth and request-assisted MSP claims from
ARCHITECTURE.md and its in-app Help mirror so they match fail-closed
OAuth removal and self-serve provider-hosted MSP plans.

Align docs/security/TEMPERATURE_MONITORING.md with container SSH key
fallback warnings, source-IP authorized_keys restriction, and the
default-organization boundary for multi-tenant SSH collection.

Align docs/operations/ADAPTIVE_POLLING_ROLLOUT.md with current
dead-letter queue clearing on a later scheduled poll success while
preserving the older-build caveat.

Document landed security boundaries in SECURITY.md, docs/API.md, and
their in-app Help mirrors: header-only X-CSRF-Token checks, live-session
pulse_csrf issuance, atomic failed-login lockout across Basic-auth
configuration transfers, in-flight request-body credential revalidation,
admin session invalidation on quick-setup rotation, and cross-origin
base-URL credential re-entry for AI provider settings. Update the Patrol
weekly digest link in docs/API.md to point at AI.md for in-app Help and
add source-bound regression tests in scripts/tests/test_public_docs_claims.py.

Contract-Neutral: Documentation, Help mirrors, and doc regression tests aligned with existing runtime behaviour without changing code contracts.
Change-source: pulse-maintainer
2026-11-27 23:47:32 +00:00
pulse-triage[bot]
41f9f71c6c Align Alerting, Patrol, API, and Agent Security Help with runtime fixes
Document four recently landed monitoring, alerting, and Patrol runtime
changes in unclaimed in-app Help guides and their mirrored public copies,
with source-bound Python regression tests:

- docs/ALERTING.md (+ mirror): document single-snapshot latest-completion
  Prometheus poll freshness (#5246), stopped-scheduler exclusion from
  pulse_scheduler_queued_poll_overdue_seconds while blocked workers stay
  in pulse_scheduler_claimed_poll_overdue_seconds (#5238), and immediate
  non-retryable TLS terminal failures across email, webhook, and Apprise
  destinations without an email/webhook Skip TLS Verify toggle (#5167).
- docs/AI_AUTONOMY.md and docs/API.md (+ mirrors): document the 24-hour
  approval window for background and refreshed Patrol action plans
  (DefaultPatrolPlanTTL) versus the 5-minute default expiry for direct API
  and interactive plans (DefaultPlanTTL) (#5170).
- docs/AGENT_SECURITY.md (+ mirror): align the container failure-log AI
  disclosure line with the retired in-app Assistant chat (Patrol and
  legacy Pulse Mobile chat until 31 March 2027).
- scripts/tests/test_alerting_outage_help_docs.py and
  scripts/tests/test_public_docs_claims.py: bind each documented behaviour
  directly to live Go runtime sources.

Contract-Neutral: Documentation, mirrored in-app Help, and Python doc-regression test alignment for already-landed runtime behaviour with no runtime, API, schema, or subsystem contract changes.
Change-source: pulse-maintainer
2026-11-27 17:02:27 +00:00
pulse-triage[bot]
8f08bed13f Align Recovery and API Help with Proxmox replication staleness
Document Proxmox replication stale-reading visibility from #5278 and the
existing read-only /api/replication/jobs endpoint in unclaimed Help docs:

- Add Proxmox -> Replication (/proxmox/replication) to docs/RECOVERY.md
  under "Where to look" and add "Proxmox replication freshness" covering
  backend-derived node/connection staleness, the amber Stale filter chip
  and Stale data / Stale status labels, inline Stale cues on non-healthy
  jobs, stale search matching, expanded drawer notices (Last reported:
  Healthy and Last polled), live recovery clearing, and safe inspection
  without restarting Pulse or forcing manual syncs.
- Add "Proxmox Replication Jobs" (GET /api/replication/jobs with
  monitoring:read, optional platform/instance/guest filters, lastPolled,
  and source-health inheritance from /api/resources) to docs/API.md.
- Mirror both guides to frontend-modern/public/docs/.
- Add ProxmoxReplicationFreshnessHelpDocsTest to
  scripts/tests/test_pve_backup_troubleshooting_docs.py binding both
  sections to ProxmoxReplicationTable.tsx, internal/api/replication.go,
  and internal/models/models.go.

Contract-Neutral: public Help documentation and source-bound doc tests aligned with existing Proxmox replication UI and /api/replication/jobs handler without changing runtime, API, or subsystem contracts.
Change-source: pulse-maintainer
2026-11-27 15:40:55 +00:00
pulse-triage[bot]
025e1132ec Align watchdog, API, and TrueNAS Help with poll lifecycle fixes
Document four monitoring-progress and poll-lifecycle fixes landed on main
across the unclaimed in-app Help guides and their mirrored public copies,
with source-bound Python regression tests:

- docs/AVAILABILITY.md and docs/API.md (+ mirrors): document external
  watchdog recovery and replacement truthfulness (#5226), including
  immediate clearing of Monitoring stalled (monitor_stalled) on fresh
  monitoring progress, synchronous clearing of lastSuccessAt and
  lastAttemptAt on URL replacement/removal/invalid save (while preserving
  lastSuccessAt when re-saving the same URL), and cycle fencing on
  shutdown or config replacement.
- docs/API.md (+ mirror): document monitor-local staleness scores in
  GET /api/monitoring/scheduler/health (#5234) and paused Proxmox VE
  passive cluster-discovery skipping in GET /api/config/nodes (#5251).
- docs/TRUENAS.md (+ mirror): document retiring-connection poller
  ownership retirement and in-flight RPC cancellation including blocked
  socket negotiation (#5239).
- scripts/tests/test_watchdog_help_docs.py,
  test_scheduler_health_api_help_docs.py, test_node_api_docs.py, and
  test_truenas_docs.py: bind each documented behaviour directly to its
  live Go runtime source.

Contract-Neutral: Documentation, mirrored Help, and Python doc-regression test alignment for already-landed runtime behaviour; no runtime, API, schema, or subsystem contract changes.
Change-source: pulse-maintainer
2026-11-27 12:59:46 +00:00
pulse-triage[bot]
4f3afcaafd Align API, Auto-Update, and Pro Help with health and upgrade checks
Document landed runtime and UI behavior across unclaimed in-app Help guides:
- API.md and docs/api/SCHEDULER_HEALTH.md: document Proxmox VE startup and
  reconnect failure recording, first-poll health authority in /api/connections
  and /api/monitoring/scheduler/health (#5210), TrueNAS and VMware shutdown
  cancellation handling and in-flight provider fencing (#5219), GET
  /api/updates/plan readiness check IDs, and the top-level Availability page
  (/availability) with DNS probe coverage.
- AUTO_UPDATE.md: document Upgrade checks in Settings -> System -> Updates
  and the Container data persistence warning for ephemeral Docker /data
  storage (including backup export, volume mount guidance, and
  PULSE_SUPPRESS_EPHEMERAL_DATA_WARNING=true).
- PULSE_PRO.md: align the licence recovery navigation path to
  Settings -> System -> Plans & Billing.

Sync the mirrored frontend-modern/public/docs copies and add source-bound
regression tests in test_scheduler_health_api_help_docs.py,
test_update_recovery_docs.py, and test_license_recovery_docs.py.

Contract-Neutral: Documentation and doc-regression test alignment with already landed runtime and UI behavior; no API, schema, or runtime contract delta.
Change-source: pulse-maintainer
2026-11-27 00:15:01 +00:00
pulse-triage[bot]
48f61c6795 Document alert reevaluation and dead-letter recovery in in-app Help
Explain how to check whether an already-open threshold alert was
reevaluated via GET /api/alerts/active (matching id and startTime,
comparing metricStatus.observedAt against lastSeen and
metricStatus.lastBreachAt, and noting that volatile metricStatus is
absent right after a restart) and add pulse_scheduler_dead_letter_depth
recovery clearing to docs/ALERTING.md, docs/API.md, and their shipped
frontend-modern/public/docs/ mirrors. Bind the documented route, scope,
fields, phases, volatile persistence stripping, and dead-letter metric
against live Go source in scripts/tests/test_alerting_outage_help_docs.py.

Refs: #5089
Contract-Neutral: Documents existing GET /api/alerts/active metricStatus fields and pulse_scheduler_dead_letter_depth gauge in in-app Help with no runtime, API, collection, or release changes.
Change-source: pulse-maintainer
2026-11-26 19:49:59 +00:00
pulse-triage[bot]
f75afe3953 Document Scheduler Health fields and boundaries in in-app API Help
Expand the Scheduler Health section in docs/API.md and its shipped
frontend-modern/public/docs/API.md mirror so operators clicking through
from GET /api/state/summary in in-app Help can read updatedAt, enabled,
queue counts and oldestOverdueSeconds, pollStatus partial-read errors,
breaker retryAt, dead-letter recovery clearing, deleted availability
check retirement and the scope boundary separating scheduled polling
from agent reports, WebSocket delivery and alert evaluation. Note
deleted availability-check retirement in docs/api/SCHEDULER_HEALTH.md
and verify fields, routes and shipped Help links against live Go structs.

Refs: #5089
Contract-Neutral: Documents existing GET /api/monitoring/scheduler/health fields, retirement behaviour and read-only diagnostic boundaries with no runtime, API, collection or release changes.
Change-source: pulse-maintainer
2026-11-26 18:52:31 +00:00
pulse-triage[bot]
c61d831c3b Explain what the fleet summary timestamp can prove
A report from one source can advance the shared state timestamp while another source has not produced a new reading. Point readers to the affected connection and sample instead of the fleet timestamp.

Contract-Neutral: Documents the existing state summary timestamp and read-only checks. The endpoint, response, access and reporting behaviour are unchanged.
Change-source: pulse-maintainer
2026-11-25 19:38:03 +00:00
rcourtman
321a7f95c9 Harden agent action routing, metadata policy, and disclosure boundaries
Separate user-editable host metadata writes from administrator command
execution policy so monitoring:write callers cannot toggle or clear
commandsEnabled. Require Docker container action dispatch to verify
live session ownership and full 64-character lowercase container IDs,
and refuse dispatch when a single token reports multiple Docker hosts
for the target identity.

Verify Proxmox node action runner routing against the live session
hostname and prevent automatic host-report node links from stealing a
node held by another reporting agent. Gate command details on agent
resource-context, changes, and events routes behind action capability
checks, and withhold probe credentials from agents using other tokens.

Contract-Neutral: Security hardening for agent action routing, metadata authority, and command/probe disclosure without changing public API contracts.
2026-11-24 17:09:37 +00:00
rcourtman
6be44e133c Bound HTTP metrics, request bodies, JWTs, suppression, and downloads
Use registered ServeMux route patterns and fixed HTTP method labels in metrics, cap JSON request bodies across operator-state, maintenance review, resource links, alerts, auto-register, and AI handlers, bound handoff and purchase-return JWTs before parsing, bound TrueNAS topology parsing and JSON-RPC WebSocket message size, cap alert suppression reasons at 240 characters, and share bounded in-memory buffers with write deadlines for GitHub-proxied agent downloads.

Contract-Neutral: Security fixes bounding memory usage and label cardinality against OOM and DoS
2026-11-24 14:20:36 +00:00
rcourtman
f7f5354097 Enforce multi-tenant org isolation, limits, and token locking
Revoke organization-bound API tokens on org deletion and before ID reuse, cap non-admin owned organizations at 20 on creation and transfer, close in-runtime public signup on provisioned workspaces and preserve existing orgs, avoid starting cold tenant monitors under config.Mu, store tenant Docker prepare-token records in the instance inventory, scope maintenance verification reruns to the request org, and read API token metadata under config.Mu across readiness and discovery readers.

Contract-Neutral: Security fixes closing multi-tenant isolation, lifecycle cleanup, org limit, signup, and data-race bugs
2026-11-24 14:20:36 +00:00
rcourtman
9a029a47f1 Enforce RBAC, admin, token scope, and billing-state authority
Require full-access instance tokens for SSO provider mutations and RBAC admin routes, disable credential-less loopback trust and recovery in hosted mode, prevent logout races in ensureAdminSession, enforce owner org membership for owner-acting tokens outside config.Mu, gate alert policy and operator-state remediation fields for sessions, require admin and settings:write on checkout start, and redact entitlement lease credentials from billing-state API responses and logs.

Contract-Neutral: Security fixes closing authorization, scope, loopback trust, session-race, and credential redaction gaps
2026-11-24 14:12:37 +00:00
rcourtman
036986434b Require admin auth and validate values on SSH config endpoints
Remove setup-token bypass on POST /api/system/ssh-config and POST /api/system/verify-temperature-ssh so both require admin session or instance settings:write scope. Validate allowlisted SSH directive argument values in HandleSSHConfig using OpenSSH word splitting so shell metacharacters, command substitution, and option flags in ProxyJump or HostName values are rejected.

Contract-Neutral: Security bug fix removing unintended setup-token bypass and validating SSH directive values
2026-11-24 14:12:05 +00:00
rcourtman
357f43f32e Harden AI tool sandboxing, agentexec sessions, and Patrol/Assistant isolation (#5077)
Hardens Pulse agentexec command transport, AI provider/tool sandboxing,
and Assistant/Patrol authorization boundaries:

- Bind agentexec sessions to organization and live connected agent token
ownership, reject NUL bytes in agent IDs, add write deadlines so stalled
agents cannot freeze dispatch, and enforce symlink-safe `/var/log` reads
with target-aware command policy.
- Sandbox AI read-only tools and providers: reject `lsblk --sysroot`,
bare hostnames in `ss` filters, sensitive path escapes, unbounded
`pulse_query` preallocation, unescaped `@path` attachments in Claude
subscription prompts, SSRF to broadcast/non-global-unicast targets in
`fetch_url`, Gemini key exposure, and command output leaks in failed
Codex turns.
- Enforce Assistant session ownership and handoff authority, bound
unknown-session abort tracking, prevent cross-org inventory leakage
after monitor reload, lock Patrol dismiss/resolve note steering behind
host-command authority, redact tool outputs from Patrol run history for
non-admins, protect saved AI provider keys on base URL changes, and
serialize AI settings updates.
2026-11-24 14:09:08 +00:00
rcourtman
0651eadf98 Harden alerts, CloudCP auth, relay trust, probes, recovery, and outbound checks (#5081)
Hardens Pulse alerts, notifications, CloudCP account/audit
authorization, relay channel trust, VMware/Proxmox/HTTPS probes,
recovery stores, WebSocket queueing, and outbound host checks:

- Enforce relay `KEY_EXCHANGE` encryption and block relayed traffic from
inheriting direct loopback trust.
- Harden Pulse Cloud control-plane membership sync (two-way
`SyncWorkspaceAccess` for promotions, demotions, and removals,
preventing magic-link re-addition of removed buyers), remove
header-spoofable audit actor IDs, and cap audit event field sizes.
- Bound alert configuration lists, escalation levels, bulk ack/clear ID
counts, Docker restart-loop alert state, per-host event-log snapshot
pruning, restart recovery markers, and Kubernetes cluster/VMID
backup-age alert keys.
- Harden notification destinations and webhook/Apprise delivery: reject
blank SMTP loopback targets, protect saved notification secrets on
destination changes, cap and sanitize webhook headers, and reject NUL
bytes in Apprise CLI arguments.
- Harden VMware inventory parsing (cycle detection in
`resolvePlacement`, VM/goroutine/JSON-array budgets), Proxmox JSON
response limits, and HTTPS availability probe TLS verification, error
size bounds, and write-only secret handling.
- Bound recovery series date ranges and isolate PVC rollup keys across
clusters, bound WebSocket `requestData` queueing for stalled clients,
and block IPv6 zone `@` loopback bypasses in tenant outbound checks.
2026-11-24 14:06:43 +00:00
rcourtman
83f17f12d2 Harden config import authority, tenant limits, SSO reload, and .env
Restrict updateEnvFile in ConfigPersistence so UPDATE_CHANNEL is only
written for supported canonical channels (stable or rc), preventing
multiline injection into .env.

Keep destination API tokens and SSO settings during POST
/api/config/import unless the caller is an instance administrator or
holds an instance-wide wildcard API token.

Apply tenant outbound destination limits and Apprise CLI restrictions
to organization administrator imports before staging any files.

Reload and publish restored SSO settings and withdraw stale cached OIDC
and SAML services after a default-organization import replaces SSO
configuration.

Contract-Neutral: Security hardening fix without public contract change
2026-11-24 12:28:52 +00:00
rcourtman
2350708f30 Harden node updates, cluster detection, PBS TLS, and reload scoping
Refuse PVE, PBS, and PMG node updates that change the host or a cluster
member override address while keeping a stored password or token value.

Probe PVE cluster detection from deep copies, re-locate the target
instance under config.Mu before storing results, guard PVE slice
removals under config.Mu, and return 409 Conflict if a connection is
removed or changed during cluster refresh.

Honor the requested VerifySSL and fingerprint settings during PBS
turnkey token creation in handleAddNode.

Scope non-default tenant node reloads to MultiTenantMonitor.ReloadTenant,
coalesce queued reloads in ReloadableMonitor.Reload, and space
auto-register reloads for existing connections per organization.

Contract-Neutral: Security hardening fix without public contract change
2026-11-24 12:28:52 +00:00
rcourtman
35f659408c Enforce org, host, TLS, and scope bounds in setup and register handlers
Close four authorization and TLS policy gaps in the Proxmox setup and agent install handlers:

- Refuse org-bound agent tokens in /api/auto-register outside their authorized organizations including default, and compare the WebSocket Upgrade header untrimmed to match auth middleware.
- Bind /api/auto-unregister setup tokens to the recorded host as spelled before marking a token used, in both live and recent grace-period branches.
- Record VerifySSLExplicit on PBS connections, prevent ungranted background agent re-registration from lowering VerifySSL or pinning an unverified certificate over chosen CA verification.
- Require callers requesting enableCommands on /api/agent-install-command to hold agent:exec themselves, and document the requirement in docs/API.md.

Contract-Neutral: Security hardening fix without public contract change
2026-11-24 12:28:52 +00:00
rcourtman
89d7d2e8af Harden Patrol authority, tool outputs, and AI settings updates
Enforce action-execute authority on Patrol prompt inputs and tool outputs, and harden AI settings saves against secret exfiltration and stale-autonomy races:

- Require action-execute capability on knowledge note mutations, Patrol objective writes, and finding notes, and refuse free-text note or resolution_note fields on dismiss/resolve without host-command authority.
- Bind withAssistantActionAuthority on Patrol run history, Patrol stream, and investigation transcript routes and withhold host tool outputs unless the caller holds host-command authority.
- Refuse AI settings updates that move an OpenAI, Z.ai, or Ollama base URL to a different origin while retaining an existing secret unless the credential is re-entered or cleared.
- Decode the AI settings request body before loading config, serialize AI settings saves through the policy-mutation coordinator while preserving stored Patrol autonomy authority, and guard Service.LoadConfig against overwriting concurrent autonomy updates via patrolAutonomyRevision.

Contract-Neutral: Security hardening of AI tool sandboxing, agentexec sessions, and Patrol/Assistant authorization without public contract delta
2026-11-24 12:28:48 +00:00
rcourtman
5a1e9e2e6c Harden Assistant session ownership, abort cleanup, and org read state
Confine Assistant sessions to their owning callers, prevent abort map memory leaks, and preserve tenant read-state isolation across reloads:

- Record a server-derived session owner on Assistant sessions and enforce chat.SessionAccess across list, read, rename, delete, abort, handoff lookup, and chat turns, returning 404 for foreign or inaccessible sessions.
- Track supplier HandoffAuthority on stored handoff envelopes so lower-privilege handoff context never replays into a higher-authority turn when an administrator continues a session.
- Record session aborts only on active turn loops in AbortSession so aborting idle or unknown session IDs cannot leak unbounded memory.
- Resolve each organization's own read state in AIHandler.SetReadState and re-point tenant chat services after Router.SetMultiTenantMonitor replaces the monitor manager.

Contract-Neutral: Security hardening of AI tool sandboxing, agentexec sessions, and Patrol/Assistant authorization without public contract delta
2026-11-24 12:28:48 +00:00
rcourtman
a138a6e1c1 Harden VMware inventory bounds, Proxmox JSON limits, and HTTPS probes
Bound vCenter inventory lists and nested JSON arrays before decoding,
prevent infinite recursion on cyclic placement parent chains, and bound
Proxmox guest-agent JSON responses before unmarshaling.

For availability probes, verify the HTTPS server certificate (trusted
chain or pinned SHA-256 fingerprint) before sending stored credentials,
header values, or request bodies unless explicitly opted out. Cap HTTP
probe response headers at 64 KiB and transport error strings at 240
bytes, and require re-entering write-only HTTP secrets when assigning a
new host agent to an availability check.

Contract-Neutral: security hardening and additive HTTPS probe TLS verification options
2026-11-24 11:59:33 +00:00
rcourtman
de26d66a58 Add native DNS resolution availability checks
Adds native DNS resolution monitoring (protocol dns) so operators can verify resolvers like Pi-hole, AdGuard Home, Technitium, and Unbound directly without maintaining a custom HTTP wrapper.

- Add AvailabilityProbeDNS and AvailabilityDNSConfig (queryName, recordType A/AAAA/CNAME/TXT/MX/NS/SRV/PTR, transport udp/tcp, optional expectedValue) with config revision tracking and default port 53.
- Implement DNS probe execution in internal/availabilityprobe/dns.go using github.com/miekg/dns, separating transport reachability from RCODE, empty-answer, and value-mismatch failures (automatically shared with Pro remote host agents).
- Add DNS resolution protocol option, DNS resolver preset, DNS query form fields, and DNS-specific test feedback in AvailabilityTargetSlot and target presentation helpers.
- Update docs/AVAILABILITY.md, docs/CONFIGURATION.md, and docs/API.md to document native DNS checks.
2026-11-24 08:37:52 +00:00
pulse-triage[bot]
abb3a6caa0 Explain how to check small Proxmox and PBS API readings
The API reference describes missing guest readings but never gives the unit
for byte-backed capacity percentages. Show how to compare used and total
without treating a missing metric as a measured zero.

Refs: #4905
Contract-Neutral: Documents the existing API units and read-only comparison. No runtime, schema, access or navigation change.
Change-source: pulse-maintainer
2026-11-23 02:48:01 +00:00
pulse-triage[bot]
1789419fcf Document how to check a Proxmox cluster refresh without retrying it
Use a read-only inventory check after a lost response. Distinguish the saved name from resumed polling and preserve the existing connection.

Refs: https://github.com/rcourtman/Pulse/discussions/4904
Contract-Neutral: Clarifies existing API and polling behavior. No changes to runtime, permissions, API schema or navigation.
Change-source: pulse-maintainer
2026-11-22 22:35:27 +00:00
pulse-triage[bot]
a571866c45 Report WebSocket state stalls without failing liveness
A WebSocket welcome can precede a stuck state build. Report when the current slot holder is overdue, without adding work or exposing shared workspace activity. Move the existing troubleshooting action before the sample response so operators can reach it on a phone, and keep the diagnostic limits with the response.

Refs #3107

Change-source: pulse-maintainer
2026-11-20 14:40:38 +00:00
rcourtman
54a854276e Hold the map back from release builds until it is reviewed
The map was built in two days, in about twenty pull requests, and has
never been in a beta. It has no end-to-end spec, has not been checked in
the light theme, in Firefox or Safari, on a phone or on a large estate,
and its guide was out of date within two hours of merging. Richard:
"before this reaches users, we need to be absolutely certain that it is
done in a way which is complete." The next candidate is cut from main,
so as things stood it would have carried the map to users unreviewed.

A release build now has no way into the map and says nothing of it. The
route is not registered, the header has no map button, the availability
form makes no offer about how the map draws a check, and the docs index
and the availability and API references no longer link or mention it.
A development build shows all of it, so the review can be done on the
real page.

The check types added for the map stay released. A router is a router
whether or not a map draws it.

Releasing the map is one deliberate change: INFRASTRUCTURE_MAP_RELEASED
set to true in a commit that says the review passed, with the guide
links restored. The guide itself is corrected here: the map is opened
from the header, not from a tab on the window edge.

Contract-Neutral: the unified-resources contract is updated in this commit. App.tsx and AppLayout.tsx gain one condition around the map's route and header button, AvailabilitySettingsPanel.tsx and AvailabilityTargetSlot.tsx one condition each around wording about the map, and the API reference loses one sentence about the map; no rule that ai-runtime, api-contracts, cloud-paid, frontend-primitives or storage-recovery state changes.
2026-11-19 14:12:23 +00:00
rcourtman
244c5f577d Let a check's type decide how it is drawn and listed
An availability check already had a stored type: machine, service or
device. The map added this week ignored it and read the check's name, so
"Core switch" was drawn as a switch and a check typed Device and named
"usw-24" was not. A check that probed a default gateway was a router
whatever it said. Pulse had two ideas of what a check is, and the form
that sets the type could not predict what the map would draw.

The stored type is now the one thing every page reads.

The server accepts three more types: router, switch and access point.
One browser module names all six and is read by the form, the settings
list and the map. The map draws a router, a switch or an access point as
that device with the ways in, and every other type as a check. That
includes a machine: only a Pulse agent makes a machine, on the map as on
the Machines table. The map no longer reads names or compares addresses.

The name reading is not thrown away. It moved into the form as an offer
beside Target type ("This looks like your switch"), with a button. A
name or a gateway address can suggest a type; nothing changes until the
owner takes it.

Links follow the same rule. A check's tile, an availability alert and a
record's owner link open that check's detail, where each used to land on
the whole list, or for an alert on Proxmox. The map's unmonitored
gateway tile creates a router check, and closing or saving that form
returns to the map.

A remote probe agent validates the type before it probes and does
nothing else with it, so an agent older than these types is sent
"device" for them and the saved type stays on the server. An older
server cannot run them at all; the availability guide says to set such
checks to Other device before a downgrade.

Not fixed here: a save that completes after the owner has left for a
second add form can close that form. The form's completion callback has
always outlived it.

Contract-Neutral: the unified-resources, api-contracts, frontend-primitives, monitoring and alerts contracts are updated in this commit. storage-recovery names routing/resourceLinks.ts as a shared file; the one addition there is a path to an availability check, and no storage or recovery route changes.
2026-11-19 11:57:19 +00:00
pulse-triage[bot]
d3ae1a5335 Bound metrics history reads without restoring plan limits
Keep the former 365-day maximum available on every plan. Refuse malformed or out-of-bound windows before resolving the monitor so bad input no longer silently selects 24 hours or reaches the store. Leave retention, authorization and agent/availability history limits unchanged.

Change-source: pulse-maintainer
2026-11-18 04:59:22 +00:00
rcourtman
107c4e29f9 Make metric history free on every plan
Community installs already stored 90 days of daily metric averages and
366 days of availability history, but the chart, availability and agent
history reads refused anything past seven days, and lapsed paid installs
had history past seven days purged 60 days after a downgrade. Locking
users out of data on their own disk is the kind of limit that drew the
loudest complaints before (the monitored-system cap, SSO), and it is not
what people pay for: 12 of 88 covered paid installs read past seven days
in the last 30 days.

The history routes now serve every supported range on every plan, and
storage retention alone decides how far back the answer goes.
long_term_metrics moves into Community as a compatibility key with no
upgrade reason. TierHistoryDays, max_history_days and the downgrade
purge (DowngradeRetentionState, the metrics store commercial ceiling and
the generated-report purge) are removed, so nothing deletes history or
reports because a plan ended. The chart and drawer lock panels, the
history plan link, the billing summary row and the plan copy that sold
history go with them. Paying users lose nothing.

The public pricing pages and licence server copy in pulse-pro change
when the release carrying this ships.
2026-11-17 20:11:48 +00:00
rcourtman
70bbf14ad0 Say what the webhook test endpoint takes
The API reference listed POST /api/notifications/webhooks/test with no
body. An agent installing v6.9.0-beta.2 from the docs sent it a
webhookId, got "webhook URL cannot be empty", and reported a bug. The
route tests the configuration in the body and never looks one up by ID;
a saved webhook is tested through POST /api/notifications/test, which is
documented a few lines above.

The reference now says both.

Contract-Neutral: documents the existing request body of an existing route; no API behaviour changes
2026-11-16 11:22:10 +00:00
pulse-triage[bot]
ea842411b4 Bind new Docker checks to the exact reviewed container endpoint
Require nonempty explicit creation selections and revalidate the complete host, container and published endpoint before probing and against fresh inventory before saving. Return a no-write conflict when the offer changed, and reject malformed or cross-host selections before probing. Preserve saved source keys, reattachment, tenant persistence and outbound policy. Adapt the retained withdrawn repair to current main and document its exact request contract.

Change-source: pulse-maintainer
2026-11-16 00:54:09 +00:00
rcourtman
3daa53a0af Offer availability checks for published container ports
A homelab user who starts a container has to add a monitor for it by hand
before anything tells them its service stopped answering. The Docker agent
already reports each container's published ports, so the Docker page now
offers one action that adds a check for every published web port that has
none. Nothing new is collected and no agent release is needed.

Only HTTPS and HTTP checks are added. On a live Docker 29 host with Pulse
running in a container on it, a plain connection to a published port was
accepted by Docker's proxy with nothing listening, so a connection check
there would pass for a dead service. For the same reason a port published
on loopback only is never checked, and a port that does not answer now
gets no check, since it would alert from its first run.

A recreated container gets a new Docker ID and resource ID. A check made
this way records its host and container name and is re-attached to the
namesake on that host while it still publishes the same port, so it keeps
its history. Verified on the same rig: an app killed inside a running
container raised an alert, and a recreated container kept its check.

The request adds only the ports the operator was shown, loads the saved
checks again after probing so a change made meanwhile is kept, and never
uses a loopback, link-local or multicast address reported by an agent.
2026-11-15 15:08:23 +00:00
rcourtman
47dac2d7c8 Refuse short API tokens at setup and name the host install type
Quick setup takes the API token from the caller and makes it a full-access
token, but checked only that it was not empty. An agent following the API
reference, whose example value was "token", sent "automation" and it was
accepted. Setup now refuses a token under 32 characters before saving
anything. The wizard sends 48 and is unaffected.

The same run built an agent token by hand because the install-command
endpoint and its reference named only the Proxmox types. The refusal now
names host as well, and the reference describes the host token response
and links the scripted first run.
2026-11-15 14:03:46 +00:00
rcourtman
19315ed391 Require execute permission for agent checks before dispatch
Planning an action, refreshing it, reviewing it (the readiness in
GET /api/actions/{id}) and approving it each asked the agent to check
the action first, for example a simulated `apt-get -s upgrade` for OS
updates, a package cache scan or a container inspect. Under an RBAC
authorizer a role with only the plan or approve permission could
therefore make the agent run commands. The default authorizer limits
those routes to administrators, so viewers were not exposed.

The check is agent work, so the action lifecycle now runs it before
dispatch only for callers allowed to execute actions, the permission
every other route that reaches an agent requires. Callers without it
still get every Pulse-side check, and dispatch always asks the agent,
so an action that is no longer feasible still cannot run. Patrol plans
keep the check. The Assistant plans for the chat caller under its own
identity and passes the caller's execute permission; a refresh uses the
refreshing caller's permission even when Patrol owns the action.

Keeping the check behind a separate permission was the alternative. It
would add a role permission without making dispatch any safer.
2026-11-14 12:05:34 +00:00
rcourtman
9bd857636b Require action permission for host work outside Assistant reads
Four ways remained for a signed-in user who cannot run actions, such as
a viewer, to start work on a monitored host or plan an action:

- POST /api/infra-updates/check needed only monitoring:write, which
  session callers skip. It queues the Docker update scan on an agent,
  whose registry lookups can run the host's credential helper. It now
  needs the action-execute capability, as the Actions execute route does.
- The Assistant's pulse_control plans an action on the shared lifecycle,
  but every session caller could use it once the control level allowed
  control tools. POST /api/actions/plan needs the action-plan
  capability; the chat route now binds the same capability and the
  Assistant offers and runs pulse_control only with it.
- POST /api/ai/findings/{id}/reinvestigate starts a Patrol investigation
  that runs commands on hosts and can plan a fix. It now needs both the
  plan and execute capabilities.
- The attention restart offer and its plan route checked the actor
  against the authorizer, which under the default authorizer admits
  every org member. A viewer was offered the restart and could plan it.
  They now also apply the request rule the Actions routes use.

Under the default authorizer these refuse non-admin sessions and
non-admin proxy roles; an RBAC grant decides otherwise. API tokens keep
their existing scope rules, including relay-mobile planning.
2026-11-14 09:07:00 +00:00
pulse-triage[bot]
a662f7d360 Explain read-only checks of saved API token expiry
Distinguish saved expiry, an expired credential and an unavailable record without changing a token or widening access. Keep Created and Last used separate from expiry and preserve existing token-route guidance in place. Link the new section from the existing expiry wording.

Contract-Neutral: Document existing metadata reads and expiry semantics only. No routes, scopes, storage, authentication or runtime behaviour change.
Change-source: pulse-maintainer
2026-11-07 10:30:15 +00:00
pulse-triage[bot]
b93eed6978 Keep the API reference's first address consistent with HTTPS guidance
The opening base URL sent remote readers towards plain HTTP despite the existing helper's explicit loopback-only default and verified HTTPS instructions. State the same transport boundary before any credential instructions without changing the request helper or authentication behaviour.

Contract-Neutral: Documentation-only transport clarification. API routes, authentication and runtime contracts are unchanged.
Change-source: pulse-maintainer
2026-11-07 02:31:10 +00:00
pulse-triage[bot]
7db88cba54 Explain optional expiry for API tokens
Show how temporary API access can expire and that an omitted lifetime leaves a token without expiry. Keep the existing monitoring-read example, scope defaults and editing/rotation rules visible at the same phone anchor, with a keyboard-accessible link to the existing lifetime option.

Contract-Neutral: Document existing token expiry semantics without changing routes, scopes, storage or runtime behaviour.
Change-source: pulse-maintainer
2026-11-07 00:09:55 +00:00
pulse-triage[bot]
9886bfe729 Explain recovery after an uncertain API token change
Link one-time rotation to a read-only saved-state check. Distinguish hidden or absent records, edited identity, and lost replacement secrets before a separately chosen recovery rotation. Preserve existing token reference information and never suggest wider grants or blind request replay. Exercise the copied private metadata read for success, refusal, redirect and interrupted responses.

Contract-Neutral: Documentation and copied-recipe tests only. Token runtime, API authority, persistence, frontend components and installed behaviour are unchanged.
Change-source: pulse-maintainer
2026-11-06 21:48:28 +00:00
pulse-triage[bot]
413ca1cf63 Let the private API guide helper send existing token edits
Accept PATCH in the bounded JSON-stdin method whitelist so the documented token edit operation can use the same private header and response files. Keep authentication, TLS, redirect refusal and nonretry behaviour unchanged. Exercise copied PATCH commands with success, auth/input failures, redirects, partial responses, proxy defaults and both header types.

Contract-Neutral: Documentation helper and executable documentation regressions only. Runtime endpoints, token scope rules and permissions are unchanged.
Change-source: pulse-maintainer
2026-11-06 18:28:23 +00:00