Repository navigation
Conversation
…1035 M2) GET /api/nodes/{pubkey}/scope-check sets a repeater's or room's own scopes next to what meshguide.dk recommends for its advertised position, through M1's engine (internal/scopeguide Recommend + Compare, unchanged): one typed node-row read by primary key, one DAGI point lookup on the in-memory index, a named response struct. 404 for unknown, hidden or blacklisted nodes and while dagi.enabled is off. The full node page shows it as "Recommended scopes here (meshguide.dk)" (public/node-scope-check.js, textContent only): the recommended chips, the node's default scope ("cannot be decoded" for an unnamed one) and the observer-reported list in neutral wording, a meshguide.dk link, nothing for companions or nodes without a position. ?section=node-scope-check deep links to it. The page renders twice on a cold load, so the module reuses the last answer for a minute: one request per node view. Relates to #1035 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… M2) CI's frontend lint (eslint no-undef, Kpa-clawbot#1342) rejects the bare global in the node page template; the wiring test now pins the window. form. Relates to #1035 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scope Audit gets a third view, Location
(#/analytics?tab=scopes&sub=audit&sav=location): every repeater and room
with an advertised position in Denmark, the scopes meshguide.dk recommends
where it stands next to its observed default scope and, when an observer
reported it, its configured list. Neutral categories only; an
undecodable scope reads "cannot be decoded".
GET /api/scope-check serves it. Each row is the NodeScopeCheck the node
page's GET /api/nodes/{pubkey}/scope-check (M2) answers for that node:
M2's builder is split into nodeScopeVerdict (shared) and its column
reader into nodeScopeSelect/nodeScopeScan (shared); M2's JSON is
unchanged. One bulk read plus one DAGI lookup and M1's Recommend +
Compare per positioned repeater or room, cached like Scope Audit (30 s,
singleflight, one key); about 10 ms for 5,000 rows. Hidden and
blacklisted identities are dropped per serve, cache hits included.
scopeCheck.publicList (default true, canonical key only) set to false
serves the list only with the API key; the node page is not affected.
Filters (slf=), sort (sls=) and search are client-side and deep-linked.
Rows are cards at <=640 px. Colours from theme variables only, text only.
Relates to #1035
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review — CS-Macmini PR#1107 — head 1235ed8Verdict: APPROVE with nits Independent, read-only review of the #1035 M3 delta ( Evidence tags: [T] tested/run by me, [A] from reading the code, [K] known/claimed elsewhere (PR text, CI) and not re-derived. Findings
There are no blocking findings. Answers to the checklist
Perf (M-series Mac, merged tree, outside
|
| Measurement | Result |
|---|---|
TestScopeCheckListBuildBudget (5,000 rows, 4,701 applicable) |
6.8 ms (budget 100 ms) [T] |
BenchmarkScopeCheckList ×3 |
6.6–6.8 ms/op, 5.2 MB/op, 28,385 allocs/op [T] |
BenchmarkNodeScopeCheck ×3 |
0.90–1.0 µs/op [T] |
| My handler test, 5,000 nodes in SQLite, hidden-name prefixes on: cold request (DB read + build + serve) | 28 ms [T] |
| … warm requests (cache hit: live visibility query over 5,000 keys + copy + summary + JSON) | 13 ms median (12.7–19.6, n=20) [T] |
| … warm, no hidden prefixes | 7.2 ms median (n=10) [T] |
A cache hit is O(rows): one bulk visibility query, a re-summary and the JSON encode. This is the same shape as /api/scope-audit. Nothing is per packet, nothing per node request, and nothing in ingest or WS.
Browser (my own walkthrough, local Go server with the PR seed + 3 extra rows)
-
375×560 and 360×640, touch, light and dark, cold start on Home. Every step was a real
touchscreen.tapon the visible element, after scrolling it to the centre:- More
- Analytics (sheet)
- Scopes tab
- Scope Audit
- Location: 7 cards,
sav=location - Show →
default-elsewhere: 3 cards,slf=written - Sort by Name
- type
aarhus: 1 card - tap the node link: node page
- Back: filter, sort and search restored, 1 card
An
elementFromPointhit check confirmed every tap target. No step was impossible, and nothing had to be closed: the swipe tip covers part of a card but not the controls. On every size and theme: 0 boxes outside the screen,scrollWidth= viewport width, no page errors, one request.Side note: if a user scrolls the Location button only just into view at 375×560, it sits under the fixed bottom nav. That is general page behaviour and not caused by this PR.
-
1280×900 light/dark: the table, summary, population line, meshguide link + commit and DAGI credit render on the theme variables (N8 cosmetic).
Tests run (merged tree)
| Suite | Result |
|---|---|
cd cmd/server && go test ./... |
ok (141.8 s) [T] |
cd internal/scopeguide && go test ./... |
ok [T] |
node test-scope-audit.js |
passed, location view included [T] |
node test-1035-node-scope-check.js |
20 passed [T] |
node test-frontend-helpers.js |
746 passed, 0 failed [T] |
sh test-all.sh |
415 passed, 0 failed (415 files) [T] |
node scripts/run-go-server-shard.js --validate |
ok (4160 entries) [T] |
node scripts/run-e2e-shard.js --validate |
ok (325 suites) [T] |
test-issue-1035-m3-location-view-e2e.js (own server, ports from 13800) |
6/6 [T] |
test-issue-1035-m2-node-scope-check-e2e.js |
10/10 [T] |
scripts/check-xss-sinks.sh --diff origin/master |
exit 0 [T] |
I prepared the fixture as in CI: freshen, the inline seed SQL, corescope-migrate, seeds 2073/199/245/122, and .git-commit. I did not run the full test-e2e-playwright.js.
Red before / green after: [T] test-scope-audit.js against master's scope-audit.js fails with an AssertionError. The new Go tests and the M3 E2E target an endpoint and view that do not exist on master, so they are red by construction [A].
Mutants (mine)
| # | Mutation | Result |
|---|---|---|
| M1 | serve rows without the per-request visibility filter | killed (4 tests) |
| M2 | drop !IsWeakAPIKey(key) |
survived → N1 |
| M3 | ListWithoutDk counts any not-listed name |
killed |
| M4 | hidden identities counted in outside/unpositioned | killed |
| M5 | remove the dagi.enabled gate |
killed |
| M6 | drop postnummer from the server sort | killed |
| M7 | drop WHERE lower(role) IN ('repeater','room') |
survived (equivalent: Compare drops other roles; the SQL filter only saves work) |
| M8 | (M2 code) ListReportedAt set even when no list is reported |
survived (pre-existing M2 gap, needs a list time without a list) |
| F1 | default-elsewhere without not_meshguide |
killed |
| F2 | slf written in every view |
killed |
| F3 | 'da' → 'en' collation |
survived → N2 |
| F4 | search without the place name | killed |
| F5 | non-https source URL used as link | killed |
| F6 | 404 message dropped | survived → N3 |
| F7 | syncState does not restore the filter select |
survived → N3 |
CI per job (run 47034027252, head 1235ed81)
| Job | Result |
|---|---|
| Go Build & Test | ✅ |
| Go Ingestor Tests | ✅ |
| Go Libraries & CLI | ✅ |
| Go Server Tests (1/3) | ✅ |
| Go Server Tests (2/3) | ✅ |
| Go Server Tests (3/3) | ✅ |
| JavaScript Unit Tests & Lint | ✅ |
| Verify Go Test Assignments | ✅ |
| Validate Docker Image | ✅ |
| Script & Container Unit Checks | ✅ |
| Playwright E2E (1/3) | ✅ |
| Playwright E2E (3/3) | ✅ |
| Playwright E2E (2/3), the shard with the new M3 suite | ✅ (about 49 min) |
| Release Artifacts | skipped |
None of the known flakes (#256, #267) showed up.
Not verified
- The list against the live network. I had no staging or prod access, so the M0 shapes were checked only through the seed and my own rows.
- Safari/WebKit and a physical phone. Only Chromium with touch emulation was used.
cmd/ingestor. The PR does not touch it, and I did not run it locally (CI ✅).- The full
test-e2e-playwright.js. - The M2 commits in depth. They are feat(nodes): recommended scopes for where the node stands, info only (#1035 M2) #1106's, and that review is separate; I am also the author of M2, so this review is not independent of that part.
🤖 Generated with Claude Code
Rapport — CS-Minimax PR#1107 #1035 — head 1235ed8Status: Draft. M3's Location view is done and every requirement is tested. Every local suite passes, and all 20 mutants were killed. CI is green on every job after one rerun of Playwright (2/3), which failed in an unrelated test (#911). Details below. Evidence: [T] = a test or command I ran, with its result. [A] = argued from the code. [K] = measured on CI. Choices I made without asking
Requirements
Mutants: 20 in total (M1–M10 Go, J1–J9 JS, 1 E2E), all killed [T]. Each mutant was applied from a snapshot, run against its suite, and restored, and the restore was verified with Local runs [T]
CI per job (head 1235ed8) [K]
About the Playwright (2/3) failure:
Remaining
|
Only conflict: scripts/e2e-shards.json, where master and this PR each appended suites; all entries are kept (--validate passes). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…anifest The master merge in 330910d kept the M7 entry twice; --validate rejects it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Coordinator merge of origin/master ( |
Relates to #1035
What
#1035 M3: a "Location" view in Scope Audit. It lists every repeater and room with an advertised position in Denmark. For each one it shows the scopes meshguide.dk recommends where it stands, next to the scopes the node has: its observed default scope and, when an observer reported it, its configured list.
It is information only. Every category is neutral, nothing is marked as wrong, and the intro says that an operator may have good reasons for scopes that differ from the recommendation. A scope this instance cannot name is shown as "cannot be decoded".
#/analytics?tab=scopes&sub=audit&sav=location. This is the existing Scope Audit pattern (sav=already selects Declarations or Transport). The filter and sort are kept in the URL too:slf=,sls=.Plan (milestone M3 of the M0 plan, owner decisions of 2026-12-02)
Server
GET /api/scope-check(cmd/server/scope_check_list.go):NodeScopeCheckthe node page'sGET /api/nodes/{pubkey}/scope-check(feat(nodes): recommended scopes for where the node stands, info only (#1035 M2) #1106, M2) answers for that node, plusnameandrole. Both endpoints are built by one helper,nodeScopeVerdict, which is M2'sbuildNodeScopeChecksplit in two. M2's JSON is unchanged.nodeScopeSelect/nodeScopeScan.row()type the scope columns once, for both the single-node read and the bulk read.Stacking on M2
This branch is
feat/1035-m2-node-page(517391d, M2) plus one commit (316fe77). It targetsmaster, because CI only runs for PRs into master. Until #1106 merges, the diff includes M2. My own change is the last commit.Visibility
scopeCheck.publicList: falseserves the list only with the API key (X-API-Key, the same strong-key check asrequireAPIKey). Without the key the view says "The operator keeps this list private."config.example.jsonand OpenAPI.Other rules
/api/scope-audit). They are also left out of the counts.dagi.enabled, like every DAGI feature.Performance
WHERE role IN ('repeater','room')). Then, for each repeater or room with a position, one DAGI point lookup and M1'sRecommend+Compare. That is O(positioned repeaters + rooms). There is nothing per packet and nothing in the ingest or WebSocket path.scopeAuditCache: 30 s TTL, singleflight, one key). A request inside the TTL does no rebuild. Filtering, sorting and search run in the browser on the one answer, so there is no request per filter or per node.buildScopeCheckListtakes about 10 ms.TestScopeCheckListBuildBudgetasserts < 100 ms outside-race.BenchmarkScopeCheckList: 9.6 ms/op, 5.2 MB/op, 28k allocs/op at 5,000 rows;BenchmarkNodeScopeCheck(one row): 1.25 µs/op.Tests
cmd/server/scope_check_list_test.go):#dk2100in Frederiksberg,#dk-sjlin Aarhus, a list without dk and witheuropa,#dk-fynin Odense, and an undecodable defaultpublicListswitch, the canonical config key, the DAGI gate, a pre-scope schema, no interface maps, and the budget and benchmarktest-scope-audit.js): state from the hash (whitelisted), hash writing, each filter, search, the name sort, mount with one/scope-checkrequest, filter change without a request, text-only rendering of markup, the https-only source link, neutral wording, and the 403 message.test-issue-1035-m3-location-view-e2e.js, new suite inscripts/e2e-shards.json): runs on its own Go server withtest-fixtures/seed-1035-m3-location-nodes.sql.Config / customizer (rule 8)
scopeCheck.publicListis new. The constants M1/M2 already list for M4 are unchanged: report max age, meshguide link and roles.🤖 Generated with Claude Code