Skip to content

Settings: read every setting through GET /v1/settings #1153

In review

Description

@leonardoxr

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.ts and 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/settings on 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); a drivers.* key at its driver's default; http.proxyAuth as one row; an optional key unset (gateway.label, no values); android.emulator.cores unset (no row) and set (a row); no mode row; 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.destinations set and unset; gateway.token changed 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, no saved, not pending); an unknown key in the file (no fileProblem, as a start only warns); no file (saved is each default); the file unreadable (fileProblem the error's message); a fileProblem over 2000 characters (cut with …)
  • B4: A gateway lists only its own settings, and an agent is refused: gateway: http.port and gateway.disconnectedRetentionMs listed; idle.shutdownAfterMs, gateway.token, gateway.headers and gateway.localLeases not; a module key the gateway ignores not, enabled and capabilities.agent-device.leaseTtlCapMs once 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 http values; HTTP off in the file: null; the file does not load: the running address

Done when

  • settings.get is in the role and effect matrices of src/contract/operations.test.ts.
  • A test fails when redactConfig masks 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

Depends on

none

Written by an agent.

Activity

  1. added
    task:draft
    on Nov 5, 2026
  2. changed the title [-]Settings: read every setting through GET /v1/config[/-] [+]Settings: read every setting through GET /v1/settings[/+] on Nov 30, 2026
  3. added
    task:ready
    and removed
    task:draft
    on Nov 30, 2026
  4. V3RON commented on Dec 1, 2026

    @V3RON
    Contributor

    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.

  5. self-assigned this
    on Dec 1, 2026
  6. V3RON commented on Dec 2, 2026

    @V3RON
    Contributor

    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 main at 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 2035 gates and merges every PR in it), or removes the label the held line names.

    Written by an agent.

  7. added
    task:blocked
    and removed
    task:ready
    on Dec 2, 2026
  8. removed their assignment
    on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    task:blocked

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions