Found while taking the measurement for #5899 (see PR #6284 for the full population). Filed unassigned as an observation, for PM triage. Not fixed there — out of that card's scope.
The situation
packages/plugin-grid/src/hooks/useRecordCrudVerdicts.ts:74 declares the server's batch cap locally, and its own doc comment states the condition under which it should stop existing:
Declared locally because the pinned @objectstack/spec@17.0.0-rc.6 predates the batch form and exports neither the constant nor the request/response types; the pin bump (objectui#4636) supersedes this declaration.
const EXPLAIN_BATCH_MAX_RECORD_IDS = 200;
That condition has been met. The tree's pin is now @objectstack/spec@17.2.0, and @objectstack/spec/security exports:
declare const EXPLAIN_BATCH_MAX_RECORD_IDS = 200
Verified by resolving the installed package and reading the export, not by reading the changelog.
Why it matters, and why it is not urgent
The values agree today, so nothing is broken right now. What is broken is the guarantee: this is a hand copy of a server contract constant whose whole point is that over-cap requests are refused with 400 VALIDATION_FAILED rather than truncated. If the server relaxes or tightens the cap and the spec follows, the local 200 keeps the client paginating at the old boundary with no signal anywhere — a faithful copy passes every value comparison, which is the reference-identity argument scripts/check-spec-symbol-derivation.mjs's own header makes.
The declaration is also self-documenting about this: it does not claim to be canonical, it claims to be temporary. It has simply outlived the reason.
Why nothing caught it
check-spec-symbol-derivation.mjs rule 1 flags a local symbol declared under a name the spec exports — which is exactly what this is, now that the spec exports the name. It could not see it: both scanners skip non-exported declarations, and this const is module-local. That hole is #5899's subject.
Fix shape
Import the constant from @objectstack/spec/security and delete the local declaration (keeping the useful half of the comment — why the cap exists and what the server does with an over-cap request). Worth checking whether the request/response types the same comment mentions are now exported too, and whether WireRecordVerdict just below it can go the same way.
Measured on a76b18cf2 against @objectstack/spec@17.2.0.
Related: #5899 (the instrument hole that hid it), PR #6284 (the census), #4636 (the pin bump this declaration named as its own successor).
Found while taking the measurement for #5899 (see PR #6284 for the full population). Filed unassigned as an observation, for PM triage. Not fixed there — out of that card's scope.
The situation
packages/plugin-grid/src/hooks/useRecordCrudVerdicts.ts:74declares the server's batch cap locally, and its own doc comment states the condition under which it should stop existing:That condition has been met. The tree's pin is now
@objectstack/spec@17.2.0, and@objectstack/spec/securityexports:Verified by resolving the installed package and reading the export, not by reading the changelog.
Why it matters, and why it is not urgent
The values agree today, so nothing is broken right now. What is broken is the guarantee: this is a hand copy of a server contract constant whose whole point is that over-cap requests are refused with
400 VALIDATION_FAILEDrather than truncated. If the server relaxes or tightens the cap and the spec follows, the local200keeps the client paginating at the old boundary with no signal anywhere — a faithful copy passes every value comparison, which is the reference-identity argumentscripts/check-spec-symbol-derivation.mjs's own header makes.The declaration is also self-documenting about this: it does not claim to be canonical, it claims to be temporary. It has simply outlived the reason.
Why nothing caught it
check-spec-symbol-derivation.mjsrule 1 flags a local symbol declared under a name the spec exports — which is exactly what this is, now that the spec exports the name. It could not see it: both scanners skip non-exported declarations, and this const is module-local. That hole is #5899's subject.Fix shape
Import the constant from
@objectstack/spec/securityand delete the local declaration (keeping the useful half of the comment — why the cap exists and what the server does with an over-cap request). Worth checking whether the request/response types the same comment mentions are now exported too, and whetherWireRecordVerdictjust below it can go the same way.Measured on
a76b18cf2against@objectstack/spec@17.2.0.Related: #5899 (the instrument hole that hid it), PR #6284 (the census), #4636 (the pin bump this declaration named as its own successor).