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.
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
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
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
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
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
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
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
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
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
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
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
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
A cancelled login can consume an empty response before the transport reports
cancellation. Preserve that context outcome for the owner and joined readers,
reject late session publication and prevent a cancelled refusal from retrying
another encoding. Keep live response validation and later recovery intact.
Reject incomplete or ambiguous 200 login bodies before replacing ticket, CSRF, expiry and PVE generation. Preserve retained sessions, joined renewal failures, normal encoding fallback and later ordinary recovery; cover real pinned startup/poll/broadcast consumption.
Contract-Neutral: Restore existing complete-session and failed-renewal preservation guarantees; no API/wire schema, TLS trust, credential authority, guest lifecycle, polling cadence or History contract delta.
Change-source: pulse-maintainer
Carry cancellation through PVE/PBS construction, cluster probes and retained sessions, startup retries and port fallback. Preserve prior health/errors on caller termination; accepted clients retain independent ordinary reads and full timeouts. Cover real pinned HTTPS cancellation, deadlines, form fallback and first-poll publication.
Contract-Neutral: Restore existing caller cancellation and usable-session guarantees; no wire/API schema, agent lifecycle, TLS trust, guest safety, polling cadence or History contract delta.
Change-source: pulse-maintainer
Validate PVE and PBS hosts before logging them, omit url.Parse input from syntax errors, and keep cluster logging, health snapshots, recovery summaries and returned error labels separate from configured routing and TLS identity. Exercise actual rejected-host constructors, cluster routing/recovery and accepted-host controls with synthetic credentials. Connection policy, authentication and guest safety fences are unchanged.
Change-source: pulse-maintainer
Publish ticket, CSRF and expiry together and share only an expired session renewal. Preserve independent requests, context cancellation without false credential errors, JSON/form authentication, token authority and terminal API refusals without replay. Add registered pinned HTTPS race, failure and recovery controls plus a canonical consuming projection. Keep exact verification paths sorted as required by candidate admission; runtime and tests are unchanged from the source-proven candidate.
Change-source: pulse-maintainer
Exercise actual TLS sockets and the PVE/PBS token, ticket/CSRF and password JSON/form flows using synthetic credentials. Retain same-origin proxy paths and the existing ten-redirect budget.
Contract-Neutral: Add discriminating source controls for the existing infrastructure connection trust boundary; no runtime or authority change.
Change-source: pulse-maintainer
Reproduced a false resolved webhook when HTTP-success status contained memory total but omitted used. Require present CPU and memory measurements before marking node metrics available, retaining genuine zero and unrelated-field compatibility. Extend client and real-poller webhook regression coverage and monitoring contract.
Change-source: pulse-maintainer
A successful response containing null or omitted data decoded into zero-valued node metrics. Repeated polls could therefore clear an active memory incident without any usable recovery evidence. Decode the status through a pointer and reject absent data so existing unavailable-metric handling preserves the incident.
Reproduced the failure through the real poller and notification queue with a local webhook. Added absent-envelope client cases and extended lifecycle coverage to assert unavailable metrics, stable incident identity, and genuine recovery. Focused client and monitoring tests pass three repetitions under the race detector; this is not installed or off-host qualification.
Change-source: pulse-maintainer
A gateway body quoting API error 403 must not discard cached backups. Use the client's typed response status before legacy text fallback; cover gateway failures and genuine terminal responses.
Change-source: pulse-maintainer
Limited tokens intentionally omit node metrics, but later gateway failures must remain visible rather than being classified from permission text. Exercise restriction, outage and recovery on the same client to protect this monitoring boundary.
Change-source: pulse-maintainer
The PBS poller called GET /nodes once per cycle just to relearn the
node hostname, which is stable for the life of the connection. On
tokens that cannot read /nodes, PBS logged a 403 every ten seconds
forever. Cache the name on the client after the first success and
defer retries for 30 minutes after a permission denial so a widened
ACL still heals without a restart. Transient failures keep retrying
each cycle.
Refs #1691
- Fix TestMonitor_PollGuestSnapshots_Coverage by correctly initializing State ID fields
- Improve PBS client to handle alternative datastore metric fields (total-space, etc.)
- Add comprehensive test coverage for PBS polling, auth failures, and datastore metrics
- Add various coverage tests for monitoring, alerts, and metadata handling
- Refactor Monitor to support better testing of client creation and auth handling
- Add persistent volume mounts for Go/npm caches (faster rebuilds)
- Add shell config with helpful aliases and custom prompt
- Add comprehensive devcontainer documentation
- Add pre-commit hooks for Go formatting and linting
- Use go-version-file in CI workflows instead of hardcoded versions
- Simplify docker compose commands with --wait flag
- Add gitignore entries for devcontainer auth files
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Added PBS client methods: CreateUser, SetUserACL, CreateUserToken
- Added SetupMonitoringAccess() turnkey method that creates user + token
- Updated handleSecureAutoRegister to use PBS API for token creation
- Enables one-click PBS setup for Docker/containerized deployments
When users provide PBS root credentials, Pulse can now create the
monitoring user and API token remotely via the PBS API, eliminating
the need to SSH/exec into the container manually.