Observed while implementing #8404, which was directed to mirror #8340's parameter shape. Filed as an observation; not fixed, since #8404's scope was its own module and this comment lives in validate-page-field-bindings.ts.
The claim
packages/lint/src/validate-page-field-bindings.ts:350-357, documenting checkFieldRefs' optional trailing unprovisionedAnchors parameter, ends:
Every in-repo caller passes it; check-cross-package-test-inputs is what would notice if one stopped.
Why it appears to be wrong
scripts/check-cross-package-test-inputs.mjs is a CI input-scoping gate. Its own header states its purpose: keep CI's idea of a test's inputs equal to the test's real inputs, for tests that read outside their own package, by driving turbo's affected-package set (layer A) and the task-cache hash (layer B) from a declared glob list. It reasons about which packages CI runs and how the cache is keyed. It does not inspect call sites and has no view of argument passing.
Its @objectstack/lint entry (:117-126) declares globs for packages/cli/src/commands/**, packages/metadata-protocol/src/**, packages/objectql/src/validation/** and packages/services/service-automation/src/** — the radius of authoring-rule-wiring / validate-rule-compilability / lint-startup-registry-verdict.corpus. Nothing in that entry concerns the anchor index or the rules that consume it.
So an in-repo caller silently dropping the argument would, as far as I can tell, be caught only by a behaviour test that goes through the top-level validate* entry point — not by this gate.
Why it is worth correcting rather than ignoring
The sentence is load-bearing as a maintenance instruction: it tells the next author that the wiring is machine-guarded, which is exactly the belief that stops someone writing the test that really guards it. It also propagates — #8404 was dispatched with instructions to mirror this comment block, and the claim would have been copied verbatim into a sixth module had it not been checked. (In #8404's implementation the sentence was replaced with one naming the two in-repo callers explicitly, and the wiring is pinned instead by tests that run through validateSearchableFields, which builds and threads the index.)
Suggested disposition
Either correct the sentence to name what actually guards the wiring, or add the guard it claims exists. Worth checking the other three #8340 modules for the same copied sentence at the same time.
Related: #8340, #8404, #7802 (the gate's actual origin).
Observed while implementing #8404, which was directed to mirror #8340's parameter shape. Filed as an observation; not fixed, since #8404's scope was its own module and this comment lives in
validate-page-field-bindings.ts.The claim
packages/lint/src/validate-page-field-bindings.ts:350-357, documentingcheckFieldRefs' optional trailingunprovisionedAnchorsparameter, ends:Why it appears to be wrong
scripts/check-cross-package-test-inputs.mjsis a CI input-scoping gate. Its own header states its purpose: keep CI's idea of a test's inputs equal to the test's real inputs, for tests that read outside their own package, by driving turbo's affected-package set (layer A) and the task-cache hash (layer B) from a declared glob list. It reasons about which packages CI runs and how the cache is keyed. It does not inspect call sites and has no view of argument passing.Its
@objectstack/lintentry (:117-126) declares globs forpackages/cli/src/commands/**,packages/metadata-protocol/src/**,packages/objectql/src/validation/**andpackages/services/service-automation/src/**— the radius ofauthoring-rule-wiring/validate-rule-compilability/lint-startup-registry-verdict.corpus. Nothing in that entry concerns the anchor index or the rules that consume it.So an in-repo caller silently dropping the argument would, as far as I can tell, be caught only by a behaviour test that goes through the top-level
validate*entry point — not by this gate.Why it is worth correcting rather than ignoring
The sentence is load-bearing as a maintenance instruction: it tells the next author that the wiring is machine-guarded, which is exactly the belief that stops someone writing the test that really guards it. It also propagates — #8404 was dispatched with instructions to mirror this comment block, and the claim would have been copied verbatim into a sixth module had it not been checked. (In #8404's implementation the sentence was replaced with one naming the two in-repo callers explicitly, and the wiring is pinned instead by tests that run through
validateSearchableFields, which builds and threads the index.)Suggested disposition
Either correct the sentence to name what actually guards the wiring, or add the guard it claims exists. Worth checking the other three #8340 modules for the same copied sentence at the same time.
Related: #8340, #8404, #7802 (the gate's actual origin).