Uh oh!
There was an error while loading. Please reload this page.
feat(lint): the #8116 unprovisioned-anchor warning reaches filter and page-binding surfaces (#8340) - #8406
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
📓 Docs Drift CheckThis PR changes 1 package(s): 3 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also reference the affected code. These are read-only:
|
…r's return (#8340) The two new-suite helpers were annotated `{ rule: string }[]`, so every assertion past `.rule` was a TS2339 the package's own `typecheck` cannot see (its tsconfig excludes `**/*.test.ts`) but check:type-check-debt counts: 12 raw errors on top of @objectstack/lint's frozen TEST_DEBT of 20.
Uh oh!
There was an error while loading. Please reload this page.
Fixes#8340
What
The #8116 unprovisioned-anchor warning could not reach the filter surfaces. Its two rules resolve fields per object; the filter-position and page-binding checks judge a name against the object-independent
SYSTEM_FIELDSunion, which by design answers "could this name be a system column anywhere" and therefore never flags a system name. Sofilter: [['owner_id', '=', '…']]on a view, widget, page or flow bound to an ADR-0015externalobject linted clean while the runtime degraded exactly as #8116 describes: on SQLite, constant-false, HTTP 200, zero rows, no error.Four rules now ask the provenance question on the path where the existence check stays silent. Per the card's assumption 2, the blanket union is not replaced anywhere — it keeps owning every pass/fail decision, and #8340 only adds a question about a name it already decided not to flag:
dashboard-filter-field-unprovisioneddateRange/globalFilters[], afterfilterBindings) ANDed into a widget's analytics querypage-field-unprovisionedcheckFieldRefscore)react-chart-field-unprovisioned< ObjectChart aggregate>'sfield/groupByflow-template-field-unprovisioned{record.< anchor>}in a record-change flow on an external trigger objectfilter, the token erases the condition and the node refuses to run (framework#3810)All four are
warning, never gating — including in the two positions where the existence twin is anerror. #8116's severity reasoning is unchanged: the existence question has a closed oracle (the field is absent or it is not), the provenance one does not — this pass knows the platform provisions no storage, not what the deployment's remote schema holds.Shared, rather than four copies of one sentence:
indexUnprovisionedAnchors,unprovisionedAnchorCauseandunprovisionedAnchorHintinpackages/lint/src/system-fields.ts, over #8116'sunprovisionedInjectedColumnsFor. No new derivation — the spec predicate stays the single source (packages/specuntouched).Per-surface false-positive analysis
The card warned each rule's tolerance for unresolvable names differs. Measured, all four could adopt the per-object derivation, and none needed a new object binding:
dataset.object; the rule already skips when its fields are unknown in this stack. The anchor lookup rides the same skip.objectNameprop, already required by the existing checks.Two exclusions were kept everywhere: a dotted relationship path (engine-resolved, unjudgeable here) and an author-declared column of the same name, which is the author's real remote column (#7859) and never enters the set.
Tests
New named coverage per surface, each mutation-tested in both directions:
warns…test red and leaves theis silent…tests green;is silent on the local twin/author DECLARES the columntests red — and, as a bonus, three pre-existing false-positive-floor tests in other suites.pnpm --filter @objectstack/lint test— 72 files, 1996 passed, 4 skipped. Typecheck, eslint,check:cross-package-test-inputs,check:spec-parsed-alias,check:nul-bytes,check:changeset-gate-self-tests,check:objectui-changeset,check:query-options-erasure,check:type-check-coverage,check-changeset-no-majorall green locally.Notes for review
packages/lint/src/index.tsis one step beyond the card's declared file surface: the four new rule ids are exported there, assemantic-role-field-unprovisionedis. No other file outside the surface is touched.minorfor@objectstack/lint, following the finding: author-time expression validation resolves injected anchors on external objects but cannot warn they are unprovisioned — the #7865 provenance marker is unreachable from @objectstack/lint #8116 changeset and the other new-lint-rule changesets in.changeset/, not thepatchthe dispatch note guessed at.check:objectui-pin-freshis red locally, on repo state (.objectui-shalagging objectuimain) and not on anything in this diff — it is only triggered here because the workflow watches.changeset. Off the release lane CI runs it--advisory.searchableFieldsis a FIFTH blanket-SYSTEM_FIELDS read site — a declared anchor on an external object becomes a$searchFieldsnarrowing over a column with no storage #8404 (a fifth blanket-union read site,searchableFields), finding: #8116's two unprovisioned-anchor diagnostics still hand-copy the cause sentence #8340 centralized intosystem-fields.ts#8405 (finding: author-time expression validation resolves injected anchors on external objects but cannot warn they are unprovisioned — the #7865 provenance marker is unreachable from @objectstack/lint #8116's two originals still hand-copy the cause sentence).Generated by Claude Code
Generated by Claude Code