Commit Graph

819 Commits

Author SHA1 Message Date
rcourtman
e7f6c66520 Read PBS job run status from the admin endpoints
Every PBS prune, verify and sync job showed as "not run" in the Backups
servers table, even when PBS ran it successfully that morning.
GetJobHealthEvidence read configured jobs from /config/sync,
/config/verify and /config/prune. On a real PBS those return schedules
and retention only; last-run-state, last-run-upid, last-run-endtime and
next-run come only from /admin/sync, /admin/verify and /admin/prune. The
test fixture served run fields from /config, so the gap never showed.

Jobs are now read from /admin/{family}, falling back to /config/{family}
only when the admin endpoint is not found. A permission or other error on
/admin stays partial evidence rather than quietly degrading to
schedule-only facts. Against a real PBS 3, eight prune and verify jobs
went from no run state to OK, each matched to its task. The fixture now
uses /admin paths, and a PBS-shaped test fails against the old reads.
2026-11-02 18:23:28 +00:00
pulse-triage[bot]
47b197a6a2 Keep CLI API requests within the configured Pulse origin
Use the existing guarded transport for authenticated fleet reads and action commands. Preserve same-origin proxy paths and caller TLS or stricter policies without duplicating the redirect boundary.

Change-source: pulse-maintainer
2026-11-02 06:56:17 +00:00
pulse-triage[bot]
7966a309f0 Exercise CLI API redirect confidentiality
Cover every registered authenticated fleet and action command through actual loopback servers, including replayable action bodies and same-origin TLS redirects.

Contract-Neutral: Registered CLI regression tests only; runtime and existing API contracts are unchanged.
Change-source: pulse-maintainer
2026-11-02 06:49:07 +00:00
rcourtman
6dd202276c fix(monitoring): use collection clocks for agent counter rates
Buffered reports can arrive milliseconds apart even though their counters
were collected seconds apart. Measure sequenced agent counter intervals on
their collection clocks while retaining receipt-time freshness and history.

