Repository navigation
Conversation
|
Location privacy × PostgreSQL (#2396): port notes I verified both together on an integration branch: master + #2396 + this PR, plus the map-tile, ducting and grid-history branches. The full
|
d6e1680 to
4da569b
Compare
… (fuzzy location)
New opt-in setting `locationPrivacy` {enabled, radiusM, secret} (secret also
via CORESCOPE_LOCATION_SECRET). When on, this instance never serves an exact
position:
- Node positions: every read of nodes/inactive_nodes coordinates goes through
node_coords.go and is fuzzed on load: a metre grid with a secret origin, the
served point offset inside a disk derived from HMAC(secret, cell), so
|served - exact| <= radiusM, it is stable (no averaging across requests),
co-located nodes share one point, and per-node hysteresis stops flipping at
cell edges. Distances, neighbours, reach, path inspect, planner and route
LOS all compute from served positions. The geo_filter, area membership and
the admin geo-prune are the only exact consumers. An invariant test fails on
any other coordinate read.
- Companion GPS (client_receptions, client_rf_samples): every fix becomes the
centre of its cell (>= 2R x 2R, secret origin) before filtering, so bbox
bisection can't localise a fix; display hexes are capped at circumradius >=
R; the /api/nodes/reported estimate is fuzzed. Per-companion views (?rx=)
are served only to the companion's linked owner or an admin.
- Located adverts: raw_hex null, decoded_json without lat/lon/signature (the
signature would let anyone brute-force the position) and "raw", plus
location_hidden, frame_bytes and frame_head so sizes and hash sizes still
work. Redaction runs once where a packet enters server memory (load,
chunked load, poll, rewrite feed) and in every DB fallback; truncated
frames fail closed. Analytics give identical numbers on and off.
- Startup fails closed: bad secret or radius; the env secret set without the
block saying "enabled": false; an unparseable config.json that enables the
feature. Disabled installs (including Docker's copied config.example.json)
start exactly as before, and /api/config/client omits the key when off.
- UI: "Approximate location (within 1 km)" and an uncertainty circle on node
detail, a map attribution note, notices on planner/LOS/distance/reach and
coverage, and a hidden-bytes message in packet detail.
- Tests: a leak test walks every GET route, the live feed and bbox/LOS
oracles and fails on any exact coordinate, advert hex or signature;
property tests for the fuzzer bound across the globe; analytics parity on
and off; a CI job runs the privacy E2E against a privacy-on server.
- Docs: docs/location-privacy.md (what it protects and what it does not).
Off by default; with it off, behaviour is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4da569b to
abc6696
Compare
|
A remark from me : I think this is a bit a strange request? |
|
Review of Three points before merge:
Smaller notes, none blocking:
Not checked: browser and E2E runs, |
|
That's a fair question, and you're right about the radio side: every advert carries the position as the operator set it, and anyone with a companion in range receives it. This doesn't change that, and the docs say so up front ("It does not make positions secret: adverts are public radio traffic"). The gap it's aimed at is who can look at the map. A public CoreScope instance isn't limited to people on the mesh: anyone with the link can open it, whether or not they run MeshCore. Hearing an advert takes a radio within range, at the moment it's sent. A public instance serves every position to anyone on the internet, all at once, searchable, with history behind it. Some operators are comfortable with that, and some would rather their site wasn't the place that collects those positions and hands them out. For example, a repeater may sit on someone's house, or the coverage pages may show where people actually drive and stop. So it's for those operators. It's off by default, and with it off nothing changes, which your review confirmed. When it's on, it only limits what that instance's own map and API show. That seemed worth offering as an option, even though the over-the-air data stays as it is. I'll work through the three points from your review next. |
Conflict in public/nodes.js: master (Kpa-clawbot#2482) replaced the Avg Hops row with renderNodePathLength; this branch added the approximate-location marker to the Location row. Both kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ot#2447) TestLocationLeakRoutes requires every GET route to be requested or listed as admin-only. GET /api/admin/notifications/push-relay is behind withAdmin; GET /api/push-relay/enrollment-proof answers only a signature over the challenge, and 404 while no enrollment runs. Push payloads carry no coordinates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…k reads as off Review of Kpa-clawbot#2458: the fail-closed check after a parse failure matched only an unquoted "enabled": true in the first brace-free span of the block, so "enabled": "true", or a brace inside a string before "enabled", started the server serving exact positions. rawLocationPrivacyMayEnable now walks the raw file's string tokens (escapes included) and decodes each locationPrivacy block on its own through LocationPrivacyConfig.UnmarshalJSON, matching keys as encoding/json does. Duplicate keys, escaped keys and quoted values read exactly as a clean load reads them; a block that does not decode refuses. Every raw "locationprivacy" must lie inside a token the walk read, so a stray or unterminated quote that hides a block refuses too. The stock disabled block with a typo elsewhere still starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of Kpa-clawbot#2458: the served point depends on the cell only, and cells are 0.4 x radiusM on a side (0.6 x radiusM near an edge, with the hysteresis). Anyone who knows one position in a cell can place every node served the same point inside that square, and nodes sharing a point are close together. "What it protects", the radiusM row, the FAQ and the config.example.json comment now say so, with how to pick radiusM for the cell size. The stale "per-node offset" wording and the leftover process markers in location_privacy.go are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of Kpa-clawbot#2458: with location privacy on, ?rx=<companion> on RX coverage and RF noise answers 403 to anyone but the owner or an admin, and the page ended on an empty map with only a console warning (a leaderboard click, or a shared #/rx-coverage?rx= link). coverageReply returns 'rx-refused' for a 403 to a single-companion view; fetchLayer then clears the hexes and shows a notice over the map ("Only this companion's owner or an admin can see its coverage. Choose All to see everyone's."), styled as the other privacy notices and announced (role=status). Any later drawn view hides it. Tests: coverageReply cases (unit); an E2E step on the privacy-on CI server, which now enables clientRxCoverage, opens a refused ?rx= link, expects the notice and no hexes, then expects it gone without ?rx=. It fails on the old code. Checked by eye in light, dark and at 375 px. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review feedback addressed (commits
Merge. Master's #2447 added two GET routes, which Re-tested: the full Of the smaller notes, I fixed the "per-node offset" wording and the leftover comment. These are not done: the relative offsets above 85°, the |
With one grid for all nodes and an offset per cell, every node in a cell was served the identical point. Anyone who can get signed adverts heard (their own keys, chosen positions) could place about 6 probe nodes around a target's served point and read off its 0.4 x radiusM cell from the one that matched, and map the shared grid with about 25 adverts. The grid origin and the offsets now come from HMAC(secret, label ‖ purpose ‖ pk32 [‖ row ‖ col]), fixed-width and versioned (csloc/v2). A probe's point says nothing about any other node. A node's computed estimate (/api/nodes/reported, built from unsigned companion reports) gets a grid of its own (purpose byte), so a report submitted for a key cannot probe that node's grid. Keys must be exactly 64 hex digits; anything else, and non-finite input, serves no position. Hysteresis anchors move to the LRU, keyed by (purpose, key). Geometry and the |served - exact| <= radiusM bound are unchanged. Trade-off, documented with numbers: nodes known to be at one site can be averaged (median error 404 m alone, 184 m for 4, at radiusM 1000). Tests: distinct points for co-located keys; 10,000 probes never share a target's point; row and column edges uniform across keys; node and estimate grids independent; bound over random keys; key forms; malformed keys and non-finite input fail closed; interleaved determinism; averaging bounds; LRU eviction; a known-answer vector. The two shared-point tests are removed. The leak-test fixture starts its secret search at 8502: two earlier suitable secrets trip a two-decimal coincidence between a fuzzed distance and an unrelated exact one, which a real leak would not do. Bench: warm 10k-node pass 1.6 -> 2.0 ms, cold 15 -> 23 ms (two HMACs per node). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
One more change, to the fuzzing itself ( Why. With one grid for every node and an offset per cell, all nodes in a cell were served the identical point. That made the cell easy to find for anyone who can get adverts heard. They can't post a position under someone else's key (the ingestor checks signatures), but they can make as many keys of their own as they like. About 6 probe nodes placed around a target's served point are enough: the one that comes back with the identical point gives away the target's cell, 400 m across at the default What changed.
The cost. Nodes at one site are now drawn at separate points. Someone who knows that N nodes really share a site can average their points. At How it was checked.
Changes that need your attention:
|
With location privacy on, the main map shows the radiusM circle around the pin under the pointer and keeps it while that pin's popup is open. The live map does the same for hover and keeps it while the node detail panel is open. One circle per map is moved, not one per marker. Circles are drawn by an SVG renderer in their own pane (z-index 390, no pointer events), so they look the same on the canvas live map and never cover a canvas path's clicks. Listeners are shared functions that do nothing while the feature is off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The uncertainty circle is now on the main and live maps too (
Tests:
Screenshots are in the description's last row. |
…k reads as off Review of Kpa-clawbot#2458: the fail-closed check after a parse failure matched only an unquoted "enabled": true in the first brace-free span of the block, so "enabled": "true", or a brace inside a string before "enabled", started the server serving exact positions. rawLocationPrivacyMayEnable now walks the raw file's string tokens (escapes included) and decodes each locationPrivacy block on its own through LocationPrivacyConfig.UnmarshalJSON, matching keys as encoding/json does. Duplicate keys, escaped keys and quoted values read exactly as a clean load reads them; a block that does not decode refuses. Every raw "locationprivacy" must lie inside a token the walk read, so a stray or unterminated quote that hides a block refuses too. The stock disabled block with a typo elsewhere still starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 03d7809)
Review of Kpa-clawbot#2458: the served point depends on the cell only, and cells are 0.4 x radiusM on a side (0.6 x radiusM near an edge, with the hysteresis). Anyone who knows one position in a cell can place every node served the same point inside that square, and nodes sharing a point are close together. "What it protects", the radiusM row, the FAQ and the config.example.json comment now say so, with how to pick radiusM for the cell size. The stale "per-node offset" wording and the leftover process markers in location_privacy.go are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit ead854a)
Review of Kpa-clawbot#2458: with location privacy on, ?rx=<companion> on RX coverage and RF noise answers 403 to anyone but the owner or an admin, and the page ended on an empty map with only a console warning (a leaderboard click, or a shared #/rx-coverage?rx= link). coverageReply returns 'rx-refused' for a 403 to a single-companion view; fetchLayer then clears the hexes and shows a notice over the map ("Only this companion's owner or an admin can see its coverage. Choose All to see everyone's."), styled as the other privacy notices and announced (role=status). Any later drawn view hides it. Tests: coverageReply cases (unit); an E2E step on the privacy-on CI server, which now enables clientRxCoverage, opens a refused ?rx= link, expects the notice and no hexes, then expects it gone without ?rx=. It fails on the old code. Checked by eye in light, dark and at 375 px. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit c660e7e)
|
Thanks for the per-node keying; that closes the probe attack. I found no path (API, WebSocket, exports, Two things before merge:
Minor: |
Conflicts: routes.go and types.go keep both LocationPrivacy and Ducting in the client config; deploy.yml stops both the location-privacy and the ducting E2E servers. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… positions The merge of master brought the ducting overlay (Kpa-clawbot#2436), whose node read ductingNodeCoords selected nodes.lat/lon in ducting_service.go. With location privacy on, the overlay's forecast cells followed exact positions; it serves them in /api/ducting and names them to the weather API. The read now lives in node_coords.go and returns servedNodePos; the visibility rule still classifies by the stored position. Rows without lat or lon, or with no servable position (malformed key), are skipped. TestDuctingNodeCoordsFuzzed covers privacy on and off, NULL rows and a malformed key. /api/ducting gets its leak-route entry (ducting is off in the fixture, so it is the 404). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… mention
A config.json that failed to parse started with exact positions when the
locationPrivacy key itself was broken: a token holding the name counted
as seen whether or not it was a key, and the block was decoded only when
':' followed. "locationPrivacy" {…}, "locationPrivacy: {…}, and the key
followed by '=', ',' or ';' all started on defaults.
rawLocationPrivacyMayEnable now accounts for every mention or refuses:
- a key that decodes to locationPrivacy must have a value that decodes
as off and is well-formed where it sits (followed by ',' or '}'), so
{"locationPrivacy": {} "enabled": true} refuses;
- any other key holding the name (misspelt block) refuses;
- elsewhere the name may only appear in a string value (':' or '['
before it; ',', '}' or ']' after it).
Mentions are counted on JSON-unescaped text, so an escaped name with a
broken separator refuses too, and a raw NUL (a UTF-16 file) refuses.
TestLocationPrivacyFailClosed: 47 cases (25 new), including the
review's five bypasses and the same with the name escaped.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…w one The circle list was only pruned on a theme change, so every node detail opened with privacy on kept its removed map reachable. makeCircle now prunes before adding, which bounds the list to circles on live maps. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Review feedback addressed (commits
Verified locally: the full |
|
Thanks, the new walk holds up well. BOMs, UTF-16 LE/BE, comments, single-quoted and unquoted keys, escapes, duplicate and nested blocks, and quote mis-pairing all refuse. I checked 62 hand-written cases and about 4.1M generated mutants of the stock config, and the stock example still starts. The ducting fix is right: its test fails when the fix is reverted. No other code merged into master since your base (#2436, #2486, #2491, #2493, #2446) reads node lat/lon, and the circle pruning and the master merge look right. One bypass is left ( The block decodes as Suggested fix: at Minor, optional: a |
With config.json unparseable, the fail-closed walk passed any
locationPrivacy block that did not enable. A block closed too early
({"_comment": "..."}, "enabled": true, ...; {}, "enabled": true; null,
{...}) or one with a misspelt "enable" decodes as not saying enabled,
so the server fell back to exact positions. Only a block that says
"enabled": false explicitly passes now.
A "_comment..." key naming the block, with a whole string value, is a
comment and no longer refuses every start of a stock-derived config.
The leak test fixture now runs ducting over a fake Open-Meteo, so
/api/ducting answers 200 with cells instead of the 404.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review feedback addressed (commit
Docs ( Local runs: full |
Brings in Kpa-clawbot#2457, Kpa-clawbot#2490, Kpa-clawbot#2488, Kpa-clawbot#2500 and Kpa-clawbot#2455. Conflicts were two added lines on each side: the eslint globals (frameHex/frameSize and NeighborRank) and the deploy.yml E2E suite list (the privacy-on suite and test-neighbor-rank-e2e.js); both kept. The leak test now requests Kpa-clawbot#2457's /api/nodes/neighbor-rank, which serves no positions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged current master (
Full |
efiten
left a comment
There was a problem hiding this comment.
Re-reviewed at 1ae8f25b. Thanks, the early-close fix holds up.
Earlier points
- Early-close bypass: fixed (
location_privacy.go:544). All four of my cases now refuse, and I found no variant: comment markers,*/inside a key, braces in strings, a second block after a close, CRLF, trailing garbage, BOM and NBSP all refuse or start as intended. Single-byte mutants of the stock config with the block enabled (271,680 broken files) and two-byte mutants of a small enabled config (7,987,264) gave no bypass with the key name intact. Mutants that break the name itself ("location"Privacy") start, which is inherent to detecting it by name. _comment_locationPrivacyand the/api/ductingleak test: fixed.- The master merge
1ae8f25bis clean: it only keeps both sides in.eslintrc.jsonanddeploy.ymland adds the neighbor-rank leak-test entry.
Blocking
- Conflicts with current master (
00f0b41f) incmd/server/store.go: theredactLocatedAdvertblock againstobservedFrameEvidencefrom #2497, andnodeZeroHopRegionCounts. After resolving,GET /api/analytics/observer-comparisonfrom #2492 also needs a class inlocation_privacy_leak_test.go, orTestLocationLeakRoutesfails. - A config copied from
config.example.jsoncannot be turned on.areas._commentis a string and does not decode intoAreaEntry(config.go:156,Areas map[string]AreaEntry), so the stock file always reads as a parse failure. WithlocationPrivacy.enabled: truethe server then exits with "config.json could not be parsed and location privacy appears configured ... cannot unmarshal string into Go struct field Config.areas". The Docker entrypoint starts from that file, so the Quick start indocs/location-privacy.mdfails for anyone who keeps the areas example. It fails closed, so nothing leaks, but the feature cannot be used that way.TestLocationPrivacyStockExampleWithSyntaxErrorStartsonly covers the disabled block. Either let_commentkeys be skipped when decodingareas, or check that onlylocationPrivacyneeds to parse, and add a test with the stock file and the block enabled.
Non-blocking
- A block that says
"enabled": falseand then closes early, with"enabled": trueoutside it, starts. It takes two edits to get there. - An unreadable
config.jsonwithout the environment secret starts on defaults. That is documented (docs/location-privacy.md:160).
Conflict resolutions: - cmd/server/store.go ingestNewFromDB: keep both. Each transmission is still redacted once (redactLocatedAdvert); master's per-observation observedFrameEvidence (Kpa-clawbot#2497) runs on the observation's own frame before it is dropped, so it reads exact bytes but keeps only the hop width and reception kind. - cmd/server/store.go nodeZeroHopRegionCounts: take master's version, which moved the frame checks into StoreObs.receivedDirectAdvert. Its legacy-singleton fallback read packetpath.AdvertRouteEvidence(tx.RawHex), which is empty for a located advert under privacy, and the evidence needs the payload length, so frameHead cannot supply it. hiddenFrame now keeps routeEvidence (computed from the whole frame at redaction) and receivedDirectAdvert reads tx.frameRouteEvidence(). Test: TestRedactZeroHopLegacySingletonParity. Follow-ups for master's changes: - TestLocationLeakRoutes: classify GET /api/analytics/observer-comparison (Kpa-clawbot#2492). It returns observer IDs, names, reception counts and SNR deltas, no position. - packet_redact_frames_test.go: ingestNewFromDB takes a clientCount (Kpa-clawbot#2511). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
config.example.json documents areas with a "_comment" string, and Config.Areas was map[string]AreaEntry, so json.Unmarshal of the stock file always failed: LoadConfig reported it as a parse failure (on master it silently moved on), and with locationPrivacy enabled the fail-closed guard refused to start. The Quick start in docs/location-privacy.md could not be followed with a config copied from the example (Kpa-clawbot#2458 review). Config.Areas is now AreaMap, whose UnmarshalJSON skips a "_"-prefixed key whose value is not an object (a comment) and decodes every other key as an AreaEntry. A "_comment": {} object is still an area, as TestConfigAreasDocumentedResponses expects. The ingestor has no areas field and already loads the example (observation_hops_backfill_test). Tests: TestConfigExampleParses (the stock file loads with its values), TestAreaMapSkipsCommentKeys, and TestLocationPrivacyStockExampleEnabledStarts (the stock file with the block enabled and a secret loads, turns privacy on and passes the startup checks); all three fail before the change. TestLocationPrivacyStockExampleWithSyntaxErrorStarts now requires the stock file to parse, and edits only the locationPrivacy block (other blocks say "enabled": false too). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Kpa-clawbot#2458 review (non-blocking): a broken config whose locationPrivacy block says "enabled": false and is closed early, with "enabled": true among the members after the brace, started: the raw fallback read the block as an explicit false, and the decoder ignores the stray top-level "enabled". rawLocationPrivacyMayEnable now also reports true when a key of the block (enabled, radiusM, secret; escapes decoded, case folded as encoding/json does) is among the scalar members right after the block. A block's members are all scalars, so an early close leaves every one of them in that run; the walk stops at the first object or array value, so another setting's "enabled" is not read as the block's. The stock example's block is followed by a _comment string and then an object, so it still starts. This path is reached only when the file fails to parse elsewhere (here the extra brace). docs/location-privacy.md lists the case and says the example already carries the block. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review feedback addressed (commits
Tests:
|
Summary
Adds an opt-in location privacy setting for operators who don't want their CoreScope instance to be the easy way to look up where a repeater owner or companion user lives. When it is on, the web UI and API never serve an exact position, only an approximate point within a configured radius (for example 1 km). The setting is off by default, and with it off, behaviour is unchanged.
The secret comes from
CORESCOPE_LOCATION_SECRET(or"secret"), at least 32 bytes. Full operator guide:docs/location-privacy.md.Scope, stated plainly: this only protects against users of this instance. Adverts are broadcast in clear over the air and published to MQTT, the database stays exact, and admin-only routes stay exact.
How it works
Node positions
nodes/inactive_nodescoordinates now lives incmd/server/node_coords.goand is fuzzed as it is loaded.cmd/server.HMAC(secret, key, cell), inside a disk sized so that|served − exact| ≤ radiusMeverywhere, including the poles and the antimeridian. The HMAC inputs are fixed-width and versioned (csloc/v2)./api/nodes/reportedestimate comes from unsigned companion reports, so it gets a separate grid and cannot be used to probe the node's.Companion GPS (
client_receptions,client_rf_samples)/api/nodes/reportedestimate is fuzzed, and itsradius_mgrows by R.?rx=<pubkey>) are served only to that companion's linked owner or an admin. Anyone else sees a notice on the map saying so, not a blank map.Located adverts
raw_hex: nulland adecoded_jsonwithoutlat,lon,signatureorraw. The signature alone would let anyone brute-force the position from the approximate one.location_hidden: true, plusframe_bytesandframe_head(header and path only), so sizes and hash-size badges keep working.Startup fails closed
"enabled": false;config.jsoncan't be parsed and alocationPrivacyblock in it doesn't say"enabled": false. Each block is decoded on its own, as a clean load would read it: a quoted"true", duplicate or escaped keys and braces inside strings are all read correctly. A broken string that hides a block from that walk refuses too, and so does any other mention of the name that isn't plain text in a string value (a key that lost its colon or closing quote, a misspelt key, a block closed too early, even one that says"enabled": falsebefore the brace with its other members after it), counted after unescaping. A_comment…key with a string value is a comment. A file with a raw NUL (UTF-16) refuses.config.example.jsonwith a typo in it. A copy of the stock file with the block enabled loads and turns the feature on (areas._commentno longer fails the parse; see Notes)./api/config/clientomits the key when the feature is off.UI
Security review
A threat model was done before implementation, and independent security and code reviews after it. Everything those reviews raised is addressed in this PR, including:
Residual risks are documented in
docs/location-privacy.md:Screenshots
Privacy on (
radiusM1000), on the e2e fixture, at commit2b682cc3; the last row (map circles) ataffd8877, zoomed to one node, with no basemap tiles loaded. Headless Chromium at 1280×800 (one at 390×844), on the keyless OSM Gray basemap. Click a thumbnail for the full size. The images are on a separate assets branch, so they are not in this diff.Node detail, light: the uncertainty circle (radius 1 km) around the approximate point, and "Approximate location (within 1 km)" under the coordinates
Node detail, dark
Node detail at 390 px
Main map: pins sit at the approximate points, and the attribution says "Positions approximate (within 1 km)"
Packet detail of a located advert: raw bytes hidden, and no lat, lon or signature among the decoded fields
Repeater planner: the notice that distances, line of sight and results are indicative
RX coverage, dark: one companion's view refused to an anonymous viewer shows a notice, not a blank map
Main map, light: the 1 km circle around the selected pin, under its popup
Main map, dark
Live map, dark: the selected node keeps its circle while the detail panel is open
Tests
location_privacy_leak_test.go): walks every GET route from the router (a new route without test parameters fails), the live feed builders, and bbox and route-LOS oracles. It fails on any exact coordinate in text, int×1e6 or distance form, on any advert raw hex, and on any signature. The fixture includes a truncated advert, and runs ducting over a fake Open-Meteo so/api/ductinganswers with cells. Its allowlist is empty.-race, and secret never serialised.config.example.jsonwith a syntax error, a quoted"true", duplicate, escaped and case-varied keys, braces in strings, stray or unterminated quotes, broken keys (missing colon or closing quote,=,,,;), the same with the name escaped, a block closed too early (including one whose"enabled": truelands outside it, the same in an enabled copy of the stock block, and a block that says"enabled": falseclosed before its other members),nullor a block withoutenabled,_comment…keys, and a UTF-16 file.config.example.jsonparses as shipped (LoadConfigreturns its values), and with the block enabled and a secret it loads, turns the feature on and passes the startup checks.test-location-privacy.js,test-packet-filter.js) and an E2E against a privacy-on server, which CI now starts on :13583 (shard 1) withclientRxCoverageon. It includes a refused?rx=coverage link, and the map circles: on hover, kept while a popup or the live detail panel is open, and gone once it closes.Local runs:
cmd/serversuite, plus-raceon the privacy tests and the leak test 10× in a rowtest-all.shOn a live dev instance (PostgreSQL, 5 server replicas, real mesh traffic) with it on: 873 nodes checked against their exact positions are displaced 24–792 m, none exact and none beyond 1 km; all 5 replicas serve identical points for all 1,346 positioned nodes; 110 of 110 adverts on the live feed over 2 minutes arrived redacted.
Performance
Nothing expensive runs under the store lock on the poll and rewrite paths.
Notes for reviewers
Per-node grids (
2b682cc3): the shared grid let anyone with signed adverts of their own probe a target's 0.4 xradiusMcell with about 6 nodes. Validated by an independent security review before building, and code-reviewed after; see the PR comment.Review round 1 (efiten, on
abc6696e): fixes in03d7809b(fail closed),ead854a3(docs on what one known position gives away) andc660e7ef(refused per-companion view); see the reply comment. Master is merged in (8d4814b0), and Optional mobile push for watched-node alerts through a push relay #2447's two push-relay routes are classified in the leak test (1a073b6e).Review round 3 (efiten, on
affd8877): master merged again (eda3d883); the ducting overlay's node read uses served positions (9ce6273a); the fail-closed walk accounts for every mention (13ef883f, also checked by a separate security review); the circle list is pruned (538b5e15). See the reply comment.Review round 4 (efiten, on
538b5e15): a broken config starts only when every block says"enabled": falseexplicitly,_comment…keys no longer refuse, and the leak test serves/api/ductingwith data (fc06dee2). See the reply comment. Master merged again (1ae8f25b): both sides' eslint globals and E2E suite lines kept, and feat(analytics): rank nodes by neighbour count (#2100) #2457's/api/nodes/neighbor-rankadded to the leak test.Review round 5 (efiten, on
1ae8f25b): master merged again (5891ffea). Instore.go, the per-transmission redaction is kept next to Count only received adverts when assigning node regions #2497's per-observationobservedFrameEvidence, and master'snodeZeroHopRegionCountsis taken. Its legacy-singleton fallback now reads the route evidence thathiddenFramekeeps, so hiding an advert changes no zero-hop vote. Compare observers against a pinned reference #2492's/api/analytics/observer-comparison(observer IDs, names, counts, no position) is classified in the leak test. The stock config can now be enabled:Config.Areasskips_-prefixed non-object keys (6b4aa59d). A disabled block closed before its other members refuses (2671bc4a). See the reply comment.map[string]interface{}incmd/serverproduction code: two fewer here than on master. The unusedGetNodeLocationsis removed, and observer locations are now typed.Found while testing, and fixed here (
6b4aa59d): the stockconfig.example.jsondidn't unmarshal intoConfig(areas._commentis a string where an object is expected), soLoadConfigtreated every Docker install that copies it as a parse failure. Pre-existing and not changed:ENABLE_PPROFlistens on all interfaces.Interaction with feat(db): PostgreSQL as an alternative database backend #2396 (Postgres): verified on an integration branch with both. See the PR comment for the port notes.
Merging with the other overnight PR: whichever lands second needs a one-line rebase in
.github/workflows/deploy.yml(both add a suite line next to test-node-reach-e2e.js).🤖 Generated with Claude Code