Repository navigation
docs(spec): a declared never-string-capable search column is admitted but contributes no clause - #29584
Conversation
… but contributes no clause The declared-branch comment in search-fields.ts and its test comment still called a declared json column "a scan that CAN match". Since the search expansion skips a column whose declared type can never hold a string (the text-operator door's door-refusal verdict), such a column is admitted to the set but contributes no clause, and a set made only of such columns answers no rows. Comment-only; no behaviour change. The docblock ships in the spec package's .d.ts, so a patch changeset rides. Claude-Session: https://claude.ai/code/session_01JQwxbWkmiSMGh5SFWcG7XY Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift Check
What this run could not see
Coarse fallback — 168 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
|
domain:spec#3 · os-warren · session_01JQwxbahe4v7GBD94QeSnir Contract reviewServed-tier: Inputs read: card #29546 body + its 3 comments (triage, claim, os-dev-report); PR #29584 body, file list (3 files), net diff against the merge-base ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Tried to break it:
Must-fix: none. Should-fix (none blocks; fold into a follow-up or a later touch of the same docblock):
Check-runs on the head at review time: 15 success, 0 failure, 36 in_progress (Test Core, Test UI, Type Check · workspace, the remaining lint families), 9 skipped. No gate family has refused the head; the running ones cannot be moved by a two-comment diff and a changeset, and the record stands on the diff and the cited code. Implemented-by: VERDICT: PASS Generated by Claude Code |
…omments - Drop the formula mention from the no-clause bullet: Filter 2 drops every formula before admission, so no formula reaches the expansion from the declared branch (same fix in the changeset bullet). - Say "substring scan" for the generic scan on the docblocks, and correct the SEARCH_VIRTUAL_TYPES docblock, which still said a declared json column is a scan that can match. - Test CONTROL comment: "single-valued" lookup, as in the docblock. Comment-only; no behaviour change. Claude-Session: https://claude.ai/code/session_01JQwxbWkmiSMGh5SFWcG7XY Co-authored-by: Claude <noreply@anthropic.com>
|
domain:spec#3 · os-warren · session_01JQwxbahe4v7GBD94QeSnir Contract review — deltaServed-tier: Closure of the prior should-fixes
New findingsNone. The delta is comment-only; no code line, test assertion, export or schema moves. Nothing in the new text contradicts Changeset editThe one-line change drops "or a Check-runs on the headRead on Implemented-by: VERDICT: PASS Generated by Claude Code |
|
domain:spec#3 · os-warren · session_01JQwxbahe4v7GBD94QeSnir 维护者速读
席位核对ACCEPT ·
Generated by Claude Code |
|
domain:spec#3 · os-warren · session_01JQwxbahe4v7GBD94QeSnir Landed · 2026-11-02T21:11Z
State change: Generated by Claude Code |
Requested by Warren · project thread
Fixes #29546
Clause-②: no
Metadata-protocol: none
Dispatched by
domain:spec#3 · os-warren · session_01JQwxbahe4v7GBD94QeSnir; dev = card threadsession_01JQwxbWkmiSMGh5SFWcG7XY.维护者速读
resolveSearchFieldResolution的 declared 分支说明和对应测试注释,改为「从不存字符串的列(如json)仍可声明、进入搜索集,但搜索展开不给它出子句」。$search展开跳过这类列,旧注释仍说 json 列「a scan that CAN match」,作者和 AI 会以为把 json 字段放进searchableFields能搜到东西。packages/spec/src/data/search-fields.ts(declared 分支两条列表项)、packages/spec/src/data/search-fields.test.ts(CONTROL 用例注释)、.changeset/29546-declared-search-column-no-clause-comment.md。git diff origin/main -- packages/spec/src只见注释行变化;pnpm --filter @objectstack/spec exec vitest run src/data/search-fields.test.ts应 50/50 通过。What changes
packages/spec/src/data/search-fields.ts, the declared-branch docblock onresolveSearchFieldResolution: a declaredlookuporjsoncolumn is ADMITTED to the set, and what it contributes is the expansion's call (expandSearchToFilter,@objectstack/objectql). A single-valuedlookupbecomes an$icontainsover the stored foreign key, a scan that can match. A column whose declared type can never hold a string (the text-operator door'sdoor-refusalverdict,textOperatorDoorVerdict) contributes NO clause, and a set made only of such columns answers no rows, never an error. Only "there is no column at all" is refused, as before. TheSEARCH_VIRTUAL_TYPESdocblock in the same file said the same stale json sentence; it now says a declared json or lookup column is admitted because a stored column exists. The generic scan word on Filter 2 and that docblock is now "substring scan".packages/spec/src/data/search-fields.test.ts, the CONTROL case comment: the same reading, single-valued lookup. The assertion is unchanged..changeset/29546-declared-search-column-no-clause-comment.md:@objectstack/specpatch. The docblock sits on an exported function and ships indist/data/index.d.ts(measured below), so the published text changes.Why
The declared-branch text is the written contract authors and AI read to decide what to put in
searchableFields. Since #29502 (#29394) the expansion skips never-string-capable columns, so "a scan that CAN match" forjsonwas false.lookupis inREFERENCE_VALUE_TYPES(verdictpasses), so it still matches and keeps that wording.Tests
pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/data/search-fields.test.tsat691a1581b: Test Files 1 passed (1), Tests 50 passed (50).pnpm --filter @objectstack/spec typecheckunder the verify lock:VERDICT command-exit 0.Acceptance notes
origin/mainff827bcf:packages/objectql/src/search-filter.tsfieldClausesForTermreturns no clause whenneverHoldsText(meta), which istextOperatorDoorVerdict(...) === 'door-refusal';jsonsits inSTRUCTURED_JSON_TYPES(verdictdoor-refusal). A single-valuedlookupfalls to the default$icontainsclause, so the old text also said$containswhere the expansion emits$icontains; the new text says$icontains.files[]ships) wins on conflict: afterpnpm --filter @objectstack/spec build,grep -c "contributes NO clause" packages/spec/dist/data/index.d.ts= 1 and the old phrase = 0 (positive control:SCANNABILITYhits the same file on the base build). So a patch changeset rides.packages/lint/src/validate-searchable-fields.tsdocblock (about L95 to L100) still says a declared json column is "a scan that CAN match". Outside this card's file surface; named in the report for the seat.691a1581: no formula in the no-clause bullet (Filter 2 drops every formula before admission), same in the changeset.packages/lint/CHANGELOG.mdandpackages/metadata-protocol/CHANGELOG.mdcarry the old phrase in released entries; release-owned, untouched.Verification
Gate union at head
691a1581b:dispatch-gates --commands / --ran
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 79 derived families, run from a runner writing one exit line each.pnpm check:dual-build-cjs-loadsexited 3, PREREQUISITE NOT MET (needs every package built). NOT MEASURED locally, left to CI.node scripts/pm/dispatch-gates.mjs --ran FILE --repo objectstack-ai/objectstack: exit 0, "79 derived famil(ies) accounted for, 78 run, 1 NOT-MEASURED".--ranprinted STALE TREE: baseff827bcfis 14 commits behindorigin/main; the 8 changed inputs arescripts/pmtooling, none reads this diff.turbo run buildfor objectql, lint, formula, client, client-react (38 tasks), then spec.Human Minimum
packages/specholds no runtime logic.pnpm lintpasses. (No formatter ran. Repo-widepnpm lintis CI's run, not run locally.)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01JQwxbWkmiSMGh5SFWcG7XY
Generated by Claude Code