mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-10-09 12:37:35 +00:00
The ingestor already stores the noise floor that CoreDrive RX companions
report with each GPS fix (`client_rf_samples`, opt-in through
`clientRfSamples`, `cmd/ingestor/client_rf_sample.go:62`), but nothing
reads it back. An operator who enables it collects the data and cannot
see it. This adds the read side: `GET /api/rf-noise` and a Signal/Noise
toggle on the Mobile RX coverage page.
## What it does
- **`GET /api/rf-noise?bbox=&z=&days=`** returns a GeoJSON hex grid with
the median, quietest and noisiest noise floor per cell, in the same
shape as `/api/rx-coverage`. It is registered always and 404s unless
`clientRfSamples.enabled` is true, the same pattern as the coverage
routes.
- **Stationary samples are excluded.** A parked companion logs hundreds
of readings at one point, which would otherwise define its cell.
- **Coverage page:** a Signal/Noise toggle, rendered only when
`/api/config/client` reports `clientRfSamples: true`. The noise layer
reuses the coverage colour tokens with the axis inverted, because a
lower dBm is quieter. Tiers are at -115 and -108 dBm.
- **Deep link:** `#/rx-coverage?layer=noise` opens on the noise layer.
- **Empty and failed answers** are labelled on the map ("No RF samples
in this view yet", or a retry hint), so a blank map never reads as
"feature off".
No new configuration key: it reads the existing `clientRfSamples`
section that the ingestor already uses. Default off, so nothing changes
for an instance that has not opted in.
## Where it comes from
Ported from the efiten/CoreScope fork, where it has run on
analyzer.on8ar.eu since September (fork commits `42d09f0e`, `80581c43`,
`cde95078`). The cherry-picks conflicted with upstream's newer
`routes.go`, `types.go` and `rx-coverage.js`, so the final state was
ported by hand. The fork-only `/scopes` route that sat next to it in the
same hunk is deliberately left out.
## Performance
The query is bounded by `sampled_at` (indexed, `idx_crf_prune`) and the
bbox, aggregation is one pass plus a per-cell sort, and the response is
capped at 5000 cells. Measured on analyzer.on8ar.eu, all of Belgium
(`bbox=49.4,2.4,51.6,6.5&z=9`), from a client in Belgium, so network
time included:
| window | samples | cells | response time |
|---|---|---|---|
| 7 days | 10,835 | 241 | 0.37 s |
| 30 days | 43,303 | 429 | 0.39 s |
That table holds 45,270 rows in total. It is only read when someone
opens the noise layer, never on ingest or WebSocket paths.
## Tests
- `cmd/server/rf_noise_test.go`: 8 tests for the aggregation (median and
extremes, stationary exclusion, the cell cap, empty input) and the gate
(404 when off, even with data present). All pass, and the full
`cmd/server` suite passes locally.
- `tests/unit/test-rx-coverage-noise.js` (new, in `test-all.sh`): the
colour axis runs the right way, including both tier bounds and a string
median from the API. Slices the real function out of `rx-coverage.js`
and fails on master's copy, which has no thresholds.
- `tests/e2e/test-rx-coverage-noise-e2e.js` (new, wired in `deploy.yml`
and `scripts/non-unit-tests.json`): no toggle when the flag is off;
Noise fetches `/api/rf-noise`, draws the cells, swaps legend and
subtitle, puts `layer=noise` in the hash; a deep link opens on the noise
layer and an empty answer shows the message. 3/3 locally; against
master's `rx-coverage.js` and `roles.js`, 1/3 (only the "flag off" case
passes, as it should).
- `test-rx-coverage-viewport-e2e.js` still passes. ESLint 8 reports 0
errors on the changed files.
## Not done
- The thresholds (-115 / -108 dBm) are fitted to the fork's own data
(1,241 moving samples at the time) and are constants in
`rx-coverage.js`. Per AGENTS.md rule 8 they belong in the customizer
eventually; not in this PR.
- The E2E suite mocks the API. The real endpoint is covered by the Go
tests and by the measurements above, not by a fixture with seeded
samples.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
136 lines
6.9 KiB
JSON
136 lines
6.9 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-1639-observers-sort-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-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"
|
|
]
|
|
},
|
|
"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-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"
|
|
]
|
|
}
|
|
}
|