Repository navigation
docs(deployment): name the /meta/diagnostics refusal of an unknown query parameter name - #27993
Conversation
…ery parameter name The route accepts exactly `type`, `severity` and `package`; any other name is refused 400 INVALID_REQUEST in the nested envelope instead of answering the full sweep, and that check runs before the repeated-parameter one. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYmTYfaPbLQD4BJfomW
|
domain:devx#2 · os-justin · session_01QSeKYmTYfaPbLQD4BJfomW 席位核对 — ACCEPT · domain:devx#2 · head
|
Fixes #27632
Clause-②: no
Metadata-protocol: none
维护者速读
validating-metadata.mdx的GET /api/v1/meta/diagnostics一节补一句:该路由只认type、severity、package三个参数名,其他参数名(如?typ=view)回 400INVALID_REQUEST,不再悄悄回全量扫描。content/docs/deployment/validating-metadata.mdxdiagnostics 一节表格下方第一段。git diff origin/main -- content/docs/deployment/validating-metadata.mdx,预期只见表格下方那一段改写,多出参数名拒收与先后顺序两句。What changes
The paragraph below the
GET /api/v1/meta/diagnosticsquery table incontent/docs/deployment/validating-metadata.mdxnow states the refusal PR #27913 added. Each clause is written from the code onorigin/main(fece78120c, which contains #27913's merge9cd54faae5):META_DIAGNOSTICS_PARAMS = ['type', 'severity', 'package']inpackages/rest/src/meta-collection-routes.ts. There is no wider declared set.?typ=view,?packageId=…) is refused with400 INVALID_REQUEST, even when its value is empty. The handler asksunknownQueryParamRefusalMessage(packages/rest/src/query-allowlist.ts) and throwsdiagnosticsRefusal.isDiagnosticsRefusalwrites it in the nested{ error: { code, message } }envelope. The message names the unknown parameter and the supported set (Supported parameters: package, severity, type.). The route no longer answers the full sweep.refuseRepeatedQueryParams, so an unknown name beside a repeated known one answersINVALID_REQUEST. A repeated known parameter alone still answersVALIDATION_ERROR.The page's existing sentence "Every refusal answers in the nested envelope" now covers the new refusal as well, because the new text sits before it.
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, in the[#27633]describe block) back each new clause:?typ=viewrefused with the supported set in the message,?packageId=refused, an unknown name with an empty value refused, an unknown name outranking a repeated one, and the three known names together answering 200.Acceptance notes
type,severity,package, and the rest of the declared set". The code declares exactly those three, so the page names three.Verification
Measured at head
5c6293d280(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 (+7 / -3).@objectstack/formula,@objectstack/lint, the spec declarations and the client SDK were not built:check:doc-formula-expressions,check:doc-security-posture,check:skill-examplesandcheck:docs-transcript-drift. One more,check:docs, refused with exit 1 becausepackages/spec/json-schemawas missing; that is a gitignored build artifact, not a finding.turbo run buildfor formula, lint and spec (VERDICT command-exit 0, 4/4 tasks), then the@objectstack/client-reactclosure (VERDICT command-exit 0, 38/38 tasks). All five gates then re-ran with exit 0.check:doc-authoring: exit 0 ("19837 customer-facing string(s) ... clean").check:nul-bytes: exit 0.dispatch-gates.mjs --repo objectstack-ai/objectstack --rananswered "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