Commit Graph

44 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]
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]
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
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]
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
b6e56c5baa Preserve PBS authentication cancellation while reading responses
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.
2026-10-18 18:11:01 +01:00
pulse-triage[bot]
3096fb2748 Require complete Proxmox password sessions before publication
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
2026-10-14 04:25:26 +01:00
pulse-triage[bot]
13984070ff Keep Proxmox recovery authentication within its caller budget
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
2026-10-14 03:18:40 +01:00
pulse-triage[bot]
90ad71f9a4 Keep rejected infrastructure credentials out of client diagnostics
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
2026-10-13 05:35:21 +01:00
pulse-triage[bot]
e3950a1df8 Share PBS session renewal across concurrent monitoring reads
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
2026-10-13 02:33:55 +01:00
pulse-triage[bot]
5abea19419 Expose infrastructure credentials following redirects to another origin
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
2026-10-11 06:34:28 +01:00
pulse-triage[bot]
3d984b0226 fix(pbs): reject incomplete alerting measurements
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
2026-09-05 18:04:21 +01:00
pulse-triage[bot]
31f1f1933a fix(pbs): reject absent node status instead of resolving alerts
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
2026-09-05 17:50:07 +01:00
pulse-triage[bot]
c3b28f4557 fix(pbs): classify backup cache failures by HTTP status
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
2026-09-05 15:05:53 +01:00
pulse-triage[bot]
8a91c82dea test(pbs): protect node metrics permission outage recovery
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
2026-09-05 14:47:04 +01:00
pulse-triage[bot]
327682ad34 Bound Proxmox API success responses
Change-source: pulse-maintainer
2026-08-31 21:20:30 +01:00
pulse-triage[bot]
8c63984696 Clear stale PBS backup-running state 2026-08-31 07:03:43 +01:00
rcourtman
70f7ca9f6f fix(pbs): skip superuser-only node lookup for tokens 2026-08-09 12:25:07 +01:00
rcourtman
8ff64e0dee Fix PBS node identity retry classification 2026-08-08 09:39:02 +01:00
rcourtman
e597325a4a fix(pbs): stop re-fetching the node name every poll cycle
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
2026-08-08 06:32:06 +01:00
courtmanr@gmail.com
6922c8ad57 Fix PBS datastore exclusions before detail polling (#1105) 2026-07-30 09:21:57 +01:00
rcourtman
21fd49d98d Fix PBS job task history filters 2026-05-13 17:09:45 +01:00
rcourtman
d55888fb7f Correct PBS job health evidence boundaries 2026-05-13 17:05:03 +01:00
rcourtman
dd8c3a78ce Add PBS job health evidence ledger 2026-05-13 17:05:03 +01:00
rcourtman
6e9c360301 Propagate PBS datastore health into monitoring 2026-05-13 13:15:10 +01:00
rcourtman
d6536932fc Harden outbound URLs and file-backed storage 2026-03-29 12:47:55 +01:00
rcourtman
778a2577b6 feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
rcourtman
b38488f2da fix(proxmox): stabilize pulse monitor token lifecycle 2026-03-03 10:57:19 +00:00
rcourtman
90cce6d51b test(monitoring): fix failing snapshot tests and improve coverage
- 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
2026-01-04 10:29:40 +00:00
rcourtman
adba448419 fix(pbs): correct API paths and achieve >95% test coverage 2026-01-03 20:45:36 +00:00
rcourtman
3fdf753a5b Enhance devcontainer and CI workflows
- 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>
2026-01-01 22:29:15 +00:00
rcourtman
3d671c1824 feat(pbs): add API-based token creation for turnkey PBS setup
- 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.
2025-12-26 10:08:41 +00:00
rcourtman
969fa0e509 test: add unit tests for AI, Kubernetes agent, and clients 2025-12-17 12:47:36 +00:00
rcourtman
f6e59b59c3 test: add unit tests for pkg/pbs 2025-11-26 14:15:49 +00:00
rcourtman
f46ff1792b Fix settings security tab navigation 2025-10-11 23:29:47 +00:00