Skip to content

[finding] No shipped boot path authors RestServerConfig at all — os serve fixes it and the dev plugin passes none, so every live crud / metadata / batch key is embedder-only #15543

Description

@claude

Filed unassigned and unlabelled for triage, from the capability-coverage work on #14961 (PR #15541). Not that PR's change and not addressed there.

Measured on origin/main 6f944589

RestServerConfig declares four sub-objects the REST server parses and consumes at construction — crud, metadata, batch, routes — with live keys that decide real behaviour: which CRUD and bulk routes are mounted, the data and metadata path prefixes, the batch size cap, and the ADR-0106 D8 object-schema masking posture.

No shipped boot path authors any of them.

  • packages/cli/src/commands/serve.ts constructs the plugin as createRestApiPlugin({ api: { api: { enableProjectScoping, projectResolution } } }) — the api sub-block only, and only those two keys, both derived from CLI flags.
  • packages/plugins/plugin-dev/src/dev-plugin.ts calls createRestApiPlugin() with no config at all.
  • The only doors that accept a full RestServerConfig are programmatic: createRestApiPlugin({ api }) (packages/rest/src/rest-api-plugin.ts) and createHonoServerPlugin({ restConfig }) (packages/plugins/plugin-hono-server/src/hono-plugin.ts).

So a deployment driven by the CLI cannot set batch.maxBatchSize, move crud.dataPrefix, disable a CRUD operation, or opt out of object-schema masking, however the schema documents those keys. Every value is whatever the Zod defaults say.

Why it is worth a decision

  1. The keys read as deployment policy and are not reachable as such. batch.maxBatchSize's own docblock calls the cap "deployment policy"; metadata.maskObjectFields's says false "opts this server out". Both are true only for an embedder.
  2. It sharpens [finding] The client SDK hard-codes /data/${object}… while crud.dataPrefix is live and discovery advertises routes.data = base + dataPrefix — a non-default prefix makes the SDK disagree with the mounts #14879 — the SDK hard-codes /data/... while crud.dataPrefix is live — by narrowing who can even reach the disagreement today.
  3. It sets the cost of testing them: the platform checklist now carries items for these keys (PR docs(qa): classify the five UNCLASSIFIED capability ledgers — four REST-config kinds authored, realtime_subscription waived #15541), and every non-default clause has to be scored in a unit harness rather than against a running deployment, which is recorded on each item's knownGaps.

Options (not decided here)

  1. Thread a config through — let the stack/app or a CLI flag supply a RestServerConfig (or the subset that is genuinely deployment policy: the cap, the prefixes, the masking opt-out).
  2. Rule it embedder-only and say so in the schema — the keys stay, their docblocks stop describing a deployment posture nobody can author from the CLI, and the ADR-0049 question "is this key reachable?" gets its answer written down.
  3. Retire the unreachable half under enforce-or-remove, keeping only what an embedder demonstrably uses.

⛔ Not a bug report against the keys' liveness: they are read, and the ledger's live verdicts are correct. The gap is between "read by the runtime" and "authorable by anyone shipping the runtime".

Where it is already captured

docs/qa/platform-checklist/FOLLOW-UPS.md §10b E2, and in the knownGaps of the three new api-backend.rest-*-config-contract items.


Generated by Claude Code

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions