fix(spec): drop dead 'status' member from SEARCHABLE_ENUM_TYPES - #13728
Conversation
'status' is not a member of the 49-value FieldType enum, so it could never match a real field type — dead vocabulary in search-fields.ts (verified mechanically: FieldType has 49 members, 'status' is absent, 'select' is present; no in-flight plan for a status field type found). Adds a [#13695] pin asserting SEARCHABLE_ENUM_TYPES stays a real FieldType subset, scoped to that one set — it closes the probe gap that let this sit unnoticed (the existing [#6934] pins check the search vocabularies against each other, never against FieldType itself). A parallel ghost-member finding in SEARCH_AUTO_EXCLUDED_TYPES is out of scope for this fix and filed separately. Includes a patch changeset for @objectstack/spec. _Generated by [Claude Code](https://claude.ai/code)_
…archable-enum-dead-entry
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 126 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin d3dc761311d61ec556eefe2a25872451534605e4 && git checkout d3dc761311d61ec556eefe2a25872451534605e4
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 8fb2d295c70dd8c560451a8c5fb22e608de5fe53 80d2fb96d7ccf0314c7b4ad4a352a701a0578c46 && git checkout -B drift-repro 8fb2d295c70dd8c560451a8c5fb22e608de5fe53 && git merge --no-ff 80d2fb96d7ccf0314c7b4ad4a352a701a0578c46
node scripts/docs-audit/affected-docs.mjs --json 8fb2d295c70dd8c560451a8c5fb22e608de5fe53 |
Fixes #13695
SEARCHABLE_ENUM_TYPESinpackages/spec/src/data/search-fields.tsdeclarednew Set(['select', 'status']).'status'is not — and pergit logonfield.zod.tsand a repo-wide grep, has never been planned to become — amember of the 49-value
FieldTypeenum, so the entry could never match areal field's
type. Dropped it, leavingnew Set(['select']).Premise, verified mechanically (not read) on this checkout:
No in-flight plan for a
statusfield type: no hits infield.zod.ts'sgit log, no mention inpackages/spec/srcordocs//content/docs/.Clause-②: no accept/reject behaviour changes —
'status'never matchedanything, so every resolution
SEARCHABLE_ENUM_TYPESfeeds(
autoDefaultFields, the#4254REST ingress gate, the linter) isbyte-identical for every real object in the tree.
Pin added, scoped narrowly. The existing
[#6934]pins insearch-fields.test.tscheck the four search vocabularies(
SEARCHABLE_TEXTUAL_TYPES,SEARCHABLE_ENUM_TYPES,SEARCH_AUTO_EXCLUDED_TYPES,SEARCH_VIRTUAL_TYPES) against each other for pairwise disjointness, butnever against
FieldTypeitself — so a pure ghost member (matching nothing,as opposed to overlapping something) passed every one of them silently. This
adds a
[#13695]pin assertingSEARCHABLE_ENUM_TYPES ⊆ FieldType.Why the pin stops at this one set. Running the same membership check
against all four vocabularies during verification turned up 4 more ghosts in
SEARCH_AUTO_EXCLUDED_TYPES('object','grid','geometry','encrypted'— none is aFieldTypemember either). That's a larger, separatefinding — two of the four names read as plausible stale spellings of real
types (
geometry→location,encrypted→secret) rather than pure deadcode, so it needs its own triage rather than a drop-on-sight fix riding this
PR. Filed as #13716; left untouched here per clause-② guidance (a subset pin
that turns something else red is a stop-and-report, not a widen-the-fix).
Tests
pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/data/search-fields.test.ts— 25 passed (was 22; the 3 new assertions ran)pnpm --filter @objectstack/spec test— 444 test files / 11882 tests passed (post-merge-with-main count)pnpm --filter @objectstack/spec typecheck— clean (tsc --noEmit+ scripts + test-layer typecheck)pnpm --filter @objectstack/spec check:generated— all 14 generated artifacts up to date (re-verified after mergingorigin/main, which touchedpackages/specon its own side too)node scripts/pm/dispatch-gates.mjs(42 path-matched + 6 convention-triggered = 46 local gate commands, re-derived after the merge) — 40 passed; 6 NOT MEASURED, all "prerequisite not met" (never a red caused by this diff):check:dev-prereqs,check:dual-build-cjs-loads,check:type-check-debt,check:doc-formula-expressions— each refuses outright on an unbuilt 79-package workspacedist/closure (their own error text names this and says so explicitly); CI builds that closure as part of the required jobs.check:test-completeness.mjs— its own no-argument branch: it grades a savedturbo run testlog, and produces no log itself.pm/check-half-states.mjs— needs a repo-scoped GitHub REST read, which this container's egress proxy 403s (confirmed by hand:curlagainstapi.github.com/repos/.../issues/13695from this container returns the same 403 before any of this ran); its own text names this exact container class as the affected one.80d2fb96.Generated by Claude Code
Generated by Claude Code