Carry the optional host IO counter timestamp through collection and reports,
use libvirt inventory time for CPU and IO, rebase incomparable clocks, and
omit unknown Docker network history. Preserve unsigned libvirt CPU counters
and legacy report compatibility. Register the counter, wire and producer
regressions under the existing subsystem proof routes.
2026-11-01 15:38:42 +00:00
rcourtman
e31210deec Report every lm-sensors temperature and fan with a stable key
Per-sensor alerts, history and a CPU-source choice (#3565) need to name
one hardware input reliably, and the existing flat maps cannot: their
keys drop the chip's bus address and lower-case the label, so two NVMe
drives, two CPU sockets or applesmc's TC1F/TC1f collapse into one
reading, and readings outside 0-150 °C vanish.

The agent now also reports sensors.native: one entry per tempN_input
and fanN_input of every chip, keyed "<chip>/<channel>", with the
original label, kind, unit, unconverted value and an ok/invalid status.
Implausible readings such as applesmc's -127 °C stay listed as invalid
rather than disappearing, a stopped fan's 0 RPM is a reading, and a
chip whose inputs leave the legacy maps empty still reports. The list
is sorted, deduplicated and bounded at 256 entries; cluster peer
results leave it out.

Ingest accepts an entry only when its ID is exactly <chip>/<channel>
for a canonical channel of the reported kind, derives the unit, and
recomputes the status with the same shared plausibility policy, so the
server does not depend on the agent's judgement. The inventory is
carried through the host model, frontend state, unified resources,
clones and the read-state projection.

Nothing consumes it yet. The legacy maps keep their keys, filters and
consumers. The contract notes record what later slices must add first:
completeness state before a missing entry can mean a removed sensor,
and a collision-free encoding before the ID becomes a lower-cased
alert or metric key.

Refs #3565
2026-10-31 22:24:26 +00:00
pulse-triage[bot]
932c17b69a Require whole PBS datastore discovery before reconciling backups
Use the shared bounded response and envelope admission for the outer datastore inventory before exclusions or child reads. Contradictory/error-bearing envelopes and partial success cannot remove retained backup evidence. Preserve HTML guidance, payload-free diagnostics and genuine empty discovery.

Exercise both guest types through the public poll, live cache, durable points and protection, including cold live state and ordinary complete/empty recovery. Keep original guest operations stopped.

Change-source: pulse-maintainer
2026-10-31 10:12:30 +00:00
pulse-triage[bot]
f55e279121 Reject ambiguous PBS running-writer inventories
Share whole-response backup inventory admission with running backup and sync task reads. Contradictory envelopes and non-200 success responses cannot establish no writer and turn incomplete artifacts into terminal failures.

Exercise both task families and later pages through the client, then VM/CT polling, durable points, posture and ordinary complete/empty recovery. Preserve bounded reads, aliases, permissions, conservative matching and guest-operation exclusions.

Change-source: pulse-maintainer
2026-10-31 08:46:50 +00:00
pulse-triage[bot]
0d2aa2a731 Require whole PBS inventory responses before reconciling history
Namespace, group and snapshot listings can withdraw retained backup evidence or renew protection. Read their bounded bodies to completion, reject ambiguous or error-bearing envelopes, and keep valid empty listings and older namespace compatibility.

Exercise malformed-response retention, nonrenewal and ordinary recovery through the client and complete VM/CT polling-to-posture path. Guest operations, access scopes and polling budgets are unchanged.

Change-source: pulse-maintainer
2026-10-31 05:28:23 +00:00
pulse-triage[bot]
3c2aa3a996 Keep unread PBS writer inventories from declaring failed backups
Require explicit task arrays, usable worker types and fully read bounded responses before interpreting current writers. A later unread page or family returns no partial set. Ordinary unknown-visibility, empty-list and completed-snapshot handling is unchanged. Add client and real collector/durable-evidence regressions without guest operations.

Change-source: pulse-maintainer
2026-10-31 03:11:01 +00:00
pulse-triage[bot]
edea3324a6 Reject malformed Proxmox task logs before guest synthesis
Read the full bounded response and require explicit, ordered native log lines before replacing accepted guest results. Retain the ordinary unread fallback, observation clocks and immutable-cache rules, with real HTTP and poll-to-history regression coverage.

Change-source: pulse-maintainer
2026-10-30 10:25:22 +00:00
pulse-triage[bot]
7967164537 Keep contradictory backup task results from completing archives
Require PVE task results and completion clocks to agree before replacing accepted writer evidence. An unread page retains the original running task and partial archive while independent completed copies remain usable. Native live/ended controls and ordinary completion are covered through the real client and VM/LXC ingestion.

Bind the existing response parser to its precise monitoring contract and normal response/lifecycle tests; its previously unowned path must not hide a missing proof route. No guest, task, backup or restore operation, public payload, protection policy or retention change.

Change-source: pulse-maintainer
2026-10-30 03:13:06 +00:00
pulse-triage[bot]
3541511d9c Deliver retained PBS and scoped lazy recovery on current main
Human PR3526 and PR3525 are on main, so the previous monitoring-contract overlap is resolved. Preserve their content and all three independent storage-recovery sections. Imported PBS and callback runtime/test files are unchanged from 9b87d13a8ef5ba6082602bed2b33e3834e056881; only additive contract composition resolves the conflict.

Contract-Neutral: Composition retains the reviewed PBS attribution and organisation-bound lazy selection contracts; no new public surface, authority, policy or schema.
Change-source: pulse-maintainer
2026-10-29 22:23:02 +00:00
pulse-triage[bot]
eab2db62cf Keep unread PVE task history from erasing backup intent
Require complete bounded task and audit responses before qualifying history. Carry last accepted tasks only for unread nodes without renewing observations or persisting them again, preserving partial archive classification and independent node updates. Accepted empty reads and explicit access denial still withdraw live rows.

Contract-Neutral: Enforces existing truthful scoped read and carry-forward semantics; no public endpoint, JSON field, extension ABI, token grant, protection policy or storage schema changes. The unclaimed storage-recovery contract records the behaviour; the human-held monitoring contract is untouched.
Change-source: pulse-maintainer
2026-10-29 20:13:57 +00:00
pulse-triage[bot]
a3b3ace2be Keep PBS success fixtures bound to their requested subjects
The complete PBS suite exposed two legacy success fixtures with only a timestamp and no native kind or ID. Supply the requested vm/100 identity and check both namespace results without relaxing snapshot admission. The runtime and frontend source are unchanged.

Contract-Neutral: Test-fixture correction only; no runtime or public contract delta.
Change-source: pulse-maintainer
2026-10-29 18:41:29 +00:00
pulse-triage[bot]
352121a8b3 Reject PBS snapshots outside their requested group
Validate every returned snapshot's exact native kind, opaque ID and unique timestamp before conversion or caching. Contradictory and duplicate arrays use the existing malformed-read retention path rather than renewing complete protection or reconciling valid history away. Preserve ordinary recovery, explicit emptiness and independent namespace evidence.

Change-source: pulse-maintainer
2026-10-29 18:27:00 +00:00
rcourtman
b94d8473ce Count the days external agents read Pulse history
The agent event-record experiment is reviewed on 2027-01-27 against one
test: at least 15 install IDs on stable versions reading history on
three or more separate days in a 30-day window. No existing counter can
answer it: they count requests, fold these reads into general context,
and the activity history keeps only its newest 500 records, so a busy
agent pushes out the days it read on.

After a successful list_recent_changes or get_metric_history response,
an external-agent request now also records one content-free history_read
marker per UTC day. The marker skips Pulse's own pages, is deduplicated
in memory and on disk, and sits outside the 500-record cap. Telemetry
schema 21 reports the number of distinct marker days as
pulse_intelligence_external_agent_history_read_days_30d (0 to 30). The
per-request records are unchanged, so existing counters keep their
meaning.
2026-10-29 12:59:09 +00:00
pulse-triage[bot]
f8a6107b90 Complete retained PBS inventory repair on current main
Compose the saved explicit-inventory admission repair unchanged with landed datastore-log and History-consumer work. Current producer-consuming browser proof remains the required next step; original guest and native recovery are separate.

Contract-Neutral: Compose the retained explicit-array admission repair under the existing unread-inventory retention contract; no new public surface, auth, identity or retention-policy delta.
Change-source: pulse-maintainer
2026-10-29 10:34:51 +00:00
pulse-triage[bot]
1cd052ad13 Separate DNS startup from recurring PBS log measurements
The full PBS suite passed, but the isolated race run included the process-global DNS cache's one-time 99-byte startup banner in its first healthy-poll log count. Initialise that shared resolver before capture in both log tests. This changes only fixture setup, not production or DNS behaviour. Keep the failed first receipt alongside the corrected-source proof.

Change-source: pulse-maintainer
2026-10-29 09:10:43 +00:00
pulse-triage[bot]
66de0e06a7 Keep routine PBS datastore payloads out of polling logs
Healthy datastore polls currently write deduplication traces and the complete provider map at Info on every read. Keep named measurements at Debug, omit arbitrary fields, and retain parse diagnostics with response sizes rather than response bodies. Readings, request selection, errors and backup-evidence behaviour are unchanged.

Exercise repeated status/RRD/GC collection at Info and Debug with enlarged provider extensions, plus malformed-list, malformed-status and HTTP-failure diagnostics.

Contract-Neutral: Internal PBS polling log volume and payload minimisation only; API results, requests, errors, backup evidence, access policy and rendered behaviour are unchanged.
Change-source: pulse-maintainer
2026-10-29 09:05:16 +00:00
pulse-triage[bot]
18d284893a Correct PBS unread-inventory lifecycle controls
Keep cold unread guests unassociated, preserve the additional historical root point during a partial scan, and make the accepted-empty fixture send an explicit array. Move the inventory comment to its actual reader.

Contract-Neutral: Correct regression assertions and fixtures for the existing failed-read retention contract; no runtime behaviour or public contract delta beyond the retained inventory admission repair.
Change-source: pulse-maintainer
2026-10-29 08:03:14 +00:00
pulse-triage[bot]
72e777d962 Require explicit PBS backup inventory arrays before reconciling absence
Missing or null data in namespace, group or snapshot responses is an unread inventory, not an authoritative empty array. Preserve the existing malformed-read retention, provider-evidence and ordinary recovery boundaries.

Contract-Neutral: Enforce the existing failed/malformed PBS enumeration and complete-success-only reconciliation contract; public payloads, endpoints, access, identity, retention policy and legacy namespace 404 compatibility are unchanged.
Change-source: pulse-maintainer
2026-10-29 07:29:10 +00:00
pulse-triage[bot]
404a859356 Retain observed PBS files across timeout and throttle responses
Treat typed HTTP 408 and 429 as unread evidence, not access rejection or absence. Keep snapshot and point clocks unchanged, preserve scope boundaries and do not add retries. Namespace discovery accepts legacy absence only from actual HTTP 404, never a quoted response-body code.

Change-source: pulse-maintainer
2026-10-29 04:50:23 +00:00
pulse-triage[bot]
993e12c972 Keep real runtime data disks visible in filesystem monitoring
Admit separately mounted Docker and Podman data directories while retaining specific layer-tree, virtual, remote and read-only exclusions. Exercise ordinary Proxmox VM polling, aliases, alert recovery and host/report admission without changing guest-read or backup policy.

Refs: #3444
Change-source: pulse-maintainer
2026-10-28 13:48:17 +00:00
pulse-triage[bot]
0771be9b27 Keep audit CSV text literal without rewriting signed evidence
Project untrusted CSV text after original event signature verification. Preserve JSON, scoped selection, metadata and export limits; cover all text columns, real signature verdicts, repeat exports and the authenticated HTTP route.

Change-source: pulse-maintainer
2026-10-27 17:46:37 +00:00
pulse-triage[bot]
6420aee87f Keep malformed saved pins distinct from explicit empty trust
Reject equivalent endpoint aliases that disagree between a malformed nonempty pin and deliberate CA mode, including delimiter-only pins. Certificate-verifier normalisation must not choose empty trust over a nonempty saved decision during resolution or consolidation.

Contract-Neutral: Completes the existing fail-closed exact-endpoint trust conflict contract; no new payload, route or frontend content.
Change-source: pulse-maintainer
2026-10-27 08:10:25 +00:00
pulse-triage[bot]
aa8e809fc8 Apply managed Proxmox TLS trust to exact polling endpoints
Persist endpoint-scoped decisions alongside discovery pins, including explicit CA mode, without clearing unrelated member trust or accepting renewed certificates automatically. Use the same policy for saved-credential probes, qualify their scope, and keep failed saves out of live PVE configuration.

Change-source: pulse-maintainer
2026-10-27 07:07:44 +00:00
pulse-triage[bot]
b801b34381 Preserve environment SSO authority across extension saves
Keep runtime-only provider authority through conversions and reconcile legacy snapshots before persistence. Reject environment-managed writes before bound handlers or service callbacks, while preserving independent saved-provider editing and detached authorization snapshots.

Change-source: pulse-maintainer
Contract-Neutral: Restore existing environment-provider immutability, non-persistence and snapshot isolation. The additive marker is runtime-only and changes no HTTP payload, route, entitlement, agent-lifecycle or storage-recovery contract.
2026-10-26 17:33:46 +00:00
pulse-triage[bot]
5cf7d82c6a Bound synchronous audit exports and summaries
Limit the actual query to 10001 rows and refuse selections over 10000 before verification or encoding. Preserve complete accepted results, selectors, signatures and access boundaries, and explain how to narrow a refused selection.

Change-source: pulse-maintainer
2026-10-26 16:06:56 +00:00
pulse-triage[bot]
815f16ac66 Require complete Proxmox guest status observations (#3341)
**Require complete Proxmox guest status observations**

Consume the full bounded status reply before admitting guest
measurements or
independent action observations. Reject absent, ambiguous, conflicting
and
foreign-guest successes, retaining optional provider fields and zero
counters.
Exercise actual HTTP reads, both collectors and the action observer
without
native guest operations.

Contract-Neutral: Repairs the existing source-observation and
fail-closed guest evidence contracts; no API, action authority, polling
budget, guest operation or policy change.

**Use the memory availability presence API in the status regression**

The first exact-source proof stopped at compilation because the new
assertion named the agent availability field rather than
VMMemInfo.HasAvailable. No test entered; use the existing public
predicate without changing runtime source.

**Bind guest status regressions to the served resource projection**

Wire the regression monitor to its actual state and canonical resource
adapter, and assert that the served memory tuple and original
observation match the ordinary collector. This strengthens the
registered regression and supplies actual producer frames for browser
proof; runtime source is unchanged.

**Separate listing and guest pressure in the status regression**

The test intends to retain a stronger guest observation over a differing
cache-inclusive listing after a rejected status reply. Give the listing
its own 50% value, rather than the same 100% as the guest; the existing
selector deliberately does not retain equal-percentage observations. No
production selection logic changes.

**Wire the status poll regression to its real alert manager**

The first collector execution reached CheckGuest with a nil fixture
manager. Provide the ordinary isolated manager, then assert that
rejected status observations preserve the existing memory incident and
only complete later recovery clears it. The retained failed aggregate
remains a failure; no runtime source is changed.

**Publish status fixtures through the monitor update boundary**

Use the ordinary monitor publication boundary before checking broadcast
observations, rather than directly ingesting a registry that its adapter
can
replace. Retain the failed 48 projection assertions; runtime source and
expected evidence are unchanged.

**Read status evidence through the current canonical adapter**

Publication atomically replaces the adapter registry. Read the current
production ReadState rather than the fixture original registry pointer;
retain every tuple, age, History and incident assertion. This fixes
fixture wiring only and does not change runtime selection or weaken
evidence checks.

**Keep diagnostic fixtures behind complete guest-status admission**

Supply the authoritative running status in successful and backup-lock
fixtures so they exercise their intended guest-safety paths. Assert
incomplete, conflicting and foreign status replies never reach
guest-agent diagnostics.

Contract-Neutral: Repairs diagnostic test fixtures for existing
complete-response and guest-safety invariants; no runtime, schema,
permission or contract changes.

**Match agent update targets to signed executable versions**

Serve the build-agent release identity on the machine version endpoint
so already-installed agents can pass its exact value through old typed
helpers. Keep display/Fleet targets unchanged and retain
development/source-build suppression, cache guards and all helper
trust/version/downgrade checks. Fixes the version-format cause in #3331,
not installed or reporter recovery.

Contract-Neutral: Restores the existing exact signed-agent target
identity invariant using the download validator; no response schema,
display target, permission, signature, digest, downgrade, rollback or
protocol change.

---
Fleet candidate `20261026T133225Z-core-runtime` from the `core-runtime`
lane. Reviewed tip `bce8dcf7ef59fdf65393d647b620c8b070a56c39` on `main`.

[How Pulse handles
triage](https://github.com/rcourtman/Pulse/blob/main/docs/AI_TRANSPARENCY.md)
2026-10-26 15:43:33 +00:00
rcourtman
1b964ff5aa Hide macOS Time Machine mounts from agent disk inventory
A Mac backing up to a network Time Machine destination mounts the backup
disk image plus one read-only APFS snapshot per retained backup. The
agent reported every one of them as a machine disk, so a Mac Mini showed
a dozen extra rows under /Volumes/.timemachine/ and "Backups of <host>",
each at a false 92%: the image advertises the sparse bundle's 15 TB
ceiling, not the destination's real free space.

macOS marks all of these mounts nobrowse (MNT_DONTBROWSE, "not a path to
user data"), as it does the APFS companion volumes and simulator
runtimes already filtered by path. The collector now skips nobrowse
mounts before the usage syscall unless the operator explicitly includes
them. /Volumes/.timemachine/ also joins the shared special mountpoints,
so the server hides snapshot rows that agents without this change still
send.
2026-10-26 13:40:22 +00:00
pulse-triage[bot]
0bb004d0e2 Use the memory availability presence API in the status regression
The first exact-source proof stopped at compilation because the new assertion named the agent availability field rather than VMMemInfo.HasAvailable. No test entered; use the existing public predicate without changing runtime source.

Change-source: pulse-maintainer
2026-10-26 11:12:48 +00:00
pulse-triage[bot]
0d07a52724 Require complete Proxmox guest status observations
Consume the full bounded status reply before admitting guest measurements or
independent action observations. Reject absent, ambiguous, conflicting and
foreign-guest successes, retaining optional provider fields and zero counters.
Exercise actual HTTP reads, both collectors and the action observer without
native guest operations.

Contract-Neutral: Repairs the existing source-observation and fail-closed guest evidence contracts; no API, action authority, polling budget, guest operation or policy change.
Change-source: pulse-maintainer
2026-10-26 11:06:28 +00:00
rcourtman
5842fd0600 Read PMG queue counts from qshape, not the queue index
PMG's /nodes/{node}/postfix/queue is a directory index that lists the
four queue names, so the queue read has never decoded on a real gateway.
v6.5.0 logged that failure at debug level; 6.6.0 records it as a read
error, which degrades every PMG connection with queue monitoring on and
sends its poll task to the dead-letter queue (#2960).

Read each queue's TOTAL row from /postfix/qshape instead. qshape reports
ages only as buckets, so the oldest age is the lower limit of the oldest
non-empty bucket: it can under-report by up to half but never raises an
age alert early. Held mail is counted but kept out of the oldest age,
since it waits for an operator by design.
2026-10-26 10:24:35 +00:00
pulse-triage[bot]
ce1fc7e5ff Reject incomplete Proxmox storage inventories
Keep malformed successful storage catalogs and content replies from establishing absent backup history. Require complete bounded unambiguous inventories before filtering content; preserve explicit scoped empties and configuration defaults. Exercise actual HTTP readers and warm/cold poll, ingest and posture recovery.

Contract-Neutral: Tighten malformed-response admission without changing the public API schema, transport, permissions or reconciliation policy.
Change-source: pulse-maintainer
2026-10-26 08:57:07 +00:00
pulse-triage[bot]
4f0018789b Reject incomplete Proxmox snapshot response inventories
Require a complete bounded snapshot response before publishing membership or recovery evidence. Missing, ambiguous and invalid success payloads must retain last accepted state rather than confirm deletion. Cover both real HTTP clients through warm/cold polling, warnings and durable recovery history, while retaining valid empty and current-only listings.

Contract-Neutral: Tighten malformed-response admission without changing the public API schema, transport, permissions or reconciliation policy.
Change-source: pulse-maintainer
2026-10-26 06:48:21 +00:00
rcourtman
03132e8782 Reduce workload chart overhead and repair browser test setup (#3233)
Cold seven-day mock workload charts synthesized 914 values per series
before discarding most of them. Selecting the existing timestamp grid
before synthesis preserves the retained readings, newest point and
complete history window while bounding expensive work. The controlled
native request fell from 8.9 seconds to 1.3 seconds.

The strict chart query gate also exceeded its 90 ms p95 limit. Profiling
showed repeated SQLite row decoding, so raw fleet value reads now carry
the series and timestamp in one integer per observation. This
statement-local transport preserves exact values, negative-epoch
timestamps, tier reconciliation, resource scope and ordering, with
separate columns when a window could overflow. Full metrics-store tests
and targeted monitoring/API regressions pass, including boundary and
prepared-query cache controls. The 90 ms limit remains unchanged.

Organization browser fixtures arrange activated API fixtures before
their first workspace load. Explicit activation and deletion bounds
cover the existing server deadlines. Cleanup owns partial preparation,
attempts every tracked organization and retains failures. Native backend
teardown retains its final log. CI executes all 63 authentication,
organization and backend lifecycle controls before browser fanout.

Browser OS acquisition uses the hosted runner's existing signed Ubuntu
source definition. An unrelated Microsoft feed returning 403 can no
longer stop browser setup. Missing, unreadable or empty Ubuntu
definitions and incomplete Ubuntu index updates still fail. Existing
mirror, TLS, signature and cached archive hash checks remain in force.
Real apt acquisition controls, 17 package cache tests, 11 ownership
tests and normal commit/push checks pass.

The mock target lookup benchmark keeps fixture lifecycle logs out of
Go's result stream. A combined stdout/stderr control reproduces the lost
original observations and parses all ten corrected observations with
identical 4,731 lookups per operation. The benchmark work and comparison
thresholds remain unchanged.

Current-build browser verification covers
`/proxmox/workloads?type=vm&platform=proxmox-pve` at 1440×1000 and
390×844: seven-day trends, row drawer expansion, history range
selection, oldest/latest keyboard inspection and drawer dismissal.
Twelve organization-route cases cover organization settings, access,
sharing and billing across Chromium, mobile Chrome and mobile Safari
with retries disabled.

The [full stable/probation browser
run](https://github.com/rcourtman/Pulse/actions/runs/40160832317)
passed: 530 passed, 392 skipped, zero failures and no retry/flaky
markers in all eight shard logs. Agent registration and organization
provisioning also passed. This evidence covers product code at 64c0a3f9.
The later correction changes only a Go benchmark fixture and its
performance contract.

The [final-head stable E2E
run](https://github.com/rcourtman/Pulse/actions/runs/40163545118) also
passed all eight shards, agent registration and organization
provisioning: 186 passed, 183 skipped, zero failures.

All nine required source checks passed. The [final-head build and test
run](https://github.com/rcourtman/Pulse/actions/runs/40163545117)
passed, including benchmark comparison and strict chart qualification.
The chart result on valid hosted capacity was p50 38.31 ms, p95 51.01 ms
and p99 52.28 ms against the unchanged 90 ms p95 limit. The retained
artifact binds the measured binary to the tested synthetic merge commit.
The preceding runtime qualification also passed at p95 86.55 ms on its
runner. The benchmark comparison found no regression above the existing
10% and p<0.05 threshold. The corrected lookup fixture supplied all ten
observations without parser warnings.

After main advanced with scoped authentication and tenant runtime
changes, a native compatibility proof composed this exact head with
c809d3c93b. API, configuration API and
monitoring regressions passed. All twelve organization browser cases
passed again with retries disabled. A fresh embedded runtime passed the
desktop and phone seven-day chart matrix with both endpoints accessible.
The reviewed combined tree is 2e9a154b1c.
2026-10-25 05:27:11 +00:00
pulse-triage[bot]
63d973f40c Keep report CSV text from becoming spreadsheet formulas
Escape formula-like external text in single-resource, fleet and VM inventory CSV exports, including saved inventory reports. Preserve field boundaries, numeric measurements, ordinary text and the runtime inventory.

Contract-Neutral: Restores safe literal-text handling in existing report CSV cells; columns, numeric values, endpoints, authorization, archive formats and scheduling contracts are unchanged.
Change-source: pulse-maintainer
2026-10-25 03:45:08 +00:00
rcourtman
473926b495 Reduce retained chart row decoding without changing observations
Profiling the strict workload chart regression showed repeated SQLite column decoding on every observation. Carry the statement-local series number and timestamp in one integer for bounded raw value reads, while retaining separate columns whenever the requested window could overflow.

Preserve negative-epoch timestamps, current metric bindings, tier reconciliation, extrema readers and exact metric values. The paired cold-service benchmark falls from 63.5 ms to 60.6 ms. Full metrics-store tests and targeted monitoring/API chart regressions pass, including boundary and SQL-cache reuse controls.
2026-10-25 03:38:53 +00:00
pulse-triage[bot]
105fb05cc3 Decode native retained metric numbers without per-point reflection
Keep database/sql conversion for atypical values and rejection of NULL, malformed and overflowing observations. Compare native and fallback scans against primitive destinations and protect the allocation-free native path.

Contract-Neutral: Retained observations, numeric acceptance and rejection, SQL, sampling, source choice, extrema and access boundaries are unchanged; only application-side numeric assignment avoids per-observation reflection.
Change-source: pulse-maintainer
2026-10-24 17:32:56 +01:00
pulse-triage[bot]
c36672b2a7 Assemble retained metric series directly by statement-local number
Avoid per-observation string resolution and nested-map flushes for interleaved filtered fleets. Bind only nonempty series after each read and bound the direct buffers, preserving the existing wide-sparse fallback, SQL snapshots, tiers and exact observations. Verify against single-resource readers on both layouts.

Change-source: pulse-maintainer
2026-10-24 13:38:25 +01:00
pulse-triage[bot]
35af9de7f5 Transport filtered retained metrics by statement-local series number
Reuse bound resource and metric identities instead of decoding a metric string and a resource number for every raw fleet observation. Preserve scoped tier reconciliation, nullable values, caller ownership and display aggregation. Verify reordered bindings, both layouts/projections and filtered chunk boundaries; keep raw reads as one consistent statement.

Change-source: pulse-maintainer
2026-10-24 11:51:02 +01:00
pulse-triage[bot]
5a852abe66 Compose native SCALE CPU repair with current main
Retain main's guest-agent fixture isolation in the two overlapping hunks, the deterministic recycled-listener regression, and main's additional per-field fixture fix. Import the unchanged native aggregate CPU repair and pinned loser observation correction. No production guest safeguards change.

Change-source: pulse-maintainer
2026-10-24 02:12:05 +01:00
rcourtman
450ed161c6 Isolate guest-agent test fixtures from recycled ports (#3163)
Guest-agent fences intentionally outlive a closed fixture listener and
are keyed by endpoint URL. A test whose client used a fixture's raw
loopback URL therefore inherited an earlier case's cooldown whenever the
kernel handed its server a recycled port, and its first read came back
`agent-cooldown` instead of what the test expected. `Backend tests
(rest-0)` failed this way twice in a row on rcourtman/Pulse#3151
(`TestGuestAgentConfigResponseMustBeComplete`, then
`TestGuestAgentTypedSuccessDefersEveryRead`), and one in twelve local
runs of the guest-agent tests failed the same way.

- Single-server and per-case fixtures now use
`guestAgentFixtureEndpoint`, the package's existing per-case boundary
that the HTTP status and lock evidence tests already use. Clients within
one case still share their key.
- Tests whose clients share fences across raw endpoints by design (the
alias and cluster tests), and the older client and cluster API tests
that read guest data through helpers that own their server, start from
an empty guest registry (`isolateGuestAgentCapacity`) instead.
- The capacity tests keep raw endpoints: they seed protected work under
them and already reset the registry. Converting them breaks what they
prove.
- Inventory, node and config fixtures have no guest fences and are
unchanged, as is the untrusted-TLS test, which sends its requests
outside the guarded reads.

Testing
- On pulse-dev, before: 1 of 12 fresh-process runs of the guest-agent
tests failed. Converting only the two tests that failed in CI moved the
failure to a third test (`TestGuestAgentWireDoesNotFollowRedirect`).
After this change: 0 of 20 runs of the guest-agent, cluster-client and
client tests failed.
- `go test ./pkg/proxmox` passes with and without `-race`, gofmt and vet
are clean, and the registry, contract, completion and browser guards
pass on this commit.
2026-10-24 01:51:59 +01:00
rcourtman
871d94f53d Serialize Patrol action projection and finalize hung runs (#3151)
Three gaps remained in how Pulse projects a Patrol investigation's
action and closes its runs, after rcourtman/Pulse#3147.

- **Projections are serialized per investigation.** The lifecycle's
transition callback, an investigation read and a run's close each read
the action audit and apply it under the investigation's lock. A run's
close also finalizes before releasing it. A projection read from an
older state can no longer land after a newer one, and an approval can no
longer land between a run's reconciliation and its finalization.
- **The projection writes only what changed.** It records the changed
action and outcome through `SetAction` and `SetOutcome` when the store
offers `aicontracts.InvestigationActionStore` (a new optional interface;
a store without it keeps the old `Update`). It therefore cannot undo run
progress the orchestrator saved in between. The reference it writes
carries the broker's canonical result and verification status
(`dispositionFromRecord`) and keeps the model's causal attribution,
which the audit does not hold.
- **Runs that hang past their limit are finalized.** The stuck-run sweep
finalizes such a run with a copy of its session marked failed, leaving
the orchestrator's own session as it is. Once the orchestrator closes
the run itself, its stored session is finalized instead of the copy, and
a later refresh no longer reopens a record that finalization closed.
- **A recovered run keeps its own status** (second commit). The sweep
used to mark a run that a restart or its limit cut short after it
planned a fix as `completed`, because the finding already held the
action's outcome, while its session and record said `failed`. The
orchestrator records the same run as `failed` when it closes itself, and
every gate against a second plan keys on the `fix_queued` outcome, so
the sweep now keeps the outcome and the run's own status.

The matching pulse-enterprise change makes the orchestrator's saves keep
the action Pulse recorded, and gives its store `SetAction`. Each side
works without the other.

Testing
- New tests cover the per-investigation lock, field-only writes,
hydration returning the stored action after a refresh replaced the plan,
a close preferring the orchestrator's own close over the sweep's copy
and finalizing under the lock, a run past its limit finalized as given
up, a refresh not reopening a finalized record, the full action
reference, and a recovered run keeping the status it closed with.
Removing any one of the fixes fails its test.
- On pulse-dev: gofmt, vet, race runs of the targeted tests, and full
runs of `internal/ai/...`, `internal/api`, `internal/actionlifecycle`,
`internal/unifiedresources/...` and `pkg/aicontracts/...`. The registry,
contract, completion and browser guards pass on both commits.
- Live, on a private Pro stack built from this branch and
pulse-enterprise main, with a real model (Claude Sonnet through the
subscription CLI) investigating a Docker container whose web server had
died. In each run the model planned a container restart through
`patrol_propose_action`, and the next model turn was made to fail:
- **Provider error after the plan.** The run closed failed with the
error, `fix_queued` and the pending restart on the session, the finding
and its record. Re-investigation returned 409 `action_pending`, the
restart waited in Actions, and the finding's review showed the queued
fix with its plan. When the plan expired, the sweep published it, and
the session, finding and record moved to `needs_attention` with the
action expired.
- **Deadline after the plan.** With a 300-second limit and the next turn
hung, the run failed at the deadline with `fix_queued`, not `timed_out`,
and the next Patrol pass did not retry it.
- **Restart after the plan.** Pulse was killed mid-run. On boot the
stored session closed as interrupted with the plan kept,
re-investigation still returned 409, and once the grace passed a Patrol
pass recovered and finalized the run. With the second commit the finding
reads `failed`, matching its session and record; before it, it read
`completed`.
- Not observable on a local stack: the approval push, which needs a
relay client, and a run hanging past its limit without closing, since
the provider call is cancelled at the deadline. Unit tests cover both.
2026-10-24 01:39:10 +01:00
pulse-triage[bot]
d6e72532e3 Isolate guest fixtures and safely observe pinned loser closure
Keep typed guest-agent cases on the existing namespaced fixture identity so recycled loopback ports cannot inherit a previous synthetic guest cooldown. Add a forced shared-listener regression without clearing the production admission registry.

Set the pinned loser peer deadline before cancellation can close the pipe, exercise the already-closed ordering deterministically, and verify that the winning connection stays usable. No runtime, transport policy, cooldown or admission behaviour changes.

Contract-Neutral: Repository-run test fixture isolation and closure observation only; production guest and pinned-dial contracts are unchanged.
Change-source: pulse-maintainer
2026-10-24 00:54:09 +01:00
rcourtman
8399207f91 Isolate guest-agent test fixtures from recycled ports
Guest fences intentionally outlive a closed fixture listener and are
keyed by endpoint URL, so a test whose client used a fixture's raw
loopback URL inherited an earlier case's cooldown whenever the kernel
handed its server a recycled port. Its first read then came back
agent-cooldown instead of what the test expected. That failed rest-0
twice in a row on one pull request, and one in twelve local runs of
the guest-agent tests.

Single-server and per-case fixtures now use guestAgentFixtureEndpoint,
the package's existing per-case boundary, as the HTTP status and lock
evidence tests already do. Tests whose clients share fences across raw
endpoints by design, the alias and cluster tests and the older client
API tests, start from an empty guest registry instead. The capacity
tests keep raw endpoints: they seed protected work under them and
already reset the registry.

None of twenty fresh-process runs failed afterwards, and the package
passes with and without the race detector.
2026-10-24 00:50:38 +01:00
pulse-triage[bot]
aaa6aaa807 Distinguish failed PBS discovery from an empty backup scope
Carry failed and accepted-empty discovery through ordinary serialized backup polling. Preserve unreadable history, reconcile only confirmed absence, and reject malformed datastore envelopes before destructive reconciliation.

Contract-Neutral: Enforces existing PBS scope-evidence semantics; no API, model, policy or permission change.
Change-source: pulse-maintainer
2026-10-23 23:11:44 +01:00
rcourtman
a4bfca4d32 Serialize Patrol action projection and finalize hung runs
Three gaps remained in how Pulse projects a Patrol investigation's
action and closes its runs.

Projections of one investigation could interleave: the transition
callback, an investigation read and a run's close each read the action
audit and applied it, so one that read an older state could land after
one that read a newer state, and an approval could land between a
run's reconciliation and its finalization. All of them now read and
apply under the investigation's lock, and a close finalizes before it
releases it.

The projection replaced the whole session through Update, so it could
undo run progress the orchestrator saved in between. It now writes
only the changed action and outcome when the store offers SetAction
(aicontracts.InvestigationActionStore), and the reference it writes
carries the broker's canonical result and verification status and the
model's causal attribution, which the audit does not hold.

A run that hung past its limit without closing was recovered by the
stuck-run sweep but never finalized. The sweep now finalizes it with a
copy of its session marked failed, leaving the orchestrator's session
as it is. A later real close is finalized instead, and a refresh no
longer reopens a record that finalization closed.
2026-10-23 22:26:09 +01:00
rcourtman
ae19fcf5d6 Preserve PVE authentication endings while reading responses
A password login can end while its response is being read: the caller
cancels, its deadline passes, or the client's own login timeout expires.
Go's HTTP transport can still hand back the server's answer to that
abandoned request. The construction fixture answers a departed client
with an empty 200, which surfaced as "invalid authentication response"
and failed TestClientConstructionHonoursContext and its client-timeout
twin intermittently in the required backend check.

The shared password exchange now reports the ending instead of
diagnosing that answer, keeps transport errors that already carry the
ending, and starts no form attempt after an ended JSON refusal. This
mirrors the PBS client fix from 18 October. Renewal shares the exchange,
so the same rule applies when its own bounded timeout ends a login.
Complete sessions are still accepted, and construction still discards a
client whose caller has ended.

A new control ends the login during response reading, by caller
cancellation and by a simulated login deadline, for every unusable
answer; without this change all of its cases fail. It also checks that
both encoding attempts carry the one login budget the client timeout
sets. The TLS fixture now aborts a request whose client has left rather
than answering it with an empty 200.
2026-10-23 13:50:03 +01:00
rcourtman
b3b5ad6e1f Record Patrol investigation conclusions as a typed tool call
Patrol investigations inferred their outcome from prose markers, so a
bold or bulleted RESOLVED line became the terminal needs_attention and
the finding was never investigated again. Timeouts clustered on
subscription agents. Patrol's 60s stream idle timeout bounds a whole
buffered CLI turn there, three investigations queued on one serial CLI
slot, and the final summary call was capped at 20s.

- Add patrol_conclude_investigation, an investigation-only,
  side-effect-free capture of resolved, cannot_fix or needs_attention.
  It is carried on InvestigationRunResult and
  OrchestratorInvestigationResult.
- After a conclusion, the next turn is the summary. The final turn
  offers only the tools that end a run. A deadline reserve makes the
  current turn final before the run times out, and the summary call
  may use the time left.
- Give investigation turns on subscription agents a 4-minute turn
  budget, a 25-minute default timeout and one investigation at a time.
  These limits are republished on config reload without holding the
  service lock across the Patrol lock.
- Derive Patrol's outer deadline from the effective timeout. Sessions
  now carry their own deadline, and the stuck-run sweep measures a live
  run against it, so neither a lowered timeout nor the previous run's
  time resets a running investigation.
- Record a run orphaned by a restart as interrupted, not timed out. A
  first investigation cut short that way used to stay running for
  good, which also blocked a manual re-run. Recovery applies only while
  the finding still shows that run, takes a result the run's session
  already recorded, and keeps an action outcome such as fix_queued.
- Add unclassified and interrupted outcomes, with lifecycle, telemetry
  bucket, digest and record handling.
2026-10-23 01:26:33 +01:00