# SPEC: scorpiox-scorpioplayer-native-handler-registry (row 22, `spnh_`)

The C side of the **NativeHandler escape hatch**: the named-function boundary where a
server-authored `SetttingsGroup` template stops being declarative and asks the app to *do*
something. Written before any C. Every decision cites the legacy C# it came from.

Spec corpora (read-only):

| Tag | Tree | Commit |
|---|---|---|
| core | `/codebases/bosxixi.toolkit/bosxixi.ScorpioPlayer.Core` | `0a8411d` (RuntimeConfigHandlers last touched `d0804eb` 2024-09-05, TableView.cs `820d6c0` 2024-07-24) |
| tplayer | `/codebases/tplayer/TPlayer` (UWP) | `71ca80f` (frozen) |
| ioslegacy | `/codebases/Platform/IOSLegacy/MoviesFinder` (Uno/Xamarin) | `663100c` |
| toolkit20 / std | `/codebases/bosxixi.toolkit20/Handlers`, `/codebases/scorpioxinc.toolkit.std` | `42ebda8` / `629de26` |

⚠️ **There is no independent oracle.** `NativeHandlers` is our own 2017 contract. The only
judges are the live templates (which say which names *must* exist) and the C# (which says what
each one did). Everything below is a reading of that C#, not a comparison with a third party.

## 1. Decision #1: registry, not implementation (the boundary)

**This repo is a registry plus the handlers that need no transport. It never links a protocol
client and never performs I/O.**

- The 134 names split into four kinds (measured, §7):
  `builtin` 9 · `connection` 33 · `service` 50 · `shell` 42.
- `connection` (`Test|Connect|Scan|Activate<X>Connection`) belong to the engine that speaks X.
  Tracker rule 3 forbids engine-to-engine links, and `sprch.h` (row 54) already gives every
  source engine a `validate()` which is the C twin of exactly these handlers
  (`runtime-config-handler-registry/SPEC.md §1`). The composing shell registers them here with
  `spnh_register("TestSMB2Connection", fn, ctx)` where `fn` calls the SMB2 engine's validate.
- `service` handlers (watchlist, enqueue, login, backup/restore, search …) need a backend
  client: registered by the shell from the relevant client engine.
- `shell` handlers (`UserPageAdvanceMenu`, `NetworkIndicator`, `PageNavigation`,
  `DocumentPicker`, context menus …) are navigation and platform UI. The shell owns them.
- `builtin`: the handlers whose C# is pure state manipulation, implemented here (§5).

Why: a registry that implements connection tests has to link libsmb2, libnfs, libssh2, curl …
That is the monolith the fleet exists to avoid. If libcurl ever appears in this Makefile the
boundary was drawn wrong.

A shell registers its own handlers **alongside** the built-ins, by name, and may **replace** a
built-in (C#: `NativeHandlers[name] = …` is an indexer assignment, last wins; the iOS
`NetworkPage.xaml.cs:51` re-registers `CancelNewServer` per page).

## 2. The invoke contract (`TableView.cs:549-580`)

C#: `Dictionary<string, Func<SetttingsGroupEventArgs, Task<NativeHandlerInvokeResult>>>`
(`tplayer Adapters/AI.cs:1036`, `ioslegacy Adapters/Class1.cs:1776`).

