Repository navigation
Description
Part of #1151.
Scope
An admin reads every setting of a worker or a gateway with GET /v1/settings or settings.get: its running, saved and default value, its kind, and whether a change applies live or on restart. Secrets say only whether they are set. Nothing changes a setting yet.
If this goes wrong, a secret shows on the wire, a setting is missing or listed twice, or a key is marked live that is not.
Technical spec
Commit 096519b.
Rows
- Behaviours: B1, B2, B3, B4, B5
- Interfaces: I1, I2, I3, I4, I5, I6, I7, I8
- Existing code: X1, X2, X3, X4, X5, X6, X15
Facts
none
Modules touched
Searches: configSchema, redactConfig, GATEWAY_CONFIG_KEYS, driversWithDefaults, CORE_ROUTE_SEGMENTS, getConfig in src and website.
src/core/settings-rows.ts(new),src/core/config.ts,src/core/config-role-checks.ts,src/core/index.ts: the rows, the closed lists, the gateway's keys exported.src/daemon/settings.ts(new),src/daemon/main.ts,src/daemon/worker-composition.ts,src/daemon/server-options.ts: the handle, built with the options the config was loaded with.src/contract/operations-admin.ts,src/contract/operations.ts,src/contract/protocol.ts;src/daemon/dispatcher.tsand its parts,src/daemon/server-requests.ts,src/gateway/dispatcher.ts: the operation.src/simlock-client/client-api.ts,src/simlock-client/client-impl.ts,src/simlock-client/client-degraded.ts,src/simlock-client/types.ts,src/admin/index.ts,website/src/content/docs/docs/reference/node-client.mdx:getSettings().src/http/admin-declarations.ts,src/http/app.ts: the route.website/src/content/docs/docs/worker/change-a-setting.mdx,website/src/content/docs/docs/reference/configuration.mdx.
Rules in play
- ADR 0099 §2, §4, §5 and §8: one resource, the rows from the config's shape and values, secrets, program keys, a gateway's own keys.
- ADR 0065: a driver's keys are carried unread; core names no driver key but the closed lists.
- ADR 0003 and
src/contract/AGENTS.md, "Adding an operation": matrices, protocol, both dispatchers, client, HTTP, website. - Documentation rule 9: the configuration pages say how to read settings over HTTP.
Tests
Seam: startDaemon through the admin client, the socket and createHttpApp (model: src/daemon/main-start-daemon.test.ts; HTTP: src/http/app-worker-routes.test.ts). Tests write config.json, not configOverrides.
- B1: An admin reads
GET /v1/settingson a worker and gets one row per setting with its kind, running, saved and default values and how it applies: a number key; an enum key with its values; a json key (warmPool.targets,capacity); a driver's key from the values (android.emulator.gpu); a module's key (capabilities.agent-device.command,machineOnly); adrivers.*key at its driver's default;http.proxyAuthas one row; an optional key unset (gateway.label, no values);android.emulator.coresunset (no row) and set (a row); nomoderow; a live key; a restart key; a key the file sets (inFile) and one it does not - B2: A secret row says only whether it is set: each of
gateway.token,gateway.headers,gateway.alerts.destinationsset and unset;gateway.tokenchanged in the file after start (set, pending); the answer's text holds none of the values - B3: A row says pending when the file differs from what runs: a restart key changed in the file after start (pending); a live key changed by hand (pending); the file no longer loads (
fileProblem, nosaved, not pending); an unknown key in the file (nofileProblem, as a start only warns); no file (savedis each default); the file unreadable (fileProblemthe error's message); afileProblemover 2000 characters (cut with…) - B4: A gateway lists only its own settings, and an agent is refused: gateway:
http.portandgateway.disconnectedRetentionMslisted;idle.shutdownAfterMs,gateway.token,gateway.headersandgateway.localLeasesnot; a module key the gateway ignores not,enabledandcapabilities.agent-device.leaseTtlCapMsonce set listed; an agent token 403; the call over the socket (getSettings()) - B5: The answer says where the console will be after a restart: HTTP on: the address of the saved
httpvalues; HTTP off in the file:null; the file does not load: the running address
Done when
settings.getis in the role and effect matrices ofsrc/contract/operations.test.ts.- A test fails when
redactConfigmasks a key the secret list does not hold, or the other way round. - The website build and its HTTP API check pass, and the HTTP reference lists
GET /v1/settings.
Out of scope
- Changing a setting (Settings: change settings through the daemon with PATCH /v1/settings, live where it can #1154), restarting (Settings: restart the daemon with POST /v1/restart and simlock daemon restart #1155), the console (Console: edit settings and restart the daemon from the Settings page #1156).
- A CLI command that lists settings.
Depends on
none
Written by an agent.
Activity
[-]Settings: read every setting through GET /v1/config[/-][+]Settings: read every setting through GET /v1/settings[/+]V3RON commentedon Dec 1, 2026
Maintainer decision (2026-12-01): #1153 no longer depends on #1907. Their only shared point is the protocol number (
PROTOCOL_VERSION_RANGE): whichever merges second takes the next number.Written by an agent.
test: the settings rows prove the live list, a secret removed from th…
fix(settings): fileProblem hides the loader's text for a secret key; …
fix(settings): the config settings use the shared errorMessage unwrap (…
fix(settings): canonical compares by the schema's key order, since no…
fix(settings): canonical ignores object key order again, with a test …
fix(settings): drop the vacuous pass-through half of the canonical te…
V3RON commentedon Dec 2, 2026
Handoff
Done
The whole #1151 stack is reviewed and ready, bottom to top: #1989 (ADR 0099, flipped to Accepted) → #2012 (#1153) → #2016 (#1154) → #2028 (#1155) → #2035 (#1156). It was synced with
mainat 12:29 on 2026-12-02, and the pre-push checks passed. #1989 is green.Not done
The merge. The gate stopped at #2012. CI on #2012 to #2035 was still running after the sync.
Findings
None new. Two decisions are pending the maintainer: B7's test surface (PR #2016) and Retry over an open dialog (PR #2035).
Blocked on
fast-track: #1153 held: its reporter leonardoxr cannot write to the repo, so the maintainer merges PR #2012.The maintainer merges the stack (merge-pr.sh 2035gates and merges every PR in it), or removes the label the held line names.Written by an agent.