Repository navigation
docs(deployment): name the /meta/diagnostics query refusals and the canonical stats key - #27959
Conversation
…anonical stats key Claude-Session: https://claude.ai/code/session_01QSeKYmTYfaPbLQD4BJfomW Co-authored-by: Claude <noreply@anthropic.com>
|
domain:devx#2 · os-justin · session_01QSeKYmTYfaPbLQD4BJfomW 席位核对 — ACCEPT · domain:devx#2 · head
|
domain:devx#2 · os-justin · session_01QSeKYmTYfaPbLQD4BJfomW
Refs #27632 (the #27620 half: the three value refusals and the canonical
statskey; the #27913 parameter-name refusal stays on the card until #27913 lands)Clause-②: no
Metadata-protocol: none
维护者速读
validating-metadata.mdx的GET /api/v1/meta/diagnostics参数表补上三种 400 拒收(未知type、severity、package),并说明stats按规范类型名作键。content/docs/deployment/validating-metadata.mdx的 diagnostics 一节(参数表与其后两段)。git diff origin/main -- content/docs/deployment/validating-metadata.mdx,预期只见该节的表格加一列、两段新文字。What changes
The
GET /api/v1/meta/diagnosticssection ofcontent/docs/deployment/validating-metadata.mdxnow states what the route does since #27620, each sentence written from the code onorigin/main(ed0e71db94):400 INVALID_REQUESTrefusal:severity: any value other thanerror/warning(packages/rest/src/meta-collection-routes.ts, the severity check).type: a misspelling of a declared type, whose message names the accepted spellings (canonicalizeMetaRequestTypeinpackages/metadata-protocol/src/protocol.ts), or a name that is neither a declared type nor in the deployment's live type set (refuseUnknownMetaListTypeinpackages/rest/src/meta-item-read-gate.ts). A live type outside the static contract still answers 200.package: a package that is not installed and that no swept item is bound to (packages/metadata-protocol/src/protocol-meta-diagnostics.ts). An installed package with no items answers zero counts.allsweeps every package (metaItemPackageBinding).{ error: { code, message } }envelope, and a repeated parameter answersVALIDATION_ERRORin the same envelope (refuseRepeatedQueryParams).statsand each entry'stypeuse the canonical type name, sotype=viewsanswers understats.view, the same astype=view(canonicalMetaUrlTypein the sweep).typeorpackageanswers the 400 rather than an empty sweep.Left out: the refusal of an unknown query parameter NAME (#27633 / PR #27913). That PR was still open on
origin/mained0e71db94when this branch was cut. Card comment 6514340216 carries the text to add once it lands.Tests
Docs only, so there is no test to run. The route's own pins in
packages/rest/src/rest-meta-diagnostics-unknown-params.test.ts(unchanged) back each documented clause: the three refusals, the near-miss message naming'view', the repeated-parameterVALIDATION_ERROR, the canonicalstats.viewfortype=views, and the preservation cases (empty severity,package=all, an installed package with no items, items bound to an uninstalled package, a live type outside the static contract).Acceptance notes
Verification
Measured at head
26a0c3bd1b(objectstack-ai/objectstack).Derived gate families: 43 derived, 43 run, all exit 0
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, exit 0, 43 commands, change set of 1 path (+15 / -7).@objectstack/formula,@objectstack/lintand client dist):check:doc-formula-expressions,check:doc-security-posture,check:skill-examplesandcheck:docs-transcript-drift. Afterturbo run buildof those closures under the verify lock (VERDICT command-exit 0, 38/38 tasks), all four re-ran with exit 0.check:doc-authoring: exit 0 ("70 published skill files clean", "19837 customer-facing string(s) ... clean").check:nul-bytes: exit 0.dispatch-gates.mjs --repo objectstack-ai/objectstack --ran(each line recorded with its exit code) answered "43 derived famil(ies) accounted for — 43 run, 0 NOT-MEASURED (a DERIVED zero — all 43 recorded an exit code and none of them is 3)".Not measured locally
Build DocsandPlan Test Core shardsjobs, and the type-check lanes. The derivation names no local invocation for them, so they are left to CI.Generated by Claude Code