| C# `SetttingsGroupEventArgs` | C |
|---|---|
| `SelectedItem` | `spnh_arg_set_item(json)`; handler reads `spnh_item_get(field)` and may write `spnh_item_set` (C# mutates the item: `StringReplacement_Version`, `AI.cs:3200`) |
| `Group` | not passed as an object. The only thing any builtin reads from it is `Group.ID`, which is `RuntimeSettings["ID"]` when non-empty (`TableView.cs:349-358`). iOS passes `RuntimeSettings = ext.Container` = `RootSettings.RuntimeSettings` (`SettingsViewController.cs:139,1040`): **the group's settings and the args' settings are the same dictionary**. So `Group.ID` == `spnh_in_get("ID")` non-empty |
| `RuntimeSettings` | `spnh_arg_set(k,v)` / `spnh_arg_set_json`. Mutable. The handler writes with `spnh_set` |
| `UISource` | ⛔ never crosses into C |
| `Indicator` | `spnh_set_indicator_cb` (Start = 1, Stop = 0) |
| `Payload` | not modelled (only shell/service handlers read it: `ContextualEnqueue AI.cs:1226`) |

| C# `NativeHandlerInvokeResult` | C |
|---|---|
| `OK` | `spnh_result_ok()` |
| `Message` | `spnh_result_message()` (translated via the callback) + `_message_key()` |
| `Item` | `spnh_result_item()`: a follow-up Item the shell executes next (`SettingsViewController.cs:969-972`) |
| `Settings` | `spnh_result_setting_count/_setting(i)`: sections that replace the page (`:252-255`) |
| `DismissViewController` | `spnh_result_dismiss()` |
| `GoBack` | `spnh_result_go_back()` |
| `NewPage` | `spnh_result_new_page()`: a whole `SetttingsGroup` as JSON |
| `Events` (`RaiseReloadNeed`/`RaiseCloseNeed`) | `spnh_result_reload()` / intent `"close"`. An event hub cannot cross a C ABI; the handler states the intent, the shell raises it |

**Intent, never UI** (reproduced exactly): the vocabulary is `ok`, `dismiss`, `go_back`,
`reload`, `close`, plus `message`, `new_page`, `item`, `settings`. `spnh_result_intent(name)`
reads any of the booleans; unknown names are `ERR_INVALID_ARG`. It is not collapsed to a bool.

**`return null` is "no result"**: all counters 0, all strings NULL, `ok` 0. That is also what
the four reference handlers always return (§4).

## 3. RuntimeSettings: the real output

S1. **The handler mutates `RuntimeSettings` in place, and that mutation is the save.** All four
core handlers `return null` on every path (`SONARRRuntimeConfigHandler.cs:61,79`,
`IRuntimeConfigHandler.cs:64,82`, `MediaServerSettingsRuntimeConfigHandler.cs:82`,
`DebridServiceSettingsRuntimeConfigHandler.cs:84`). In C the caller reads the mutated map back:
`spnh_out_count/_key/_value`, `spnh_out_changed(key)`, `spnh_out_json()`.

S2. Dictionary semantics: ordinal keys (`"a"` ≠ `"A"`), insertion order, overwriting keeps the
first position (the .NET `Dictionary` indexer), values may be null (key present,
`TryGetValue` → null). `spnh_arg_set(k, NULL)` = C# null. There is no delete in the C# handlers;
`spnh_set(k, NULL)` sets null, it does not remove.

S3. `spnh_arg_set_json` takes a flat object. Strings as-is, numbers by raw text, `true`/`false`
as text, `null` as null; object/array values are refused (`ERR_INVALID_ARG`), the same rule as
`sprch_settings` (row 54 SPEC §4.1). Duplicate keys: last wins, first position.

S4. `spnh_out_changed(k)` = 1 if the key was added, its value changed (string compare, null ≠
"") or it was set null; 0 if identical; -1 if the key never existed on either side.

## 4. The four core reference handlers, and what they tell us

```
Indicator.Start()
  id = RuntimeSettings.TryGetValue("ID")
  config = RuntimeSettings.CreateSonarrConfig()
  if config.Host non-empty:            ← ⚠️ NRE when Host is empty (config is null) → catch → alert
      ok = await client.TestAsync(logger: list.Add)
      if ok:  RuntimeType, URL = config.Link, ID ||= Guid → alert(Success + log lines)
      else:   alert("1: " + Failed + log lines)
catch: alert(ex.Message)
finally: Indicator.Stop()
return null
```

S5. **ID is minted by the connection test, not by the save.** `ID ||= Guid.NewGuid()` happens on
a successful test (`SONARRRuntimeConfigHandler.cs:56-59`, `IRuntimeConfigHandler.cs:59-62`,
`MediaServerSettings…:55`, every toolkit20 handler e.g. `SMB2RuntimeConfigHandler.cs:165-168`).
`SaveNewServer` then refuses a group without an ID (`AI.cs:2943`, `Class1.cs:2890`:
`if (c?.Group?.ID is string str && str.IsNotEmptyItems()) … else Alert(UnableToSaveTest)`).
Order preserved: **test → ID → save**. C: `spnh_mint_id()` (ID ||= uuid, only if empty) and
`spnh_commit_connection(runtime_type, url)` which writes, in the C# order, `RuntimeType`, then
`URL` (if given), then `ID` (if empty).

S6. **`RuntimeType` is written by the handler**, not by the template (`SONARR…:54`). It is how
the saved config later selects its `IRuntimeConfigHandler` (row 54 dispatch).

S7. **The logger is a list of `ITranslatable`** (`SONARR…:50-51`, `RadarrV3.cs:44-73` logs
`RadarrV3_Get_Rootfolder`, `RadarrV3_Rootfolder`, …), each translated separately and joined with
`Environment.NewLine`. C: `spnh_log_add(key, display)`, `spnh_log_count/_key/_text`. The joined
alert is not rebuilt in C; each line stays separately addressable.

S8. **Alert and Translate are injected** (`NativeHandlerContext.cs:11-12`). Nothing in C
formats a user-visible string on its own. Every message is a `(key, display)` pair passed
through the translate callback (`IRuntimeConfigHandlerExtension.Translate`,
`SONARR…:11-14`: `TranslatableCallback?.Invoke(new Translatable{Key=str, DisplayName=str}) ?? str`).
No translate callback → the display text. The alert callback receives the translated text.

S9. **`"1: "` is a debugging leftover** (`IRuntimeConfigHandler.cs:68`, `SONARR…:65`,
`toolkit20 JackettRuntimeConfigHandler.cs:78`, and six `WriteMessage` calls in
`tplayer ContentDialogs/SambaDialog.xaml.cs` / `WebDAVDialog.xaml.cs`). **Recorded, not
reproduced.** C never prefixes a message.

S10. **`ERR_NOT_REGISTERED` ≠ `ERR_HANDLER_FAILED`.** The C# collapses "no such handler"
(`SettingsUIHelper.cs:450-459`: `ContainsKey` false → `Debugger.Break()` → `return null`;
`SettingsViewController.cs:1035` silently skips) and "it ran and said no" (`AlertCallback` +
`return null`) into the same null. C keeps them apart; an empty/NULL name is `ERR_INVALID_ARG`.

S11. A handler whose inputs are unusable returns `ERR_BAD_ARGS`. This is the C# NRE path: e.g.
`CreateSonarrConfig()` returns null for an empty Host and `config.Host` throws inside the try,
so the user saw the NRE message (`SONARR…:46-47,69-71`). C reports it, it does not throw.

### 4.1 Verdict: RADARR uses `CreateSonarrConfig()` — same shape, not a bug (today)

`IRuntimeConfigHandler.cs:49` (`RADARRRuntimeConfigHandler.TestRadarrConnection`) builds its
config with `CreateSonarrConfig()` and passes it to `RadarrV3`. `RuntimeSettingsParser.cs:20-44`:
`SonarrConfig`, `RadarrConfig` and `JackettConfig` are **empty subclasses** of
`StandardAPIKeyConfig`, and `CreatRadarrConfig` (sic) / `CreateSonarrConfig` /
`CreateJackettConfig` all copy the same five fields from the same private
`CreateStandardAPIKeyConfig` (`:55-87`). The live `newserver.json` Sonarr, Radarr and Jackett
pages carry the identical key set `CustomName Host Port APIKey UseHttps (QualityProfile)`.
**Proven identical: byte-for-byte the same settings shape.** It is a copy-paste smell (the
typo'd `CreatRadarrConfig` has exactly one reference in all corpora: its own definition), and it
would become a real bug the day a Radarr-only field is added. Same pattern in
`InstantDebridService.cs:104` (`GetRADARRAsync`).

Two things that *are* defects in `CreateStandardAPIKeyConfig`, recorded:
- F2: the port default is **9117** (Jackett's) for Sonarr and Radarr too (`:62`), and the live
  templates prefill **6800** (aria2's) on all three pages.
- F3: `Link` uses the **raw** `serverPort` string (`:82`) while `Port` is validated to 1-65534
  (`:78-81`). `Port="99999"` gives `Port=9117` but `Link="http://host:99999"`, and `Link` is what
  is written into `RuntimeSettings["URL"]`.

### 4.2 Finding F1 (real bug): `ValidateMediaServerSettings` calls the debrid service

`MediaServerSettingsRuntimeConfigHandler.cs:38` resolves `IInstantDebridService` and calls its
`ValidationAsync`, which POSTs to `{Host}/api/debrid/validation`
(`InstantDebridService.cs:55`). The media-server endpoint `/api/mediaserver/validation`
(`InstantMediaServer.cs:55-58`, `IInstantMediaServer.ValidationAsync`, `Utils.cs:521-527`) was
added **in the same commit** `a1103c2` ("IInstantMediaServer", 2024-09-05) and is **never
called** anywhere in any corpus. The file is a copy of the debrid handler with three
identifiers changed (`diff` of the two files: class name, `RuntimeType`, handler name). So the
media-server settings page has always been validated by the debrid endpoint.
C: the injected validation callback receives the **service name**; the builtin passes
`"mediaserver"` for `ValidateMediaServerSettings` (the evident intent) and `"debrid"` for
`ValidateDebridServiceSettings`. Divergence D1, deliberate.

### 4.3 `IRuntimeConfigHandler` is two interfaces

`IRuntimeConfigHandler.cs:8-16` has five members plus `RuntimeType`. In all four core
implementations `CreateRootFolder`, `CreatePlaybackStreamAsync`, `DownloadAsync` return `null`
and `InitDelegateMediaCategorizer` is empty (`SONARR…:20-35`, `IRuntimeConfigHandler.cs:22-38`,
`MediaServerSettings…:11-27`, `DebridServiceSettings…:13-29`): **4 of 5 members are null/empty
in 4 of 4**; only `InitNativeHandler` does anything. Across toolkit20 the split is visible
too: `ARIA2`, `Jackett`, `KeyVault`, `Synology` return null from `CreateRootFolder` while
`EXTDOC`/`ONEDRIVE` register **no** native handler. So the interface is:

1. a **storage provider** (`CreateRootFolder`, `CreatePlaybackStreamAsync`, `DownloadAsync`,
   `InitDelegateMediaCategorizer`): row 54 `sprch_handler` (`list`/`stream_url`/`download`) and
   the folder-model repos;
2. a **native-handler registrar** (`InitNativeHandler`): this repo.

Only the second belongs here. The connection-test half of (2) is `sprch_handler.validate`; this
repo is where a shell binds that validate to the template's handler name.

## 5. Built-in handlers (reference implementations)

| Handler | Legacy | C behaviour |
|---|---|---|
| `StringReplacement_Version` | `AI.cs:3198-3203` (UWP: `PackageVersion`), `Class1.cs:3888-3893`, `UserPage.xaml.cs:360-365`, `Platform.Shared ConstantValues.cs:2229` (iOS/Uno: `"v"+VersionString()`) | reads context `AppVersion` (required) and `Platform`. UWP → text as-is, every other platform → `"v"` + text. Sets `SelectedItem.Key` **and** `DisplayName`. No `AppVersion` → `ERR_NO_CALLBACK`. Returns null (no result) |
| `StringReplacement_TotalUsers` | **no implementation in any corpus** (8 refs in `dynamictemplates.json`, all `NativeHandlerPreProcess`, Keys `TotalCount`/`Overall`) | by analogy with `_Version`: context `TotalUsers` → Key + DisplayName. Missing → `ERR_NO_CALLBACK`. ⚠️ invented, D2 |
| `ResetAppSettings` | `AI.cs:3205-3209` → `Utils.cs:800-823` (a 3-button dialog, then `SettingService.Reset(roaming)` + `FavoritesService.Reset()` + restart) | ☢️ **never** touches a store. Empties the in-memory `RuntimeSettings` map passed by the caller (every key reported by `spnh_out_removed_count`) and returns `ok` + `reload` + message `WM_ResetAppTitle`. The confirm dialog, the roaming choice and the persistent reset are the shell's. See §8 |
| `SaveNewServer` | `AI.cs:2941-2975`, `Class1.cs:2888-2919`, `ConstantValues.cs:1068` | **validation half only**: `ID` non-empty? no → alert `SCORPIOX_Code_UnableToSaveTest`, return null (`ERR_HANDLER_FAILED`). Also refuses a missing `RuntimeType` (D3: the C# would persist a group no handler can load). yes → `OK`, message `SCORPIOX_Code_SaveCompleted`, `dismiss`, follow-up item `{"Type":"NativeHandler","DefaultValue":"NetworkPageReload"}` (exactly the C# result; no `Events`, so no `reload`). The persist (`ISettingsGroupStore.SaveGroupsAsync`) and the cloud copy (`SCORPIOX_Favorites_<UserID>_<ID>`) are the shell's |
| `CancelNewServer` | iOS `Class1.cs:2432-2437` `TryGoBack()`; UWP `SettingsUIHelper.cs:437-448` hide popup / `GoBackToRoot()` | intent `go_back` |
| `NewServer` | UWP `SettingsUIHelper.cs:386-400` returns `NewPage = newserver.json`; Droid navigates | if context `NewServerTemplate` is set (the shell puts the `newserver.json` text there) → `new_page` = it; else `ERR_NO_CALLBACK`. The template is not fetched here |
| `EnterEditMode` | `AI.cs:2212-2223`: if `Group.ID` non-empty → **nothing**; else alert `UnableToSaveTest` | the same, faithfully: ID → OK with no intent; no ID → `ERR_HANDLER_FAILED` + alert |
| `ValidateDebridServiceSettings` | `DebridServiceSettingsRuntimeConfigHandler.cs:33-85` | §5.1 with service `"debrid"`, RuntimeType `DEBRIDSETTINGS` |
| `ValidateMediaServerSettings` | `MediaServerSettingsRuntimeConfigHandler.cs:31-83` | §5.1 with service `"mediaserver"` (F1), RuntimeType `MEDIASERVERSETTINGS` |

### 5.1 The Validate*Settings flow

```
indicator(1)
id = in["ID"]
in["UserID"]    = context UserID      (IAppSettings.UserID, may be null)
in["ProfileID"] = context ProfileID   (int.ToString(); default "0")
request = {"IsOK":false,"Message":null,"RuntimeSettings":{…current map…}}   (DebridValidationPayload)
rc = validation_cb(service, request)          ← injected. No callback → ERR_NO_CALLBACK
rc < 0 / empty            → alert "Failed." ; ERR_HANDLER_FAILED               (:66-69)
IsOK true                 → merge response RuntimeSettings; RuntimeType; ID = id ?: uuid;
                            alert Success ; OK                                (:50-56)
IsOK false, Message set   → alert translate(Message) ; ERR_HANDLER_FAILED     (:60-63)
IsOK false, no Message    → silent ; ERR_HANDLER_FAILED
unparseable response      → alert "Failed." ; ERR_HANDLER_FAILED (C#: FromJSONObject returns null)
indicator(0)
```

☢️ `UserID`/`ProfileID` identify the user to a third party (`MediaServerSettings…:43-44`), and
the C# writes them into the saved settings as a side effect. Reproduced (they are part of the
observable output), but only from the **injected** context; `--test` injects fake values.
⚠️ the ID ordering differs from S5: here `ID = id.IfEmptyUse(Guid)` is assigned **after** the
merge, so a server-returned `ID` is overwritten by the caller's (or a fresh) one. Reproduced.

## 6. Error taxonomy

| Code | Value | When |
|---|---|---|
| `SPNH_OK` | 0 | |
| `SPNH_ERR_NOT_REGISTERED` | -1 | no such name at `spnh_invoke` / `spnh_unregister` |
| `SPNH_ERR_BAD_ARGS` | -2 | the handler ran, its inputs were unusable (§S11) |
| `SPNH_ERR_HANDLER_FAILED` | -3 | the handler ran and said no |
| `SPNH_ERR_NO_CALLBACK` | -4 | the handler needs an injected capability that is not installed |
| `SPNH_ERR_INVALID_ARG` | -5 | API misuse: NULL/empty name, invoke without begin, bad JSON, handler-side call outside an invoke |
| `SPNH_ERR_OOM` | -6 | |

`spnh_last_error()` carries the detail. Warnings (`spnh_warning_*`) collect non-fatal notes:
duplicate keys, a truncated scan, a template that is not an object.

## 7. The coverage question (offline)

`spnh_scan_template(json)` walks **every** object in the document (not only the rendered
`Settings/Items/Group` path) and counts each object whose `Type` string starts with
`NativeHandler` (ordinal, case-sensitive: `SettingsViewController.cs:1033` uses
`StartsWith("NativeHandler")`), taking the handler name from its `DefaultValue` (the invoked key:
`Utils.cs:270`, `SettingsViewController.cs:1035`). A whole-document walk is required: 364 of
the 1,129 live NativeHandler nodes live in `Extension.iOS.RightBarSettings` /
`CenterBarSettings` / `LeftBarSettings` bar buttons (`SettingsViewController.cs:207-258`), which
a Settings/Items walk misses. Empty `DefaultValue` nodes (111 live, mostly bar spacers) are
counted separately and name nothing.

`AdvanceMenu.NativeHandlerCode` is **not** a handler name: it is a parameter read *by* the
handler (`DocumentView`, `DynamicInvoke`, `APICall` are dispatched inside `UserPageAdvanceMenu` /
`DynamicAdvanceMenu`, `AI.cs:3423`, `:1269`; `ContextualEnqueue` uses it as a queue name,
`AI.cs:1230`). All 315 live `NativeHandlerCode` values sit on `NativeHandler*` nodes whose
`DefaultValue` is the real handler. Not counted as required. (`template-parse`'s `handler` field
falls back to it for non-NativeHandler types, R29; the live bundle has none.)

Measured on the live bundle (2026-09-26, 126 templates): **1,129 nodes, 134 distinct names,
1,018 named references, 111 empty**. `newserver.json`: 44 distinct handlers.
Of the 134, **110 have an implementation somewhere in the corpora and 24 have none** (the
template references a name no client registers; the click silently does nothing on every
platform, or hits `Debugger.Break()` in a debug UWP build).

## 8. ☢️ Destructive-export audit

| Export | Side effect | Guard |
|---|---|---|
| `ResetAppSettings` (builtin) | empties the **in-memory** map handed to `spnh_invoke`. No file, no store | nothing persistent exists to arm |
| `SaveNewServer` (builtin) | none; validation only | the persist is the shell's |
| `Validate*Settings` | calls the injected validation callback with the user's settings + UserID/ProfileID | no callback → `ERR_NO_CALLBACK`. `--test` installs a fake |
| connection tests | not implemented here | registered by the shell |
| every other export | in-memory only | |

**No export dials a host. No export touches the filesystem.** The engine has no socket, no
`fopen`, no curl; the CLI's `coverage` mode reads template files the user names (read-only).
Every outbound capability is an injected callback, and the harness injects fakes.

## 9. Injected UUID (determinism)

`Guid.NewGuid()` mints a server's permanent identity. C never reads `/dev/urandom` or the
clock: `spnh_set_uuid_cb` must be installed before any handler mints an ID; a mint with no
callback is `ERR_NO_CALLBACK` (and nothing is written). `--test` and the unit tests install a
counter (`00000000-0000-4000-8000-00000000000N`), so every run produces the same IDs.

## 10. Divergences (deliberate)

| # | C# | C | Why |
|---|---|---|---|
| D1 | `ValidateMediaServerSettings` posts to the debrid endpoint | passes service `"mediaserver"` | F1 |
| D2 | `StringReplacement_TotalUsers` unimplemented everywhere | implemented from context `TotalUsers` | 8 live refs; by analogy with `_Version` |
| D3 | `SaveNewServer` saves a group with an ID but no RuntimeType | `ERR_BAD_ARGS` | the saved config could never be dispatched |
| D4 | "1: " prefix | never | S9 |
| D5 | not-registered and failed both return null | two codes | S10 |
| D6 | NRE → alert(ex.Message) | `ERR_BAD_ARGS` + last_error, no alert | C does not format exception text for users |

## 11. Findings

- **F1** (real bug) `ValidateMediaServerSettings` validates against `/api/debrid/validation`; `IInstantMediaServer.ValidationAsync` is dead code (§4.2).
- **F2** Sonarr/Radarr default port 9117 (Jackett's); templates prefill 6800 (aria2's) on all three pages.
- **F3** `Link`/`URL` built from the unvalidated port string (§4.1).
- **F4** 24 of 134 referenced handlers have no implementation in any corpus, 228 references (§7, report table).
- **F5** RADARR builds its config with `CreateSonarrConfig()`: same shape, not a live bug; `CreatRadarrConfig` is dead (§4.1).
- **F6** `IRuntimeConfigHandler` is two interfaces (§4.3).
- **F7** `"1: "` debugging prefix shipped in 3 handlers + 6 dialog messages (S9).
- **F8** Platform.Shared (`FuncConverter.cs:204-209`) invokes `StringReplacement_Version` for **every** `NativeHandlerPreProcess` item regardless of its `DefaultValue`, so the 8 `StringReplacement_TotalUsers` items there display the app version.

## 12. Open questions (written down, not guessed)

- Q1 `ResetAppSettings`: should the C builtin empty the caller's map, or only return the intent? Chosen: empty it (the observable effect of "reset" on the settings the handler was given), intent `ok` + `reload`. The shell does the real reset.
- Q2 `NetworkPageReload` (the follow-up item of `SaveNewServer`) is a shell handler; the registry does not chain invocations. The shell executes `spnh_result_item()`.
- Q3 `Payload` is not modelled. Only `service`/`shell` handlers read it.
