Commit Graph

5 Commits

Author SHA1 Message Date
rcourtman
f01ecee33b Outlast the sampling window in the agent load driver
The footprint watch ends each agent load driver with SIGTERM once its
sampling loop finishes. The driver's own deadline was the same length, so
it could expire as the signal arrived; Python then exited by the signal
(143) instead of handling it, and a run with every report accepted failed
as "agent load failed". Seen on pulse-dev with both builds at 360 of 360
reports. Give the driver two minutes of headroom so the harness signal
always ends it.
2026-11-09 23:56:29 +00:00
pulse-triage[bot]
036e58c6da Require observed dashboard state traffic in the agent memory watch
The newly landed agent estate can accept every report while its WebSocket never connects or carries state. Require an initial state and a subsequent nonempty update on one connection, keep arbitrary frames distinct from verified state in the retained summary, and reassemble fragmented messages without counting ping/pong traffic. Exercise rejected, idle, heartbeat-only, welcome-only, missing-baseline and unusable-state dashboards while retaining accepted-report statistics.

Contract-Neutral: Diagnostic load-driver admission and evidence accuracy only; no runtime, frontend, auth, release qualification or performance threshold changes.
Change-source: pulse-maintainer
2026-11-09 20:13:39 +00:00
rcourtman
9efeab37d4 Measure an agent-fed Pulse in the nightly memory watch
The memory watch only runs mock mode, and mock mode drops pushed agent
reports and skips state broadcasts without a subscriber. It can never
reach the cost #2199 measured: every accepted report refreshes the
unified resource registry and broadcasts state to connected dashboards.

Add scripts/memory/agent_load.py, a stdlib-only driver that mints one
install token per synthetic Unified Agent through the dev admin bypass,
posts gzip host reports from 30 agents every 30s (6 also send Docker
reports with 40 containers each), and keeps one dashboard WebSocket
connected. It counts a report as failed after the agent's own 15s
timeout and fails the run when reports were not accepted, so a run that
missed the path cannot pass as a measurement. compare_release_memory.sh
takes PULSE_FOOTPRINT_ESTATE=agents to start a real, authenticated Pulse
under that load, and a new compare-agents job runs it nightly. It reports
without gating (PULSE_MEMORY_GATE=0) and the issue reporter does not read
it, so the new estate cannot open the memory watch issue.

Five-minute runs on pulse-dev, v6.7.0 against main: all 360 reports
accepted on both builds, 270 resources registered, and a CPU profile
showed HandleReport -> ApplyHostReport -> replaceRegistryLocked and the
websocket merge patch, the #2199 chain. Both builds used 5.7% of a core,
wrote about 6.5 GB/day, and answered host reports at a 50 ms median but
a 1.7-1.9 s p95 and 4 s maximum. Mock runs are unchanged apart from the
legacy key path, which keeps hosts with an installed Pulse from refusing
to start.
2026-11-09 18:38:52 +00:00
rcourtman
02d293d466 Report CPU and disk writes in the nightly memory watch
The memory watch compares resident memory with the last stable, but
#2199 (sustained CPU) and #1966 (tens of GB/day of writes) are the same
class of regression and nothing measured them. Sample CPU ticks from
/proc/<pid>/stat and storage and write-call bytes from /proc/<pid>/io
beside RSS, and report steady-state CPU and MiB/day over the existing
final-third window.

The new rates are reported, not gated: budgets need a measured noise
floor first. A 5-minute run of main against itself on pulse-dev gave
0.6% CPU on both builds and 472 vs 461 MiB/day of disk writes, so writes
vary about 2.5% between identical builds and write calls about 11%.
2026-11-09 17:36:56 +00:00
rcourtman
44af307878 ci: compare memory with the latest stable release every day
Memory grew release after release with nothing comparing it (#1803):
a 256 MB LXC that ran v5 for a year needed 1 GB by v6.3. The existing
memory test only checks growth within one run.

The daily watch builds the latest stable release and main from source,
runs both for 15 minutes against the same small mock estate, and splits
steady-state resident memory into the Go heap, memory outside Go and
file pages. It fails past both 15% and 16 MiB, uploads both heap
profiles with a per-function growth list, and keeps one issue open
while it fails. It runs on a schedule rather than in the pull request
benchmarks job because a 15-minute whole-server run is too slow and
noisy to gate every PR. Mock fixtures live in the heap, so the summary
says to check internal/mock first.

Checked end to end on pulse-dev: v6.5.0 against this branch measured
123.5 and 117.2 MiB, no regression; a synthetic 40% growth exits 1.

Related to #1803
2026-10-21 14:16:15 +01:00