You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs(deployment): name the /meta/diagnostics query refusals and the canonical stats key - #27959
Refs #27632 (the #27620 half: the three value refusals and the canonical stats key; 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 按规范类型名作键。
The GET /api/v1/meta/diagnostics section of content/docs/deployment/validating-metadata.mdx now states what the route does since #27620, each sentence written from the code on origin/main (ed0e71db94):
The query table gains a column naming each parameter's 400 INVALID_REQUEST refusal:
severity: any value other than error / warning (packages/rest/src/meta-collection-routes.ts, the severity check).
type: a misspelling of a declared type, whose message names the accepted spellings (canonicalizeMetaRequestType in packages/metadata-protocol/src/protocol.ts), or a name that is neither a declared type nor in the deployment's live type set (refuseUnknownMetaListType in packages/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. all sweeps every package (metaItemPackageBinding).
An empty value keeps the default. Every refusal uses the nested { error: { code, message } } envelope, and a repeated parameter answers VALIDATION_ERROR in the same envelope (refuseRepeatedQueryParams).
stats and each entry's type use the canonical type name, so type=views answers under stats.view, the same as type=view (canonicalMetaUrlType in the sweep).
The CI-gate sentence now says that a misspelled type or package answers 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/mained0e71db94 when 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-parameter VALIDATION_ERROR, the canonical stats.view for type=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
No finding filed.
Verification
Measured at head 26a0c3bd1b (objectstack-ai/objectstack).
Derived gate families: 43 derived, 43 run, all exit 0
Derivation: node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, exit 0, 43 commands, change set of 1 path (+15 / -7).
Each command's exit code was written to disk before any pipe. On the first pass, four gates refused with exit 3, PREREQUISITE NOT MET (unbuilt @objectstack/formula, @objectstack/lint and client dist): check:doc-formula-expressions, check:doc-security-posture, check:skill-examples and check:docs-transcript-drift. After turbo run build of those closures under the verify lock (VERDICT command-exit 0, 38/38 tasks), all four re-ran with exit 0.
Reconciliation: 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
NOT MEASURED: CI's Build Docs and Plan Test Core shards jobs, and the type-check lanes. The derivation names no local invocation for them, so they are left to CI.
Shape: draft → main, Refs #27632. The seat changed it from Fixes in this act, because the card keeps the #27913 item. 1 file, +15/−7. Labels documentation, size/s, skip-changeset. Non-governed; the seat lands it. Report 6515458646, claim 6515191967.
Sentences checked against the code (content/docs is a prose face, checked here at ACCEPT):
severity: any value other than error or warning is refused. An empty value keeps error.
type: a near-miss of a declared type is refused by canonicalizeMetaRequestType, with the accepted spellings named. A name that is neither declared nor live is refused by refuseUnknownMetaListType after the sweep. A live type outside the static contract still answers 200, and the table's wording ("neither a declared type nor a type this deployment carries") matches that.
package: refused only when the package is not installed and no swept item is bound to it, in protocol-meta-diagnostics.ts. all or an empty value sweeps every package.
Envelope: every classified 400 leaves through isDiagnosticsRefusal as nested { error: { code, message } }. A repeated parameter answers VALIDATION_ERROR in the same shape.
stats and entries[].type: both are keyed by canonicalMetaUrlType, pinned in rest-meta-diagnostics-unknown-params.test.ts.
Gates: on head 26a0c3bd1b, 49 check-runs: 30 success, 19 skipped, 0 failure; mergeable_state: clean. check-expected-skips --pr 27959: OK, all 19 skips are in main's roster (exit 0). check-governed-merges --pr 27959: NOT governed, 22 changed lines. Dev's union: 43 derived, 43 run, all exit 0.
Out of scope: none. #27913's parameter-name refusal stays on #27632 (comment 6514340216 carries the text).
Landing: non-governed, 22 changed lines. In this act the seat readies the PR and arms auto-merge. On merge, the seat verifies the merged diff and releases #27632 as a partial landing. The card goes to pm:blocked with Blocked-by: PR #27913 for the remaining sentence.
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
documentationImprovements or additions to documentationsize/sskip-changesetPR has no user-facing published change; bypasses the changeset gate
1 participant
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.
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