Skip to content

feat(config): operator default for the 1-byte hop mode (#912 M2) - #1001

Merged
dborup merged 7 commits into
masterfrom
feat/912-m2-1byte-operator-default
Nov 29, 2026
Merged

dborup merged 7 commits into
masterfrom
feat/912-m2-1byte-operator-default

Conversation

@dborup

@dborup dborup commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

Relates to #912

Status: M2 is built as planned. Every requirement has a test that is red on master and green here, plus at least one killed mutant. All local suites are green, except time-budget tests that fail the same way on clean master on this machine.

Evidence labels: [T] = ran here, with the output checked. [K] = checked by reading code. [A] = an assumption or inference, not verified.

Note for the reviewer: M1 and M2 were parked on 2026-11-18/20. The owner restarted both on 2026-11-27 (owner comment on #912), with M1 in #1004.

Fix round (commit 01ecb3be) for the review of head a0c7e38c: F1 "Use server default", F2 the change event after a reset, F3 an open panel follows a late client config, F4 a docs sentence, F5 two more unit tests. See "Review fixes" below.

Plan (M2 of #912, as approved there)

  1. Server
  2. Client
  3. Docs
    • config.example.json, docs/CUSTOMIZATION.md and docs/api-spec.md.

live.js is not touched; M1 is a separate branch.

Changes

  • cmd/server/config.go
    • OneByteHopsDefault string is tagged json:"-", so only applyOneByteHopsDefault fills it, from keys.Get("customizer", "oneByteHopsDefault"). A value of the wrong type, for example 2, gives one warning and mark instead of rejecting the whole config file.
    • Case variants (OneByteHopsDefault, Customizer) are ignored, with configkey's usual warning.
    • (*Config).OneByteHopsDefault() returns the effective mode.
  • cmd/server/types.go, routes.go
    • CustomizerClientConfig.OneByteHopsDefault (json:"oneByteHopsDefault") is always present in the response.
  • public/hop-filter.js
    • New MC_get1ByteHopsDefault / MC_set1ByteHopsDefault.
    • get1ByteHopsMode() falls back to the operator default instead of a hard-coded mark.
    • set1ByteHopsMode() always stores the choice.
    • Setting the default fires mc-hide-1byte-hops-changed only when it changes the effective mode, that is, only for a visitor following the default. map.js and packets.js already re-render on that event.
    • If MC_CUSTOMIZER_CFG arrived before the file loaded, it is read at load time, so script order does not matter.
    • Review fixes: MC_get1ByteHopsChoice() returns the stored choice, or null for a visitor who follows the default. MC_clear1ByteHopsMode() removes the choice (and the feat: customizer toggle to hide 1-byte path hops everywhere — they may do more harm than good Kpa-clawbot/CoreScope#1633 key) and fires mc-hide-1byte-hops-changed. MC_set1ByteHopsDefault() also fires mc-1byte-hops-default-changed when the operator default itself changes.
  • public/roles.js
    • Copies customizer.oneByteHopsDefault into MC_CUSTOMIZER_CFG and hands it to hop-filter.js. hop-filter.js validates it.
  • public/customize-v2.js
    • The option for the server default is labelled "… (server default)". The old static "(default)" on Mark is removed.
    • The select is built from fixed literals only, with no config values interpolated.
    • Review fixes: while a choice is stored, a ↺ Use server default button under the select removes it (MC_clear1ByteHopsMode). The open select is updated in place on both events (labels, selection, button), not re-rendered, because a pick fires change while the select has the focus. Reset All goes through MC_clear1ByteHopsMode(), so the open page follows the default without a reload.
  • Tests

Performance: nothing changes in a hot path. get1ByteHopsMode() reads one more variable, and the extra event fires at most once per config load. [K]

Config and customizer: this is the customizer item from the plan. The customizer shows the server default. Visitors cannot edit the operator default, by design.

Requirements → tests → mutants

Requirement Test (red on master → green) Mutant killed
customizer.oneByteHopsDefault: show/mark/hide valid; unknown value → one warning + mark; absent → mark TestOneByteHopsDefaultValidation912 (11 cases) [T] G1 validation removed, G2 no warning, G4 absent → "", G6 unknown → hide [T]
Named field, canonical configkey only, a wrong type does not drop the file TestOneByteHopsDefaultIsANamedField912, TestOneByteHopsDefaultCanonicalKeyOnly912, TestOneByteHopsDefaultBadTypeKeepsTheFile912 [T] G3 struct decode reads the key (json:"oneByteHopsDefault") [T]
Value served in the customizer block of /api/config/client TestClientConfigOneByteHopsDefaultShape912; E2E step 1 [T] G5 the API sends "" [T]
Resolution order: stored → operator → mark test-issue-912-m2-1byte-operator-default.js (resolution tests) [T] JS1 default ignored, JS4 operator beats stored, JS7 default not validated [T]; E2E-C operator beats stored [T]
Explicit choice always stored; mark survives a hide default Same file, "every explicit choice is stored", "explicit mark survives"; #674 unit test; E2E "explicit Mark … across a reload" [T] JS2 [T]; E2E-B′ (master's rule, mark → no key) killed by exactly that E2E step [T]
Never-chosen visitor follows the default, including later changes "follows a later change of the default, and is told"; "config before hop-filter.js loaded" [T] JS5 no event, JS6 early config ignored [T]
Legacy Kpa-clawbot#1633 migration kept "the Kpa-clawbot#1633 'true' key still migrates … even under a show default", "another legacy value is dropped" [T] JS3 migration broken [T]
roles.js hands the server value over "roles.js passes customizer.oneByteHopsDefault …" (runs the real roles.js snippet) [T] JS8 [T]; E2E-A (fresh visitor, own-choice and phone steps fail) [T]
Customizer shows the server default "the customizer select labels the server default …"; E2E select checks [T] JS9 label removed [T]
E2E: operator default for a fresh visitor; the visitor's own choice wins test-issue-912-m2-1byte-operator-default-e2e.js [T]: on master's frontend 5/7 red, on the fix 7/7 green, then 3/3 more green runs E2E-A, E2E-B′, E2E-C [T]
Phone: the setting at 375×560, light and dark E2E steps 6–7 [T]: no sideways scroll, the select and label inside the viewport, at least 24 px tall, text "Hide (server default)". I looked at the screenshots: both themes render cleanly. The swipe tips in them are the existing first-visit hints. E2E-A (the label shows the wrong default) [T]
F1: a visitor with a stored choice can follow the default again Unit: MC_get1ByteHopsChoice, MC_clear1ByteHopsMode, "offers Use server default only while a pick is stored", "the reset button and a pick keep the open select in step"; E2E F1 (pick Show, press the button: 0 relays on the open route, nothing stored, focus on the select, still Hide after a reload) [T] F1-a button always hidden, F1-b never hidden, F1-c clear keeps the pick, F1-d choice falls back to the default, F1-e sync leaves the button [T]; E2E: the click handler not wired [T]
F2: the way back tells the open page Unit: "MC_clear1ByteHopsMode fires …", "Reset All tells the page …"; E2E F2 (Reset All button: 22 → 0 relays without a reload) [T] F2-a clear fires no event, F2-b Reset All skips it, F2-c fires the old mode [T]
F3: an open panel follows a late client config Unit: "a changed operator default fires mc-1byte-hops-default-changed …", "an open customizer follows a client config …"; E2E F3 with /api/config/client held until the panel is open, with and without a stored pick [T] F3-a no default event, F3-b default event always fires, F3-c/d customizer ignores either event, F3-e/f sync leaves labels/selection [T]
F5: early junk config; Kpa-clawbot#1633 key under a load-time default Two unit tests [T] The review's R1 and R5 [T]
Config example and docs config.example.json (+ its existing Go decode tests), docs/CUSTOMIZATION.md, docs/api-spec.md [T]/[K] — (documentation)

Red on master:

  • Go: the new test file does not compile against master, because OneByteHopsDefault does not exist yet [T]. The assertion-level failures come from the mutants above.
  • JS: the new unit suite gives 1 passed, 14 failed on master [T]. The one pass is the guard that junk stays rejected.
  • E2E: run against master's public/ with 5/7 red [T]. Step 1 was green there only because that server binary already had the fix; on master the Go shape test covers it.

Mutants:

  • Go: 6/6 killed, run on a copy of cmd/server [T].
  • JS: 9/9 killed by the new suite on its own [T].
  • E2E: A, B′ and C killed [T].
  • One more E2E mutant, B ("skip storing a pick equal to the current operator default"), was the wrong mutation, because no step makes such a pick. Its one failure was a timeout, so I do not count it.

Checks

Check Result
cd cmd/server && go vet ./... ok [T]
go test -run 912|Customizer|ConfigClient|ClientConfig ok [T]
go test ./... (whole cmd/server package, one local process, -timeout 90m, nothing else running) Finished in 24.9 min with 3 failures, all time or cost budgets: TestAdvertIntervalAnalytics_AggregatePerf (25.4 ms vs 25 ms on master), TestProfileCard_Cost and TestCoverage941_PerfBudget (504 terrain timeout). Each fails the same way on its own on clean master on this machine [T]. All #912 tests pass [T]. Earlier runs under load also hit the default 10 min and a 30 min timeout, and TestAdvertIntervalBucket_Perf / TestMomentsTickCostBounded_881 failed only under load [T]. CI runs the package in 3 shards with -timeout 20m.
node scripts/run-go-server-shard.js --validate ok, 3876 entries; the new Go tests land in catch-all shard 3 [T]
sh test-all.sh 373 passed, 7 failed of 380 [T]. All 7 fail the same way on clean master on this machine (time budgets, e.g. test-live-heard-filter.js 58.9 ms on 10k nodes): test-live-heard-filter.js, test-live-scope-color.js, test-issue-724-masts-hint.js, test-issue-728-ortho-base.js, test-issue-941-predicted-reach.js, test-issue-730-buildings-ui.js, test-issue-598-hop-path-inference.js [T]
node test-frontend-helpers.js exit 0 [T]
node test-issue-674-1byte-hop-modes.js 16/16 [T]
node scripts/run-e2e-shard.js --validate ok, 290 suites; the new suite is in shard 1 next to #674 [T]
E2E against a local Go server + e2e-fixture.db (freshened, migrated) #912 M2 7/7 (4 runs), #674 7/7, #673 3/3 [T]
scripts/check-xss-sinks.sh --diff origin/master clean, exit 0 [T]
No new map[string]interface{} outside tests; cmd/server stays read-only [T] grep of the diff / [K] (config load only, no DB writes)
No hard-coded colours none added; the select keeps its existing var(--…) styles [T]
Fork guards .github/ not touched: 9 in deploy.yml, 1 in release-fast-path.yml, unchanged [T]

Review fixes (commit 01ecb3be)

Check Result
test-issue-912-m2-1byte-operator-default.js 25/25 on the fix; 17 passed, 8 failed on head a0c7e38c (every F1–F3 test) [T]
test-issue-912-m2-1byte-operator-default-e2e.js 11/11 on the fix (3 runs); against head's public/: 7 passed, 4 failed (the 4 new steps) [T]
#674 unit 16/16, #674 E2E 7/7, #673 E2E 3/3 on the fix [T]
JS mutants 16/16 killed by the #912 unit suite; the click-handler mutant killed by E2E F1 [T]
sh test-all.sh 372 passed, 8 failed of 380, all time budgets. In isolation the fix fails the same 7 as listed above; test-live-follow.js passed on the fix and failed on head, so it is load-dependent [T]
run-go-server-shard.js --validate, run-e2e-shard.js --validate ok [T]
scripts/check-xss-sinks.sh --diff (vs a0c7e38c and vs origin/master) clean, exit 0 [T]
Phone, 375×560, light and dark, with a stored Show under a Hide default the button is 29 px tall, elementFromPoint hits it, no sideways scroll; a tap gives Hide, nothing stored, the button hidden [T]

No Go code changed in the fix round. go vet and the #912 / ClientConfig / Customizer Go tests: ok [T]. Full cmd/server go test ./...: the same budget failures as above (TestAdvertIntervalAnalytics_AggregatePerf, TestProfileCard_Cost, TestCoverage941M2_PerfBudget, TestCoverage941_PerfBudget) and nothing else [T]. cmd/ingestor go test ./...: ok in 18.5 min with -timeout 40m; the default 10 min timed out here with no failing test [T].

CI per job

What I expect from CI, without having verified it [A]:

  • go-server-1/2/3: green. The new tests are fast config tests in shard 3, and the perf budgets above passed on CI runners before.
  • js-test: green.
  • E2E shard 1: the new suite adds about 30–60 s.

Remaining items

  • Local Go time budgets. TestAdvertIntervalAnalytics_AggregatePerf, TestProfileCard_Cost and TestCoverage941_PerfBudget fail on this machine on clean master too. This PR does not cause them; the CI runners are the gate.
  • E2E manifest. The new suite has no meanSeconds yet (no CI measurement). The validator accepts that.
  • Staging validation from the plan ("default hide on staging, a fresh profile shows Hide on Live") is not done: I have no staging access. Live only follows the mode on its map once M1 lands.
  • Back to the default. Done in the fix round: ↺ Use server default under the setting, shown while a choice is stored. Reset All, when the Export tab offers it, also removes the choice. A visitor who explicitly picked Mark before this PR has no stored key (master stored Mark as no key), so they follow the operator default; docs/CUSTOMIZATION.md says so.
  • Pre-existing, not changed here: on a fresh phone profile the first-visit "swipe left or right" tip overlaps the lower right of the select until dismissed (review F7).

🤖 Generated with Claude Code

dborup and others added 2 commits November 27, 2026 10:51
…op mode (#912 M2)

Go: customizer.oneByteHopsDefault parsing (show/mark/hide, unknown,
absent, wrong type, case variants) and its place in the customizer
block of /api/config/client. JS: the resolution order (stored choice,
operator default, mark), explicit storage, following a later default,
the Kpa-clawbot#1633 migration and the customizer's server-default label. E2E: a
fresh visitor gets an intercepted hide default, the visitor's own choice
wins across a reload, and the setting fits a 375x560 phone in light and
dark. The #674 tests now expect an explicit mark to be stored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
customizer.oneByteHopsDefault (show, mark or hide) is a named field on
CustomizerConfig, read from the canonical key only (#884): an unknown
value logs one warning and gives mark, an absent key is mark as before.
/api/config/client serves the effective value in its customizer block.

hop-filter.js resolves the visitor's stored choice, then the operator
default, then mark. An explicit choice is now always stored, so a pick
of mark survives a hide default; a visitor who never chose follows the
operator default, also a later change, and is told through
mc-hide-1byte-hops-changed. The Kpa-clawbot#1633 key migration is unchanged. The
customizer labels the server default.

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

dborup commented Nov 28, 2026

Copy link
Copy Markdown
Owner Author

Review — CS-VM2 PR#1001 — head a0c7e38

Dom: REQUEST CHANGES. One small required fix (F1): once visitors have picked a mode, most of them have no way back to following the operator default, although the PR and the docs say Reset All provides one. Everything else is nits.

Evidence labels: [T] = ran here, with the output checked. [K] = checked by reading code. [A] = an assumption or inference, not verified.

Trees tested:

  • the PR head a0c7e38c, base cd5ae0b6;
  • the merged tree git merge-tree --write-tree origin/master a0c7e38c = 40b00439 on origin/master 71372e99, clean merge;
  • clean master 71372e99, for comparisons.

All work was done in git archive copies in a scratch directory. git ls-remote gave the same head before and after: a0c7e38c on both the branch and pull/1001/head, master 71372e99.

Findings

# Severity Finding Evidence
F1 Medium (required) No way back to the operator default for a visitor whose only customization is the hop pick. The PR body says "A visitor who has picked a mode returns to following the operator default only through Reset All". docs/CUSTOMIZATION.md says "it keeps winning … until Reset All". But Reset All renders only when _hasResettableCustomization() is true (public/customize-v2.js, _renderExport), and that only counts theme overrides and tile picks, not meshcore-1byte-hops-mode. Picking the default mode again does not help either: it is now stored explicitly, so it no longer follows later changes. On master this did not happen, because picking Mark removed the key; the storage change makes this a regression. Suggested fix: count meshcore-1byte-hops-mode (and the legacy key) in _hasResettableCustomization(), with a unit test that is red before; or add a "Follow server default" option. Either is a few lines in this PR's scope. [T] Browser, real config hide, a fresh profile picks Show in the select. The Export tab offers no Reset All (#cv2ResetAll absent). Add one theme override and it appears. [K] _hasResettableCustomization is unchanged by the PR.
F2 Low (nit; fold into F1) Reset All does not tell the page that the mode changed. _resetAll() removes the key but fires no mc-hide-1byte-hops-changed. The mode becomes the operator default (hide), but the open map route keeps all 22 relays until a reload. The same gap exists on master, but now this is the documented route back to the default. [T] After Reset All: MC_get1ByteHopsMode() = hide, nothing stored, 22 relays on the open route. After a reload, 0 relays.
F3 Low (nit) The panel shows the wrong label if it opens before /api/config/client arrives. The select shows "Mark uncertain hops (server default)", selected. When the config lands, the mode becomes hide and the route updates, but the open panel keeps the stale label and selection until it is reopened. This is the same class as #741's tile block. Re-rendering the Path Display block on mc-hide-1byte-hops-changed would fix it. [T] Deterministic: the config response was held until the panel was open, then released. Before: {"shown":"Mark uncertain hops (server default)","mode":"mark"}. After it landed: {"shown":"Mark uncertain hops (server default)","mode":"hide"}. Reopened: "Hide (server default)".
F4 Low (docs nit) Earlier explicit Mark picks become "follow the default". A visitor who explicitly picked Mark before this PR has no key, because master stored the default as no key. They cannot be told apart from a visitor who never chose, so they will follow an operator hide. This is unavoidable; one sentence for operators in docs/CUSTOMIZATION.md would cover it. [K] Master's set1ByteHopsMode called removeItem(MODE_KEY) for mark.
F5 Info (test gap) Two of my JS mutants survive the unit suites. The code is correct in both places [K]. Optional tests: an early MC_CUSTOMIZER_CFG with a junk value, and a legacy "true" with a load-time default and no prior get. [T] R1: the load-time read of MC_CUSTOMIZER_CFG skips isMode. R5: the operator default is returned before the legacy migration; the existing test masks this, because set1ByteHopsDefault calls get first.
F6 Info (process) The owner's restart decision is not in the issue thread I was given. The #912 snapshot ends with M1/M2 parked (2026-11-18 and 2026-11-20). The PR body says the owner restarted them on 2026-11-27. A one-line owner comment on #912 would make the restart traceable. [A] Only the issue export given to me was checked.
F7 Info (pre-existing) A first-visit tip overlaps the select on a phone. On a fresh profile at 360×640, the existing "swipe left or right to switch tabs" tip covers the lower right of the select. The centre stays tappable, and "Got it" dismisses the tip. This PR does not cause it. [T] Screenshot plus an elementFromPoint check at the select's centre.

Answers to the review points

Go

  • Named struct and canonical read: yes. CustomizerConfig.OneByteHopsDefault string is tagged json:"-", and only applyOneByteHopsDefault fills it, via keys.Get("customizer","oneByteHopsDefault"). A value of the wrong type (2) warns and keeps the rest of the file. [K]; [T] TestOneByteHopsDefaultBadTypeKeepsTheFile912.
  • An unknown value gives one warning and mark: yes. [T] 11 validation cases. [T] On a live server with {"oneByteHopsDefault":"Hide","OneByteHopsDefault":"show"}:
    • served: mark;
    • log line 1: customizer.OneByteHopsDefault is ignored: config keys are case-sensitive …;
    • log line 2: customizer.oneByteHopsDefault is not "show", "mark" or "hide"; using "mark".
  • An absent key behaves as today: yes. It is mark, with no warning. [T]
  • Served in the customizer block of /api/config/client: yes. [T] curl on two servers:
    • no config.json: {'disabledTabs': [], 'oneByteHopsDefault': 'mark'};
    • config.json with hide: {'disabledTabs': [], 'oneByteHopsDefault': 'hide'}.
  • No new map[string]interface{}. The added lines contain 0 occurrences. [T]
  • The server stays read-only. The change is config loading only. The diff has no Exec, INSERT, UPDATE, DELETE or RW connection. [T] grep; [K].

JS (hop-filter.js)

  • The order is stored choice, then operator default, then mark: yes. [T] 15/15 unit tests, plus E2E.
  • An explicit choice is always stored, and the feat: customizer toggle to hide 1-byte path hops everywhere — they may do more harm than good Kpa-clawbot/CoreScope#1633 migration is kept: yes. [T]
  • A visitor who never chose follows later operator changes: yes.
    • They are told through mc-hide-1byte-hops-changed, which fires only when the effective mode changes. [T]
    • On a new page load, the client takes the current server value. [K]
    • The server reads config.json at startup, so an operator change takes effect after a restart. [K]
  • Edge cases:
    • Old boolean key "true": it becomes a stored hide, even under a show default. [T]
    • Other legacy values are dropped and the default applies. [T] feat: customizer toggle to hide 1-byte path hops everywhere — they may do more harm than good Kpa-clawbot/CoreScope#1633 never wrote "false", because its setHide1ByteHops(false) removed the key. [K]
    • A stored value equal to the default stays explicit: isMode(stored) returns it first, so it keeps winning after the default changes. [K] The unit test's combinations cover stored values that differ from the default, not equal ones.
    • An unknown stored value is removed and the default applies. [T]

Customizer

  • It shows the server default: yes. "… (server default)" follows the operator's mode, and the old static "(default)" on Mark is gone. [T] E2E. [T] My phone walk-through against a real config.json (no interception): "Hide (server default)". The exception is the cold-load timing case in F3.

Perf budgets (Go)

  • Full go test ./... on the merged tree: 1579 s (26.3 min), 5 failures, all time or cost budgets:

    • TestAdvertIntervalAnalytics_AggregatePerf;
    • TestAdvertIntervalBucket_Perf;
    • TestProfileCard_Cost;
    • TestCoverage941M2_PerfBudget;
    • TestCoverage941_PerfBudget.

    The two panic( traces in the log are the neighbour-graph tests' deliberate, recovered panics. [T]

  • The same budget tests in isolation (merged, then master, nothing else running) [T]:

Test merged master
TestAdvertIntervalAnalytics_AggregatePerf FAIL 33.0 ms / 25 ms FAIL 37.2 ms / 25 ms
TestAdvertIntervalBucket_Perf pass 21.4 ms pass 20.1 ms
TestProfileCard_Cost FAIL (render 286 ms) FAIL (render 402 ms)
TestCoverage941M2_PerfBudget FAIL 504 terrain timeout FAIL 504 terrain timeout
TestCoverage941_PerfBudget FAIL 504 terrain timeout FAIL 504 terrain timeout
TestMomentsTickCostBounded_881 pass pass
TestGraphScore629_GoldenBitIdentical pass pass
  • Conclusion: none of these is caused by this PR.
    • The failing tests touch advert intervals, profile cards and terrain, not config or the customizer. [K]
    • Every one of them also fails on clean master on this linux/amd64 machine. [T]
    • The full-run Bucket_Perf failure was load: my light JS mutant runs overlapped the first minute of that run.
    • TestGraphScore629_GoldenBitIdentical passes here. [T]
    • CI: every job is green, per the CI snapshot. [T: the file]

Tests run

Run Result
go vet ./... (cmd/server, merged) ok [T]
go test ./... (cmd/server, merged) Budget failures only; see the table above. Every #912 / ClientConfig / Customizer test passes [T].
PR Go test against master Does not compile (cfg.OneByteHopsDefault undefined); red [T]
sh test-all.sh (merged) 373 passed, 8 failed of 381 [T]. 2 are archive artefacts (test-issue-628-vendor-gitattributes.js and test-issue-715-og-denmark.js need .git); in a git checkout of the merged tree they pass 4/4 and 10/10, and test-test-all.js passes 8/8 there [T]. The other 6 are timing budgets that also fail on master: live-heard-filter, live-scope-color, 724-masts-hint, 941-predicted-reach, 730-buildings-ui, 598-hop-path-inference [T]. Master: 370/380; the same set, plus 728-ortho-base (timing) and test-test-all.js (my contamination: I had copied the #912 test into that tree) [T].
node test-frontend-helpers.js merged 738/0, master exit 0 [T]
test-issue-912-m2-1byte-operator-default.js merged 15/15; master 1 passed, 14 failed [T]
test-issue-674-1byte-hop-modes.js 16/16 [T]
E2E (local Go server on the merged tree, e2e-fixture.db freshened, CI seed SQL, corescope-migrate, seeds 2073/199/245/122, no config.json) #912 M2 7/7, #674 7/7, #673 3/3 [T]
#912 E2E against master's public/ (same server binary) 2 passed, 5 failed; matches the PR's red claim [T]
scripts/check-xss-sinks.sh --diff origin/master Clean, exit 0, on both head and merged [T]
Hard-coded colours None added: the grep hits are only issue numbers in comments [T]
Fork guards .github/ untouched. 9 in deploy.yml (8 if: and 1 comment) and 1 in release-fast-path.yml [T]
Closing keywords None in the commits or the PR body [T]
Commit author / committer dborup <kontakt@meshview.dk> on both commits [T]

Mutants

Go: all 10 killed, run on copies of the merged cmd/server, with -run 'OneByteHops|ClientConfig|ConfigClient|Customizer'. [T]

Mutant Killed by
baseline green
G1: validation removed Validation912 (unknown, wrong case, …)
G2: no warning Validation912
G3: struct decode reads the key BadTypeKeepsTheFile912, CanonicalKeyOnly912
G4: absent → "" Validation912 (absent block / key)
G5: API sends "" ClientConfigOneByteHopsDefaultShape912
G6: unknown → hide Validation912
R-G1 (mine): case-insensitive validation (strings.ToLower) Validation912/wrong_case
R-G2 (mine): applyOneByteHopsDefault not wired into applyCanonicalKeys Validation912 (show / hide)
R-G3 (mine): API serves the raw field instead of the effective value ClientConfigOneByteHopsDefaultShape912

JS: 14 of 16 killed, checked against the #912 and #674 unit suites with an unmutated baseline. [T]

  • The PR's 9 mutants, JS1–JS9: all killed by the Live map: follow the 1-byte hop setting, operator default for it, and a working maxHopDist #912 suite.
  • My 7 mutants:
    • Killed: R2 (skip storing a pick equal to the current default), R3 (the default event always fires), R4 (the event carries the old mode), R6 (roles.js reads the top-level key) and R7 (the label marks the selected mode).
    • Survived: R1 and R5 (F5).
    • Also survived: R8 (set1ByteHopsMode keeps the legacy key). It is effectively equivalent, because the mode key is read first and Reset All removes both keys, and it also survives on master's suite. I don't count it.

Phone walk-through (real config.json with hide, no interception) [T]

Viewports: 375×560 and 360×640, isMobile and hasTouch, light and dark. Each run started from a fresh profile on a cold page. Steps:

  1. Home loads: the mode is hide, and nothing is stored.
  2. A shared packet link (with no mode in it) opens: 0 one-byte relays on the route.
  3. Taps: More, then Customize, then Display.
  4. A real finger drag (raw touch events) in .cust-body until the setting is above the panel footer and the bottom nav. elementFromPoint at its centre is the select itself, it is at least 24 px tall, there is no sideways scroll, and it reads "Hide (server default)".
  5. Pick Show (selectOption, standing in for the native picker), then tap the visible ✕: 22 relays, and show is stored.
  6. Reload: Show persists.

There were no page errors, and every step was possible without closing anything. The result was 24/24.

The PR's own phone steps scroll with scrollIntoView, not a touch drag. The walk-through above covers that.

A note on tooling: CDP Input.synthesizeScrollGesture scrolls nothing in this headless Chromium, not even the Nodes page, so I used raw Input.dispatchTouchEvent drags. My first walk-through run failed on this, and that was the harness, not the PR.

Not verified

  • No staging. The plan's validation step ("a fresh profile shows Hide on Live") was not run. The Live map only follows the mode once M1 lands.
  • Chromium only, with mobile emulation. I did not test WebKit/Safari or real devices, and the native select picker was replaced by selectOption.
  • CI-exact Go runs. I did not run the Go server tests with -race / coverage per CI shard, nor run-go-server-shard.js --validate / run-e2e-shard.js --validate. CI's assignment and verify jobs are green [T: the CI file].
  • Pages that render before the config arrives. Analytics, the observer detail and the initial Live feed list could show the built-in mode until their next render. Map and Packets re-render on the event. [A] Untested; in practice their data fetches take longer than /api/config/client.
  • cmd/ingestor: not run; the PR does not touch it.

…M2)

Review of PR #1001:

- F1: while a visitor has a stored 1-byte hop choice, the Display tab
  offers "Use server default" under the setting. It calls the new
  MC_clear1ByteHopsMode(), which removes the choice (and the Kpa-clawbot#1633 key),
  so the visitor follows the operator default again, later changes too.
  MC_get1ByteHopsChoice() tells the stored choice from the default.
- F2: MC_clear1ByteHopsMode() fires mc-hide-1byte-hops-changed, and
  Reset All goes through it, so an open map follows without a reload.
- F3: hop-filter.js fires mc-1byte-hops-default-changed when the
  operator default changes. The customizer updates the open select in
  place on both events (labels, selection, the reset button), so a
  panel opened before /api/config/client lands shows the right default.
- F4: docs/CUSTOMIZATION.md says that an explicit Mark picked before
  M2 was stored as no key, so those visitors follow the default.
- F5: unit tests for a junk early MC_CUSTOMIZER_CFG and for the Kpa-clawbot#1633
  key under a load-time default with no earlier read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
adminopenclaw8-sketch pushed a commit that referenced this pull request Nov 28, 2026
…ck Hide test

Owner decision on #912 (2026-11-27): until M2 (#1001) lands, a visitor
who never chose a 1-byte hop mode sees the Live map as Show. A stored
Show / Mark / Hide applies as before. Other pages keep hop-filter.js's
DEFAULT_MODE (mark).

- hop-filter.js: an explicit choice is always stored, Mark included,
  so "chose Mark" and "never chose" differ (the rule M2 also adopts).
  New MC_getStored1ByteHopsMode() returns the stored choice or null.
- live.js: oneByteHopsMode() uses the stored choice, else
  LIVE_1BYTE_HOPS_FALLBACK ('show'); M2 replaces this fallback.
- customize-v2.js: the hint says Live shows every hop unmarked until a
  mode is picked.
- Review finding 1: E2E step in Hide with a pure 1-byte path and
  decoded.path.hops set; it fails when the fallback resolveHopPositions
  call drops hopMode (mutant X3).
- Unit: no stored mode -> Show on Live, stored show/mark/hide, Kpa-clawbot#1633
  migration and junk mode. E2E: cold start draws unmarked, explicit
  Mark is stored.
- #674 tests: an explicit Mark is now stored instead of "no key".
- e2e-shards.json: meanSeconds 90 -> 10.5 (CI ~10 s, local 10.5 s).
- Perf test comment: the real timings (60-125 ms per mode).

Relates to #912

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

dborup commented Nov 28, 2026

Copy link
Copy Markdown
Owner Author

Review feedback addressed (commit 01ecb3be)

Fix — PR#1001 — head 01ecb3b

The fix is one commit, 01ecb3be, on top of a0c7e38c. It merges cleanly with origin/master 46d993bd; the #912, #674, frontend-helpers and #741 unit suites and the E2E manifest validator pass on that merged tree.

Author and committer are dborup <kontakt@meshview.dk>. Files were added explicitly. There was no rebase, amend or force-push, and the commit has no closing keywords.

Evidence labels: [T] = ran here, with the output checked. [K] = checked by reading code.

  1. F1 (required): a way back to the operator default — 01ecb3be

    • What changed:
    • Docs:
      • docs/CUSTOMIZATION.md now describes the button. "until Reset All" is gone.
      • The PR body draft replaces the "only through Reset All … follow-up" bullet and adds the new rows.
    • Tests:
      • Unit:
        • MC_get1ByteHopsChoice;
        • MC_clear1ByteHopsMode (keys gone, the default is followed, later changes too);
        • "offers Use server default only while a pick is stored";
        • "the reset button and a pick keep the open select in step".
      • E2E step F1, under a Hide default:
        • pick Show: 22 relays, and the button appears at ≥ 24 px;
        • click the button: 0 relays on the open route, nothing stored, the select shows "Hide (server default)", the button is hidden, and the focus is on the select;
        • reload: still Hide, nothing stored.
    • Red → green [T]:
      • Unit: on head, every F1 test fails (MC_get1ByteHopsChoice is not a function, no reset button rendered); on the fix, they pass.
      • E2E: against head's public/, F1 fails (reset: false, want true); on the fix, it passes.
    • Killed mutants [T]:
      • F1-a: the button is always hidden.
      • F1-b: the button is never hidden.
      • F1-c: clear keeps the stored choice.
      • F1-d: the choice falls back to the default instead of null.
      • F1-e: the sync leaves the button alone.
      • E2E: the click handler does not call MC_clear1ByteHopsMode. E2E F1 fails (10/11).
  2. F2: tell the open page after a reset — 01ecb3be

    • What changed:
      • MC_clear1ByteHopsMode() always fires mc-hide-1byte-hops-changed with the mode now in force, like MC_set1ByteHopsMode does for a pick.
      • _resetAll() has a new step 6 that calls it. Step 1 still removes both keys, so a page without hop-filter.js behaves as before.
    • Tests:
      • Unit: "MC_clear1ByteHopsMode fires … with the mode now in force"; "Reset All tells the page that the 1-byte hop mode changed". The second runs the real customize-v2.js with the real hop-filter.js in tests/customizer-sandbox.js.
      • E2E F2: a stored Show and a theme override, so Reset All is offered. Click Reset All through the Export tab and accept the dialog: 22 → 0 relays on the open route without a reload, nothing stored.
    • Red → green [T]:
      • Unit: on head, events [].
      • E2E: on head's public/, the relays never drop (timeout); on the fix, it passes.
    • Killed mutants [T]:
      • F2-a: clear fires no event.
      • F2-b: Reset All skips the hop clear.
      • F2-c: clear fires the old mode.
  3. F3: the open panel follows a late /api/config/client — 01ecb3be

    • What changed:
      • MC_set1ByteHopsDefault() also fires mc-1byte-hops-default-changed (detail.default) when the operator default itself changes. A stored choice can hide a change of the default from mc-hide-1byte-hops-changed, but the label must still move.
      • The existing rule stays: the mode event fires only when the effective mode changes. The test that guards it (the review's R3) is unchanged.
      • customize-v2.js listens to both events. _syncHide1ByteHopsField() updates the option labels, the selection and the button in place. It does not re-render the block, because a pick fires change while the select has the focus.
    • Tests:
      • Unit: "a changed operator default fires mc-1byte-hops-default-changed, also behind a stored pick"; "an open customizer follows a client config that lands after it rendered" (no pick, and a stored Show).
      • E2E F3, twice (no pick / stored Show): /api/config/client is held until the Display tab is open.
        • While held: the select shows Mark as the server default.
        • After release: {"value":"hide","defaults":["hide"]}, or with a stored Show, {"value":"show","defaults":["hide"],"reset":true}.
    • Red → green [T]:
      • On head's public/, both E2E variants keep the stale label. This is the review's exact repro.
      • On the fix, both pass.
    • Killed mutants [T]:
      • F3-a: no default event.
      • F3-b: the default event always fires.
      • F3-c: the customizer ignores mc-1byte-hops-default-changed.
      • F3-d: the customizer ignores mc-hide-1byte-hops-changed.
      • F3-e: the sync leaves the labels.
      • F3-f: the sync leaves the selection.
  4. F4: docs sentence for operators — 01ecb3be

  5. F5: the two optional unit tests — 01ecb3be

    • "an early MC_CUSTOMIZER_CFG with a junk default is ignored: mark". It covers bogus, constructor, __proto__, Hide and 3.
    • "a legacy "true" migrates on the first read under a load-time default (no earlier get)". The default comes from an early MC_CUSTOMIZER_CFG of show; the first read gives hide, the key is migrated and the legacy key is removed.
    • Both pass on head too, because the code was already correct there [K].
    • Killed mutants [T]:
      • R1: the load-time read skips isMode.
      • R5: the operator default is returned before the legacy migration, as if (operatorDefault) return null; ahead of the migration in get1ByteHopsChoice.
      • No other test kills either one.

F6 is handled by the owner comment on #912. F7 is pre-existing and left alone; it still shows in the phone screenshots.

Test runs

Run Result
test-issue-912-m2-1byte-operator-default.js fix 25/25; head 17 passed, 8 failed (every F1–F3 test) [T]
test-issue-912-m2-1byte-operator-default-e2e.js (local Go server on the CI-prepared e2e-fixture.db: freshened, seeded, migrated) fix 11/11 (4 runs); head's public/ 7 passed, 4 failed (the 4 new steps) [T]
#674 unit / #674 E2E / #673 E2E 16/16 / 7/7 / 3/3 [T]
JS mutants 16/16 killed by the #912 unit suite (no effect on #674's); 1 E2E mutant killed [T]
sh test-all.sh 372 passed, 8 failed of 380, all time budgets in files this PR does not touch [T]. In isolation, the fix fails the same 7 that the PR body lists for clean master (live-heard-filter, live-scope-color, 724-masts-hint, 728-ortho-base, 941-predicted-reach, 730-buildings-ui, 598-hop-path-inference); head fails those 7 plus test-live-follow.js, which passed on the fix in isolation, so it is load-dependent [T]
node scripts/run-go-server-shard.js --validate ok, 3876 entries [T]
node scripts/run-e2e-shard.js --validate ok, 290 suites (294 on the merged tree) [T]
bash scripts/check-xss-sinks.sh --diff exit 0, vs a0c7e38c and vs origin/master [T]. The new markup is fixed literals only; the sync sets textContent
Go (no Go code changed) go vet ok; #912/Customizer/ClientConfig tests ok. Full cmd/server: only TestAdvertIntervalAnalytics_AggregatePerf, TestProfileCard_Cost, TestCoverage941M2_PerfBudget, TestCoverage941_PerfBudget, the budget set the review found on master too. cmd/ingestor: ok in 1110 s with -timeout 40m; the default 10 min timed out with no failing test (CI uses 20 min) [T]
Phone 375×560, light and dark, stored Show under a Hide default button 29 px tall, elementFromPoint hits it, no sideways scroll; a tap gives Hide, nothing stored, the button hidden. Screenshots checked [T]
Hard-coded colours / map[string]interface{} / .github/ none added / none (no Go) / untouched [T]

Performance:

  • get1ByteHopsMode() does the same reads as before.
  • The sync touches 3 options and 1 button, once per event.
  • The new event fires at most once per config load. [K]

Manifest: the #912 suite's measurementNote in scripts/e2e-shards.json mentions the new steps and the local time: about 180 s for 11 steps, measured while test-all.sh was also running.

Open

  • Not tested: WebKit/Safari and real devices.

@dborup

dborup commented Nov 28, 2026

Copy link
Copy Markdown
Owner Author

Review — CS-VM1 PR#1001 — head 01ecb3b

Dom: REQUEST CHANGES. The fix round is complete: F1–F5 are fixed and tested, and my own mutants and phone walk-through agree. One new required item came up during this review: #1004 (#912 M1) merged into master, and the PR no longer merges. Besides the textual conflict, the Live map would keep its "Show until M2" fallback and ignore the operator default this PR adds.

Evidence labels: [T] = ran here, with the output checked. [K] = checked by reading code. [A] = an assumption or inference, not verified.

Trees tested:

  • the PR head 01ecb3be, base cd5ae0b6;
  • the fix commit alone (a0c7e38c..01ecb3be);
  • the merged tree git merge-tree --write-tree origin/master 01ecb3be = 6e10f25b on origin/master fe32ee49: a clean merge, and its diff against master is identical, line for line, to the PR diff [T];
  • clean master fe32ee49, for comparisons.

All work was done in git archive copies in a scratch directory.

git ls-remote:

Findings

# Severity Finding Evidence
R1 Required The PR conflicts with current master (#1004, #912 M1), and the M1/M2 hand-over is not done.
• Conflicts: git merge-tree --write-tree origin/master 01ecb3be against a49526df reports conflicts in public/hop-filter.js, test-issue-674-1byte-hop-modes.js and test-issue-674-1byte-hop-modes-e2e.js.
• Duplicate helper: M1 added MC_getStored1ByteHopsMode(), "the visitor's own choice, or null". That is the same contract as this PR's MC_get1ByteHopsChoice().
• Live ignores the operator default: public/live.js oneByteHopsMode() returns MC_getStored1ByteHopsMode() || LIVE_1BYTE_HOPS_FALLBACK ('show'), and its comment says this lasts "until M2's operator default replaces this fallback". It never reads the operator default. After a trivial conflict resolution, a fresh visitor on an instance with oneByteHopsDefault: "hide" would still see every 1-byte hop on Live. That contradicts the owner decision on #912 (2026-11-27: "Once M2 lands, the operator default decides the starting mode") and the issue's M2 browser check ("default hide … a fresh profile shows Hide on Live").
• M1 tests pin the old behaviour: test-issue-912-live-1byte-hops.js ("no stored mode: the Live map uses Show", "a junk stored mode counts as no choice: Show on Live") and the M1 E2E step "no stored mode (cold start): Live uses Show". They would keep passing, so they would not catch this.
[T] merge-tree against a49526df: 3 conflicts. [T] The fix-round code merges cleanly with fe32ee49, and everything below was tested there. [K] live.js on a49526df, oneByteHopsMode() and LIVE_1BYTE_HOPS_FALLBACK. [K] The M1 tests named.
N1 Nit (test gap) "Use server default" for a pick equal to the default is not tested. My mutant V3 shows the button only when the pick differs from the default. Under that mutant, a visitor who explicitly picked Hide under a Hide default is stored as a pick and gets no way back. It survives the #912 unit suite and the PR's E2E. The code is correct: my phone walk-through checks this case and kills V3. One more case in "offers Use server default only while a pick is stored" (stored hide, default hide) would cover it. [T] V3 survives the unit suites and the PR's E2E (its one E2E failure was the control step failing against my hide test server); the walk-through kills it 8 of 40 steps.
N2 Nit (test gap) MC_clear1ByteHopsMode() without an operator default is not tested. Every clear test sets hide first. Mutant V6 (fire the raw operatorDefault, which is null on an instance without the key) survives all suites. The code is correct: it fires get1ByteHopsMode() [K]. [T] V6 survives.
I1 Info The new mc-1byte-hops-default-changed event is only checked behind a stored pick. Mutant V8 fires it only when the effective mode did not change, and it survives. Today the only listener, the customizer, also listens to mc-hide-1byte-hops-changed, so nothing a user sees changes; the mutant is equivalent for current consumers. [T] V8 survives; [K] the only listener is in customize-v2.js.
I2 Info (pre-existing, = F7) First-visit tips on a phone. On a fresh phone profile a first-visit tip ("swipe in from the left edge…") sits over the top of the customizer panel, including the ✕. "Got it" dismisses it. It did not block any step. This PR does not cause it. [T] Screenshot 375×560 light, step 3.
I3 Info The CI snapshot is incomplete. All Go, JS, script and Docker jobs pass. The three Playwright E2E shards were still pending, so I cannot confirm CI E2E. [T: the file]

Answers to the review points

Is every required finding fixed, and every nit fixed or explained?

First review Status Evidence
F1 (required): a way back to the operator default Fixed.
• MC_get1ByteHopsChoice() returns the pick or null.
• MC_clear1ByteHopsMode() removes the mode key and the Kpa-clawbot#1633 key, then fires the event.
• A ↺ Use server default button shows only while a pick is stored.
[T] unit 25/25; E2E step F1; my phone walk-through (below). [K] code.
F2: Reset All tells the open page Fixed. _resetAll() step 6 calls MC_clear1ByteHopsMode(), so the event fires. [T] unit "Reset All tells the page…"; E2E F2: 22 → 0 relays without a reload.
F3: a late /api/config/client Fixed.
• A new mc-1byte-hops-default-changed event fires when the default changes.
• _syncHide1ByteHopsField() updates the labels, the selection and the button in place.
• Both listeners are registered once, at load, not per render [K].
[T] unit F3; E2E F3, with and without a stored pick, config held until the panel is open.
F4: docs sentence Fixed. docs/CUSTOMIZATION.md describes the button, and that earlier explicit Mark picks now follow the default. "until Reset All" is gone. [K]
F5: two optional tests Added. They kill the first review's R1 and R5. [T] I re-ran R1 and R5: both killed by the new F5 tests.
F6 Done. The owner comment of 2026-11-27 is on #912. [T: the issue file]
F7 Left alone as pre-existing; see I2. [T]

Are the new tests red without the fix and green with it?

  • The Live map: follow the 1-byte hop setting, operator default for it, and a working maxHopDist #912 unit suite (with the fix) run against the code of a0c7e38c: 17 passed, 8 failed. The failures are every F1–F3 test: MC_get1ByteHopsChoice is not a function, no reset button rendered, events [], a stale label. [T]
  • On the fix and on the merged tree: 25/25. [T]
  • The F5 tests pass on both versions by design, because the code was already correct; their value is that they kill R1 and R5 [T].
  • E2E on the merged tree: 11/11 [T]. I did not re-run the E2E against head's public/; the author reports 7/4 there [A].

Did anything else change that the first review did not see?

The standing checks

Check Result
Every #912 M2 acceptance criterion has a red→green test Go: the PR's test file does not compile against master (cfg.OneByteHopsDefault undefined) [T]. JS: see above [T]. The one gap is Live, now that M1 exists (R1).
cmd/server read-only No Go change in the fix round. The PR's Go change is config loading and one response field, with no DB writes [K].
No new map[string]interface{} 0 in the added Go lines [T]. oneByteHopsModes is a map[string]bool lookup set.
No hard-coded colours None added. The new button reuses cust-dl-btn (var(--surface-2), var(--border)) [T].
scripts/check-xss-sinks.sh --diff origin/master Exit 0 on the head, on the merged commit, and for the fix commit alone (--diff 01ecb3be~1). The new markup is fixed literals; the sync sets textContent [T].
Fork guards .github/ is identical to master. 9 upstream-repository guards (github.repository == …) in deploy.yml (8 if: and 1 comment) and 1 in release-fast-path.yml [T].
Closing keywords None in the 3 commits or the PR body [T].
Commit author / committer dborup <kontakt@meshview.dk> on all 3 commits [T].
TestGraphScore629_GoldenBitIdentical (linux/amd64) Passes, on merged and on master [T].

Tests run

Run Result
go vet ./... (cmd/server, merged) ok [T]
go test ./... (cmd/server, merged, -timeout 90m) 1673 s, 5 failures, all time or cost budgets: TestAdvertIntervalAnalytics_AggregatePerf, TestAdvertIntervalBucket_Perf, TestProfileCard_Cost, TestCoverage941M2_PerfBudget, TestCoverage941_PerfBudget. The run overlapped my E2E runs [T].
The same budget set in isolation, merged vs master Identical on both: AggregatePerf, ProfileCard_Cost, Coverage941M2_PerfBudget and Coverage941_PerfBudget fail. Bucket_Perf, MomentsTickCostBounded_881 and GraphScore629_GoldenBitIdentical pass. Bucket_Perf failed only under load [T].
#912 / ClientConfig / Customizer Go tests (merged) ok, 51 passing tests [T]
cmd/ingestor Not run: the PR does not touch cmd/ingestor/ [T: diffstat]
sh test-all.sh (merged) 374 passed, 9 failed of 383 [T]:
• test-issue-628-vendor-gitattributes.js and test-issue-715-og-denmark.js need .git. In a git checkout of the merged commit they pass 4/4 and 10/10 [T].
• 7 are timing budgets that also fail in isolation on clean master: live-heard-filter, live-scope-color, 724-masts-hint, 728-ortho-base, 941-predicted-reach, 730-buildings-ui, 598-hop-path-inference [T].
node test-frontend-helpers.js (merged) 738 passed, 0 failed [T]
#912 M2 unit / #674 / Kpa-clawbot#1633 / Kpa-clawbot#1496 / #673 / #741 (merged) 25/25, 16/16, and the other four exit 0 [T]
E2E: local Go server on the merged tree, e2e-fixture.db prepared as in CI (freshen, the Kpa-clawbot#1486/Kpa-clawbot#1791 seed SQL, corescope-migrate, seeds 2073, 199, 245, 122), no config.json #912 M2 11/11, #674 7/7, #673 3/3 [T]

The servers were stopped by port (fuser -k), and a health check afterwards confirmed that they were down.

Mutants

JS (mine), checked against the #912, #674, Kpa-clawbot#1633, Kpa-clawbot#1496, #673 and #741 unit suites, with an unmutated baseline green:

Mutant Result
V1: clear keeps the Kpa-clawbot#1633 key killed (F1 clear test)
V2: the default event carries the old default killed (F3)
V3: the button only shows for a pick that differs from the default survives the units and the PR's E2E; killed by my walk-through (N1)
V4: the sync labels the selected mode instead of the default killed (F3, F1 sync)
V5: Reset All re-stores the default as a pick killed (F2 Reset All)
V6: clear fires the raw operatorDefault survives (N2)
V8: the default event fires only when the mode did not change survives; equivalent for current consumers (I1)
V9: the sync leaves the selection killed (F3, F1 sync)
V10: clear fires before removing the keys killed (F2, F1 sync)
First review's R1 and R5 killed by the new F5 tests

V7 was an equivalent mutant (same reads, same order), so I do not count it.

Go (mine), on a copy of the merged cmd/server with -run 'OneByteHops|ClientConfig|ConfigClient|Customizer':

Mutant Killed by
GA: no warning for a value of the wrong JSON type TestOneByteHopsDefaultValidation912
GB: the effective default drops the "" → mark fallback when a customizer block exists Validation912, CanonicalKeyOnly912
GC: JSON null treated as absent (no warning) Validation912

config.go was restored and checked against the head with cmp.

Phone walk-through

The setup:

  • A real config.json with {"customizer":{"oneByteHopsDefault":"hide"}}, with no request interception, on a second local server with the same fixture.
  • Viewports 375×560 and 360×640, isMobile and hasTouch, light and dark: 4 runs.
  • A fresh profile and a cold page (/) for each run.

How I drove it:

  • Taps: every tap is touchscreen.tap at the centre of an element that is fully on screen, after an elementFromPoint check that it is on top. No auto-scroll.
  • Scrolling: real Input.dispatchTouchEvent finger drags in .cust-body.

Steps:

  1. Cold home: the mode is hide, and nothing is stored.
  2. More → Customize → Display, by taps. A first-visit tip appeared and was dismissed with "Got it" (I2). One to four drags brought the setting into view. It shows "Hide (server default)", with no button and no sideways scroll.
  3. Tap the select and pick Show. selectOption stood in for the native picker. Show is stored, and ↺ Use server default appears at 146×29 px, on screen, on top, with no drag needed.
  4. Tap the button. The mode is Hide, nothing is stored, the button is gone, and the focus is on the select.
  5. Pick Hide, equal to the default. It is stored and the button is offered; a tap clears it. This is N1's case, and the code is correct.
  6. Close with the visible ✕.
  7. Open a shared link to the 22-hop 1-byte route (the link carries no mode): 0 one-byte relays.
  8. On the route, the customizer opens by taps; pick Show: 22 relays on the open route. Tap Use server default: 0 relays without a reload. Close with ✕.
  9. Reload: still Hide, nothing stored, no page errors.

Result: 40/40. No step was impossible, and only the tip needed closing. I looked at the screenshots: the button sits directly under the select, readable in both themes, clear of the panel footer and the bottom nav.

Not verified

  • R1's fix itself: I resolved nothing and only describe what is missing. Whether Live should use mark on an instance without the key, which is what MC_get1ByteHopsMode() gives, or keep show there, is for the author to settle against the owner decision and state in the PR. A plain reading of "the operator default decides the starting mode" gives MC_get1ByteHopsMode() [A].
  • No staging. The plan's "a fresh profile shows Hide on Live" check was not run, and on the current master it would need R1 first.
  • Browsers: Chromium with mobile emulation only. No WebKit/Safari, no real devices, and the native select picker was replaced by selectOption.
  • CI-exact runs: no -race, no per-shard coverage runs, and no run-go-server-shard.js --validate / run-e2e-shard.js --validate. The CI E2E shards were pending in the snapshot.
  • Head's public/: I did not run the Live map: follow the 1-byte hop setting, operator default for it, and a working maxHopDist #912 E2E against it. The red claim for the E2E is the author's; the unit red→green is mine.

dborup and others added 2 commits November 28, 2026 13:55
Brings in #1004 (#912 M1). Conflicts resolved:

- public/hop-filter.js: M1's MC_getStored1ByteHopsMode() and this
  PR's MC_get1ByteHopsChoice() had the same contract (the visitor's
  own choice, or null). Keep one: M1's name, with this PR's body,
  which drops junk and migrates the Kpa-clawbot#1633 key itself instead of going
  through get1ByteHopsMode(). customize-v2.js and the #912 M2 unit
  test now call MC_getStored1ByteHopsMode().
- test-issue-674-1byte-hop-modes{,-e2e}.js: both sides made the same
  change (an explicit Mark is stored); master's wording kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#912 M2)

PR #1001 review (CS-VM1) R1: after #1004, Live's oneByteHopsMode()
returned the stored choice or a hard "show", so a fresh visitor on an
instance with oneByteHopsDefault "hide" still saw every 1-byte hop on
Live. The owner decision on #912 (2026-11-27) was "once M2 lands, the
operator default decides the starting mode".

- hop-filter.js: get1ByteHopsMode(fallback) resolves the stored choice,
  then the operator default, then the caller's fallback (when it is a
  mode), then mark. Every other caller passes nothing and keeps mark.
- live.js: oneByteHopsMode() is MC_get1ByteHopsMode('show'). Show is
  left only for a page with no default from /api/config/client, or no
  hop-filter.js. LIVE_1BYTE_HOPS_FALLBACK and the "until M2" comment
  are gone.
- The customizer hint no longer says the Live map shows every hop
  unmarked until you pick a mode; the docs and config.example.json
  name the Live map among the places Mark and Hide apply.

Tests:
- test-issue-912-live-1byte-hops.js: "no stored mode" and "junk stored
  mode" now assert the operator default, Show only without one. New:
  a "hide" default with a fresh profile is Hide on Live (red with the
  old fallback), "show"/"mark" defaults, a pick beats the default, a
  late default and Use server default, an invalid default.
- test-issue-912-live-1byte-hops-e2e.js: the cold-start step asserts
  the served default; new steps with /api/config/client answering
  "hide" (Hide on Live, nothing stored) and with no default (Show).
- test-issue-912-m2-1byte-operator-default.js: review N1 (the reset
  button for a pick equal to the default), N2 (clear without an
  operator default fires mark) and the fallback order.

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

dborup commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner Author

Review feedback addressed (commit abdff3f9)

Fix — PR#1001 round 2 — head abdff3f

Two commits on top of 01ecb3be (a fast-forward of the branch):

  1. R1, conflicts. I merged origin/master with a merge commit (no rebase, no force-push).

    • public/hop-filter.js: see item 2.
    • test-issue-674-1byte-hop-modes.js and test-issue-674-1byte-hop-modes-e2e.js: both sides made the same change (an explicit Mark is stored), so I kept master's wording. These two files are now identical to master.
    • git merge-tree --write-tree origin/master abdff3f9 is clean.
  2. R1, one helper instead of two. MC_get1ByteHopsChoice() is gone; MC_getStored1ByteHopsMode() (M1's name) remains.

  3. R1, Live reads the operator default. get1ByteHopsMode(fallback) resolves in this order:

    • the stored choice;
    • else the operator default;
    • else the caller's fallback, when it is a mode;
    • else mark.

    live.js oneByteHopsMode() is now MC_get1ByteHopsMode('show'). LIVE_1BYTE_HOPS_FALLBACK and the "until M2" comment are removed. Other callers pass nothing, so they still get mark.

    What "no default" means here: the server always sends the effective default (mark when config.json has no key; types.go: "always the effective mode"). So on such an instance a fresh visitor sees Mark on Live. Show is left only for a page that got no default from /api/config/client (an older server, or before the config arrives) or that has no hop-filter.js. This is the plain reading of the owner decision ("once M2 lands, the operator default decides the starting mode") and of the issue ("If the key is absent, the behaviour is as today (mark)"). If Live should instead stay on Show when the key is absent, the server must send "not configured" separately, and that is a Go API change I did not make.

    The customizer hint loses its sentence "Until you pick a mode here, the Live map shows every hop unmarked", which is no longer true. docs/CUSTOMIZATION.md and config.example.json now list the Live map among the places where Mark and Hide apply. "Before Live map: follow the 1-byte hop setting, operator default for it, and a working maxHopDist #912 M2, choosing Mark stored nothing" now says "Before Live map: follow the 1-byte hop setting, operator default for it, and a working maxHopDist #912", because M1 already stores Mark.

  4. R1, M1 tests that pinned the old behaviour.

    • test-issue-912-live-1byte-hops.js "no stored mode: the Live map uses Show": renamed "… and no operator default yet". It still asserts Show (and mark for other pages) when there is no default.
    • "a junk stored mode counts as no choice": now asserts the operator default (hide), and Show only without a default.
    • M1 E2E "no stored mode (cold start)": now reads customizer.oneByteHopsDefault from /api/config/client and asserts that Live and the other pages use it. It also checks the drawing matches: a vertex on the 1-byte hop unless the default is hide, and A→B marked only for mark. The CI server has no config.json, so there it is Mark.
  5. New tests: red before item 3, green after.

    • Unit: "oneByteHopsDefault "hide" and a fresh profile: Hide on Live". Also new: the operator defaults show and mark apply on Live; a stored Mark beats a hide default; a default that arrives late reaches the next packet, and Use server default returns to it; an invalid default counts as none (Show).

    • E2E: "M2: oneByteHopsDefault "hide" and a fresh profile: Hide on Live, nothing stored", with /api/config/client answering hide: no vertex on the 1-byte hop, and A→C dashed. "M2: no default in the client config …: Show on Live".

    • Mutant MA, the old fallback (MC_getStored1ByteHopsMode() || 'show', i.e. M1's code): unit 4 failures; E2E 8 passed, 2 failed ("cold start", live: "show" against served mark, and "hide default", live: "show").

    • Other mutants, all killed by the units:

      Mutant Killed by
      MB: Live calls MC_get1ByteHopsMode() with no fallback 5 failures
      MC: the fallback is ignored killed
      MD: the fallback beats the operator default killed
      ME: a junk fallback passes through killed
      MF: Live falls back to mark without hop-filter.js killed
  6. Nits.

    • N1: "offers Use server default only while a pick is stored" now also covers stored hide under a hide default. Your V3 (the button shown only for a pick that differs from the default) is now killed by that test.
    • N2: new test "MC_clear1ByteHopsMode without an operator default fires mark". Your V6 (it fires the raw operatorDefault) is now killed.
    • I1 (V8) is unchanged: it is equivalent for the current consumers, as the review says.

Tests run (on abdff3f9, unless noted)

Browser

The setup:

  • a second local server with a real config.json: {"customizer":{"oneByteHopsDefault":"hide"}}, with no request interception;
  • Chromium at 375×560 with isMobile and hasTouch, a fresh profile and a cold /, in light and dark.

Every tap is touchscreen.tap at the centre of an element that is fully on screen, after an elementFromPoint check that nothing covers it. Scrolling is done with real touch drags in the panel. selectOption stands in for the native picker.

The steps, 9/9 in light and 9/9 in dark:

  1. Cold home: the mode is hide, and nothing is stored.
  2. Tap Live. A packet A → B (1-byte) → C (2-byte) through the WS handler: no vertex on B, and A→C dashed.
  3. Tap More → Customize → Display (3 drags): "Hide (server default)" is selected and there is no reset button.
  4. Pick Mark: mark is stored and ↺ Use server default appears under the select.
  5. Close with ✕. On Live, B is drawn and its segments are marked.
  6. Reopen the panel and tap ↺ Use server default: nothing is stored, the mode is Hide, the button is gone, and the focus is on the select.
  7. Close. On Live, the same route has no vertex on B again, without a reload.
  8. Reload: still Hide, nothing stored, and no sideways scroll.
  9. No page errors.

I looked at the screenshots: the button sits under the select, readable in both themes, and the hint no longer mentions the Live map. On reopening, the panel keeps its scroll position, so the button can start behind the bottom nav; one drag brings it up. The button was usable in every run.

Not verified

  • No staging run. Chromium with mobile emulation only: no WebKit or real devices, and the native select picker was not used.
  • CI-exact runs: no -race, no per-shard coverage, and no full Go suites.

🤖 Generated with Claude Code


The branch is now pushed: head abdff3f9.

@dborup

dborup commented Nov 28, 2026

Copy link
Copy Markdown
Owner Author

Review — CS-VM1 PR#1001 — head abdff3f

Dom: REQUEST CHANGES. One required item, R2. On an instance whose config.json has no oneByteHopsDefault (today, every instance), this PR changes the Live map from Show to Mark for every visitor who never picked a mode, and no config value brings back today's behaviour. That needs an explicit owner decision, or a small change (see R2). Everything else from round 2 is done and verified: R1 resolution, one helper, the Live chain, the M1 tests, N1/N2, and the phone walk.

Evidence labels: [T] = ran here, with the output checked. [K] = checked by reading code. [A] = an assumption or inference, not verified.

Trees tested:

  • head abdff3f9;
  • the merged tree git merge-tree --write-tree origin/master abdff3f9 = 26e7242e on origin/master 190726ee, a clean merge. Its diff against master is identical to the PR diff (a49526df..abdff3f9), except for hunk offsets [T];
  • clean master 190726ee, for comparisons.

All work was done in git archive copies and one throw-away detached worktree of the merged tree, in a scratch directory. The worktree was removed afterwards.

git ls-remote, before and after: abdff3f9 on both the branch and pull/1001/head, and master 190726ee, unchanged [T].

Findings

# Severity Finding Evidence
R2 Required (owner decision or small change) On an unconfigured instance, Live changes from Show to Mark on merge, and no config value restores today's behaviour.
• The server always serves an effective default: mark when the key is absent (types.go: "always the effective mode"). So Live's MC_get1ByteHopsMode('show') never reaches its show fallback with a current server.
• On Live, Mark dashes every segment that touches any 1-byte hop. applyOneByteHopsMode tests each hop with MC_isVisibleHop(hop, {hide1ByteHops:true}), not an "uncertain" test. The owner's 2026-11-18 measurement puts that at about a third of Live lines, and called that variant "not wanted".
• The issue's M2 plan says "If the key is absent, the behaviour is as today". Today, with M1 merged, Live is Show for such a visitor.
• No escape for the operator: "show" brings Live back to Show, but it also turns off Mark in the route view and elsewhere. The pre-merge combination (Live Show, other pages Mark) cannot be configured.
• The author disclosed this in the round-2 comment, which is fair. But a change that every instance sees on merge, and that the owner has spoken against before, should not ride in on a reading of "the operator default decides".
To close it, either:
(a) the owner confirms on #912 that unconfigured instances get Mark on Live, and docs/CUSTOMIZATION.md, config.example.json and the PR body say plainly that Live changes on merge for instances without the key; or
(b) serve the configured value only (absent or "" when unset). The client already handles this: Live gets Show and other pages get Mark (the PR's own E2E step "no default in the client config: Show on Live" passes [T]). The Go shape test, the docs and the "(server default)" label for the unconfigured case would need adjusting.
[T] Fresh profile, cold #/live at 375×560, the same fixture, a server with no config.json, one injected ADVERT A → B (1-byte) → C (2-byte):
• this PR (merged): {"served":"mark","live":"mark","vertexOnB":true,"abDashed":true,"bcDashed":true};
• master's public/: {"served":"mark","live":"show","vertexOnB":true,"abDashed":false,"bcDashed":false}.
[K] live.js applyOneByteHopsMode; routes.go / config.go OneByteHopsDefault().
N1 Nit (docs) "Mark marks the uncertain ones … on the Live map" is not what Live does. config.example.json ("uncertain hops marked on the map route and the Live map") and docs/CUSTOMIZATION.md ("marks the uncertain ones on the map route and the Live map") both say this. On Live, Mark dashes every 1-byte hop; the route view marks only unsure inferred hops. One clause fixes both. This becomes more visible if R2 is closed with (a). [K] live.js applyOneByteHopsMode; route-view.js / HopDisplay.isUnsureInferredHop.
I1 Info The merge commit ea59d04f also carries the helper rename (MC_get1ByteHopsChoice → MC_getStored1ByteHopsMode and its callers), not only the conflict hunks. I read it: it is correct and in scope, and the fix commit abdff3f9 builds on it. Mentioned only because merge commits are rarely read line by line. [T] git diff 01ecb3be ea59d04f -- public/hop-filter.js
I2 Info The M1 E2E manifest entry keeps meanSeconds: 10.5, although the suite now has two more cold Live loads; the note says so. It took 230 s here, under load. The validator accepts it. [T] run-e2e-shard.js --validate exit 0 (297 suites)
I3 Info Two of my mutants are not killed by the unit suites. X9 is equivalent: roles.js skips MC_set1ByteHopsDefault when the customizer block is absent, but the config is fetched once and the default starts as null. X10 (the reset button no longer refocuses the select) is killed by the PR's E2E F1. No action needed. [T]

Answers to the review points

R1: merge resolution against master (#1004). Done correctly. [T]

One helper only (DRY). Yes. [T]

  • MC_get1ByteHopsChoice / get1ByteHopsChoice has zero occurrences anywhere in the merged tree (JS, docs and JSON).
  • getStored1ByteHopsMode() is the single reader of the stored choice. It drops junk and migrates the feat: customizer toggle to hide 1-byte path hops everywhere — they may do more harm than good Kpa-clawbot/CoreScope#1633 key.
  • public/hop-filter.js is the only file that names the storage keys; customize-v2.js only lists them for Reset All.
  • Callers: customize-v2.js _hopModeState (which covers the render, the sync and the button) and live.js oneByteHopsMode() (through MC_get1ByteHopsMode('show')).
  • Tests: the M1 unit suite and the M2 unit suite.
  • The new getStored1ByteHopsMode has the same contract as M1's version (stored mode after migration, or null) [K].

Live reads stored choice → operator default → Show. Yes, as code; but see R2 for what this means with a current server.

  • get1ByteHopsMode(fallback) = getStored1ByteHopsMode() || operatorDefault || (isMode(fallback) ? fallback : 'mark'). Live passes 'show'. Every other caller passes nothing and still gets mark [K].
  • [T] unit: the fallback test covers all four rungs, plus a junk fallback.
  • [T] E2E: "hide default → Hide on Live" and "no default in the client config → Show on Live".
  • [T] my walk: Live mode hide → mark → hide, following the chain.
  • Before the client config lands, Live briefly uses Show, then the default. A packet in that window is drawn as Show [K]; this is harmless.

The M1 tests now assert the operator default. Yes. [T]

  • Unit (test-issue-912-live-1byte-hops.js, 32/32): the old "no stored mode: Show" test is now scoped to "no operator default yet". The junk-mode test asserts hide with a default and show without one. There are new cases for the show and mark defaults, a stored Mark beating a hide default, a late default reaching the next packet plus Use server default, and an invalid default.
  • E2E cold-start step: it reads the served customizer.oneByteHopsDefault and asserts both the mode and the drawing. On a key-less server that is mark, with A→B dashed.

The new red/green test and its mutant.

  • Red on master [T]: the PR's JS tests run against master's public/:

    • M2 unit: 3 passed, 24 failed;
    • M1 unit: 25 passed, 7 failed.
  • Red on master, Go [T]: the PR's Go test does not compile against master (cfg.OneByteHopsDefault undefined).

  • Mutant MA (M1's MC_getStored1ByteHopsMode() || 'show') [T]:

    • unit 28 passed, 4 failed;
    • M1 E2E 8 passed, 2 failed: the cold start (live:"show" vs served mark) and the hide default (live:"show").

    This exactly matches the author's numbers.

Phone walk: 375×560, cold start, operator default hide, then Mark, then "↺ Use server default". 27/27 [T]; see the table below.

Standing checks

Check Result
Every acceptance criterion has a red→green test Yes, for the server key, validation, API shape, resolution order, explicit storage, following later changes, migration, customizer label, way back, and Live (above) [T]. The gap is the absent-key Live behaviour, which is pinned to the PR's reading, not to the plan's "as today" (R2).
No behaviour change beyond the purpose Except R2 [T]. Otherwise, Reset All now fires one extra mode event (seen in round 1, harmless) [K].
cmd/server read-only The Go change is config loading and one response field. The added lines have 0 Exec / INSERT / UPDATE / DELETE / RW tokens [T]. The read-only invariant test passes in the full run [T].
No new map[string]interface{} 0 in the added Go lines [T]. oneByteHopsModes is a map[string]bool set.
No hard-coded colours 0 hex / rgb / hsl in the added public/ lines. The button reuses cust-dl-btn [T].
scripts/check-xss-sinks.sh --diff origin/master Exit 0 on the merged commit and on the head [T].
Fork guards .github/ is identical to master; 9 in deploy.yml, 1 in release-fast-path.yml [T].
Closing keywords None in the 5 commits or the PR body [T].
Commit author / committer dborup <kontakt@meshview.dk> on all 5 commits e60f62db..abdff3f9 [T].
TestGraphScore629_GoldenBitIdentical (linux/amd64) PASS, on merged and on master [T].

Tests run

Run Result
go vet ./... (cmd/server, merged) ok [T]
go test -timeout 90m ./... (cmd/server, merged) 2262 s, 5 failures, all time or cost budgets: TestAdvertIntervalAnalytics_AggregatePerf, TestAdvertIntervalBucket_Perf, TestProfileCard_Cost, TestCoverage941M2_PerfBudget, TestCoverage941_PerfBudget. The run overlapped my E2E runs [T]. The two panic lines are the neighbour-graph tests' deliberate, recovered panics.
The same budget set in isolation, merged vs master Identical: AggregatePerf, ProfileCard_Cost, Coverage941M2_PerfBudget and Coverage941_PerfBudget fail on both; Bucket_Perf and GraphScore629_GoldenBitIdentical pass on both [T].
cmd/ingestor Not run: the PR does not touch cmd/ingestor/ [T: diffstat].
sh test-all.sh (git checkout of the merged commit) 377 passed, 8 failed of 385 [T]:
• 7 are time budgets that also fail in isolation on clean master: live-heard-filter, live-scope-color, 724-masts-hint, 728-ortho-base, 941-predicted-reach, 730-buildings-ui, 598-hop-path-inference (for example #657 … under 120 ms (median 404.9 ms)).
• test-live-follow.js passes in isolation on the merged tree (39/0), so it is load-dependent [T].
node test-frontend-helpers.js (merged) 738 passed, 0 failed [T]
Unit suites (merged) #912 M2 27/27, #912 M1 32/32, #912 maxHopDist 16/16, #674 16/16, Kpa-clawbot#1633 21/21, Kpa-clawbot#1496 27/27, #673 11/11, #741 base maps 26/26, #882 M2 29/29 [T]
run-e2e-shard.js --validate / run-go-server-shard.js --validate Exit 0 / exit 0 (3903 entries) [T]
E2E: local Go server on the merged tree, e2e-fixture.db prepared as in CI (freshen, the Kpa-clawbot#1486/Kpa-clawbot#1791 seed SQL, corescope-migrate, seeds 2073, 199, 245, 122), no config.json #912 M2 11/11, #912 M1 10/10, #674 7/7, #673 3/3 [T]

The servers were stopped by port (fuser -k), and a health check afterwards confirmed that all five were down [T].

Mutants

JS, checked against the #912 M1, #912 M2, #674, Kpa-clawbot#1633, Kpa-clawbot#1496 and #673 unit suites and the frontend helpers, with an unmutated baseline green [T]:

Mutant Result
MA (author's): Live uses M1's stored || 'show' killed: M1 unit 4 failures; M1 E2E 2 failures
X1: Live passes 'mark' as its fallback killed (M1 unit)
X2: the Kpa-clawbot#1633 migration returns hide but does not store it killed (M2 unit 3, #674 1, #673 5)
X5: Live caches its mode on the first packet killed (M1 unit, late default)
X8: get1ByteHopsMode uses get1ByteHopsDefault(), so the fallback is never reached killed (M1 unit, M2 unit)
X9: roles.js skips the hand-over without a customizer block survives; equivalent (I3)
X10: the reset button does not refocus the select survives the units; killed by E2E F1 (10 passed, 1 failed)
Previous round's V3 (the button only for a pick that differs from the default) now killed (M2 unit; N1 fixed)
Previous round's V6 (clear fires the raw operatorDefault) now killed (M2 unit; N2 fixed)

Go, on a copy of the merged cmd/server with -run 'OneByteHops|ClientConfig|ConfigClient|Customizer', baseline green [T]:

Mutant Killed by
GX1: the API serves "" when the config has no customizer block TestClientConfigOneByteHopsDefaultShape912
GX2: "" accepted as a mode, silently TestOneByteHopsDefaultValidation912

config.go and routes.go were restored and checked against the merged tree with cmp.

Phone walk-through [T]

The setup:

  • A second local server with a real config.json: {"customizer":{"oneByteHopsDefault":"hide"}}, with no request interception.
  • Viewports 375×560 (light and dark) and 360×640 (light), isMobile and hasTouch, 3 runs.
  • A fresh profile and a cold / (home, not a deep link) for each run.

How I drove it:

  • Taps: every tap is touchscreen.tap at the centre of an element that is fully on screen (above the bottom nav, unless it is in the nav) and on top, checked with elementFromPoint.
  • Scrolling: real Input.dispatchTouchEvent finger drags in .cust-body.
  • selectOption stands in for the native picker.
  • Live packets were injected through Live's own WS handler (a test seam).
Step 375×560 light 375×560 dark 360×640 light
1. Cold home: mode hide, nothing stored, no sideways scroll ✓ ✓ ✓
2. Tap Live in the bottom nav; A → B (1-byte) → C: no vertex on B, A→C dashed ✓ ✓ ✓
3. Tap More → Customize → Display; drag; the select (48 px) shows "Hide (server default)", with no reset button ✓ (3 drags) ✓ (3) ✓ (3)
4. Tap the select, pick Mark: mark stored, ↺ Use server default shown at 146×29 px, on screen and on top ✓ (1 drag) ✓ (1) ✓ (0)
5. Tap the visible ✕. On Live, B is drawn and A→B is dashed ✓ ✓ ✓
6. Reopen by taps, tap ↺ Use server default: nothing stored, Hide, the button gone, the focus on the select, "Hide (server default)" ✓ (1 drag) ✓ (1) ✓ (0)
7. Close. On Live, B is left out again, without a reload ✓ ✓ ✓
8. Reload: still Hide, nothing stored, no sideways scroll ✓ ✓ ✓
9. No page errors ✓ ✓ ✓

27/27. No step was impossible, and nothing had to be closed to reach the next control.

I looked at the screenshots:

  • the button sits directly under the select, readable in light and dark;
  • it is clear of the panel footer and the bottom nav;
  • the hint no longer mentions Live.

My first harness run failed every tap on a bottom-nav tab. That was my own on-screen check, which clipped at the top of the nav; it was fixed before the run above, not a PR issue.

Not verified

  • No staging. The plan's "default hide on staging, a fresh profile shows Hide on Live" was run only against a local server with a real config.json (above).
  • Browsers: Chromium with mobile emulation only. No WebKit/Safari, no real devices, and the native select picker was replaced by selectOption.
  • CI-exact runs: no -race and no per-shard coverage runs. cmd/ingestor was not run, because the PR does not touch it.
  • The production consequence of R2 is not measured here. "About a third of Live lines dashed" is the owner's 2026-11-18 sample, not my measurement [A].
  • CI: all jobs are green in the snapshot, including the three Playwright shards [T: the file]. I did not re-check CI after the snapshot.

dborup and others added 2 commits November 28, 2026 21:10
CS-VM1 review round 3, R2 (option b): the M2 plan says "if the key is
absent, the behaviour is as today". The server served an effective `mark`
for a missing customizer.oneByteHopsDefault, so on every unconfigured
instance Live switched from Show to Mark on merge.

- /api/config/client carries oneByteHopsDefault only when config.json sets
  it (omitempty); an invalid value still warns and serves mark.
- MC_get1ByteHopsDefault() is null without an operator default. The
  customizer then reads as on master: Mark "(default)", the hint that Live
  shows every hop until a pick, and "Use default" on the reset button.
- An unconfigured instance: Live Show, other pages Mark, as on master. A
  configured value applies everywhere as before.
- config.example.json no longer sets the key (staging copies the example);
  CUSTOMIZATION.md, the example comment and api-spec.md say what a missing
  key does, and (N1) that on Live Mark dashes every segment touching a
  1-byte hop while the route view marks only uncertain inferred hops.
- Tests: the Go shape test asserts no key on the wire without config; the
  M1 E2E cold start on a key-less server asserts no default served, Live
  Show, B drawn, nothing dashed (red on abdff3f and with a server that
  serves mark for no key); M2 unit/E2E cover the pre-M2 labels and hint.

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

dborup commented Nov 29, 2026

Copy link
Copy Markdown
Owner Author

Review feedback addressed (commit 0c5ef4e3)

Fix — PR#1001 round 3 — head 0c5ef4e

The branch was behind origin/master (ca676781). Merge commit b86966e4 (parents abdff3f9, ca676781) merged it cleanly with no conflicts. The fix is the single commit 0c5ef4e3 on top. Author and committer on both: dborup <kontakt@meshview.dk>.

  1. R2, option (b): the server serves only the configured value.

    • (*Config).OneByteHopsDefault() now returns "" unless config.json sets customizer.oneByteHopsDefault.
    • CustomizerClientConfig.OneByteHopsDefault is tagged json:"oneByteHopsDefault,omitempty", so a key-less instance sends no oneByteHopsDefault on /api/config/client. disabledTabs stays in the block.
    • A configured but invalid value (unknown, wrong case, "", a number, null) still logs one warning and is served as mark, as before. The operator wrote the key, so it is not treated as "absent".
  2. Unconfigured instance = master today; configured = as before.

    • The client needed no change for the modes. With no default, MC_get1ByteHopsMode('show') on Live reaches its show fallback, and every other caller gets mark.
    • A configured value still applies everywhere, Live included.
    • MC_get1ByteHopsDefault() now returns null without an operator default, instead of 'mark', so the customizer can tell the two cases apart. mc-1byte-hops-default-changed carries null when a default is cleared.
  3. Go shape test, label, docs, example.

    • Go:
      • TestClientConfigOneByteHopsDefaultShape912: the key is absent for {}, for a customizer block without it, and for a case-variant key. It is served for show/mark/hide and as mark for an invalid value.
      • TestOneByteHopsDefaultValidation912 and …CanonicalKeyOnly912: absent → "".
      • …IsANamedField912: asserts the omitempty tag.
    • Customizer, unconfigured case: it reads as on master.
      • The labels are Show / Mark uncertain hops (default) / Hide, with no "(server default)" anywhere.
      • The hint's "Until you pick a mode here, the Live map shows every hop unmarked." is back. It is a span, hidden when a default is configured and kept in step by _syncHide1ByteHopsField.
      • The reset button reads ↺ Use default (still ↺ Use server default when one is configured).
    • Configured case: unchanged; "(server default)" on the configured mode and no Live hint.
    • config.example.json: it no longer sets the key. deploy.yml copies the example to a fresh staging config.json, so the old "mark" would have changed Live there. The comment now says the key is optional, what a missing key does (Live unmarked, Mark elsewhere), and gives an example.
    • docs/CUSTOMIZATION.md: says the same. It also covers what the server sends when the key is missing, and the "(default)" / "Use default" wording.
    • docs/api-spec.md: marks the field optional, "only when configured".
    • scripts/e2e-shards.json: the two Live map: follow the 1-byte hop setting, operator default for it, and a working maxHopDist #912 measurementNotes are updated to match.
  4. N1: docs/CUSTOMIZATION.md and the config.example.json comment now say: "mark flags them: the map route view marks only the uncertain inferred 1-byte hops, while the Live map dashes every segment that touches any 1-byte hop." I checked this against route-view-utils.js isMarkedUnsure (2-hex hops only) and live.js applyOneByteHopsMode.

  5. Red→green test and mutant. M1 E2E, cold-start step on a server with no config.json, a fresh profile, cold #/live, injecting A → B (1-byte) → C (2-byte). It asserts one object: {served:null, live:"show", global:"mark", dflt:null, vertexOnB:true, abDrawn:true, anyDashed:false}.

    Tree Result
    this fix (0c5ef4e3) 10/10 pass
    abdff3f (its server + its public/) 9 passed, 1 failed: got {"served":"mark","live":"mark","global":"mark","dflt":"mark","vertexOnB":true,"abDrawn":true,"anyDashed":true}
    mutant: the fix, with OneByteHopsDefault() returning "mark" when absent 9 passed, 1 failed: same got; Live draws Mark with A→B dashed
    Go tests, on abdff3f 4 tests fail (Validation, CanonicalKeyOnly, IsANamedField, Shape)
    Go tests, on the mutant killed: Shape fails with cfg {}: no default configured, but customizer.oneByteHopsDefault = "mark", plus Validation and CanonicalKeyOnly
    M2 E2E on abdff3f 8 passed, 3 failed: the new "no default served, customizer as before M2" step and the two F3 steps, which now expect MC_get1ByteHopsDefault() === null while the config is held

Tests run

Run Result
cd cmd/server && go test -count=1 -timeout 90m ./... exit 1 after 1529 s. The only failures are the time/cost budgets TestAdvertIntervalAnalytics_AggregatePerf, TestAdvertIntervalBucket_Perf, TestProfileCard_Cost and TestCoverage941_PerfBudget; this run overlapped my E2E runs. The two panic( lines are the neighbour-graph tests' deliberate, recovered panics.
Those 4 budgets in isolation, this branch vs clean origin/master ca676781 Identical: AggregatePerf, ProfileCard_Cost and Coverage941_PerfBudget fail on both, and Bucket_Perf passes on both.
go test -run 'OneByteHops|ClientConfig|ConfigClient|Customizer'; go vet .; gofmt -l on the touched files ok; ok; clean
Unit tests #912 M2 28/28 (one new test, R2 "reads as before M2"); #912 M1 32/32; #912 maxHopDist 16/16; #674 16/16; Kpa-clawbot#1633 21/21; Kpa-clawbot#1496 27/27; #673 11/11; customizer-v2 66/66; #882 M2 29/29; test-frontend-helpers.js 738/0
E2E: fix server, CI-style fixture (freshen, the Kpa-clawbot#1486/Kpa-clawbot#1791 seed SQL, corescope-migrate, seeds 2073/199/245/122), no config.json #912 M1 10/10, #912 M2 11/11, #674 7/7, #673 3/3
node scripts/run-e2e-shard.js --validate exit 0 (also after the note edits)
node scripts/run-go-server-shard.js --validate exit 0
scripts/check-xss-sinks.sh --diff origin/master exit 0
cmd/ingestor not run: the PR does not touch cmd/ingestor/

Browser: 375×560, isMobile/hasTouch, a fresh profile, cold /, light and dark

How it was driven:

  • Taps: bottom nav → Live; then More → Customize → Display.
  • Live: an ADVERT A → B (1-byte) → C (2-byte) injected through Live's WS handler.
  • Customizer: a pick through the select, then a tap on the reset button.
  • Then: close, a second packet, a reload.

No config (server without config.json), 16/16 checks:

  • Home: mode mark, nothing stored, MC_get1ByteHopsDefault() null, no sideways scroll.
  • Live: show; a vertex on B, and A→B is not dashed.
  • Display tab:
    • labels Show / Mark uncertain hops (default) / Hide, and the Live hint is shown;
    • a pick (Hide) is stored and offers ↺ Use default;
    • the tap clears it, the select goes back to Mark, the focus stays on the select, and Live is Show again without a reload.
  • Reload: the same, with no page errors.

Operator default hide (a real config.json {"customizer":{"oneByteHopsDefault":"hide"}}, no interception), 16/16 checks:

  • Home: mode hide, nothing stored.
  • Live: hide; no vertex on B, and A→C is dashed.
  • Display tab:
    • Hide (server default) and no Live hint;
    • a Mark pick offers ↺ Use server default;
    • the tap goes back to Hide, with focus on the select, and Live is Hide again without a reload.
  • Reload: the same, with no page errors.

I looked at the screenshots: the hint and the "(default)" label read correctly in light, and "Hide (server default)" reads correctly in dark.

All local servers were stopped by port, and health checks afterwards confirmed they were down. All work was done in the worktree _wt-912-m2 and in scratch copies; test-fixtures/ is unchanged.

Notes

  • The PR body still describes the old behaviour in three places and needs editing:

    • "An absent key gives mark, as today";
    • "Always serve the effective value in the customizer block";
    • "CustomizerClientConfig.OneByteHopsDefault (json:"oneByteHopsDefault") is always present", and the table row "absent → mark".

    They should now say: absent → no key served, and Live Show / other pages Mark, as on master.

  • Not verified: staging, WebKit/Safari and real devices. The native select picker was driven with selectOption. No -race run and no per-shard coverage runs.

@dborup

dborup commented Nov 29, 2026

Copy link
Copy Markdown
Owner Author

Review — CS-VM1 PR#1001 — head 0c5ef4e

Dom: APPROVE with nits. R2 is closed with option (b) and works as described: an unconfigured instance now draws Live exactly as master does, and a configured value applies everywhere, Live included. N1, the label, the Go shape test and the phone flow check out, and every mutant I wrote is killed. The one nit (N2) is that the PR body still describes the round-2 behaviour. The author has already flagged this; it should be fixed before merge, but it is not a code issue.

Evidence labels: [T] = ran here, with the output checked. [K] = checked by reading code. [A] = an assumption or inference, not verified.

Trees tested

All work was done in git archive copies and one throw-away detached worktree of the merged tree, in a scratch directory. The worktree has been removed.

git ls-remote, before and after: 0c5ef4e3 on both the branch and pull/1001/head, unchanged. Master went e7b41e5b → ddb920db → 26e0d6cf (other PRs) [T].

Findings

# Severity Finding Evidence
N2 Nit (PR text, fix before merge) The PR body still describes round 2. The places that need updating:
• Plan 1: "An absent key gives mark, as today" and "Always serve the effective value";
• Changes: "CustomizerClientConfig.OneByteHopsDefault (json:"oneByteHopsDefault") is always present in the response";
• the requirements row "absent → mark", and mutant "G4 absent → """, which is now the correct behaviour.
The author lists these in the round-3 comment. The description is the first thing a reviewer reads (AGENTS.md rule 11), so it should say: absent → no key served, so Live gets Show and other pages Mark, as on master.
[K] PR body vs config.go / types.go at head
I1 Info (pre-existing, not this PR) On an unconfigured instance, a Live visitor cannot pick Mark directly.
• The select shows "Mark uncertain hops (default)" as selected on every page, including Live, where Live draws Show. The hint explains this ("Until you pick a mode here, the Live map shows every hop unmarked").
• A native picker fires no change when the already-selected option is chosen. To get Mark on Live, the visitor has to pick another mode first.
• Master behaves the same since #1004: its _renderHide1ByteHopsToggle also selects MC_get1ByteHopsMode() = mark. This PR does not change it.
• A possible follow-up, outside #912 M2's scope: have the Live page's select reflect MC_get1ByteHopsMode('show').
[K] master and head customize-v2.js; [A] native-picker change semantics (not tried on a real device). Playwright's selectOption fires change anyway, so my walk picks Hide (a real change) on the unconfigured server.
I2 Info clear1ByteHopsMode() sends detail.mode = "mark" on Live, where the effective mode is Show. This is harmless: no listener reads detail.mode, and Live reads the mode per packet through MC_get1ByteHopsMode('show'). [K] grep of mc-hide-1byte-hops-changed listeners: map.js, packets.js, customize-v2.js
I3 Info "oneByteHopsDefault": null (or "") counts as a configured, invalid value: one warning, then mark, not "absent". This is consistent with "the operator wrote the key" and is pinned by TestOneByteHopsDefaultValidation912 ("null", "empty"). [T] Go test; [K] applyOneByteHopsDefault

Answers to the review points

R2, option (b): the server serves only a configured oneByteHopsDefault. Done. [T]

  • Wire: a real server with no config.json sends "customizer":{"disabledTabs":[]}, with no oneByteHopsDefault. With a real config.json of {"customizer":{"oneByteHopsDefault":"hide"}}, it sends {"disabledTabs":[],"oneByteHopsDefault":"hide"} [T: curl].

  • [K] Code:

    • OneByteHopsDefault() returns "" unless the key was configured.
    • The tag is omitempty.
    • get1ByteHopsDefault() returns null with no operator default.
    • get1ByteHopsMode(fallback) = stored → operator → fallback → mark, and Live passes 'show'.
  • My A → B (1-byte) → C (2-byte) injection. Each run uses a fresh profile and a cold #/live at 375×560 with touch, and sends one ADVERT through Live's WS handler, on the same CI-style fixture:

    Server Result
    this PR, no config {"served":null,"live":"show","global":"mark","dflt":null,"vertexOnB":true,"abDrawn":true,"abDashed":false,"bcDashed":false,"acDashed":false,"anyDashed":false}
    master, no config the same drawing: vertexOnB:true, abDrawn:true, nothing dashed
    previous round's head abdff3f9 (my last review) abDashed:true,bcDashed:true: the regression that is now gone
    this PR, hide configured {"served":"hide","live":"hide","global":"hide","dflt":"hide","vertexOnB":false,"acDashed":true}. Configured hide applies on Live.

    On master my probe's live field reads mark, because master's MC_get1ByteHopsMode ignores the fallback argument; master's Live uses its own stored || 'show'. The drawing is what counts, and it is identical.

  • So an unconfigured instance with a fresh profile gives Live = Show and other pages = Mark, identical to master, and the owner's "Once M2 lands, the operator default decides the starting mode" (Live map: follow the 1-byte hop setting, operator default for it, and a working maxHopDist #912, 2026-11-28) holds for configured instances.

N1, the docs clause. Fixed. [T] [K]

  • docs/CUSTOMIZATION.md and the config.example.json comment now say that Mark marks only the uncertain inferred hops in the route view, while Live dashes every segment that touches any 1-byte hop.
  • That matches the drawing. In my Mark runs, both A→B and B→C are dashed, and C is a 2-byte hop [T].
  • config.example.json no longer sets the key, so a fresh staging config.json copied from it stays unconfigured [K].
  • docs/api-spec.md marks the field "optional; only when configured" [K].

The "(server default)" label. Correct in both cases. [T]

  • Unconfigured: Show / Mark uncertain hops (default) / Hide, the Live hint is shown, and the reset button reads ↺ Use default. This reads as on master, apart from the new button.
  • hide configured: Show / Mark uncertain hops / Hide (server default), the Live hint is hidden, and the button reads ↺ Use server default.
  • Both cases were checked in the DOM on all walk runs. I also looked at the screenshots in light and dark: the button sits directly under the select, readable, and clear of the footer and the bottom nav.

The Go shape test. TestClientConfigOneByteHopsDefaultShape912 covers:

  • the key absent for {}, for a block without it, and for a case-variant key;
  • the key served for show, mark and hide, and as mark for nope;
  • disabledTabs always present.

…IsANamedField912 pins the omitempty tag. Both pass [T] and are killed by my mutants GM1 and GM3 (below).

My own mutants for R2. All killed [T]. Details are in "Mutants".

  • "Serve mark when absent" (GM1):
    • 3 Go tests fail;
    • a server built from it serves "oneByteHopsDefault":"mark", and my probe gets Live = Mark with A→B and B→C dashed.
  • "Live ignores a configured hide" (JM1):
    • unit tests: M2 1 fails, M1 4 fail;
    • PR's M1 E2E: "oneByteHopsDefault "hide" … Hide on Live" fails with {"stored":null,"live":"show"};
    • my probe on a real hide server: live:"show", B drawn.

Phone walk: 375×560 cold start, no config, then operator default hide, Mark, "↺ Use server default". All runs pass, the last three on the re-merged tree; see the table below. [T]

Standing checks

Check Result
Every acceptance criterion has a red → green test Yes. Re-run this round [T]:
• PR unit suites against master's public/: M2 3 passed / 25 failed, M1 25 / 7;
• against abdff3f9's public/: M2 22 / 6 (the R2 tests, F3 null default, F5);
• green on the merged tree.
Go fails to compile against master (OneByteHopsDefault undefined); on round 2's behaviour it is red via GM1.
No behaviour change beyond the purpose Yes. An unconfigured instance draws as master on Live and other pages, and has master's labels and hint [T]. The intended changes are an explicit pick is always stored, plus the new reset button.
cmd/server read-only The Go change is config loading plus one response field. The added Go lines contain 0 Exec / INSERT / UPDATE / DELETE / RW tokens. The read-only tests pass [T].
No new map[string]interface{} outside tests 0 in added non-test Go lines [T]
No hard-coded colours 0 hex / rgb / hsl in added public/ lines. The button reuses cust-dl-btn, and the hint uses var(--text-muted) [T].
scripts/check-xss-sinks.sh --diff origin/master Exit 0, no findings, on the merged commit [T]
Fork guards .github/ identical to master: 9 in deploy.yml (8 if: and the header comment), 1 in release-fast-path.yml [T]
Closing keywords None in the 7 commits or in the PR body [T]
Commit author / committer dborup <kontakt@meshview.dk> on all 7 commits e60f62db..0c5ef4e3 [T]
TestGraphScore629_GoldenBitIdentical (linux/amd64) PASS on f44fa5ae and e0632be3 [T]
CI At my one REST check, every job on 0c5ef4e3 was success, including Go server shards 1–3 and Playwright shards 1 and 3. Playwright 2/3 was still in_progress, and Release Artifacts was skipped [T: anonymous API].

Tests run

Run Result
go vet (cmd/server, merged); gofmt -l on the 4 touched Go files ok; clean [T]
go test -count=1 -timeout 90m ./... (cmd/server, merged f44fa5ae) 1808 s; 4 failures, all time or cost budgets: TestAdvertIntervalAnalytics_AggregatePerf, TestProfileCard_Cost, TestCoverage941M2_PerfBudget, TestCoverage941_PerfBudget (504 terrain timeout). The two panic( lines are the neighbour-graph tests' deliberate, recovered panics (neighbor_graph_cache.go:109) [T].
The same budget set in isolation Merged: AggregatePerf, ProfileCard_Cost, Coverage941_PerfBudget fail. Clean master e7b41e5b: those three plus AdvertIntervalBucket_Perf and Coverage941M2_PerfBudget, a superset. Nothing is PR-caused [T].
go test -run 'OneByteHops|ClientConfig|ConfigClient|Customizer|ReadOnly|GraphScore629…' ok on f44fa5ae and e0632be3 [T]
cmd/ingestor Not run: the PR does not touch cmd/ingestor/ [T: diffstat]
sh test-all.sh (detached worktree of the merged commit) 379 passed, 7 failed of 386 [T].
• The 7: live-heard-filter, live-scope-color, 724-masts-hint, 728-ortho-base, 941-predicted-reach, 730-buildings-ui, 598-hop-path-inference.
• Each also fails in isolation on clean master, as a time budget. Examples: heard-filter 60.5 ms on 10k nodes, scope-color 437 ms vs 50 ms, buildings 103 ms vs 50 ms.
• This is the same set as last round.
node test-frontend-helpers.js 738 / 0 on f44fa5ae and e0632be3 [T]
Unit suites (merged) #912 M2 28/28, #912 M1 32/32, #674 16/16, Kpa-clawbot#1633 21/21, Kpa-clawbot#1496 27/27, #673 11/11, customizer-v2 66/66, #882 M2 29/29. On e0632be3, the first five and customizer-v2 are the same [T].
E2E: local Go server, e2e-fixture.db prepared as in CI, no config.json Fixture preparation: freshen, the Kpa-clawbot#1486/Kpa-clawbot#1791 seed SQL taken from deploy.yml, corescope-migrate, then seeds 2073, 199, 245, 122.
On f44fa5ae: #912 M2 11/11, #912 M1 10/10, #674 7/7, #673 3/3.
On e0632be3 (new master, fresh fixture): the same: 11/11, 10/10, 7/7, 3/3 [T].
E2E #882 M2 (touches customize-v2.js) 7 passed, 2 failed (dark palette timeout; deuteranopia slot colour), identical on clean master's server and public/. This is pre-existing and not related to this PR [T].

All servers were stopped by port (fuser -k). Health checks afterwards confirmed all 7 ports down, and no corescope-server process is left [T].

Mutants

JS, run against the #912 M2, #912 M1, #674, Kpa-clawbot#1633, Kpa-clawbot#1496, #673, customizer-v2 unit suites and the frontend helpers. The unmutated baseline was green [T].

Mutant Killed by
JM1: get1ByteHopsMode lets the caller's fallback beat the operator default (Live ignores a configured hide) M2 unit (1), M1 unit (4); PR's M1 E2E; my probe on a hide server
JM2: roles.js hands over oneByteHopsDefault || 'mark' (R2 reintroduced on the client) M1 unit (1); PR's M1 E2E cold-start step and "no default … Show on Live"; my probe (live:"mark", A→B dashed)
JM3: no "(default)" on Mark without an operator default M2 unit "R2 … reads as before M2"
JM4: the Live hint is not re-synced when the default arrives late M2 unit F3 "open customizer follows a client config…"
JM5: the reset button always says "Use server default" M2 unit (2)
JM6: get1ByteHopsDefault() returns mark when none is configured M2 unit (6)

Go, on a copy of the merged cmd/server with -run 'OneByteHops|ClientConfig|ConfigClient|Customizer'. The baseline was green [T].

Mutant Killed by
GM1: OneByteHopsDefault() returns mark when absent Validation912, CanonicalKeyOnly912, Shape912 (cfg {}: no default configured, but … = "mark"). As a built server, it also fails my probe: served:"mark", Live Mark, A→B dashed.
GM2: an invalid configured value is treated as absent ("") Validation912 (6 cases), Shape912
GM3: the client tag loses omitempty IsANamedField912, Shape912 (= "")
GM4: no warning for an invalid value Validation912 ("want exactly one … warning, got 0")

config.go and types.go were restored and checked with cmp [T].

Phone walk-through [T]

The setup:

  • Two real servers on the same CI-style fixture: one with no config.json, and one with {"customizer":{"oneByteHopsDefault":"hide"}}. There was no request interception.
  • Viewports and runs:
    • 375×560 (light and dark) and 360×640 (light), all with isMobile and hasTouch;
    • first on f44fa5ae, 6 runs, plus one extra unconfigured run picking Hide;
    • then 3 runs on e0632be3.
  • Every run starts from a fresh profile and a cold / (home, not a deep link).

How I drove it:

  • Taps: each tap is touchscreen.tap at the centre of the visible element. Before each tap the harness checks that the element is fully inside the screen and the visible part of .cust-body, above the bottom nav (unless it is in the nav or the More sheet), and that elementFromPoint hits it.
  • Scrolling: real CDP touch drags inside .cust-body, 3–4 per opening.
  • Picker: selectOption stands in for the native picker.
  • Live: packets are injected through Live's WS handler (a test seam).
Step No config: 375×560 light / dark, 360×640 hide configured: 375×560 light / dark, 360×640
1. Cold home: mode, nothing stored, no sideways scroll mark, default null ✓ hide ✓
2. Tap Live in the bottom nav; A → B (1-byte) → C Show: B drawn, nothing dashed ✓ Hide: no vertex on B, A→C dashed ✓
3. Tap More → Customize → Display; drag to the select (48 px) Mark uncertain hops (default), hint shown, no button ✓ Hide (server default), no hint, no button ✓
4. Pick a mode Mark (and Hide in the extra run): stored; ↺ Use default 106×29 px, on screen and on top ✓ Mark: stored; ↺ Use server default 146×29 px, on screen and on top ✓
5. Tap the visible ✕; inject on Live The picked mode is drawn (Mark: A→B and B→C dashed; Hide: B left out) ✓ Mark drawn ✓
6. Reopen by taps, drag, tap the reset button Nothing stored, back to mark, the button gone, focus on the select, labels unchanged ✓ Nothing stored, back to hide, the button gone, focus on the select ✓
7. Close; inject on Live, no reload Show again ✓ Hide again ✓
8. Reload The same, nothing stored, no sideways scroll ✓ ✓
9. Page errors none ✓ none ✓

All 10 runs pass all 9 steps. No step was impossible, and nothing had to be closed to reach the next control.

The screenshots were taken while the picker was open. The headless native drop-down list covers the area under the select, so I took two extra shots with the picker closed and a stored pick (deep link, for the picture only). They show the reset button cleanly under the select in light and dark.

Not verified

  • No staging. The plan's "default hide on staging, a fresh profile shows Hide on Live" was run only against a local server with a real config.json (above).
  • Browsers: Chromium with mobile emulation only. No WebKit/Safari and no real devices.
    • The native select picker was replaced by selectOption.
    • So I1's "no change on re-picking the selected option" is HTML behaviour I did not observe on a device [A].
  • CI-exact runs: no -race and no per-shard coverage runs. cmd/ingestor was not run.
  • Full suites on the newest master: go test ./... and test-all.sh ran on the e7b41e5b merge only. On e0632be3, I re-ran the targeted Go tests, the unit suites, the four E2E suites, the probe and three walks. 26e0d6cf (fix(mobile): keep the Packets header mirrors so the #740 M3b phone tap does not lose its button #1027) touches no file in this PR, and I did not test against it separately.
  • CI: Playwright shard 2/3 was still running at my one check.

@dborup
dborup marked this pull request as ready for review November 29, 2026 08:17
@dborup
dborup merged commit 440c419 into master Nov 29, 2026
33 of 36 checks passed
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