docs(api): the batch cap is embedder-only, not the deployment's to configure - #17185
Merged
Conversation
…nfigure
`content/docs/api/data-api.mdx` told operators the bulk-route cap is "the
deployment's `batch.maxBatchSize` (default 200, configurable 1-1000)". Both
halves of that were ruled false on 2026-09-07: a `RestServerConfig` is the
ARGUMENT a host passes when it constructs the server, and there is exactly one
door -- `createRestApiPlugin({ api })`, whose `start()` is the only non-test
site reaching `new RestServer(...)`. Neither shipped boot path opens it with a
`batch` config: `os serve` forwards exactly two `api.*` keys and the dev plugin
passes none. A CLI-started deployment therefore always gets 200 and no flag,
config file or CLI option moves it.
The audience of this page is exactly the audience that cannot configure it, so
an operator who hit `400 BATCH_TOO_LARGE` was sent looking for a knob that does
not exist for them.
This is the third and last carrier of the claim still saying it in public; the
`packages/spec` and `packages/rest` carriers were corrected under the same
ruling. The wording here is copied from those two rather than invented afresh
-- "embedder-only", "written only by a host that constructs this config, never
by `os serve` or the dev plugin", and "a CLI-started deployment always gets the
default".
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012GKcPZbMoGq7WPzKLfRBTU
baozhoutao
marked this pull request as ready for review
September 9, 2026 15:33
baozhoutao
enabled auto-merge
September 9, 2026 15:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #16940
Clause-②: no — the whole diff is
content/docs/**; no contract surface is touched.What changed
One paragraph in
content/docs/api/data-api.mdx, section Batch size.Before:
After:
The wording was copied, not invented
The claim that this cap is "the deployment's" and reader-configurable was ruled false on 2026-09-07 (director seat, summon #17, decision batch #2, maintainer verbatim 「同意」). Two carriers were already corrected under that ruling, and this page is the third and last one still saying it in public. Every load-bearing phrase above is lifted from them:
packages/spec/src/api/rest-server.zod.ts, theWHO CAN WRITE THIS CONFIG (#15543)header — "every OTHER key here is EMBEDDER-ONLY"os serveor the dev plugin"content/docs/references/api/rest-server.mdx:287(auto-generated from thebatchblock's.describe()), verbatim: "embedder-only: written by a host that constructs this config, never byos serveor the dev plugin"packages/rest/src/rest-server.ts, theenforceBatchSizedocblock as #16801 left it, and themaxBatchSizeREACHABILITY row inpackages/spec/liveness/batch_endpoints.json1–1000range, now bound to the embedderenforceBatchSizedocblock — "The cap isRestServerConfig.batch.maxBatchSize(1..1000, default 200)"The range is kept rather than deleted because it is true for the embedder — the false part was addressing it to this page's reader, who is precisely the party that cannot reach it. It is now attached to the only party that can.
⭐ A FOURTH carrier was swept up — filed, not fixed here
content/docs/protocol/kernel/http-protocol.mdx:851, in the batch endpoint's Behavior list:Same defect in weaker form: it drops "the deployment's" and drops the range, but still tells the reader the cap is configurable and names the key, with no statement of who may write it. It is outside this PR's fenced landing surface (
content/docs/api/data-api.mdxalone), so it is filed as #17183 and left untouched here.maxBatchSize), so it never appears in thebatch.maxBatchSizepositive row — only in themaxBatchSizecontrol row, which was carried to prove the probe reaches the tree, not to enumerate carriers. ⇒ The control token, not the positive token, is what held it. That is the same shape as this card's own subject: a probe written over one spelling of a claim is not a probe over the claim.Token census — re-measured on this branch's base
content/only,git grep -o … | wc -l(hit counts, not file counts), onfd5cff209f:deployment policyenforceBatchSizebatch.maxBatchSizemaxBatchSize(control)RestServerConfig(control)Exact match with triage and with the PM's independent re-measurement. ⛔ The card-vs-triage offset of 1 on three tokens is not explained here and this seat was not asked to explain it; no explanation is invented.
Every other
maxBatchSizehit incontent/was adjudicated and is not a carrier:record-view-auditing.mdx(3, thereadAuditflush buffer),references/api/contract.mdx(3, the DataLoader key),references/system/tracing.mdx(1, the OTel span processor),references/api/{batch,protocol}.mdx(6, "server caps the count", asserting nothing about configurability, and auto-generated),references/api/rest-server.mdx(3, auto-generated and already correct).⛔ The docs-drift tool's green was not used as evidence
scripts/docs-audit/affected-docs.mjsreports 4 docs for the code-side change, all reached through the single symbol anchorRestServer, and this page is in neither list. That is structural: the page states the rule by its inputs, and the emitter's carrier is a private method (enforceBatchSize) no anchor kind reaches. A tool-reported 0 for a page of this shape is not a clean bill, so the sweep above was done by hand.Verification
node scripts/pm/dispatch-gates.mjs --commandsderived 39 commands; all 39 run green.node scripts/pm/dispatch-gates.mjs --ranreconciles: 39 derived, 39 run, 0 NOT-MEASURED, 0 UNRUN.PREREQUISITE NOT MET/ not-built refusals (exit 3, and exit 1 for two that refuse rather than measure). Those were read as NOT MEASURED — not as failures — and re-run green after building@objectstack/lint,@objectstack/formula,@objectstack/spec,@objectstack/clientand@objectstack/client-reactthrough the shared verify lock.RestServerConfigat all —os servefixes it and the dev plugin passes none, so every livecrud/metadata/batchkey is embedder-only #15543 and [finding]rest-server.ts#enforceBatchSizecalls the batch cap "deployment policy", but no shipped boot path can set it — the same defect #15543 just closed inpackages/spec, one package over #16801.No changeset — measured, not assumed
Nothing published moves.
content/sits in no package directory, so it cannot appear in any published package'sfiles[]; its only consumer,apps/docs(@objectstack/docs), isprivate: truewith nofiles[]at all. Precedent on the same class: PR #16938, acontent/docs/**-only prose correction, merged withskip-changesetand no changeset file. ⇒skip-changesetapplied.验收备注
content/docs/protocol/kernel/http-protocol.mdxcalls the batch cap "configurable viamaxBatchSize" — a FOURTH carrier of the claim #15543 / #16801 / #16940 corrected elsewhere #17183 —content/docs/protocol/kernel/http-protocol.mdx:851, the fourth carrier described above.content/docs/releases/v17/17-0.mdx:1734carries the claim once more ("stay underbatch.maxBatchSize(default 200, raisable to 1000"). RELEASE-OWNED — AGENTS.md forbids editing it in a code PR, and it needs a docs-only PR or its own card. Successor: whoever writes the next release-notes correction pass; it is also recorded inside [finding]content/docs/protocol/kernel/http-protocol.mdxcalls the batch cap "configurable viamaxBatchSize" — a FOURTH carrier of the claim #15543 / #16801 / #16940 corrected elsewhere #17183 so it does not depend on this PR being read.content/docs/releases/v17.mdx; no such file exists onfd5cff209f— the release page was split per minor (docs(releases): split the v17 page per minor, and draft the missing 17.4.0 section #17105) and the live path iscontent/docs/releases/v17/17-0.mdx. The claim is on one line there, not two as the card states — one sentence carrying both the key and the range. Successor: the same release-notes pass; recorded in [finding]content/docs/protocol/kernel/http-protocol.mdxcalls the batch cap "configurable viamaxBatchSize" — a FOURTH carrier of the claim #15543 / #16801 / #16940 corrected elsewhere #17183.content/docs/references/api/rest-server.mdxis auto-generated and already carries the corrected embedder-only wording at line 287, which is what made it usable as the copy source above. No action.Generated by Claude Code