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
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
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.
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.
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
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.
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
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
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.
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.
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.
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.
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
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
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
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
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
The reference tried to create the protected built-in operator and described PUT like a partial edit. Use alert-manager consistently and link the complete-policy preservation instructions without pushing existing controls out of view.
Contract-Neutral: Documentation and executable documentation regressions only. Runtime routes, policy semantics and permissions are unchanged.
Change-source: pulse-maintainer
Explain that omitted or null create scopes request full access while an empty list is rejected. Keep the monitoring-read example and distinguish rename-only preservation from scope-change authority. Shorten existing edit prose without dropping its identity, expiry, organization or rotation rules.
Contract-Neutral: Clarify existing API token defaults and editing semantics without changing routes, grants or runtime behaviour.
Change-source: pulse-maintainer
Document the existing canonical agentId request and saved unlink intent, distinguish resource-pair unlink and removal, and preserve uncertain legacy/operator associations. Keep the shipped guides in sync and check the example against the handler and client.
Contract-Neutral: Documentation and registered recipe checks for existing agent unlink behaviour; no runtime, route, schema, permissions or subsystem contract changes.
Change-source: pulse-maintainer
Use an editor and fresh private file for token validation through the existing API helper. Exercise the copied recipe with real synthetic HTTP transport, two credential forms, adverse responses and fail-closed file preparation.
Contract-Neutral: Documentation and executable recipe coverage only; no runtime, access, route or subsystem contract changes.
Change-source: pulse-maintainer
Replace the bare recovery-action list with the existing client-bound effects, direct-loopback limits and single-use token consumption. Link password and lockout recovery instead of suggesting cookie transfer, a status-token probe or a blind retry. Keep the shipped reference identical and register source-consistency checks in the existing documentation test inventory.
Contract-Neutral: Documentation and registered consistency tests only; recovery admission, sessions, credentials and API behaviour are unchanged.
Change-source: pulse-maintainer
Separate public server liveness, authentication, WebSocket transport, initial state and current readings in the existing API and troubleshooting guides. Use original evidence rather than reset, probe or credential-export recipes; retain the unresolved runtime investigation.
Contract-Neutral: Existing help and registered renderer regressions only; no health, collection, authentication, recovery or runtime contract changes.
Change-source: pulse-maintainer
The history route now reads pod, k8s-cluster, k8s-node and k8s-deployment as the k8s store type, so the API and metrics history guides list them, and the docs test reads multi-value cases in the type switch instead of one literal per case.
Distinguish archive rejection, post-commit live-reload failure and an uncertain original request in migration help and the API reference. Route readers to same-destination checks without replaying replacement imports or enabling a second poller. Add registered renderer tests tied to the current producer's bounded errors.
Contract-Neutral: Documentation and registered renderer tests only; import routes, persistence, replay guard, permissions and runtime behaviour are unchanged.
Change-source: pulse-maintainer
Put installation and organisation checks before backup transfer. Separate session management authority, API scopes and archive decryption; disclose excluded membership state and retained token bindings. Link the checklist from Recovery and API help, with registered renderer and mirror controls.
Contract-Neutral: Documents existing configuration-transfer scope and authorization only; no runtime, route, API, permission or recovery contract changes.
Change-source: pulse-maintainer
The in-app Assistant chat window was retired in #3126. Several backend
routes existed only for it, and Pulse Mobile, the remaining chat client,
never called them: assistant surface-tools, workflow-prompt render,
question answers, and the session summarize, fork, undo, redo, steer,
diff, revert and unrevert sub-resources. This removes them along with
the handlers, service and session-store methods, the persisted redo
stack, session compaction, mid-turn steering and the question-answer
wait behind them.
The question tool needed more than a route removal. Interactive chat
still offered pulse_question, and Pulse Mobile has no way to answer it,
so a Mobile turn that called it waited until the request ended. No
profile offers it now. The agentic loop answers any call with a refusal
that tells the model to ask in its reply text, the path Patrol runs
already took, and the chat prompt drops its clarification-tool advice.
The capabilities manifest's Assistant surface stops declaring
interactive questions, so the generated docs and fallback governance
names follow it.
/api/ai/chat and the session list, create, rename, delete, messages and
abort routes Pulse Mobile uses are unchanged, as is /api/ai/status. Old
session files load as before and drop the redo stack and steered flag
on their next write. docs/API.md lists the remaining chat routes, and
the subsystem contracts record the removal.
Most of the alert history fold was evidence nothing reads. On the
dogfood install a resolved snapshot averaged 21 KB, 83% of it the
evidence trail of up to 64 envelopes (35 on average), across 1,895
occurrences kept for 90 days (#1803). No Pulse UI, AI tool or API
handler reads Alert.evidence from history: the incident panel uses
the incident timeline, and the AI uses recently resolved alerts.
The fold now trims each decoded snapshot to its newest envelope, by
observedAt and then position (an updated envelope keeps its slot, so
the last one is not always the newest). History output applies the
same rule to live overlays and the JSON fallback, so every
/api/alerts/history entry carries at most one envelope.
operationalRecord.evidenceIds and transitions keep their full lists,
the event log keeps every snapshot whole, and /api/alerts/active still
returns an open alert's full evidence.
On a log shaped like the dogfood install's, the history fold went from
27.2 MB to 2.1 MB of retained heap. Negative controls: keeping full
evidence in the fold, in the output, or choosing the newest by position
each fail their test. The alerts tree passes on pulse-dev.
Related to #1803
Preserve selected memory freshness and the VM/LXC interpretation.
Retain both native tool contracts and current API concurrency controls.
Qualify this source separately from release and installed recovery.
Contract-Neutral: Integrate already-governed parents without a new contract change. Incoming verification files already match main. Fresh integration tests and source-bound browser proof cover the combined memory and installer surfaces.
The organization-owner fix judged browser sessions only. API tokens on
instance routes were still checked for scope alone, and the tenant
middleware resolves an org-bound token to its own organization without
the caller naming one. A token bound to a tenant organization and
holding settings:write therefore reached system settings, SSO
providers, token management, relay, log level, updates and the other
instance surfaces.
ensureAdminSession, behind RequireAdmin, and ensureSettingsScope now
refuse a token unless it acts for the instance: not bound to any
organization other than the default one, with OrgIDs taking precedence
over OrgID. The route's scope still applies. The org variants
(RequireOrgAdmin, ensureOrgAdminSession, ensureOrgSettingsWriteScope)
keep judging tokens by scope alone. tokenHasInstanceWideAuthority is
now the same binding rule plus full-access scope.
The test notification broadcasts only to the request organization, so
it moves to RequireOrgAdmin. Its tenant delivery test already relied on
an org-bound token sending it, and that organization's managers may now
send it from a session too.
No path an organization manager can reach mints a settings scope: relay
mobile, install, deploy and action-runner tokens carry relay, agent and
report scopes only, and token management is instance administration.
The API reference and the api-contracts, security-privacy,
agent-lifecycle and storage-recovery contracts record the token rule.
Send draft verification and fingerprint settings to the saved-credential
probe so Test connection reflects the edit form before saving. Preserve
saved defaults for callers without overrides and keep probe state temporary.
Keep shared footer actions visible on narrow screens so the edit and test
flow remains usable through pending, error and confirmation states.
Retain both independent diagnostics and runtime-switch contract additions, preserving the reviewed cc8514de tip and exact upstream aa9548cf ancestry.
Change-source: pulse-maintainer
A paid key activated on the public community build unlocks only the
licence-gated features compiled into that build. Patrol modes, container
update risk, Audit, RBAC and Reporting need the private Pulse Pro
runtime, and the only way to get it was the download portal. Licence
data from 14 October shows 6 of 36 v6 buyers and 39 of 109 migrated v5
licences still running only the community build.
GET /api/updates/pro-runtime reports whether this install can switch,
and POST /api/updates/pro-runtime/apply performs it. The license server
download broker decides eligibility from the activation's licence, the
same broker the Pro binary already updates from, so a refusal there
reads as not_eligible and any other failure as unavailable. Without an
activation the check answers not_activated without a network call.
The in-place switch is limited to systemd and Proxmox LXC installs. It
runs through ApplyUpdate with an explicit SwitchToProRuntime flag, so
ordinary community updates never take the broker path. It accepts the
Pro build of the running version or newer, refuses an older pin, and
keeps the signed-archive, hash, self-test, backup and history-rollback
steps of a normal update. Docker installs get the broker's
digest-pinned image commands instead. The Settings card that uses these
routes follows separately.
The private-response helper promises one request, but real curl expands quoted brace lists and bracket ranges into two or three requests, including POST, PUT and DELETE. Disable URL globbing without changing token-file transport, response privacy, scopes, TLS, deadlines or no-retry rules. Explain the literal-path and separate URL-encoding boundary.
Exercise the copied helper with both authentication headers, every supported method, encoded identifiers and adverse write responses. Add consuming desktop and narrow Docs/router verification.
Contract-Neutral: Documentation and synthetic recipe/browser checks only; API authentication, endpoint and runtime contracts are unchanged.
Change-source: pulse-maintainer
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
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.
Reconcile the overlapping single and fleet narration documentation with current upstream route assertions, retaining CSV refusal and the actual shared ai:execute guard. Record the incorporated diagnostics token visibility boundary in its dependent contracts without changing runtime authority.
Change-source: pulse-maintainer
Preserve every accepted maintenance commit while incorporating human-authored diagnostics token visibility. Resolve API guide overlap by retaining the shared ai:execute narration gate, explicit deterministic fallback and CSV refusal in both mirrors.
Change-source: pulse-maintainer
Follows the token authority fixes. The API reference now says:
- agent uninstall is a collector's own-token removal, or an admin session;
- AI narration of reports needs ai:execute from API-token callers, for
single and fleet reports, and otherwise falls back to the deterministic
summary;
- API-token callers manage only the tokens in their own organizations,
and only an instance-wide token can create, edit, rotate or delete
another instance-wide token;
- quick setup that would change credentials needs an instance-wide
token from API-token callers.
Adds the missing entry for POST /api/security/tokens/<id>/rotate, which
the regenerate entry already points scoped tokens to.
test_api_reference_routes.py pins each statement to the code that
enforces it, so the reference and the gates cannot drift apart. Each pin
fails when the code or the reference is reverted.
Contract-Neutral: Customer docs corrected to match shipped behaviour; no runtime, API or contract change.
Keep generation's read scope distinct from the ai:execute permission needed for single-resource and fleet PDF narration. Preserve the bounded PR2836 runtime guard unchanged, mirror the canonical API/MSP help into shipped assets, and record the actual contract including token-triggered versus server-run schedules. Replace the old unconditional-POST source assertion with both method and spending-scope checks, and cross GET with all five caller types. The production Docs browser fixture checks the public guidance on desktop and touch phone without API requests or mutations.
Change-source: pulse-maintainer
Follows the token scope fixes. POST /api/security/regenerate-token now
needs an instance-wide full-access token from API-token callers and
replaces every stored token; the reference says so and points scoped
tokens at the per-token rotate route. POST /api/resources/{id}/link,
/unlink and /report-merge need monitoring:write.
test_api_reference_routes.py pins each of these to the code that
enforces it, so the reference and the gates cannot drift apart again.
Each pin fails when the code or the reference is reverted.
Contract-Neutral: Customer docs corrected to match shipped behaviour; no runtime, API or contract change.
The API reference marked the Patrol stream, manual run, acknowledge,
snooze, suppress, suppressions and dismissed routes "(Pro)" and promised
a 402 when unlicensed. None of them is licence-gated: Patrol and
managing its findings are free (ai_patrol is a free feature, and the
frontend offers these controls on every plan). Only governed fixes need
Pro. The routes now show the scope they actually require and the
reference says what Community gets, including the one-full-run-per-hour
cap on manual runs.
Also corrects the findings routes: reinvestigate is Pro and needs the
ai_autofix entitlement and a Patrol mode above Watch only, and
reapprove is retired and always answers 410.
scripts/tests/test_api_reference_routes.py gains checks that a Patrol
route documented without a paid label has no licence wrapper in its
registration, and that reapprove is documented as retired. Each fails
when its claim is reverted.
Contract-Neutral: Customer docs corrected to match shipped behaviour; no runtime, API or contract change.
Audited every HTTP route the server registers against docs/API.md.
Where a documented route and the code disagreed, or an integrator-facing
route was missing, the reference now matches the code.
- Auth and scope labels: notifications, SSO providers, license
activate/clear, security reset-lockout, availability targets, agent
profiles (every method needs settings:write for tokens), relay settings
and the resource metadata routes (no admin requirement).
- Behaviour: POST /api/notifications/test targets one channel per request,
the storage detail route is GET /api/storage/{storageId} (not a list at /api/storage/), token
rename-only updates are accepted, validate-token moved out of the Audit
Log (Pro) section because it has no licence gate, and the setup script
is public.
- Retired routes: /api/ai/remediation/execute and /rollback always answer
410 Gone, as approve already documented.
- Newly documented: GET /api/ai/patrol/runs/{id}, POST
/api/availability-history, POST /api/agents/agent/{id}/allow-reenroll,
PUT /api/truenas/connections/{id} and its /test route.
scripts/tests/test_api_reference_routes.py pins the corrections to the
router so later drift fails a test: every scope named on a route line must
exist in pkg/auth/scopes.go, the newly documented routes must exist in the
router, and the retired routes must say 410. It fails on the previous
reference and passes on this one.
Each doc is mirrored under frontend-modern/public/docs and updated in
both places. Labels where the docs and the code disagree about licence
gating are left alone; that needs a product decision, not a doc edit.
Contract-Neutral: Customer docs corrected to match shipped behaviour; no runtime, API or contract change.
Audited the customer-facing docs against the code: about 5,200 concrete
claims (env vars, endpoints, flags, defaults, ports, UI labels), plus every
environment variable the code reads. Each discrepancy was re-verified
against the source before editing, and every edit was reviewed again.
What users would have hit following the old text:
- UI paths and labels that no longer exist (Settings > Relay, Platform
connections, Access Control, SSO Providers, Create Organization) and
Patrol mode names (now Ask first, Safe auto-fix, Autopilot).
- Wrong values and behaviour: LOG_MAX_AGE=0 does not disable cleanup,
Patrol evidence budget is 10 calls and 12 turns, ALLOW_UNPROTECTED_EXPORT
covers private networks too, PULSE_AUDIT_ASYNC defaults on.
- Agent install: install.sh ignores PULSE_ENABLE_KUBERNETES and
PULSE_ENABLE_PROXMOX, rejects --disable-auto-update, and the token
fallback lives in the state directory.
- API: audit endpoints answer 402 on Community, onboarding QR is GET,
type=container is rejected, several routes need admin plus a scope.
- HTTP_REDIRECT_PORT was not documented anywhere.
Docs are mirrored under frontend-modern/public/docs, so each change is
applied to both copies. The tests that pinned the old wording (including
three that asserted claims the code contradicts) are updated alongside.
Contract-Neutral: Customer docs corrected to match shipped behaviour; no runtime, API or contract change.
Replace root-password and implicit-TLS examples with a private JSON-file recipe using the existing bounded helper. Distinguish live tests, persisted changes, platform credentials and uncertain results; exercise copied commands with synthetic success, denial, redirect and incomplete responses.
Contract-Neutral: Documentation, mirrored guidance and copied-recipe regression tests only; no runtime API, authentication, TLS or frontend contract changes.
Change-source: pulse-maintainer
Reuse the existing private-response API helper for all role and user operations, preserving exact methods, bodies, privileges and targets. Document independent decisions and uncertain mutation readback; exercise copied commands against synthetic private success, denial, redirect and incomplete responses without exposing credentials or retrying.
Contract-Neutral: Documentation, mirrored guides and copied-recipe regression tests only; no runtime authentication, RBAC, API or frontend behaviour changes.
Change-source: pulse-maintainer
Additively integrate exact upstream 1a094646d7 while retaining starting reviewed 19a8358a49. Keep reviewed UUID incident/event IDs and upstream non-wrapping atomic sequences for other memory IDs. Compose upstream shared SMART/Unraid temperatures with reviewed pending context and observation-gap interruption; pin Unraid-only continuity and both grace paths. Retain all browser, completion and security validation limits until evidenced.
Change-source: pulse-maintainer
## What
Single-resource report generation (`/api/admin/reports/generate`) now
takes `POST` with a JSON body as its canonical transport, and only
`POST` may narrate a PDF with Pulse Assistant.
- **POST**: the same fields as before (`resourceType`, `resourceId`,
`format`, `metricType`, `start`, `end`, `title`) in a JSON body, decoded
with the `generate-multi` rules (1MB cap, unknown fields and trailing
payload rejected). When Pulse Assistant is configured, a PDF's executive
summary is narrated by the AI provider as before.
- **GET**: still accepts the same fields as query parameters and returns
the same report, but always uses the deterministic summary. The PDF
shows a short note in place of the "Configure Pulse Assistant" tip,
which would be wrong for a tenant that already has the Assistant
configured.
- **GET never resolves the AI service at all.** It reads Patrol findings
only from a tenant AI service that is already running, through a new
`AISettingsHandler.ExistingAIService` lookup. Constructing a tenant
service through `GetAIService` can list provider models or start
background discovery, so a report GET must not trigger it. The router's
reporting wiring moves into `Router.wireReportingAIResolvers` so a test
can drive it.
- **Other methods**: `405` with `Allow: GET, POST`.
- The shared report body decoder now also returns `body_too_large`,
rather than `invalid_body`, when the cap is hit while reading past a
valid value.
- The reporting catalog advertises
`performanceReport.singleResourceMethod: "POST"`, and the settings UI
follows it. A catalog without the field, and the legacy fallback
catalog, keep the GET query transport that older backends accept. Fleet
reports were already `POST`.
- `docs/API.md` and `docs/MSP.md` (and their shipped copies) document
both methods.
## Why
Before this change, a GET for a PDF resolved the tenant's AI narrator.
That made a paid provider call and recorded a usage event in the AI cost
ledger. GET passes the demo-mode guard and the CSRF check, and a
SameSite=Lax session cookie is sent on cross-site top-level GET
navigations. So following a link could spend a signed-in admin's AI
budget.
GET stays available rather than returning `405` because the API
reference and the MSP guide documented it for scripted exports. Breaking
those scripts would add no protection: CSV is never narrated, and GET no
longer reaches the provider.
## Verification
- `TestContract_SingleReportAINarrationRequiresPOST` drives a real
report engine with a counting narrator. GET, HEAD, PUT and DELETE make
zero narrator calls and POST makes one. The GET narrative is heuristic
and carries the note. As a negative control, the same test fails against
the handler on `main` via `go test -overlay` ("GET report called the AI
narrator 1 times, want 0").
- `TestContract_SingleReportGETDoesNotConstructTenantAIService` drives
the router's real resolvers with an uncached tenant: GET constructs no
tenant AI service, while POST resolves one. A negative control that
swaps `ExistingAIService` back to `GetAIService` fails it ("GET report
constructed 1 tenant AI services, want 0").
`TestAISettingsHandler_ExistingAIServiceNeverConstructs` covers the
lookup itself.
- Handler tests cover the POST body rules (empty, unknown field,
trailing value, form-encoded body, fields only in the query, oversized
padding) and the `Allow` header. The catalog contract snapshot includes
the new field.
- Frontend tests cover POST bodies, the GET transport for catalogs that
name GET, parser defaults and validation, and the legacy fallback.
`docsLinks.test.ts` ties the docs to the handler.
- Browser pass on a private stack: real login, dev Pro licence, and
Pulse Assistant pointed at a local stub OpenAI-compatible provider that
logs every call. Checked at 1280×800 and 390×844:
- Generating a single-resource PDF from Settings → Data & Reports sends
one `POST` with a JSON body, downloads the PDF and calls the provider
once. The downloaded PDF carries the AI narrative.
- CSV makes no provider call. The fleet report still posts to
`generate-multi`.
- A top-level browser navigation to the GET URL with the session cookie
downloads the deterministic PDF, with the new note, and makes no
provider call.
- HEAD, PUT, DELETE and PATCH return `405`, and a session POST without
the CSRF header returns `403`.
- The AI usage summary lists `report_narrative` only for the UI POSTs.
- Full `./internal/api/...` and `./pkg/reporting` run on the dev VM:
everything passed apart from two tests that fail there for environment
reasons in code this change does not touch
(`TestServerInfoEndpointReportsDevelopment` needs `.git`; a `configapi`
shell-hangup bootstrap test).
The same class of issue on the Assistant session routes
(`/api/ai/sessions/{id}/summarize` and friends) is handled separately in
#2670.
Preserve exact upstream 23bf99e1ba and all reviewed local history. Resolve the sole agent-lifecycle contract conflict by retaining both independent accounts; no frontend source resolution is required. Bound this transaction to the upstream frontier recorded at batch start.
Change-source: pulse-maintainer
GET /api/admin/reports/generate resolved the tenant's AI narrator, so a
PDF requested with GET made a paid provider call and appended a usage
event to the AI cost ledger. GET passes the demo-mode guard and the
CSRF check, and a SameSite=Lax session cookie rides a cross-site
top-level GET navigation, so a link could spend a signed-in admin's AI
budget.
POST with a JSON body, decoded with the generate-multi rules, is now
the canonical single-resource transport and the only one that may use
the AI narrator. The settings UI sends it, following a new
performanceReport.singleResourceMethod catalog field; a catalog without
the field, and the legacy fallback catalog, keep the GET transport that
older backends accept. GET stays available with the same query
parameters but narrates deterministically, printing a note in place of
the "Configure Pulse Assistant" tip, and other methods get 405 with
Allow: GET, POST. GET also stops resolving the AI service at all: it
reads Patrol findings through a new ExistingAIService lookup, because
GetAIService constructs a tenant service on first use and that can list
provider models or start background discovery. The router's reporting
wiring moves into wireReportingAIResolvers so a test can drive it.
Keeping GET rather than answering 405 avoids breaking documented API
scripts (MSP.md pointed providers at it) for no security gain: CSV is
never narrated and GET no longer reaches the provider.