Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Merge current main and verify diagnostic workflows

rcourtmanf779bf064ab4
diff --cc docs/qualification/PATROL_ASSISTANT_CUSTOMER_JOURNEY.md
index d1134d31b6,0e24cc4ce1..2fc67229e3
--- a/docs/qualification/PATROL_ASSISTANT_CUSTOMER_JOURNEY.md
+++ b/docs/qualification/PATROL_ASSISTANT_CUSTOMER_JOURNEY.md
@@@ -413,457 -311,3 +413,478 @@@ provider readiness probe. The final sav
to the tool's descriptive governance metadata. Runtime source hashes, transcript
and screenshots are retained in the local homelab evidence-trust artifact set.
These receipts do not qualify autonomous Patrol or infrastructure mutations.
+
+
+## Retained history reconciliation, 2026-09-05
+
+The shared metrics query now reconciles each resource/metric across retained
+tiers before downsampling. Preferred buckets exclude overlapping lower-priority
+observations, and uncovered times and new metrics remain visible to single,
+all-series and batch consumers. Rollups preserve stored extrema through later
+aggregation stages. This does not recover historical peaks already discarded
+or observations that were never collected. Query-plan checks exercise the actual
+shared SQL builder and require indexed overlap probes.
+
+The original local fixture now returns both the minute and newer raw point for
+24-hour single/all-series reads. Regression cases cover older fallback buckets,
+internal gaps, newer raw tails, overlap precedence at minute/hour/day boundaries,
+resource-family isolation, per-metric filters, downsampling after reconciliation,
+and single/batch parity. Customer issue #1717 independently documents the value
+of API-only Proxmox history, although its earlier canonical-ID defect is distinct
+from this query-tier defect. The full issue and comments were read. It has no
+supplied screenshots and this work makes no new claim about that reporter's fix.
+
+The live read-only Assistant repeat completed in 161 seconds. Its 24-hour
+summary now contained 444 CPU/memory points and 436 temperature points, ending
+at 22:43:54 BST, seven seconds before the summary query. The previous run returned
+83 points ending at 21:39, about 45 minutes stale. The returned observation span
+is now roughly 2 hours 27 minutes, with a largest timestamp gap of 61 seconds.
+This validates the recovered recent tail, not a full day of collection.
+
+The model again correctly distinguished high utilisation from demonstrated
+pressure and disclosed the unavailable host agent evidence. Diagnosis remains
+unqualified. It asserted continuous collection from point spacing, inferred a
+monitoring/store restart from coincident timestamps, and called two temperature
+readings contradictory without ruling out change between their different
+observation times. It suggested treating a rising memory floor as evidence of
+a leak without workload attribution. These are model-reasoning failures, not
+additional proof of a storage defect or homelab fault. No infrastructure mutation
+or new refused provider-readiness probe was performed.
+
+Playwright exercised `/patrol` Assistant submission/completion, all eleven tool
+controls with keyboard and pointer expansion/collapse, inner output scrolling,
+answer pixels, Escape, session selection and reload at 1440x1000 and 390x1000.
+The actual cached provider-refusal state at
+`/settings/pulse-intelligence/patrol` and the manual HTTP 409 gate still hold.
+The local retained-coverage artifact set contains transcript, current source
+hashes and final browser screenshots.
+
+
+The adjacent `/proxmox` node History check found a second evidence-path defect.
+The view inferred a linked Agent from discovery routing, requested `agent/delly2`,
+and showed Collecting history while the real source was `node/homelab-delly2`.
+The canonical unified metrics target now advertises the collector's `node`
+storage family and source ID for API-only Proxmox hosts, while preserving real
+Agent-source precedence. The node projection carries that target to the drawer
+and takes Agent linkage only from explicit metadata. Summary tools consume the
+corrected target without their former Proxmox-specific exception.
+
+Current-build browser verification exercised the node History tab at 1h, 24h
+and 7d on 1440x1000 and 390x1000 viewports. Utilisation, network and thermal
+charts all contained retained points. Chart hover, range changes, Overview/History
+switching and reload were checked. API-only nodes no longer show Agent-only disk
+throughput or a fabricated linked-Agent label. A real linked-Agent case remains
+covered by drawer regression tests. No historical data was fabricated to fill
+the unavailable portion of the selected range.
+
+Worker verification passed the metrics package with the race detector
+(excluding timing-sensitive SLO tests), all query SLO tests without the race
+detector, and the full unified-resources package. Focused summary/reporting
+regressions, the two changed frontend suites (58 tests) and frontend type checking
+also passed. The node History receipt binds its final source hashes and returned
+range/point metadata separately from the model transcript.
+
+The final repeat after the canonical node-target correction completed in 215
+seconds with thirteen visible tool controls. It read 194 retained points through
+22:58:55 BST at 22:59:06, approximately eleven seconds old. Point count changed
+as the normal rollup replaced raw points with preferred minute buckets, while
+the recent tail remained available. The answer preserved the pressure-versus-
+utilisation distinction and recognised a resolved thermal alert, but still
+inferred a restart, continuous collection and a previously working Agent without
+sufficient evidence. It also repeated the known disk-health/wear explanation
+gap. These residuals remain in the outcome qualification gap. The final
+retained-canonical-coverage receipts bind the current code to Assistant
+expansion, output scrolling, answer pixels and reload at both viewports, plus
+the actual saved provider refusal and HTTP 409 gate.
+
+
+## Redesign baseline retest, 2026-09-05
+
+The unchanged performance question completed in 224 seconds with eleven visible
+tool controls after the local disk and timestamp-context changes. Playwright
+exercised `/patrol` at 1440x1000 and 390x1000, including keyboard/pointer tool
+expansion, output scrolling, Escape, session selection and reload. Initial answer
+pixels were inspected. Final conclusion pixels and the focused disk question
+remain pending, so this is not full browser qualification for the slice.
+
+The model explicitly repeated the timestamp caveat while still calling the
+returned series unbroken and inferring that the alert start almost certainly
+marked collection start. It also treated a present-time pressure read as a
+definitive resolution of the historical pressure question. These are failed
+diagnoses, not evidence that more caveat text is sufficient.
+
+The changed disk tool returned SMART `PASSED`, canonical `warning`, and remaining
+life 63, but neither SMART counters nor risk reasons. A direct canonical resource
+API read confirmed those fields are absent upstream too. The subsequent source-status read identified `proxmox.status=stale`, which
+explains a freshness warning without a hardware-risk reason. The disk tool had
+omitted that field too. Preserve the canonical source status alongside health
+and risk before qualifying this explanation. Do not fabricate a wear warning
+from 63 percent remaining.
+
+Artifacts remain private under the local
+`tmp/patrol-outcome-telemetry/homelab/diagnostic-evidence-performance` directory.
+An initial browser attempt never reached a provider because the configured SSD
+temporary directory was absent. The directory was restored before the recorded
+run. Installed Chrome was used because the expected cached Playwright browser
+was unavailable. No refused readiness probe or infrastructure mutation occurred.
+
+The qualification scorer also needs an explicit trust review: current root-cause
+grounding checks match resource names/IDs in a named Markdown section, and other
+diagnosis checks use required words. Combined with code-inserted proposal prose,
+this can reward a formatted assertion without independent diagnostic support.
+Keep the physical fault oracles and action readback checks, but do not treat
+those text checks as semantic proof of cause.
+
+### Regression work discovered during redesign
+
+PR #1920 CI exposed a retained-history performance regression, including the
+bounded chart query and shared store reads. Reconciliation must remain correct,
+but display aggregation belongs inside SQLite rather than scanning all retained
+points into Go. The working correction also reuses scan destinations. Initial paired
+worker benchmarks confirm reduced allocations but still show material runtime
+regressions. Performance correction and source-bound browser proof remain open.
+
+The resource API test selected the first canonical `agent` resource and assumed
+it was Agent-backed. A Proxmox-only node has the same canonical resource type,
+but different history storage coordinates. The test now selects the fixture's
+actual Agent identity and separately asserts the Proxmox node target.
+
+Disk warning investigation exposed another canonical gap. Proxmox physical disks
+poll every five minutes by default, but source freshness currently uses the
+shorter general Proxmox threshold. Registry merge status selection also requires
+a regression check for recovery from stale Proxmox data. Preserve source
+freshness in the tool now, and correct cadence/recovery at the owning registry
+and monitoring boundary before qualifying those warnings as useful diagnosis.
+
+### Disk live retest, 2026-09-06 local time
+
+The current local Assistant answered the disk question through Claude Opus 5
+in about three minutes. The source freshness field was visible and correctly
+identified as distinct from SMART failure. The answer still failed qualification:
+it invented a midnight polling restart from coincident timestamps, treated the
+remaining-life measurement as ambiguous, and hit three rejected disk-detail calls.
+The tool advertised `physical-disk` for get but its handler did not support it.
+
+The next working correction routes exact canonical disk get/health requests
+through the same shared projection and labels remaining life with the explicit
+`life_remaining_percent` field. The live answer is a recorded failure, not proof
+of completed diagnosis. The screenshots exercised `/patrol`, Assistant, tool
+expansions, keyboard activation, narrow wrapping, Escape and session reload at
+1440x1000 and 390x1000. Fresh browser proof is required after these later changes.
+
+### Canonical freshness correction under verification
+
+Physical disk collection now carries its independent polling interval into the
+canonical per-source freshness record. Staleness uses at least two expected
+intervals, while retaining a longer configured source threshold. A new observation
+from the highest-priority available source may refresh its resource status,
+including a Proxmox-only resource that previously kept its first warning.
+The targeted regression covers five- and fifteen-minute disk schedules, stale
+transition, identity-preserving recovery and measured hardware risk after recovery.
+The live collector exposed a further loss in the quick temperature refresh:
+`physicalDiskFromReadStateView` discarded cadence before writing disk records
+back to monitoring state. That conversion now preserves the typed source status
+schedule. Broader registry regressions and final browser proof remain required. This does not make timestamp coincidences evidence of collector restarts.
+
+The retained-query candidate also encountered a SQLite native fault during the
+full metrics package run. The same baseline package passed. This is unresolved
+until the failing context and current candidate are verified. Narrow benchmark
+and query-plan success do not close this failure.
+
+### Continued orchestration review
+
+The assessment sweep currently receives only the retained finding title, severity,
+resource and up to 500 characters of old evidence. It receives neither the main
+run's observations nor their collection times. That is insufficient context for a
+new present/resolved judgment. The completion obligation may remain mechanical,
+but any continuation must share the actual investigation context. It must not
+turn old evidence into a fresh assessment.
+
+The investigation evidence-call floor also misclassifies a failed or
+approval-blocked read as no evidence at all. Such a result establishes a limit
+on available access, while a successful tool call alone establishes no diagnostic
+quality. Remove the quality inference and forced start-repair turn. Preserve
+explicit call/turn/time limits and let an incomplete or uncertain conclusion
+record the unavailable evidence. Action authority remains independently enforced.
+
+The unmatched-signal follow-up rebuilds a reduced evidence list after the main
+model run and prohibits further investigation. Its candidate selection ranks
+health/reliability/backup/connectivity/anomaly categories and caps them at twenty.
+This duplicates interpretation outside the model and discards the main reasoning
+context. The planned replacement is the original model assessment with complete
+seed/tool evidence, measured against independent missed-fault controls.
+
+A fresh live canonical disk read after the cadence round-trip correction returned
+`online` and `expectedUpdateIntervalSeconds=300`. This verifies the actual
+collector-to-canonical-resource path. Full affected package tests and the current
+Assistant answer remain separate acceptance checks.
+
+### Current disk answer and browser evidence
+
+The 2026-09-06 00:28 BST Assistant retest completed through the configured Claude
+subscription route in 2m38s, with 12,436 reported tokens. All nine evidence calls
+completed, including the exact canonical disk detail request that failed before.
+The answer correctly interpreted 63 percent remaining life, source recency and
+the distinction between disk and node temperature evidence.
+
+The overall answer still fails qualification. It asserted that recovery exists
+because an online backup datastore has space, without reading actual backup
+coverage or restore evidence. It also offered host commands without checking
+that execution access exists. The conclusion should remain bounded to the
+observed disk state. Latency and unnecessary fleet-wide explanation remain
+product defects to address in the shared diagnostic contract.
+
+Playwright exercised `/patrol` and the Assistant drawer at 1440x1000 and
+390x1000, expanded all nine evidence calls with keyboard activation, scrolled
+long outputs, collapsed them, used Escape, reloaded and reopened the retained
+session. Root inspection covered actual disk-list/detail output pixels, retained
+summary output and the final answer through its last paragraph. The answer and
+evidence remain readable at both widths. The source-bound receipt and screenshots
+are private under `tmp/patrol-outcome-telemetry/homelab/diagnostic-evidence-disk-canonical-final`.
+This is interface and data-path proof, not a passing diagnostic outcome.
+
+### Retained-performance retest and transport correction
+
+The 00:32 BST read-only performance request completed in 3m36s with 17,677
+reported tokens. It correctly reported unavailable agent access and separated
+high memory occupancy from established pressure. It still called the retained
+slice unbroken and inferred collector startup from coincident timestamps despite
+explicitly repeating the evidence caveat. That diagnosis remains failed.
+
+This run also exposed raw serialized routing JSON in the visible conversation.
+The subscription fallback had accumulated native CLI text before the first
+declared tool call and forwarded it as Assistant content. It also retained only
+one call from a native batch. The working provider correction returns the entire
+first declared batch in order, emits no routing-turn prose, and keeps the
+structured final answer unchanged. Targeted provider tests pass. All explicit
+refusal and local-tool isolation boundaries remain. Fresh browser evidence is
+required after this runtime change.
+
+The transport retest exceeded the browser's five-minute limit and was cancelled
+when that browser closed. The saved session contains four ordered routing turns
+with 2, 5, 4 and 3 calls respectively. Their answer content is empty, so the
+protocol text leak is absent from the persisted transport result. Fourteen calls
+did not produce a final answer before cancellation. This is incomplete browser
+qualification and failed interactive latency, not a completed diagnostic run.
+The response instruction currently demands thorough investigation and suggested
+next steps even after the user's specific question can be answered. Review that
+shared product instruction before collecting another equally broad run.
+
+### Scoped response and rendering retest
+
+The 00:56 BST performance request completed in 2m42s with 13,021 reported
+tokens after the shared response prompt was scoped to the user's actual job.
+Routing JSON was absent, missing agent access remained explicit and memory
+pressure was correctly left unknown. The answer still overstated continuous
+coverage from retained timestamps, inferred history start causes, treated an
+alert on the same utilization measurement as corroboration, and mixed UTC/BST.
+This remains a failed diagnostic outcome. It does not qualify autonomous Patrol.
+
+That real answer exposed a six-column table expanding the narrow conversation.
+The shared sanitized renderer now gives tables their own keyboard-scrollable
+region. Playwright reopened the real session at 1440x1000, 900x1000 and 390x1000,
+reached the last column, verified fixed conversation width, and exercised Escape,
+reload and session reopening. Browser-only short and streaming table fixtures
+confirmed preserved focus, region identity and scroll position. Actual pixels
+were inspected. The source-bound frontend receipt is
+`frontend-modern/browser-verification.json`; private artifacts are under
+`tmp/patrol-outcome-telemetry/homelab/markdown-table-final`. These fixture results
+establish rendering behavior only. No additional model calls were made.
+
+### Final evidence-foundation proof
+
+The affected tools, chat, providers, models, unified resources, monitoring and
+resource API package suites pass on the worker. The final metrics implementation
+(`store.go` SHA256 `5ef4b22506ecc73131bcd881a5bbc72d2a45f43f393f2dccbfba52dc287b18e8`)
+passes the full metrics suite in 90.446s, the database suite in 0.131s and the
+focused concurrent read/write race proof in 19.625s. Tests cover new/deleted
+history visibility, resource isolation, bounded compiled-statement retention,
+one-connection operation and transaction-bound query instrumentation.
+
+The unchanged bounded chart benchmark measures 889.3 microseconds baseline
+versus 888.8 microseconds candidate (p=.796, n=10), with no significant slowdown.
+Final paired metrics benchmarks pass the existing regression checker. The
+single-metric downsample case reports +10.00% (p=.005, n=10), close to the
+checker's greater-than-10% threshold. Raw single-series and both multi-metric
+queries have no significant latency difference. These are bounded worker
+measurements, not a production latency guarantee. The earlier +20.34% chart
+regression is corrected by reusing compiled presence SQL while evaluating it
+inside every current read snapshot. No history or tier-presence result is cached.
+
+One earlier metrics package run terminated inside SQLite native binding code.
+Subsequent full and focused race runs passed, including the final implementation.
+The original fault has no established root cause and is not labelled harmless
+or explained by the successful reruns. Its private worker log is
+`paired-metrics-local-20260905T235637/full-metrics-final.log`.
+
+### Diagnostic orchestration slice, 2026-09-06
+
+The investigation loop no longer rejects a conclusion for having no successful
+read or forces extra tool calls when seed context or unavailable access supports
+an honest unknown conclusion. Evidence attempts still consume the configured
+limit, which remains visible as a system fact. Removed completion checkpoints
+and the Assistant/Watch 12/18-call wrap-up instructions from tool results, along
+with the four silent-tool-turn cutoff. Overall turns, advertised capability
+boundaries, configured budgets and repeated-call/error recovery remain bounded.
+
+Full worker chat and AI packages pass against the exact changed runtime source.
+The longer-read regression executes twenty distinct reads over five silent tool
+turns, retains unchanged observations, and preserves the model's conclusion.
+Seed-only and failed/policy-blocked read cases retain uncertainty. These are
+contract tests, not proof of real diagnosis.
+
+Browser qualification reproduced a linked-issue defect: a finding folded under
+an existing alert could not stay selected because selection searched only the
+non-mirrored display groups. Selection now resolves the canonical filtered
+findings, preserving the existing interactive inline surface. The final
+Playwright matrix opens ordinary and mirrored findings at 1440/900/390 widths,
+opens the nested failed-read transcript, collapses the review and
+passes the same finding, unknown conclusion and access limit to Assistant.
+Scripted inference and blocked writes make this a presentation/context proof.
+
+PR #1920's initial worker proof passed against local source 5288b64d, but its CI
+comparison against the actual base 4f9de86e failed nine benchmark comparisons,
+including small single-resource retained reads. Landing is blocked while the
+exact base/candidate comparison is reproduced and corrected. Do not treat the
+previous narrower performance pass as complete CI qualification.
+
+### Exact-base retained-read correction
+
+The small retained-read path performed an extra tier-presence query and opened
+an explicit transaction even when the reconciliation was already one SQLite
+statement. Plain reads now reuse bounded compiled reconciliation statements.
+All-metric plain reads retain index time order instead of sorting by metric.
+Each output series remains chronological. Display aggregation retains its
+required series grouping and same-snapshot presence optimization. No data or
+tier-presence result is cached.
+
+The corrected `store.go` SHA256 is
+`41132f7eae5a987e72092aceb8813a20f3dc44986c849023ffa0654e5bfe58aa`.
+Ten alternating 100 ms worker samples against exact PR base 4f9de86e report:
+
+| Query | Base | Correction | Comparison |
+|---|---:|---:|---|
+| Bounded single-metric API chart | 848.6 us | 894.5 us | No significant difference, p=.436 |
+| Single series across resources | 916.98 us | 47.12 us | -94.86%, p<.001 |
+| Single query, 500-node load fixture | 18.78 ms | 51.50 us | -99.73%, p<.001 |
+| All-metric dashboard | 309.3 us | 174.3 us | -43.66%, p<.001 |
+| Batch dashboard, 10 nodes | 1.912 ms | 1.723 ms | -9.86%, p=.007 |
+| Batch dashboard, 50 nodes | 8.807 ms | 8.337 ms | -5.34%, p=.023 |
+| Batch dashboard, 100 nodes | 17.56 ms | 16.08 ms | -8.43%, p=.002 |
+| Batch dashboard, 500 nodes | 87.56 ms | 82.34 ms | No significant difference, p=.052 |
+
+These are worker measurements, not a production latency guarantee. An exact
+query-plan reproduction shows the old single-query SQL choosing the broad
+tier/time index on this worker. The corrected runtime uses the series/range
+index explicitly. This explains the large worker single-query difference but
+does not establish which plan the prior CI runner chose. No benchmark threshold
+was relaxed. The final full metrics suite passes in 87.114s, the database
+suite in 0.119s and focused concurrent read/write race proof in 19.065s. The
+remaining failed CI comparisons have no significant worker latency difference:
+API memory fallback, 163.6 versus 167.3 us (p=.315), and the fifty-guest chart
+batch, 128.0 versus 121.3 ms (p=.190). These comparisons cover the earlier failed
+cases. A fresh CI run must still qualify the final landing commit. The earlier
+unexplained native SQLite fault remains an open observation.
+
+Private worker evidence is retained under
+`/opt/pulse-release-worker/pr1920-bench-4f9-c5d2/`, with source-bound
+`full-metrics-second.log`, `full-db-second.log`, `race-metrics-second.log`,
+`second-candidate-*` and `adj-*` artifacts.
+
+
+### Detection conversation redesign
+
+The original model conversation now owns reads, finding decisions and correction
+of rejected calls within the explicit run limit. Removed the separate evaluator,
+old-evidence assessment sweep, signal-count report budget and post-finding prompt
+replacement. The standing prompt describes Pulse's evidence, existing alerts,
+active-finding obligation and action boundaries without fixed tool sequences or
+forcing symptom reports before investigation. A run with no new finding may be called all clear only when the model's
+evidence supports that conclusion. Final-turn and output-limit recovery instructions
+also retain missing/stale evidence and avoid repeating accepted assessments.
+
+The 01:55 UTC ordinary Assistant recheck did not yield a final answer. Server
+logs record `context canceled` at 01:57:06 UTC, before the qualification runner
+was interrupted at about 01:57:44 UTC. The request's eleven tool calls and partial
+session remain reproduction evidence. It is a runtime failure with an unresolved
+cancellation source, not a completed diagnosis. Its source/binary correspondence
+has not been established as an exact final-build proof. No autonomous request or
+paid alternate-provider call was made.
+
+The rebuilt local runtime retains the same unknown cause and failed-read evidence
+through ordinary and alert-mirrored finding review and the linked Assistant.
+The scripted browser matrix passes at 1440x1000, 900x1000 and 390x1000, including
+nested transcript expansion/collapse, keyboard review and explanation, selected
+issue identity, draft preservation, menu dismissal and error/retry. Actual pixels
+were inspected. This proves presentation and context continuity, not diagnosis.
+The private source-bound receipt is `tmp/patrol-assistant-journey/result.json`.
+Runtime binary SHA-256 before/after the pass was
+`724941045a17714460f703724528a040645c752aabe01c114fc1aae6cecca52c`.
+
+Final affected worker proof passes: full chat 13.670s, full AI 10.216s,
+Patrol/API bridge tests 24.421s and focused conversation race tests 1.043s.
+The race cases cover mixed accepted/rejected finding calls, a fresh evidence read
+between independent findings, provider failure after an accepted finding and
+exact accepted-call idempotency. The integration case retains an omitted
+assessment as active and incomplete after exactly one original model run.
+Zero, one and fifteen heuristic flags do not change the run limit, trigger an
+auxiliary session, manufacture findings or inflate model usage. Existing
+control-mode, capability and objective-observer tests remain part of the passing
+full packages. Private proof logs are `/opt/pulse-release-worker/final-affected2-chat.log`
+and `final-affected3-{ai,api,race}.log`.
+
+The subsequent ordinary Assistant check on the unchanged binary completed from
+02:45:25.486 to 02:48:18.734 UTC, about 173 seconds, with thirteen visible tool
+records. It distinguished high utilisation from proven pressure and preserved
+failed access. It still inferred observation startup from timestamp coincidence
+and asserted that a change across retained resolutions was not an aggregation
+artefact without supporting evidence. The temporal conclusion therefore remains
+unqualified. Completion of this request does not explain the earlier cancellation
+and does not qualify autonomous Patrol.
+
+This real run also reproduced a canonical result defect: `pulse_read` with
+`action=file` returned missing-agent text but a successful result. The shared
+file-read boundary now returns a tool error for absent agents and nonzero
+host/container command exits, preserving the original explanation. Success
+continues to require actual file content. Focused negative controls cover absent
+agents and both stderr/stdout error paths. The final real Assistant check executed the exact file read once and returned
+`tool_end.success=false`. The failed badge and original explanation were visible
+in desktop and narrow views, survived expansion/collapse and reload, and the
+model described a collection limit without claiming file evidence. The single
+request ran from 02:52:16.552 to 02:52:48.461 UTC. The scripted linked-issue matrix
+also passed again at 1440/900/390 widths on the final rebuilt runtime.
+
+Final binary SHA-256 was
+`a575a40a640af1aaed479b56636dc5a3205c76df6999bbb20546ccf09fe70659`,
+unchanged throughout both passes. `tools_file.go` SHA-256 was
+`a5585c787e8a24aa5bc694b40a6c945709ecab06d9f581105131531dd16d3ac3`.
+Private receipts remain under the task's
+`diagnostic-evidence-file-read-failure-final/` and the repository's
+`tmp/patrol-assistant-journey/`. This qualifies the named ordinary read failure
+and presentation contract, not autonomous investigation or action outcomes.
+
+The final full tools package passes in 59.413s and focused file-read race proof
+in 1.033s, covering successful reads alongside the failed-read controls.
+Private worker logs are `file-read-full.log` and `file-read-race.log` under
+`/opt/pulse-release-worker/`.
++
++## Integration qualification, 2026-09-06
++
++The detection and failed-read slice is committed as `61607333cc9e`. Integration
++with main `3f74c0c27304` required a fresh browser receipt. Intermediate-width
++inspection exposed the shared delivery-health card squeezing its explanation
++under the action buttons. The shared card now wraps by available width and uses
++an opaque semantic heading colour. Permanent fixtures include 900 pixels and
++check control bounds and heading overflow.
++
++Final worker proof passes 18 delivery-ordering cases and 12 Overview refresh
++cases at 1440, 900 and 390 pixels, with Overview checked in light and dark themes.
++Unavailable health, retained retry/dismiss actions, pending refresh and healthy
++recovery were exercised. Final card pixels were inspected at all three widths.
++Frontend lint, type checking and three affected test files pass. Focused merged
++Patrol/API/adapter/Docker-result proof passes. The final local scripted
++`/patrol` and `/alerts` journey passes at 1440x1000, 900x1000 and 390x1000,
++including nested failed-read evidence and the linked Assistant. This qualifies
++the integrated presentation and context contract only. Exact staged hook and
++remote landing are subsequent delivery checks. Real diagnosis and autonomous
++action outcomes remain unqualified, and the provider refusal remains enforced.
diff --cc docs/release-control/v6/internal/status.json
index 2e6870d1b9,1f1a6bd192..39b42486cd
--- a/docs/release-control/v6/internal/status.json
+++ b/docs/release-control/v6/internal/status.json
@@@ -10201,7 -10218,7 +10201,7 @@@
},
{
"id": "patrol-assistant-customer-outcome-qualification",
- "summary": "The maintainer requested a whole-design assessment and an explicit completion goal for Patrol and Assistant. The ordered plan and source-bound evidence are in docs/qualification/PATROL_ASSISTANT_CUSTOMER_JOURNEY.md. The contract separates observations, model conclusions, proposals, execution and independently verified outcomes. Assistant continues the same issue and governed action records. The explicit explanation handoff is an implemented frontend foundation, not outcome qualification. The recorded 2026-09-05 latest-report, monitoring-active, multi-ping review excluded development and deployment proof and contained 127 paid installs, 71 with Patrol enabled and 23 with Assistant calls. Fourteen reported verified resolutions came from one install. Paid includes all non-free tiers. Activity cooccurrence does not establish a successful linked task, and schema 17 outcome/provider/cost fields had no adoption in that review. Real read-only homelab testing with Claude Opus 5 exposed missing canonical evidence, history target/tier gaps, premature context loss, unsupported causal claims and multi-minute responses. Prior history and handoff changes are recorded in the plan. The current working slice removes proposal rationale promotion into Root Cause and duplicate causal inference, preserves disk SMART/risk/source freshness and explicit remaining life, supports canonical disk get/health, and corrects collector cadence and status recovery. Targeted regressions and the live disk data path pass. Affected full worker package suites pass. The single-metric downsample regression and an adjacent bounded chart regression are corrected. Compiled presence statements are reused within a bounded set, but every query reads current data in one snapshot. The chart comparison shows no significant slowdown. Final metrics/database suites, focused concurrency race checks and the existing benchmark guard pass. Single-metric downsampling remains close to the performance threshold. PR #1920 CI subsequently failed nine benchmark comparisons against the actual base 4f9de86e, including small retained reads. The prior worker comparison used local source 5288b64d and does not establish final CI performance. The exact-base correction removes unnecessary plain-read presence probes, transaction wrappers and metric sorting while retaining canonical reconciliation and current snapshots. Full metrics/database and focused race suites pass. Ten alternating worker samples cover the previously failed CI comparisons without a significant greater-than-10% regression. Final CI landing qualification remains pending. One earlier SQLite native binding fault has no established root cause, although subsequent final full and focused race proofs pass. The latest live answers still infer collector startup from timestamp coincidence, claim continuous coverage from retained spacing and infer backup recovery from an online datastore. They fail diagnostic qualification. A serialized routing-envelope leak prompted a subscription transport correction with targeted regression proof, verified without routing prose in a completed real Assistant answer. A narrow answer-table overflow defect is corrected in the shared sanitized renderer with desktop, intermediate and mobile browser proof. The selected subscription provider explicitly refused autonomous Patrol readiness. The runtime and API preserve that refusal and prevent execution. Ordinary Assistant success is not autonomous proof. Required healthy/unhealthy, dependency, missing-access, backup/capacity and approved/rejected action qualification remains incomplete. Independent volunteered Pro environments are required before claiming repeatable customer value or wider readiness. The next diagnostic slice removes successful-read completion floors, evidence checkpoint instructions and generic call-count/silent-turn wrap-up policy. Full worker chat and AI suites pass. Browser qualification exposed and corrected mirrored-alert finding selection in the shared review lookup. Ordinary/mirrored records and linked uncertainty/failed-read context pass Playwright at 1440/900/390 widths. The detection slice removes contextless evaluation and assessment sessions, the flag-count turn ladder, signal-count report quotas and post-finding prompt replacement. The original conversation retains evidence tools and accepted records alongside errors. Full chat and AI packages, focused Patrol API tests and conversation race regressions pass. Source-bound scripted browser proof against the rebuilt runtime preserves linked uncertainty and failed reads at 1440/900/390 widths. Integration with current main and final landing verification remain pending. The latest ordinary Assistant recheck ended with context cancellation before a final answer, with eleven tool results retained. Its cancellation source and exact running binary correspondence are unresolved. The subsequent unchanged-runtime ordinary Assistant check completed in about 173 seconds, correctly distinguished utilisation from pressure, but still made unsupported temporal claims. It also exposed a failed file read marked successful. The shared file-read correction now preserves error status for absent agents and nonzero exits, with a final real ordinary file-read check returning success=false and showing the failed badge, preserved explanation and honest collection limit through reload. The linked-issue browser matrix passes again on the final rebuilt runtime. The full tools package and focused file-read race proof pass. Final integrated landing proof remains pending. Real-model/action outcome qualification remains open.",
- "summary": "The 2026-09-05 product review found that Explain with Assistant opened a blank generic conversation and the attention workbench discarded richer canonical finding context. The explicit explanation dispatcher and canonical handoff repair address that frontend break, with scripted browser proof and regression tests. They do not qualify model reasoning, real infrastructure actions, or repeated customer value. Latest-report, monitoring-active, multi-ping telemetry excluding dev and deployment proof contained 127 paid installs, 71 with Patrol enabled and 23 with Assistant calls. Fourteen reported verified resolutions were concentrated in one install. Paid includes all non-free tiers, and activity cooccurrence is not a linked successful journey. Schema 17 outcome/provider/cost fields had no adoption in that review. Three real jobs remain to qualify across named provider/model/version configurations: unhealthy service diagnosis, backup or capacity risk, and supported VM/LXC plan, approval and verified result. Repeatability must be established across independent paid customer environments without pooling free-tier or ineligible installs. The same-day real maintainer homelab evaluation with Claude Opus 5 exposed missing Proxmox temperature-tool evidence, contradictory summary health, incomplete visible prose, alert-count confusion and an inaccurately classified provider refusal during Patrol readiness. The shared temperature projection and premature within-window evidence compaction are repaired, while the documented reasoning, completion, readiness and end-to-end outcome failures remain unqualified. The continuation repaired canonical resource lookup, operation-versus-disk filtering, Proxmox CPU topology and retained resource-scoped history across backend restarts. Unscoped summary/baseline modernization, wear semantics, disk risk explanation and complete retained-window coverage remain open. A named-resource repeat exposed overly restrictive current_resource recovery guidance, now corrected without weakening the attachment boundary. Live testing also exposed warning-based API execution after an incomplete provider check. Runtime and API now enforce the selected-mode verdict, including saved incomplete results, and the repaired live endpoint returns HTTP 409. One read-only test run started before the gate correction and was stopped, so it is not qualification evidence. The evidence interpretation continuation replaces model-facing heuristic summaries with retained statistics, explicit source scope, real observation coverage and preserved bucket extrema/timestamps. A typed provider_refusal diagnosis now survives CLI exit and legacy cache decoding without granting readiness or repeating the refused request. The final real summary distinguished utilisation from demonstrated pressure and explained extrema versus bucket averages, but still speculated about sensor artefacts and monitoring restarts, inferred continuous coverage from minute spacing, and conflated returned history with retained history. Reasoning remains unqualified. A local fixture confirmed that 24-hour Query and QueryAll can hide newer raw points when a preferred aggregate tier is non-empty. Shared temporal tier reconciliation, including batch queries, is required in L10 before claiming current requested-window history.",
++ "summary": "The maintainer requested a whole-design assessment and an explicit completion goal for Patrol and Assistant. The ordered plan and source-bound evidence are in docs/qualification/PATROL_ASSISTANT_CUSTOMER_JOURNEY.md. The contract separates observations, model conclusions, proposals, execution and independently verified outcomes. Assistant continues the same issue and governed action records. The explicit explanation handoff is an implemented frontend foundation, not outcome qualification. The recorded 2026-09-05 latest-report, monitoring-active, multi-ping review excluded development and deployment proof and contained 127 paid installs, 71 with Patrol enabled and 23 with Assistant calls. Fourteen reported verified resolutions came from one install. Paid includes all non-free tiers. Activity cooccurrence does not establish a successful linked task, and schema 17 outcome/provider/cost fields had no adoption in that review. Real read-only homelab testing with Claude Opus 5 exposed missing canonical evidence, history target/tier gaps, premature context loss, unsupported causal claims and multi-minute responses. Prior history and handoff changes are recorded in the plan. The current working slice removes proposal rationale promotion into Root Cause and duplicate causal inference, preserves disk SMART/risk/source freshness and explicit remaining life, supports canonical disk get/health, and corrects collector cadence and status recovery. Targeted regressions and the live disk data path pass. Affected full worker package suites pass. The single-metric downsample regression and an adjacent bounded chart regression are corrected. Compiled presence statements are reused within a bounded set, but every query reads current data in one snapshot. The chart comparison shows no significant slowdown. Final metrics/database suites, focused concurrency race checks and the existing benchmark guard pass. Single-metric downsampling remains close to the performance threshold. PR #1920 CI subsequently failed nine benchmark comparisons against the actual base 4f9de86e, including small retained reads. The prior worker comparison used local source 5288b64d and does not establish final CI performance. The exact-base correction removes unnecessary plain-read presence probes, transaction wrappers and metric sorting while retaining canonical reconciliation and current snapshots. Full metrics/database and focused race suites pass. Ten alternating worker samples cover the previously failed CI comparisons without a significant greater-than-10% regression. Final CI landing qualification remains pending. One earlier SQLite native binding fault has no established root cause, although subsequent final full and focused race proofs pass. The latest live answers still infer collector startup from timestamp coincidence, claim continuous coverage from retained spacing and infer backup recovery from an online datastore. They fail diagnostic qualification. A serialized routing-envelope leak prompted a subscription transport correction with targeted regression proof, verified without routing prose in a completed real Assistant answer. A narrow answer-table overflow defect is corrected in the shared sanitized renderer with desktop, intermediate and mobile browser proof. The selected subscription provider explicitly refused autonomous Patrol readiness. The runtime and API preserve that refusal and prevent execution. Ordinary Assistant success is not autonomous proof. Required healthy/unhealthy, dependency, missing-access, backup/capacity and approved/rejected action qualification remains incomplete. Independent volunteered Pro environments are required before claiming repeatable customer value or wider readiness. The next diagnostic slice removes successful-read completion floors, evidence checkpoint instructions and generic call-count/silent-turn wrap-up policy. Full worker chat and AI suites pass. Browser qualification exposed and corrected mirrored-alert finding selection in the shared review lookup. Ordinary/mirrored records and linked uncertainty/failed-read context pass Playwright at 1440/900/390 widths. The detection slice removes contextless evaluation and assessment sessions, the flag-count turn ladder, signal-count report quotas and post-finding prompt replacement. The original conversation retains evidence tools and accepted records alongside errors. Full chat and AI packages, focused Patrol API tests and conversation race regressions pass. Source-bound scripted browser proof against the rebuilt runtime preserves linked uncertainty and failed reads at 1440/900/390 widths. Integration with current main and final landing verification remain pending. The latest ordinary Assistant recheck ended with context cancellation before a final answer, with eleven tool results retained. Its cancellation source and exact running binary correspondence are unresolved. The subsequent unchanged-runtime ordinary Assistant check completed in about 173 seconds, correctly distinguished utilisation from pressure, but still made unsupported temporal claims. It also exposed a failed file read marked successful. The shared file-read correction now preserves error status for absent agents and nonzero exits, with a final real ordinary file-read check returning success=false and showing the failed badge, preserved explanation and honest collection limit through reload. The linked-issue browser matrix passes again on the final rebuilt runtime. The full tools package and focused file-read race proof pass. Final integrated landing proof remains pending. Real-model/action outcome qualification remains open. Integrated main 3f74c0c27304 passes focused API proof and final frontend lint, type checking and three affected test files. Permanent browser fixtures pass 18 delivery-ordering and 12 light/dark Overview cases at 1440/900/390 widths after repairing shared card wrapping and heading readability. The final linked Patrol/Assistant browser matrix also passes. Exact staged hook and remote landing remain pending. These checks do not close the real-model/action outcome gap.",
"owner": "project-owner",
"status": "planned",
"recorded_at": "2026-09-05",
diff --cc docs/release-control/v6/internal/subsystems/alerts.md
index df0496f562,3722e139be..17ac194002
--- a/docs/release-control/v6/internal/subsystems/alerts.md
+++ b/docs/release-control/v6/internal/subsystems/alerts.md
@@@ -15,6 -15,12 +15,19 @@@
## Purpose
++The shared delivery-health card wraps action groups according to available
++space, retaining readable explanation width when Review, Retry, Dismiss and
++Refresh appear together. Its heading uses the opaque semantic foreground,
++not the translucent palette shades reserved for status backgrounds. Verify
++light/dark layouts at desktop, intermediate and narrow widths, including
++unavailable health, pending refresh and recovery.
++
+ The alerts overview offers the existing delivery-status refresh control when
+ health is unavailable, including after a successful retained-queue action whose
+ follow-up health read fails. The warning remains until a verified healthy read;
+ a successful queue action alone is not evidence of delivery health. Normal
+ degraded summary presentation continues to omit refresh.
+
Confirmed canonical metric recovery publishes the clearing evaluation's value,
observation time, and resolved metric wording in the snapshot consumed by
recent-resolution reads and notification callbacks. It must not reuse the last
diff --cc docs/release-control/v6/internal/subsystems/frontend-primitives.md
index 159c6f0238,0828f81b6d..0b217c2342
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@@ -20,6 -20,12 +20,19 @@@
## Purpose
++The shared delivery-health card wraps action groups according to available
++space, retaining readable explanation width when Review, Retry, Dismiss and
++Refresh appear together. Its heading uses the opaque semantic foreground,
++not the translucent palette shades reserved for status backgrounds. Verify
++light/dark layouts at desktop, intermediate and narrow widths, including
++unavailable health, pending refresh and recovery.
++
+ The alerts overview offers the existing delivery-status refresh control when
+ health is unavailable, including after a successful retained-queue action whose
+ follow-up health read fails. The warning remains until a verified healthy read;
+ a successful queue action alone is not evidence of delivery health. Normal
+ degraded summary presentation continues to omit refresh.
+
Proxmox backup presentation treats every manifestless PBS artifact as
non-recoverable. It renders the artifact as `Running` when current writer
visibility is absent or a matching writer is active, and as danger-tone
diff --cc frontend-modern/browser-verification.json
index 4d0c8bddfc,357d04b348..df645715bd
--- a/frontend-modern/browser-verification.json
+++ b/frontend-modern/browser-verification.json
@@@ -1,39 -1,33 +1,57 @@@
{
"version": 1,
- "base_sha": "c5d2f56dda42946ebafe09266c8e2e52319ba24b",
- "verified_at": "2026-09-06T01:21:13.188Z",
- "base_sha": "4cc53d10950f2effae720d251f92bf7d143d2093",
- "verified_at": "2026-09-06T00:55:06.543758Z",
++ "base_sha": "61607333cc9e2fe1c1712b94ce458ac45abdabd1",
++ "verified_at": "2026-09-06T03:17:28.710286Z",
"result": "passed",
"changed_paths": [
- "frontend-modern/src/components/AI/FindingsPanel.tsx"
- "frontend-modern/src/features/alerts/OverviewTab.tsx"
++ "frontend-modern/src/features/alerts/AlertDeliveryHealthCard.tsx",
++ "frontend-modern/src/features/alerts/OverviewTab.tsx",
++ "frontend-modern/src/features/alerts/useNotificationDeliveryHealth.ts"
],
"content_sha256": {
- "frontend-modern/src/components/AI/FindingsPanel.tsx": "aead071f9431e5c2284014cd8e4af8fc5cde69951f3f850821808dcf885c5226"
- "frontend-modern/src/features/alerts/OverviewTab.tsx": "8f7fdc04bd0546f86152c8bb392ff3e3fb755f1f0a1c28d1ee85da3e9fe23582"
++ "frontend-modern/src/features/alerts/AlertDeliveryHealthCard.tsx": "dad60838804e575c0314398b304bda6d2fbd842cb2f693b3f33d168a4bce5dc1",
++ "frontend-modern/src/features/alerts/OverviewTab.tsx": "8f7fdc04bd0546f86152c8bb392ff3e3fb755f1f0a1c28d1ee85da3e9fe23582",
++ "frontend-modern/src/features/alerts/useNotificationDeliveryHealth.ts": "1eadf6df30b4f1130f868b8f139561ea60fdb87e1823deeeaaf2f8fbc699a00c"
},
"routes": [
- "/qualification (actual OverviewTab in isolated Solid Router fixture; not application shell)"
++ "/qualification (actual delivery-health and Overview components in isolated Solid Router fixtures, scripted API promises)",
+ "/patrol",
+ "/alerts"
],
"viewports": [
+ {
+ "width": 1440,
+ "height": 900
+ },
++ {
++ "width": 900,
++ "height": 900
++ },
+ {
+ "width": 390,
+ "height": 900
++ },
+ {
+ "width": 1440,
+ "height": 1000
+ },
+ {
+ "width": 900,
+ "height": 1000
+ },
+ {
+ "width": 390,
+ "height": 1000
}
],
"states": [
- "Ordinary and alert-mirrored findings retain the same review selection. Completed investigation remains Needs attention with unknown cause and failed access evidence.",
- "Original failed read and uncertain conclusion remain visible in the nested investigation transcript and linked Assistant request. Scripted responses establish presentation and context preservation, not diagnostic competence."
- "Actual OverviewTab and delivery-health hook/card in Chromium, scripted API promises, empty active alerts. Not installed backend or recipient qualification.",
- "Degraded health, successful Retry or Dismiss followed by unavailable health, pending manual refresh, verified healthy response. Desktop and narrow unavailable screenshots visually inspected; Refresh fits without clipping. Not a full accessibility or shell audit."
++ "Delivery ordering: 18 scripted cases at three widths. Overview refresh: 12 scripted cases across light/dark themes and three widths. Unavailable health, retained Retry/Dismiss actions, pending disabled Refresh and healthy recovery. These fixtures do not qualify installed backend delivery or recipient outcomes.",
++ "Final card pixels inspected at desktop, intermediate and narrow widths in both themes. Heading is readable and actions wrap within the card. This is a focused card check, not a full dark-theme shell audit.",
++ "Ordinary and alert-mirrored Patrol findings preserve unknown cause and failed-read evidence in the investigation transcript and linked Assistant. Scripted responses qualify presentation and context preservation, not diagnostic competence."
],
"interactions": [
- "Activity, Finding options and history, mirrored disclosure, keyboard Review, investigation thread expansion/collapse, review close at 1440/900/390 widths. Inspect final pixels for readable content and reachable controls.",
- "Inbox selected issue, evidence expansion, keyboard Explain, same canonical finding with failed-read evidence and uncertainty in Assistant handoff, Escape, draft preservation, reload without resubmission.",
- "Existing adjacent alert menu Escape/outside dismissal and provider failure/retry checked. No infrastructure mutations or autonomous provider calls. Private source-bound proof: tmp/patrol-assistant-journey/result.json."
- "pulse-heavy-run -- node scripts/check-overview-health-refresh.mjs: four cases passed (two actions at two widths).",
- "Retry and Dismiss each accepted once; failed health read preserves unavailable warning and offers Refresh; Refresh disabled while pending; healthy read removes warning without another queue action."
++ "Retry and Dismiss followed by failed health read, manual Refresh while pending, healthy recovery and overlapping old/new response ordering. Geometry assertions check heading overflow and control bounds.",
++ "Selected issue, evidence expansion, keyboard Review and Explain, nested transcript expansion/collapse, Assistant streaming, preserved draft, reload, error/retry, menu Escape and outside dismissal at 1440/900/390 widths.",
++ "Private receipts: /Volumes/Development/pulse/tmp/patrol-merge-browser/final-health-ordering and final-overview-refresh, and tmp/patrol-assistant-journey/result.json. No infrastructure mutations or autonomous provider calls."
]
}
diff --cc frontend-modern/src/features/alerts/AlertDeliveryHealthCard.tsx
index 6519ec23c4,6519ec23c4..6839f5b831
--- a/frontend-modern/src/features/alerts/AlertDeliveryHealthCard.tsx
+++ b/frontend-modern/src/features/alerts/AlertDeliveryHealthCard.tsx
@@@ -52,20 -52,20 +52,20 @@@ export function AlertDeliveryHealthCard
return (
<Card tone="danger" padding="sm" class="border-red-200 dark:border-red-800 sm:p-4" role="alert">
-- <div class="flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between">
-- <div class="flex min-w-0 items-start gap-3">
++ <div class="flex flex-wrap items-start justify-between gap-3">
++ <div class="flex min-w-0 flex-1 basis-72 items-start gap-3">
<AlertTriangleIcon
class="mt-0.5 h-4 w-4 flex-shrink-0 text-red-700 dark:text-red-300"
aria-hidden="true"
/>
<div class="min-w-0">
-- <h3 class="text-sm font-semibold text-red-900 dark:text-red-100">
++ <h3 class="text-sm font-semibold text-base-content">
{getAlertDestinationsDeliveryHealthTitle(status())}
</h3>
<p class="mt-1 text-sm leading-6 text-red-800 dark:text-red-200">{description()}</p>
</div>
</div>
-- <div class="flex flex-shrink-0 flex-wrap items-center gap-2">
++ <div class="flex max-w-full flex-wrap items-center gap-2">
{props.detailsHref ? (
<ButtonLink variant="secondary" size="sm" href={props.detailsHref}>
{getAlertDestinationsDeliveryReviewLabel()}
diff --cc scripts/check-delivery-health-ordering.mjs
index 0000000000,5da689c279..d2f5917f82
mode 000000,100644..100644
--- a/scripts/check-delivery-health-ordering.mjs
+++ b/scripts/check-delivery-health-ordering.mjs
@@@ -1,0 -1,146 +1,146 @@@
+ // Isolated real-browser component qualification; no installed backend or delivery claim.
+ import { createServer } from "../frontend-modern/node_modules/vite/dist/node/index.js";
+ import solid from "../frontend-modern/node_modules/vite-plugin-solid/dist/esm/index.mjs";
+ import { chromium } from "@playwright/test";
+ import { resolve } from "node:path";
+ import { mkdirSync } from "node:fs";
+ import assert from "node:assert/strict";
+ const root = resolve("frontend-modern");
+ process.chdir(root);
+ const fixture = `
+ import { render } from 'solid-js/web';
+ import { Show } from 'solid-js';
+ import { NotificationsAPI } from '/src/api/notifications';
+ import { AlertsAPI } from '/src/api/alerts';
+ import { useAlertDestinationsTabState } from '/src/features/alerts/useAlertDestinationsTabState';
+ import { AlertDeliveryHealthCard } from '/src/features/alerts/AlertDeliveryHealthCard';
+ import '/src/index.css';
+ const pending = [];
+ NotificationsAPI.getHealth = () => new Promise((resolve, reject) => pending.push({resolve, reject}));
+ NotificationsAPI.getDeliveryLog = async () => [];
+ AlertsAPI.getEvents = async () => [];
+ NotificationsAPI.retryTerminalFailures = NotificationsAPI.dismissTerminalFailures = async () => ({affected: 1});
+ window.confirm = () => true;
+ window.finish = (i, status) => status === 'error' ? pending[i].reject(new Error('scripted offline')) : pending[i].resolve({queue:{status, failed:1, deadLetter:0, attentionRequired:1}});
+ window.count = () => pending.length;
+ function Fixture() {
+ const s = useAlertDestinationsTabState({emailConfig:()=>({}), appriseConfig:()=>({}), setAppriseConfig:()=>{}, configLoadError:()=> 'scripted config unavailable', isRetrying:()=>false, isLoadingDestinations:()=>false, onRetryLoad:()=>{}, webhooks:()=>[]});
+ return <main class="p-4"><h1>Delivery health ordering fixture</h1><button onClick={s.handleRetry}>Configuration Retry</button><output data-testid="loading">{String(s.refreshingDeliveryHealth())}</output><Show when={s.deliveryNeedsAttention()}><AlertDeliveryHealthCard health={s.deliveryHealth()?.queue ?? null} unavailable={s.deliveryHealthUnavailable()} refreshing={s.refreshingDeliveryHealth()} onRefresh={s.loadDeliveryHealth} onRetryFailures={s.retryTerminalFailures} onDismissFailures={s.dismissTerminalFailures}/></Show></main>;
+ }
+ render(() => <Fixture/>, document.getElementById('root'));
+ `;
+ const server = await createServer({
+ root,
+ configFile: false,
+ optimizeDeps: {
+ noDiscovery: true,
+ entries: [],
+ esbuildOptions: { target: "esnext" },
+ },
+ esbuild: { target: "esnext" },
+ plugins: [
+ solid(),
+ {
+ name: "ordering-fixture",
+ configureServer(s) {
+ s.middlewares.use((req, res, next) => {
+ if (req.url === "/qualification") {
+ res.setHeader("Content-Type", "text/html");
+ res.end(
+ '<div id="root"></div><script type="module" src="/ordering-fixture.tsx"></script>',
+ );
+ } else next();
+ });
+ },
+ resolveId(id) {
+ if (id === "/ordering-fixture.tsx") return id;
+ },
+ load(id) {
+ if (id === "/ordering-fixture.tsx") return fixture;
+ },
+ },
+ ],
+ resolve: { alias: { "@": resolve(root, "src") } },
+ server: { host: "127.0.0.1", port: 5197, strictPort: true },
+ });
+ let browser;
+ try {
+ await server.listen();
+ browser = await chromium.launch({ headless: true });
+ mkdirSync("/tmp/pulse-health-ordering", { recursive: true });
+ let cases = 0;
- for (const width of [1440, 390]) {
++ for (const width of [1440, 900, 390]) {
+ for (const [old, newer] of [
+ ["healthy", "degraded"],
+ ["degraded", "healthy"],
+ ["error", "healthy"],
+ ["healthy", "error"],
+ ]) {
+ const page = await browser.newPage({ viewport: { width, height: 900 } });
+ await page.goto("http://127.0.0.1:5197/qualification");
+ await page.waitForFunction(() => window.count?.() === 1);
+ await page
+ .getByRole("button", { name: "Configuration Retry", exact: true })
+ .click();
+ await page.waitForFunction(() => window.count() === 2);
+ await page.evaluate((s) => window.finish(1, s), newer);
+ await page.waitForFunction(
+ () => document.querySelector("output").textContent === "false",
+ );
+ const before = await page.locator("main").innerText();
+ await page.evaluate((s) => window.finish(0, s), old);
+ await page.evaluate(
+ () =>
+ new Promise((r) =>
+ requestAnimationFrame(() => requestAnimationFrame(r)),
+ ),
+ );
+ assert.equal(await page.locator("main").innerText(), before);
+ assert.equal(
+ await page.getByRole("alert").count(),
+ ["degraded", "error"].includes(newer) ? 1 : 0,
+ );
+ await page.screenshot({
+ path: `/tmp/pulse-health-ordering/${width}-${old}-${newer}.png`,
+ });
+ await page.close();
+ cases++;
+ }
+ for (const action of [
+ "Retry retained deliveries",
+ "Dismiss retained failures",
+ ]) {
+ const page = await browser.newPage({ viewport: { width, height: 900 } });
+ await page.goto("http://127.0.0.1:5197/qualification");
+ await page.waitForFunction(() => window.count?.() === 1);
+ await page.evaluate(() => window.finish(0, "degraded"));
+ await page.getByRole("alert").waitFor();
+ await page
+ .getByRole("button", { name: "Configuration Retry", exact: true })
+ .click();
+ await page.getByRole("button", { name: action, exact: true }).click();
+ await page.waitForFunction(() => window.count() === 3);
+ await page.evaluate(() => window.finish(1, "healthy"));
+ assert.equal(await page.getByTestId("loading").textContent(), "true");
+ await page.evaluate(() => window.finish(2, "healthy"));
+ await page.waitForFunction(
+ () => document.querySelector("output").textContent === "false",
+ );
+ assert.equal(await page.getByRole("alert").count(), 0);
+ await page.close();
+ cases++;
+ }
+ }
+ console.log(
+ JSON.stringify({
+ result: "passed",
+ cases,
- viewports: [1440, 390],
++ viewports: [1440, 900, 390],
+ scope:
+ "real Chromium, real caller/hook/card, scripted API; not installed application or notification receipt",
+ }),
+ );
+ } finally {
+ await browser?.close();
+ await server.close();
+ }
diff --cc scripts/check-overview-health-refresh.mjs
index 0000000000,494d678021..4c184162b4
mode 000000,100644..100644
--- a/scripts/check-overview-health-refresh.mjs
+++ b/scripts/check-overview-health-refresh.mjs
@@@ -1,0 -1,98 +1,143 @@@
+ // Isolated real-browser component qualification; no installed backend or delivery claim.
+ import { createServer } from "../frontend-modern/node_modules/vite/dist/node/index.js";
+ import solid from "../frontend-modern/node_modules/vite-plugin-solid/dist/esm/index.mjs";
+ import { chromium } from "@playwright/test";
+ import { resolve } from "node:path";
+ import { mkdirSync } from "node:fs";
+ import assert from "node:assert/strict";
+ const root = resolve("frontend-modern");
+ process.chdir(root);
+ const fixture = `
+ import { render } from 'solid-js/web';
+ import { Router, Route } from '@solidjs/router';
+ import { NotificationsAPI } from '/src/api/notifications';
+ import { AlertsAPI } from '/src/api/alerts';
+ import { OverviewTab } from '/src/features/alerts/OverviewTab';
+ import '/src/index.css';
+ const pending = [];
+ NotificationsAPI.getHealth = () => new Promise((resolve, reject) => pending.push({resolve, reject}));
+ AlertsAPI.getDeliveryDiagnoses = async () => [];
+ window.actions = 0;
+ NotificationsAPI.retryTerminalFailures = NotificationsAPI.dismissTerminalFailures = async () => { window.actions++; return {affected: 1}; };
+ window.confirm = () => true;
+ window.finish = (i, status) => status === 'error' ? pending[i].reject(new Error('scripted offline')) : pending[i].resolve({queue:{status, failed:0, deadLetter:status === 'healthy' ? 0 : 1, attentionRequired:status === 'healthy' ? 0 : 1}});
+ window.count = () => pending.length;
+ function Fixture() {
+ return <main class="p-4"><OverviewTab overrides={[]} activeAlerts={{}} updateAlert={()=>{}} showQuickTip={()=>false} dismissQuickTip={()=>{}} showAcknowledged={()=>true} setShowAcknowledged={()=>{}} alertsDisabled={()=>false}/></main>;
+ }
+ render(() => <Router><Route path="/qualification" component={Fixture}/></Router>, document.getElementById('root'));
+ `;
+ const server = await createServer({
+ root,
+ configFile: false,
+ optimizeDeps: {
+ noDiscovery: true,
+ entries: [],
+ esbuildOptions: { target: "esnext" },
+ },
+ esbuild: { target: "esnext" },
+ plugins: [
+ solid(),
+ {
+ name: "ordering-fixture",
+ configureServer(s) {
+ s.middlewares.use((req, res, next) => {
+ if (req.url === "/qualification") {
+ res.setHeader("Content-Type", "text/html");
+ res.end(
+ '<div id="root"></div><script type="module" src="/ordering-fixture.tsx"></script>',
+ );
+ } else next();
+ });
+ },
+ resolveId(id) {
+ if (id === "/ordering-fixture.tsx") return id;
+ },
+ load(id) {
+ if (id === "/ordering-fixture.tsx") return fixture;
+ },
+ },
+ ],
+ resolve: { alias: { "@": resolve(root, "src") } },
+ server: { host: "127.0.0.1", port: 5197, strictPort: true },
+ });
+ let browser;
+ try {
+ await server.listen();
+ browser = await chromium.launch({ headless: true });
- mkdirSync('/tmp/pulse-overview-refresh', { recursive: true });
++ mkdirSync("/tmp/pulse-overview-refresh", { recursive: true });
+ let cases = 0;
- for (const width of [1440, 390]) {
- for (const action of ['Retry retained deliveries', 'Dismiss retained failures']) {
- const page = await browser.newPage({ viewport: { width, height: 900 } });
- await page.goto('http://127.0.0.1:5197/qualification');
- await page.waitForFunction(() => window.count?.() === 1);
- await page.evaluate(() => window.finish(0, 'degraded'));
- await page.getByRole('button', {name: action, exact: true}).click();
- await page.waitForFunction(() => window.count() === 2);
- await page.evaluate(() => window.finish(1, 'error'));
- const refresh = page.getByRole('button', {name:'Refresh delivery status', exact:true});
- await refresh.waitFor();
- assert.match(await page.getByRole('alert').innerText(), /status is unavailable/);
- await page.screenshot({path: `/tmp/pulse-overview-refresh/${width}-${cases}-unavailable.png`});
- await refresh.click();
- await page.waitForFunction(() => window.count() === 3);
- assert.equal(await refresh.isDisabled(), true);
- await page.evaluate(() => window.finish(2, 'healthy'));
- await page.getByRole('alert').waitFor({state:'detached'});
- assert.equal(await page.evaluate(() => window.actions), 1);
- await page.screenshot({path: `/tmp/pulse-overview-refresh/${width}-${cases}-healthy.png`});
- cases++;
- await page.close();
++ for (const theme of ["light", "dark"]) {
++ for (const width of [1440, 900, 390]) {
++ for (const action of [
++ "Retry retained deliveries",
++ "Dismiss retained failures",
++ ]) {
++ const page = await browser.newPage({
++ viewport: { width, height: 900 },
++ });
++ await page.goto("http://127.0.0.1:5197/qualification");
++ await page.evaluate(
++ (theme) =>
++ document.documentElement.classList.toggle("dark", theme === "dark"),
++ theme,
++ );
++ await page.waitForFunction(() => window.count?.() === 1);
++ await page.evaluate(() => window.finish(0, "degraded"));
++ await page.getByRole("button", { name: action, exact: true }).click();
++ await page.waitForFunction(() => window.count() === 2);
++ await page.evaluate(() => window.finish(1, "error"));
++ const refresh = page.getByRole("button", {
++ name: "Refresh delivery status",
++ exact: true,
++ });
++ await refresh.waitFor();
++ assert.match(
++ await page.getByRole("alert").innerText(),
++ /status is unavailable/,
++ );
++ const geometry = await page.getByRole("alert").evaluate((el) => {
++ const heading = el.querySelector("h3");
++ const bounds = el.getBoundingClientRect();
++ return {
++ titleFits: heading.scrollWidth <= heading.clientWidth + 1,
++ actionsFit: [...el.querySelectorAll("button, a")].every(
++ (control) => {
++ const rect = control.getBoundingClientRect();
++ return rect.left >= bounds.left && rect.right <= bounds.right;
++ },
++ ),
++ };
++ });
++ assert.equal(
++ geometry.titleFits,
++ true,
++ "warning heading must not overflow beneath actions",
++ );
++ assert.equal(
++ geometry.actionsFit,
++ true,
++ "warning actions must stay inside the card",
++ );
++ await page.screenshot({
++ path: `/tmp/pulse-overview-refresh/${theme}-${width}-${cases}-unavailable.png`,
++ });
++ await refresh.click();
++ await page.waitForFunction(() => window.count() === 3);
++ assert.equal(await refresh.isDisabled(), true);
++ await page.evaluate(() => window.finish(2, "healthy"));
++ await page.getByRole("alert").waitFor({ state: "detached" });
++ assert.equal(await page.evaluate(() => window.actions), 1);
++ await page.screenshot({
++ path: `/tmp/pulse-overview-refresh/${theme}-${width}-${cases}-healthy.png`,
++ });
++ cases++;
++ await page.close();
++ }
+ }
+ }
+ console.log(`${cases} overview action/outage/refresh browser cases passed`);
+ } finally {
+ await browser?.close();
+ await server.close();
+ }