mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-11-11 12:37:33 +00:00
Refs #748 (M3a: correct numbers within the in-memory window; the SQL history in M3b is a separate plan, see the end). ## Problem The node analytics range picker offers 24h, 7d, 30d and All (365d), but the store only holds its in-memory window (`retentionHours`, then eviction). `GetNodeAnalytics` still divided availability and packets/day by the requested range. Measured on our live instance (14-day window), repeater BE-BRE-ON8AR: | Range | Availability | Packets/day | |---|---|---| | 7d | 88.7% | 91 | | 30d | 42.6% | 265 | | All | 3.5% | 22 | Nothing on the page said that the data stopped at the edge of the window. ## What changes - `coverageStart` returns the edge of the in-memory window: the latest of `oldestLoaded` (background-load progress), `now - retentionHours`, and a new `evictedThrough` that eviction sets to the newest `FirstSeen` it removed, so memory-pressure eviction inside the retention window moves the edge too. - `s.packets[0]` is not that edge, and the first version of this PR used it. Chunks are selected by `last_seen`, so a transmission first heard weeks ago and heard again recently sits at the head with its old `FirstSeen`. On staging (7-day window) it returned 21/07. - When the edge lies more than a minute after the requested start, node analytics counts only transmissions from the edge, computes availability and packets/day over that span, and returns `timeRange.dataFrom` and `timeRange.partial`. - The minute of slack keeps a range equal to the retention window from reading as partial. Without it every 7d request on staging (168h) was partial, because the two edges came from separate clock reads. - The analytics page shows "Data from 2026-10-07: the server keeps about 7 days of packets in memory. Availability and packets/day cover that period, not the full 365 days." when partial. - **UTC fix.** The window bounds of node analytics and node hop analytics are formatted in UTC. They are compared as strings with UTC `FirstSeen` values, so on a non-UTC host the 7d window lost its oldest hours (2 at +02:00). Docker images run in UTC, which is why this did not show in production. - `nodeTxsSince` (one caller) is inclusive, so a packet exactly on the edge is kept. ## Tests - Go, `node_analytics_coverage_test.go`: - full coverage within memory; - 30d over 3 days in memory; - empty store; - a re-heard 85-day-old transmission at the head of `s.packets` (edge stays at retention, packet not counted, no bucket before `dataFrom`); - memory-eviction edge; - eviction records `evictedThrough`; - retention 30 s shorter than the range is not partial, while 30d is; - window bounds under a +02:00 `time.Local`. - Two tests were checked to fail on the old code: the local-zone test (166 of 168 packets, a `+02:00` bound) and the retention test without the slack (`dataFrom 09:57:08` vs `from 09:56:38`). - Full `cmd/server` suite passes locally (skipping `TestSaveGeoFilterPreservesFileMode`, a Windows-only failure on clean master). One run of five reported `FAIL` and four reruns were green; I did not capture which test failed. - Frontend unit: `tests/unit/test-issue-748-node-analytics-coverage.js` (5 assertions on the real `node-analytics.js` in `vm`), in `test-all.sh`; the full suite passes. - E2E: `tests/e2e/test-issue-748-node-analytics-coverage-e2e.js` (registered in `deploy.yml` and `scripts/non-unit-tests.json`), against the real fixture response with no interception: 7d is not partial and shows no notice; All is partial and the notice names the real start date. 2/2 locally. ## Validation Staging (retentionHours 168), same repeater, after the background load completed: | Range | Before | After | |---|---|---| | 7d | 82.7% | 83.3%, not partial | | 30d | 19.3% | 83.3%, partial from 2026-10-07 | | All | 1.6% | 83.3%, partial from 2026-10-07 | In the browser the notice appears under All and not under 7d. ## Not done - M3b, older history from SQLite. In the database only the sender is indexed (`from_pubkey`). Recipients sit in `decoded_json`, and relay hops only in `observations.resolved_path` (filled for about 27% of observations on our live instance, not indexed). A fallback today would show only a node's own packets for older days, a different meaning than the in-memory part. Doing it properly needs a per-node index written by the ingestor (pubkey, transmission, role); that is a separate plan. - The other analytics endpoints with a range (observer analytics, RF) were not checked for the same dilution. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
142 lines
7.2 KiB
JSON
142 lines
7.2 KiB
JSON
{
|
|
"browser": {
|
|
"reason": "Requires Playwright and Chromium; most suites also require a running local fixture server via BASE_URL. Existing E2E workflow steps retain their separate setup and selection. Never point these tests at production.",
|
|
"files": [
|
|
"tests/e2e/test-1110-live-filter.js",
|
|
"tests/e2e/test-a11y-axe-1668.js",
|
|
"tests/e2e/test-analytics-fluid-charts.js",
|
|
"tests/e2e/test-audio-lab-1297-e2e.js",
|
|
"tests/e2e/test-audio-live-1297-e2e.js",
|
|
"tests/e2e/test-bottom-nav-1061-e2e.js",
|
|
"tests/e2e/test-channel-color-picker-e2e.js",
|
|
"tests/e2e/test-channel-decrypt-e2e.js",
|
|
"tests/e2e/test-channel-fluid-e2e.js",
|
|
"tests/e2e/test-channel-issue-1087-e2e.js",
|
|
"tests/e2e/test-channel-issue-1111-e2e.js",
|
|
"tests/e2e/test-channel-modal-e2e.js",
|
|
"tests/e2e/test-channel-qr-e2e.js",
|
|
"tests/e2e/test-channels-add-modal-e2e.js",
|
|
"tests/e2e/test-channels-list-render-e2e.js",
|
|
"tests/e2e/test-channels-selection-flow-e2e.js",
|
|
"tests/e2e/test-channels-share-color-e2e.js",
|
|
"tests/e2e/test-channels-ws-batch-e2e.js",
|
|
"tests/e2e/test-channels-ws-race-1498-e2e.js",
|
|
"tests/e2e/test-charts-fluid-1058-e2e.js",
|
|
"tests/e2e/test-customize-branding-e2e.js",
|
|
"tests/e2e/test-customize-display-e2e.js",
|
|
"tests/e2e/test-customize-export-e2e.js",
|
|
"tests/e2e/test-customize-theme-e2e.js",
|
|
"tests/e2e/test-drag-manager-e2e.js",
|
|
"tests/e2e/test-e2e-1267-mobile-vcr.js",
|
|
"tests/e2e/test-e2e-playwright.js",
|
|
"tests/e2e/test-filter-ux-e2e.js",
|
|
"tests/e2e/test-gesture-hints-1065-e2e.js",
|
|
"tests/e2e/test-gestures-1062-e2e.js",
|
|
"tests/e2e/test-gestures-1185-scroll-discriminator-e2e.js",
|
|
"tests/e2e/test-home-coverage-e2e.js",
|
|
"tests/e2e/test-issue-1109-hamburger-dropdown-visible-e2e.js",
|
|
"tests/e2e/test-issue-1122-packets-filter-ux-e2e.js",
|
|
"tests/e2e/test-issue-1128-multi-viewport-e2e.js",
|
|
"tests/e2e/test-issue-1128-packets-layout-e2e.js",
|
|
"tests/e2e/test-issue-1136-live-region-e2e.js",
|
|
"tests/e2e/test-issue-1146-path-link-contrast-e2e.js",
|
|
"tests/e2e/test-issue-1147-section-order-e2e.js",
|
|
"tests/e2e/test-issue-1150-404-state-e2e.js",
|
|
"tests/e2e/test-issue-1151-orphan-separators-e2e.js",
|
|
"tests/e2e/test-issue-1204-live-panel-structure-e2e.js",
|
|
"tests/e2e/test-issue-1205-live-controls-anchor-e2e.js",
|
|
"tests/e2e/test-issue-1206-resize-observer-leak-e2e.js",
|
|
"tests/e2e/test-issue-1206-vcr-overlap-e2e.js",
|
|
"tests/e2e/test-issue-1224-channels-mobile-ux-e2e.js",
|
|
"tests/e2e/test-issue-1234-live-chrome-pass2-e2e.js",
|
|
"tests/e2e/test-issue-1236-map-mobile-e2e.js",
|
|
"tests/e2e/test-issue-1244-live-vcr-row-hints-e2e.js",
|
|
"tests/e2e/test-issue-1273-qr-overlay-height-e2e.js",
|
|
"tests/e2e/test-issue-1274-legend-coverage-e2e.js",
|
|
"tests/e2e/test-issue-1279-legend-p2-e2e.js",
|
|
"tests/e2e/test-issue-1281-location-row-e2e.js",
|
|
"tests/e2e/test-issue-1306-collisions-terminology-e2e.js",
|
|
"tests/e2e/test-issue-1329-map-controls-accordion-e2e.js",
|
|
"tests/e2e/test-issue-1367-channels-chat-app-e2e.js",
|
|
"tests/e2e/test-issue-1374-route-map-a11y-e2e.js",
|
|
"tests/e2e/test-issue-1400-nav-vertical-clip.js",
|
|
"tests/e2e/test-issue-1413-nav-overlap-e2e.js",
|
|
"tests/e2e/test-issue-1486-collapse-reopens-detail-e2e.js",
|
|
"tests/e2e/test-issue-1487-byop-modal-layout-e2e.js",
|
|
"tests/e2e/test-issue-1510-live-nav-pin-e2e.js",
|
|
"tests/e2e/test-issue-1567-corner-clears-drag-e2e.js",
|
|
"tests/e2e/test-issue-1599-replay-freeze-e2e.js",
|
|
"tests/e2e/test-issue-1630-reach-mobile-e2e.js",
|
|
"tests/e2e/test-issue-1268-rf-params-e2e.js",
|
|
"tests/e2e/test-issue-1639-observers-sort-e2e.js",
|
|
"tests/e2e/test-issue-748-node-analytics-coverage-e2e.js",
|
|
"tests/e2e/test-issue-661-airtime-e2e.js",
|
|
"tests/e2e/test-issue-1640-compare-discovery-e2e.js",
|
|
"tests/e2e/test-issue-1648-m1-icons-e2e.js",
|
|
"tests/e2e/test-issue-1648-m2-icons-e2e.js",
|
|
"tests/e2e/test-issue-1648-m3-icons-e2e.js",
|
|
"tests/e2e/test-issue-1648-m4-icons-e2e.js",
|
|
"tests/e2e/test-issue-1648-m5-icons-e2e.js",
|
|
"tests/e2e/test-issue-1657-analytics-channels-group-sprites-e2e.js",
|
|
"tests/e2e/test-issue-1692-packets-init-parallel-e2e.js",
|
|
"tests/e2e/test-issue-1705-subpath-contrast-e2e.js",
|
|
"tests/e2e/test-issue-1758-ng-filter-rerenders-e2e.js",
|
|
"tests/e2e/test-issue-1799-label-vocab-e2e.js",
|
|
"tests/e2e/test-issue-1833-legend-toggle-clickable-e2e.js",
|
|
"tests/e2e/test-issue-1997-distance-building-e2e.js",
|
|
"tests/e2e/test-live-dedup.js",
|
|
"tests/e2e/test-live-fullscreen-1572-e2e.js",
|
|
"tests/e2e/test-live-layout-1178-1179-e2e.js",
|
|
"tests/e2e/test-live-mql-leak-1180-e2e.js",
|
|
"tests/e2e/test-live-multibyte-only-e2e.js",
|
|
"tests/e2e/test-logo-default-sage-teal-e2e.js",
|
|
"tests/e2e/test-logo-pulse-1173-e2e.js",
|
|
"tests/e2e/test-logo-rebrand-e2e.js",
|
|
"tests/e2e/test-logo-theme-e2e.js",
|
|
"tests/e2e/test-map-modal-fluid-e2e.js",
|
|
"tests/e2e/test-map-nodes-pagination-e2e.js",
|
|
"tests/e2e/test-nav-drawer-1064-e2e.js",
|
|
"tests/e2e/test-nav-fluid-1055-e2e.js",
|
|
"tests/e2e/test-nav-more-floor-1139-e2e.js",
|
|
"tests/e2e/test-nav-priority-1102-e2e.js",
|
|
"tests/e2e/test-nav-priority-1311-e2e.js",
|
|
"tests/e2e/test-nav-priority-1391-e2e.js",
|
|
"tests/e2e/test-neighbor-map-btn-clip-e2e.js",
|
|
"tests/e2e/test-node-reach-coverage-e2e.js",
|
|
"tests/e2e/test-node-reach-e2e.js",
|
|
"tests/e2e/test-nodes-export-e2e.js",
|
|
"tests/e2e/test-observer-iata-1188-e2e.js",
|
|
"tests/e2e/test-packets-compact-columns-e2e.js",
|
|
"tests/e2e/test-packets-scope-column.js",
|
|
"tests/e2e/test-path-inspector-coverage-e2e.js",
|
|
"tests/e2e/test-rx-coverage-mobile-nav-e2e.js",
|
|
"tests/e2e/test-rx-coverage-gaps-e2e.js",
|
|
"tests/e2e/test-rx-coverage-noise-e2e.js",
|
|
"tests/e2e/test-rx-coverage-viewport-e2e.js",
|
|
"tests/e2e/test-show-neighbors.js",
|
|
"tests/e2e/test-slideover-1056-e2e.js",
|
|
"tests/e2e/test-slideover-1168-munger-e2e.js",
|
|
"tests/e2e/test-table-fluid-e2e.js",
|
|
"tests/e2e/test-touch-gestures-coverage-e2e.js",
|
|
"tests/e2e/test-touch-targets.js",
|
|
"tests/e2e/test-user-management-e2e.js"
|
|
]
|
|
},
|
|
"domIntegration": {
|
|
"reason": "Requires jsdom. The JS unit gate runs with no node_modules at all (its job has no npm install), so a suite needing a third-party module cannot live in test-all.sh. It runs in the E2E job, which does npm ci, and is invoked by its own deploy.yml line.",
|
|
"files": [
|
|
"tests/e2e/test-region-quick-picks.js",
|
|
"tests/e2e/test-table-sort.js"
|
|
]
|
|
},
|
|
"playwrightRunner": {
|
|
"reason": "Requires the @playwright/test runner (not plain node), its configuration, Chromium, and a local server. @playwright/test is not currently declared in package.json; these suites are inventoried but not part of the standalone unit gate.",
|
|
"files": [
|
|
"tests/e2e/test-issue-1522-trace-url-sync-e2e.js",
|
|
"tests/e2e/test-marker-outline-weight.js",
|
|
"tests/e2e/test-path-inspector-e2e.js",
|
|
"tests/e2e/test-pr-1490-live-map-gpu-animations-e2e.js"
|
|
]
|
|
}
|
|
}
|