Skip to content

fix(spec): drop dead 'status' member from SEARCHABLE_ENUM_TYPES - #13728

Merged
os-warren merged 2 commits into
mainfrom
claude/issue-13695-searchable-enum-dead-entry
Aug 31, 2026
Merged

fix(spec): drop dead 'status' member from SEARCHABLE_ENUM_TYPES#13728
os-warren merged 2 commits into
mainfrom
claude/issue-13695-searchable-enum-dead-entry

Conversation

@os-warren

Copy link
Copy Markdown
Collaborator

Fixes #13695

SEARCHABLE_ENUM_TYPES in packages/spec/src/data/search-fields.ts declared
new Set(['select', 'status']). 'status' is not — and per git log on
field.zod.ts and a repo-wide grep, has never been planned to become — a
member of the 49-value FieldType enum, so the entry could never match a
real field's type. Dropped it, leaving new Set(['select']).

Premise, verified mechanically (not read) on this checkout:

FieldType member count: 49
'status' in FieldType: false
'select' in FieldType: true

No in-flight plan for a status field type: no hits in field.zod.ts's
git log, no mention in packages/spec/src or docs//content/docs/.
Clause-②: no accept/reject behaviour changes — 'status' never matched
anything, so every resolution SEARCHABLE_ENUM_TYPES feeds
(autoDefaultFields, the #4254 REST ingress gate, the linter) is
byte-identical for every real object in the tree.

Pin added, scoped narrowly. The existing [#6934] pins in
search-fields.test.ts check the four search vocabularies
(SEARCHABLE_TEXTUAL_TYPES, SEARCHABLE_ENUM_TYPES, SEARCH_AUTO_EXCLUDED_TYPES,
SEARCH_VIRTUAL_TYPES) against each other for pairwise disjointness, but
never against FieldType itself — so a pure ghost member (matching nothing,
as opposed to overlapping something) passed every one of them silently. This
adds a [#13695] pin asserting SEARCHABLE_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 a FieldType member either). That's a larger, separate
finding — two of the four names read as plausible stale spellings of real
types (geometrylocation, encryptedsecret) rather than pure dead
code, 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 merging origin/main, which touched packages/spec on 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 workspace dist/ 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 saved turbo run test log, 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: curl against api.github.com/repos/.../issues/13695 from this container returns the same 403 before any of this ran); its own text names this exact container class as the affected one.
  • Ran at commit 80d2fb96.

Generated by Claude Code


Generated by Claude Code

claude added 2 commits August 31, 2026 08:08
'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)_
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to listnot 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
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.

Coarse fallback — 126 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 8fb2d295c70dd8c560451a8c5fb22e608de5fe53packageMentionDocs.

Which tree this was computed on

This run read content/docs from d3dc761311d61ec556eefe2a25872451534605e4 — the merge of head 80d2fb96d7ccf0314c7b4ad4a352a701a0578c46 into base 8fb2d295c70dd8c560451a8c5fb22e608de5fe53, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# 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

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

@github-actions github-actions Bot added documentation Improvements or additions to documentation protocol:data tests tooling labels Aug 31, 2026
@os-warren
os-warren marked this pull request as ready for review August 31, 2026 09:06
@os-warren
os-warren enabled auto-merge August 31, 2026 09:06
@os-warren
os-warren added this pull request to the merge queue Aug 31, 2026
Merged via the queue into main with commit cff17af Aug 31, 2026
35 checks passed
@os-warren
os-warren deleted the claude/issue-13695-searchable-enum-dead-entry branch August 31, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation protocol:data size/s tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[finding] SEARCHABLE_ENUM_TYPES contains 'status', which is not a member of the 49-value FieldType enum — dead vocabulary entry in search-fields.ts

2 participants