Skip to content

feat(account): station data through owner links, with a change log (#1018 M2d) - #1095

Draft
dborup wants to merge 7 commits into
masterfrom
feat/1018-m2d-station-data-via-links
Draft

dborup wants to merge 7 commits into
masterfrom
feat/1018-m2d-station-data-via-links

Conversation

@dborup

@dborup dborup commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Relates to #1018 (stacked on #1067)

#1018 M2d: station data through owner links, plus the change log.

Stacked: this branch is feat/1018-m2b-one-click-link (#1067, head 12d899ad) plus two commits. It targets master because CI only runs for PRs into master. Until #1067 merges, the diff also shows #1067's commits. Review only c687496b, 4e55e6b5 and c5c397a7 (git diff 12d899ad..HEAD).

Plan (this PR is the whole milestone)

  1. Shared rules (internal/channelregistry):
    • new account op station-set, carrying an antennaclaim.Edit (height part and/or details part);
    • Edit is factored out of the claim command, so one validation serves both paths;
    • ProbationSQL and ObjectedSQL are shared by the server and the ingestor;
    • new config key accounts.probationHours.
  2. Schema (internal/dbschema, ingestor-owned): self-healing ADD COLUMN adds via, account_id and link_id to node_antenna_claims (CHECKed), plus an index on (pubkey, created_at). AssertReady gets a transient item for them.
  3. Ingestor (cmd/ingestor/accounts_station.go): applies the edit in the account write's transaction (the session generation is checked):
    • an active link of either tier is required, and the node needs a position (a clear-only edit does not);
    • at most 100 link edits per node per 24 h;
    • each edit is a claim row with account_id, link_id and via='link';
    • last write wins by created_at, then request_id: a part is taken only when no row in force for it was edited later; an edit left with nothing in force is superseded;
    • a replayed command adds nothing.
  4. Server (read-only, cmd/server/accounts_station.go):
    • POST /api/account/nodes/{pubkey}/station uses the claim route's own checks (checkEdit, factored out), the claim's identical 404 for hidden, unknown and unpositioned nodes, and the account write windows. It answers 202 {requestId, review?};
    • GET /api/account/nodes/{pubkey}/history is for the node's owners only;
    • the first done read for a station edit drops the 30 s claim snapshots, so the node page shows the edit at once.
  5. UI:
    • The owner card on the account page gets Edit station data, which links to #/nodes/{pk}?section=node-antenna.
    • On the node page a linked owner gets the same form with Save and the line "You own this node … no code and no advert needed". The page waits for the ingestor, then redraws the Station block and shows the Change log (owners only).
    • The shared form gains inputs for the Station details: hardware (official MeshCore list, ESP32/nRF52), TX power, direction, battery/solar and a photo #1017 M3 values (TX power, cable loss, direction, beamwidth, battery, solar). Each input shows only where the server's cross-field rules let it apply, and they are pre-filled from /station. Before this, those values could only be carried forward, never typed, so "fill in everything in one sitting" was not possible.
    • New module: public/account-station.js.

Approval rules, and how they apply to self-reported owners

Case Verified owner Self-reported owner (one-click admin login)
Structured fields (height, antenna, gain, power, installation, hardware key, TX, cable loss, direction, beamwidth, battery, solar) approved at once, approved_by='auto' ('owner' for a clear-only edit) the same (owner decision 2026-12-02, which supersedes M2 rule 3)
New contactPublic, or a new hardware-model text under other admin review: the structured part is applied, and the whole edit waits as a second row (account.ReviewClaimID) the same
Probation: joined a node that already had an active owner of either tier, within probationHours (default 0 = off; an operator turns it on, e.g. 72) the whole edit goes to review the same
Open objection against the owner's link the whole edit goes to review until the admin decides or the objection is withdrawn the same (verified owners can object to a self-reported one, as in M2a)
Direct advert claim (#789/#898) unchanged: via stays NULL, and the auto-approve switches and height review apply as before —

The review rows are ordinary proven claims, so the existing admin queue approves or rejects them. An admin approval follows the same rule as any claim: a later approved edit wins (NewerApprovedQuery).

Decisions I made (no one could answer questions)

Rate limits (§4.11)

  • The account write windows apply: writesPerHour globally and writesPerHourPerAccount.
  • The ingestor also allows at most 100 link edits per node per 24 h, all owners together; together with the claim retention this keeps the table bounded.
  • Each edit drops the claim snapshots once. That costs one rebuild per applied edit, bounded by the global write window (600 per hour by default).

Perf (rule 0)

  • No ingest hot path changes.
  • An edit is a few primary-key or indexed reads plus 1–2 inserts, in one transaction.
  • The change log is one indexed read of at most 50 rows: the node's claim rows are bounded by the per-node limit and the retention.
  • The owner check on the node page reuses the account the page already loads: no extra request for visitors. Owners make one history request per node view.

Tests (written first; red before, green after)

  • cmd/ingestor/accounts_station_test.go:
    • last write wins across two co-owners, with both rows kept and naming account and link;
    • an older edit applied later loses (and still takes a part nothing newer holds);
    • the tie-break, in both apply orders;
    • self-reported structured fields auto-approved;
    • probation (both tiers; the first owner never; ends after the window);
    • objection (both tiers; withdrawal restores);
    • free text split for review (contact and model);
    • refusals: not an owner, old generation, no position, the day limit, replay;
    • advert claims unchanged.
  • cmd/server/accounts_station_1018_test.go:
    • queued for both tiers; refusals (identical 404s, 400s, 403 switches);
    • the review reason, and probationHours on (via config) and off (the default);
    • history lists both co-owners with labels, order and tie-break, and leaks no ids;
    • owners only;
    • reflection: no contactAdmin (or account/link id) in the history types;
    • done shows the edit at once.
  • internal/channelregistry/account/station_test.go, internal/dbschema/antenna_claim_link_columns_test.go: the op rules and the migration (old rows untouched, CHECKs, idempotent, AssertReady).
  • test-1018-m2d-station.js (vm, the real files): field bounds, cross-field visibility, the body, the owner texts, history rows, save and error mapping.
  • test-1018-m2d-station-e2e.js: the owner's golden path with the real server and ingestor, on a copy of the fixture: sign in → one-click link (fake companion) → Edit station data → fill in everything → Save → the Station block shows it, the change log lists it, and a signed-out visitor sees it. Runs at 375×560 light with real taps and at 1280×900 dark. Added to scripts/e2e-shards.json (shard 3). The broker and process harness is shared in tests/e2e-real-stack.js.

Mutants (all killed)

M1 LWW ignores a newer row · M2 tie-break dropped · M3 tie-break inverted · M4 probation ignored · M5 probation without "joined after" (survived round 1; test strengthened in 4e55e6b5) · M6 objection ignored · M7 self-reported not auto-approved (old rule 3) · M8 free text auto-approved · M9 no per-node limit · M10 contactAdmin field in history · M11 history reads the admin contact · M12 labels count the viewer (survived round 1; fixed in 4e55e6b5) · M13 no owner check · M14 no snapshot drop on done · M15 history order without tie-break · J1 TX bound 38 · J2 beamwidth without direction · J3 heldFreeText never · J4 save ignores an ingestor error · J5 typed values not sent · E1 (E2E) Station block not reloaded after Save.

Customizer (rule 8)

None. accounts.probationHours is an operator setting in config.json, documented in config.example.json and docs/user-guide/configuration.md. The owner guide gains a "Station data for your nodes" section.

🤖 Generated with Claude Code

dborup and others added 3 commits December 2, 2026 16:26
…1018 M2d)

A linked owner (verified or self-reported, owner decision 2026-12-02)
edits a node's station data from the node page with no code or advert:
POST /api/account/nodes/{pubkey}/station queues account op station-set;
the ingestor writes claim rows with account_id, link_id and via='link'
(self-healing ADD COLUMN), last write wins by created_at then request_id.
Structured values are auto-approved; new contactPublic or hardware-model
text, probation and open objections go to admin review. GET
/api/account/nodes/{pubkey}/history is the owners-only change log, never
with contactAdmin. The shared form gains the #1017 M3 inputs (TX power,
cable loss, direction, beamwidth, battery, solar).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he viewer (#1018 M2d)

Kills two mutants that survived the first round: probation without the
'joined after another owner' condition, and history labels that count
the viewing owner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1018 M2d)

The XSS sink check refused setAttribute('href') fed by a helper taking
the pubkey; the link is now built inline from the encoded key, as the
admin list does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dborup

dborup commented Dec 2, 2026

Copy link
Copy Markdown
Owner Author

Rapport — CS-Minimax PR#1095 #1018 — head c5c397a

Status: M2d is done and CI is green on every job. The PR stays a draft, stacked on #1067 (head 12d899ad). The one open decision for the owner is the probation default (see Leftovers).

Evidence: [T] = a test or CI run in this PR · [A] = a judgement or assumption · [K] = read in the code or the issue.

Requirements

# Requirement Test (red before, green after) Mutant (killed) Evidence
1 A linked owner of either tier edits station data without an advert claim: one claim row per edit with account_id, link_id, via='link' (self-healing ADD COLUMN, written by the ingestor; the server stays read-only) TestStation1018_LastWriteWinsAcrossCoOwners, TestStation1018_EditQueuedForAnOwner, TestAntennaClaimLinkColumns1018_* M13 (no owner check on edit) [T]
2 Last write wins by created_at, then request_id TestStation1018_AnOlderEditAppliedLaterLoses, TestStation1018_TieBreakByRequestID (both apply orders) M1 (ignores a newer row), M2 tie-break dropped, M3 tie-break inverted [T]
3 Last write wins across two co-owners, and the history lists both ingestor …LastWriteWinsAcrossCoOwners; server TestStation1018_HistoryListsBothCoOwners (labels, order, tie-break, no ids leaked) M12 labels count the viewer (survived round 1; killed after the test was strengthened in 4e55e6b5), M15 history order without tie-break [T]
4 Probation and objections force review TestStation1018_ProbationForcesReview, …NoProbationWithoutAnEarlierOwner, …ObjectionForcesReview (each for both tiers), …EditSaysWhyItWaits M4 probation ignored, M5 probation without the "joined after" condition (survived round 1; killed in 4e55e6b5), M6 objection ignored [T]
5 contactAdmin never in the history (reflection) TestStation1018_HistoryTypesHaveNoAdminContact, plus a body check in …HistoryListsBothCoOwners M10 (a contactAdmin field), M11 (the query reads the admin contact) [T]
6 Self-reported owners: structured fields auto-approved (decision 2026-12-02) TestStation1018_SelfReportedStructuredFieldsAutoApproved M7 (old rule 3: verified only) [T]
7 contactPublic (and model text) go to admin review for everyone TestStation1018_FreeTextGoesToReview M8 (free text auto-approved) [T]
8 Rate limits (§4.11): the account write windows, plus at most 100 link edits per node per 24 h TestStation1018_Refusals M9 (no per-node limit) [T]
9 The node page shows the edit at once (the claim snapshot is dropped on "done") TestStation1018_DoneShowsTheEditAtOnce; the E2E M14 (no drop); E1 (E2E: Station block not reloaded) [T]
10 E2E golden path, link → edit → node page, on the real server and ingestor, at 375×560 with real taps and at 1280×900 test-1018-m2d-station-e2e.js: 14/14 locally and in CI shard 3 E1 [T]
11 Form inputs for TX power, cable loss, direction, beamwidth, battery and solar, so everything can be filled in at one sitting test-1018-m2d-station.js (12 tests) J1 TX bound, J2 beamwidth without direction, J3 heldFreeText, J4 save ignores an ingestor error, J5 typed values not sent [T]
12 Direct advert claim unchanged TestStation1018_AdvertClaimUnchanged; existing TestAntennaClaim* green — [T]

Mutants: 21 in total, all killed. 15 in Go (M1–M15), 5 in JS (J1–J5) and 1 E2E mutant (E1). M5 and M12 survived the first round; I strengthened the tests and both were killed after that. [T]

Rules that always apply

  • cmd/server stays read-only: no write path was added, and the readonly_invariant test is green. [T]
  • No new map[string]interface{} outside tests: 0 in the changed Go files. [T]
  • No hardcoded colours: the CSS uses variables only. [T]
  • scripts/check-xss-sinks.sh --diff origin/master is clean at c5c397a7. My first push failed this check, because my local run compared against an outdated origin/master ref; it is fixed in c5c397a7. [T]
  • Fork guards unchanged: 9 in deploy.yml, 1 in release-fast-path.yml. [T]

Local runs

  • cd cmd/ingestor && go test ./...: ok. [T]
  • cd cmd/server && go test ./...: everything passes except TestDHM1065_DatafordelerRefusalIsTheTransparentStandIn and TestDHMOrtho1065_RefusedOrFailedIsTheStandIn. Those two fail the same way on master with local Go 1.26.0, and they pass in CI. [T]/[K]
  • Account and lib tests (internal/channelregistry, internal/dbschema): ok. [T]
  • node test-frontend-helpers.js: 746 passed. [T]
  • node scripts/run-go-server-shard.js --validate and node scripts/run-e2e-shard.js --validate: ok. [T]
  • sh test-all.sh: 401 passed, 0 failed. [T]

CI per job (run 46916682532, head c5c397a7)

All success: Go Build & Test · Go Server Tests 1/3, 2/3, 3/3 · Go Ingestor Tests · Go Libraries & CLI · JavaScript Unit Tests & Lint · Script & Container Unit Checks · Verify Go Test Assignments · Validate Docker Image · Build & Publish Docker Image · Playwright E2E 1/3, 2/3, 3/3 · Verify E2E Shards & Coverage.

Skipped by design on a PR: Release Artifacts, Deploy Staging, Publish Badges. No reruns were needed. The earlier run on 4e55e6b5 failed only JS Lint, on the XSS check that c5c397a7 fixes. [T]

Leftovers

  1. Probation default (owner decision needed). The task said to keep probation, but the M2 decisions of 2026-11-29 (question 2) had dropped it. I implemented it as the task says: 72 h by default, and accounts.probationHours: 0 turns it off. [K]/[A]
  2. PR base is master, not the M2b branch. CI only runs on PRs into master. The diff therefore also shows feat(account): one-click linking of a repeater from the browser (#1018 M2b) #1067's commits until feat(account): one-click linking of a repeater from the browser (#1018 M2b) #1067 merges; review only c687496b, 4e55e6b5 and c5c397a7. [A]
  3. Installation photo. It does not exist yet (Station details: hardware (official MeshCore list, ESP32/nRF52), TX power, direction, battery/solar and a photo #1017 M5/M6), so nothing routes it to review. [K]
  4. Public node page. TX, direction and the other new values are stored and shown in the owners' change log, but the public Station block does not show them yet; that belongs to Station details: hardware (official MeshCore list, ESP32/nRF52), TX power, direction, battery/solar and a photo #1017's display work. [A]
  5. Hardware test. The E2E uses the fake companion; a run with a real companion and repeater on staging is still to do (the same open item as feat(account): one-click linking of a repeater from the browser (#1018 M2b) #1067). [A]

dborup and others added 2 commits December 2, 2026 18:13
Owner direction (M2 decisions 2026-11-29, question 2): easy for owners.
accounts.probationHours now defaults to 0 (off). The mechanism stays
behind the config key; an operator turns it on with e.g. 72. Out-of-range
values fall back to the default (off). config.example.json and the
configuration guide updated; tests cover probation on via config and the
default off.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@dborup dborup closed this Dec 2, 2026
@dborup dborup reopened this Dec 2, 2026
@dborup

dborup commented Dec 2, 2026

Copy link
Copy Markdown
Owner Author

Fix round — CS-Minimax PR#1095

Review feedback addressed (commit 30bfbc33)

  1. accounts.probationHours now defaults to 0 (off), per the owner's M2 direction "easy for owners" (decisions 2026-11-29, question 2). The mechanism stays behind the config key: an operator turns it on with e.g. 72. Out-of-range values fall back to the default (off).
  2. config.example.json (value and _comment) and docs/user-guide/configuration.md updated.
  3. Tests: probation on via config (72) in the ingestor and server tests; the default off is covered in the account package (DefaultProbationHours == 0), in a new ingestor test TestStation1018_ProbationOffByDefault, and in the server test (unset and explicit 0).
  4. PR body updated: the probation rows and the owner-decision note say it is off by default.

Nothing else changed. Local: the account package, ingestor and server station/account tests pass, and test-1018-m2d-station.js passes (12/12).

CI is pending because of the GitHub Actions outage: no workflow run has started for 30bfbc33 or for the empty retrigger commit cc7771a1 (head). The coordinator will check CI once Actions is back.

🤖 Generated with Claude Code

@dborup

dborup commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner Author

Review — CS-VM3 PR#1095 — head cc7771a

Dom: REQUEST CHANGES

Scope: the M2d commits on top of 12d899ad (c687496b, 4e55e6b5, c5c397a7, 30bfbc33, cc7771a1). I tested on the head and on the merged tree against origin/master b7db1738 (git merge-tree --write-tree, clean merge, tree 1c17ee3e). Evidence: [T] = a test or run I did · [A] = judgement · [K] = read in the code or the issue.

The M2d core is sound and well tested: last write wins, the tie-break, the read/write split, the change log without contactAdmin, free text to review, both tiers auto-approved, and the real-stack golden path. One rule from the M2d acceptance list can be bypassed, though: an open objection stops forcing review once the objected owner upgrades their link (F1). The fix is small. The other findings are low.

Findings

# Sev Finding Evidence
F1 Medium An open objection no longer forces review after a link upgrade. account.ObjectedSQL matches link_objections.link_id = the edit's link only. A self-reported owner who proves the node by advert (the existing M2a upgrade, cmd/ingestor/accounts_links.go:181) gets a new link_id, and the old one becomes upgraded. The objection stays open on the old link, so mustReview and the server's reviewOf both answer "no review". The objected owner's edits then apply at once, which is the exact case §4.10 and the owner decision of 2026-11-29 ("the protection against a stranger who used the default admin password") are meant to stop. Probe test: verified A objects to self-reported B; B's edit → proven (correct); B upgrades with r.linked(b, 0); B's next edit → approved with 1 objection still open. Related, pre-existing in M2a: an admin "uphold" of that objection then removes nothing (active > 0 is false on the old link). Suggested fix: match open objections on any link of the same (account_id, pubkey), or carry open objections to the new link on upgrade. Add a red/green test for the upgrade case. [T] probe TestReview1095_ObjectionSurvivesUpgrade fails on head; [K]
F2 Low The owner guide contradicts the new default. After 30bfbc33 set probationHours to 0 (off), docs/user-guide/owner-account.md still says: "if you joined a node that already had an owner, your changes are checked by an administrator for the first 3 days (the operator can change or turn this off)". config.example.json and configuration.md were updated; the owner guide was not. [K]
F3 Low Probation restarts on an upgrade (only when an operator turns probation on). The upgrade creates a link with a fresh created_at, so ProbationSQL puts a long-standing co-owner on probation again for probationHours after they prove the node verified. Probe: probation 72 h, B self-reported 100 h ago, B upgrades → next edit proven. The same fix direction as F1 applies: judge "joined" by the account's first active link to the node, not by the newest link row. [T] probe TestReview1095_ProbationRestartsOnUpgrade fails on head
F4 Low Test gap: probation's "earlier owner had not ended" condition is unpinned. My mutant MC deletes AND (o.ended_at IS NULL OR o.ended_at > l.created_at) from ProbationSQL, and it survives both the ingestor and the server TestStation1018* suites. A new owner of a node whose earlier owner had already left would then wrongly go on probation. One more case in TestStation1018_NoProbationWithoutAnEarlierOwner would kill it. [T]
F5 Low A clear-only edit is impossible on a node without a position. The ingestor explicitly lets a clear-only edit through without a position (ClearOnly), and the PR body says so. But the server answers 404 first (resolveTerrainEnd needs HasGPS and a valid position), so that path cannot be reached. An owner whose node no longer reports a position cannot withdraw their data through the link. This matches the advert-claim route, so it is not a regression. Either let clear-only edits skip the position check on the server, or drop the claim from the comment and the body. [K] cmd/server/accounts_station.go:166, terrain_profile.go:919
F6 Nit The change log shows unreviewed public-contact text to co-owners. The history query returns contact_public for every row that is not pending or expired, including proven rows waiting for review. That covers a co-owner's held contact and an advert claim's, possibly from a non-owner. That text has not passed the review decision 7 requires. It is not contactAdmin, and the readers are owners, so this is a nit; consider omitting contactPublic on proven rows of other people. [K]
F7 Nit On a phone the "Saved." line ends up below the bottom menu. After Save at 375×560 and 360×640, the section is redrawn and the status line sits under the bottom nav (top 554 px, usable to 502 px; top 634, usable to 582). The redrawn Station block is visible, so the owner does see the result. Scrolling the status into view, or putting it above the form, would make it clearer. [T] walkthrough

The points of the task

  • Read/write split. All writes are in cmd/ingestor/accounts_station.go, inside the account write's transaction, with the session generation checked. cmd/server/accounts_station.go only runs QueryRow/Query, and readonly_invariant_test is green in the full server run. ensureAntennaClaimLinkColumns is a self-healing ADD COLUMN, guarded per column, idempotent and recorded. It has CHECKs on via/account_id/link_id, and AssertReady gets a transient item. internal/dbschema tests pass. [T]/[K]
  • Last write wins by created_at, then request_id. putInForceByEditTime takes a part only when no row in force for it is newer by (proven_at = edit time, request_id). The tie-break is tested in both apply orders. My mutant MA (tie-break dropped) is killed by TestStation1018_TieBreakByRequestID. An admin approval of a review row goes through NewerApprovedQuery, which is strict on proven_at and has no request_id tie-break; this only matters for two edits in the same millisecond. [T]/[A]
  • Change log owner-only, never contactAdmin. ownedNodeLink requires an active link and answers 404 for hidden nodes. My mutant MF2 (hidden check disabled) is killed. The reflection test covers the history types. The query never touches node_claim_admin_contacts, and StationDetails has no admin-contact field. The E2E asserts that the admin contact never reaches the page. See F6 for the public-contact nit. [T]/[K]
  • Approval routing. Structured fields are auto-approved for both tiers (approved_by='auto', 'owner' for clear-only), per decision 2026-12-02. A new contactPublic or hardware-model text is split: the structured part is applied now and the whole edit waits as ReviewClaimID. My mutant MB (model not held) is killed. There is no photo yet (Station details: hardware (official MeshCore list, ESP32/nRF52), TX power, direction, battery/solar and a photo #1017 M5/M6). An objection forces review, but see F1. Probation is off by default (DefaultProbationHours = 0) and works when configured (tests at 72 h); see F3/F4. [T]
  • Rate limits §4.11. The edit is charged to writesPerHour / writesPerHourPerAccount (queueWrite, only after the request has been validated). The ingestor allows at most 100 link edits per node per 24 h; my mutant MD (>= → >) is killed by TestStation1018_Refusals. Note that an edit with held free text writes 2 rows, so it uses 2 of the 100. The stationEdits map is bounded by linkOwnerCap. [T]/[K]
  • Direct advert claim unchanged. checkEdit is the old validation extracted with the same order and messages, and insertClaimRow is the old insert extracted. via stays NULL; TestStation1018_AdvertClaimUnchanged and the existing claim tests pass. One UI change for the claim form, declared in the PR: the shared form now shows inputs for the Station details: hardware (official MeshCore list, ESP32/nRF52), TX power, direction, battery/solar and a photo #1017 M3 values (TX, cable loss, direction, beamwidth, battery, solar), pre-filled from /station, instead of silently carrying them forward. I consider that in scope ("fill in everything in one sitting"). [T]/[A]
  • XSS on owner-entered text. account-station.js builds every row with createElement + textContent. The Edit link's href is built from encodeURIComponent(pubkey) (a hex key). bash scripts/check-xss-sinks.sh --diff origin/master exits 0 on the head checkout. Note: the script needs bash, because sh fails on its syntax. [T]
  • Golden path, cold start, real taps. See below. It works at 375×560 and 360×640 (touch), and on desktop through the PR's E2E. [T]
  • Other rules. No new map[string]interface{} in non-test Go: the count is unchanged per file versus the merge base. No hardcoded colours: --status-amber-text, --status-green-text, --text-muted and --border all exist in style.css. Fork guards are 9 in deploy.yml and 1 in release-fast-path.yml, on the head and the merged tree. No closing keywords in the body or commits. All five M2d commits are authored by dborup <kontakt@meshview.dk>. [T]

Golden path (my own walkthrough, the real server and ingestor)

I ran the merged-tree binaries on a CI-prepared copy of e2e-fixture.db, plus one seeded companion and one positioned repeater per run. The fake companion from tests/fake-companion.js stands in for Web Serial. Viewports: 375×560 and 360×640, isMobile + hasTouch, finger taps (touchscreen.tap / tapWhenSettled).

  1. Cold /: onboarding with two gesture tips and the familiarity chooser. I tapped "Got it" twice, then the experienced card.
  2. Sign-in: done via the API from the page. This fake companion cannot sign, and M1b has its own suite. This is the only step that skipped the UI.
  3. Home → My Mesh: typed the name in the search, then tapped + Claim. The suggestions stay open over the Account link (existing Home behaviour); one tap outside closes them.
  4. Account → one-click link: tapped the Account link on Home, picked the node, typed the password, tapped USB. The status said "Linked. You are an owner of this node by admin login (self-reported)", and I tapped Done.
  5. Owner card: Edit station data is visible without scrolling.
  6. Node page: the owner hint is in view after the jump, and the button says Save.
  7. Fill in and Save: set height 14.5 and panel antenna, gain 8, mains, TX 20, cable loss 0,8 (decimal comma), direction 90 and beamwidth 65, then tapped Save. The Station block shows Panel, 8.0 dBi and Mains at once. The change log lists the edit "In use" by "You (admin login)" with every value.
  8. Second edit: a height-only edit is applied, and the change log shows both rows.
  9. Layout: no sideways scroll, and no page errors.

No step was impossible, and nothing had to be closed except the existing search dropdown. See F7 for the status line under the bottom menu. Desktop: the PR's test-1018-m2d-station-e2e.js runs at 1280×900 dark with the mouse; I looked at its screenshots. [T]

Tests (merged tree unless noted; linux/amd64, Go 1.27.1, Node 22)

Run Result
cd cmd/ingestor && go test -timeout 20m ./... (CI's timeout) still running when this review was posted; a failure will follow as a comment
cd cmd/server && go test ./... All M2d, account, claim, readonly-invariant, DHM and TestGraphScore629_GoldenBitIdentical tests pass. 5 perf-budget tests fail: TestAdvertIntervalAnalytics_AggregatePerf, TestDagiAreaStatsWithinBudget, TestProfileCard_Cost, TestCoverage941_PerfBudget, and TestCoverage941M2_PerfBudget (that one only under load; it passes in isolation). The other four fail the same way in isolation on origin/master b7db1738 (e.g. 248 ms vs a 150 ms budget, 18.8 s vs 3 s), so this test machine is too slow, not a regression. These are not the known flakes #256/#267.
internal/channelregistry (account, antennaclaim, hardware), internal/dbschema ok
node test-frontend-helpers.js 746 passed, 0 failed
node test-1018-m2d-station.js / node test-1018-m2b-oneclick.js 12/12 / 42/42
node test-1018-m2d-station-e2e.js (real server + ingestor, prepared fixture) 14 passed, 0 failed
node scripts/run-go-server-shard.js --validate / run-e2e-shard.js --validate ok (4124 Go entries; 320 E2E suites)
sh test-all.sh 398/410. All 12 failures fail the same way on an archive of origin/master. Two are git-dependent (628-vendor-gitattributes, 715-og-denmark) and pass in a real git checkout. The rest are microbenchmark budgets on this slow test machine (e.g. #657 212–366 ms vs 120 ms); test-live-follow passes in isolation. None touches an M2d file.
CI Run 46938971795 on head cc7771a1 (event pull_request): success, every job green, read from the provided CI file and confirmed via the public API. The fix round's note that CI was pending because of the Actions outage is out of date: the run completed later.

Mutants (mine)

Mutant Result
MA: LWW without the request_id tie-break killed (TestStation1018_TieBreakByRequestID)
MB: hardware-model text not held for review killed (TestStation1018_FreeTextGoesToReview)
MC: ProbationSQL without "earlier owner had not ended" survived (ingestor and server) → F4
MD: per-node day limit >= → > killed (TestStation1018_Refusals)
ME: history includes pending/expired rows killed (TestStation1018_HistoryListsBothCoOwners)
MF2: hidden node not refused by the owner check killed (TestStation1018_HistoryOwnersOnly)
MG: server reviewOf ignores objections killed (TestStation1018_EditSaysWhyItWaits)
JA: panel not treated as directional killed (test-1018-m2d-station.js)
JB: approved but not in force shown as "In use" killed
JC: beamwidth accepted without a direction killed
JE: owner Save routed back to the code flow survives the unit tests, killed by the real-stack E2E
JD: Edit link without encodeURIComponent survived; equivalent (keys are validated hex)

Probes (not mutants, failing on the unmodified head): TestReview1095_ObjectionSurvivesUpgrade (F1), TestReview1095_ProbationRestartsOnUpgrade (F3).

What I did not verify

  • A real companion and repeater: hardware is not available on this test machine. The owner's hardware test on staging covered M2b over Bluetooth, not M2d.
  • The sign-in UI in my walkthrough: done via the signed-challenge API, as in the PR's E2E.
  • iOS Safari itself: I used Chromium emulation at 375×560 and 360×640. One-click linking needs Web Serial or Web Bluetooth, which iPhones lack; there the manual code flow applies, and I did not walk it for M2d.
  • Admin approval of a held review row through the admin UI: I read the queue path in the code and did not click through it.
  • The 72 h probation through the real stack: only covered by the Go tests.
  • git ls-remote showed head cc7771a1 before and after the review, unchanged.

dborup and others added 2 commits December 2, 2026 23:28
…M2d)

Review PR#1095 fix round 2:

- F1: an upgrade (a self-reported link proven by advert) carries the open
  objections of the old link to the new one, so they keep forcing review
  and an admin uphold removes the active link.
- F3: probation counts from the account's first link in an unbroken
  upgrade chain (account.JoinedSQL), in the ingestor's decision and in the
  server's reviewUntil.
- F4: TestStation1018_NoProbationWithoutAnEarlierOwner runs with probation
  on, so the "earlier owner had not ended" condition is pinned.
- F5: the station route lets a clear-only edit through without a
  position; a hidden node still answers 404.
- F6: the change log omits a co-owner's public contact while it waits for
  review; the author still sees their own.
- F7: the "Saved." line is scrolled clear of the top bar and bottom nav
  after Save, again once the Station block above it is drawn.
- F2: the owner guide says probation is off by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dborup

dborup commented Dec 2, 2026

Copy link
Copy Markdown
Owner Author

Follow-up to "## Review — CS-VM3 PR#1095": cd cmd/ingestor && go test ./... is ok (1,236 top-level tests, including every TestStation1018* and TestAntennaClaim*) with -timeout 60m; on the slow test machine the default 10 m and CI's 20 m timeouts were reached without any failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant