Skip to content

Commit 38717d3

Browse files
fix(spec): repoint the query.searchFields liveness row at engine-find.ts#expandSearchOnAst (#30368)
<!-- claude-projects-attribution: {"github_login":"os-bill"} --> _Requested by **Bill** · [project thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wg1KEKUvnWZ8oYQ388cWv3dF)_ Fixes #30367 Refs #30053 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:`packages/spec/liveness/query.json` 里 `searchFields` 一行的证据第一段从 `engine.ts#expandSearchOnAst` 改指 `engine-find.ts#expandSearchOnAst`,note 补一句为什么改;加一个 `@objectstack/spec` patch changeset(liveness 目录随包发布)。 - 为什么改:#30341(#30053 第一片)把 `engine.ts` 里最后一处提到 `searchFields` 的私有 docblock 搬进了手写模块,`check:liveness` 要求被引文件提到键名,于是 main 红了(Spec Liveness Check 不是必需检查,所以 #30341 照样合并了;Lint UI 会跑它)。函数体从 codemod 拆分起就在 `engine-find.ts`,那里提到 `searchFields`。没有在 `engine.ts` 里硬加一处提及。 - 风险与回滚:只改台账证据文本,无运行时改动;回滚就是 revert。 - 两分钟验证:`pnpm --filter @objectstack/spec check:liveness`,退出码 0。 ## What changes - `packages/spec/liveness/query.json`, row `query.searchFields`: the evidence's first leg cites `packages/objectql/src/engine-find.ts#expandSearchOnAst` (was `engine.ts#expandSearchOnAst`). The note gains one sentence dated 2026-11-05 on why. The other two legs are unchanged. - `.changeset/30053-liveness-search-fields-repoint.md`: `patch` on `@objectstack/spec`, because `liveness/` ships in the package's `files`. ## Why `check:liveness` requires every cited file to name the property it is evidence for. On `main` `f672e0dc` it fails: `query/searchFields → packages/objectql/src/engine.ts`. The first slice of the hand-series docblock move (#30341) moved the private docblock that named `$searchFields` out of `engine.ts`, and nothing else there names the key. The hand-off the row describes has lived in `engine-find.ts` (`FindFacet.expandSearchOnAst`) since the `engine.ts` codemod split, and that file names `searchFields`. ## Verification - Reproduced first: `pnpm --filter @objectstack/spec check:liveness` on the #30341 head exits 1 with exactly that one citation. - On this head: exit 0, 0 failures. That run covers every ledger (`field.json` included): no other row cites a file that no longer names its key. - The diff against `main` is these 2 files (+13 / −2). The branch is the designated thread branch, which carried #30341; `main` is merged in, so no earlier commit's content is in the diff. - Gates: `dispatch-gates --commands` derives 55 for this diff; 43 had run when this PR opened, all exit 0. The rest go to the seat with the hand-back. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (a ledger row only) - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran. - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. (the designated thread branch with `main` merged in) - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. (a liveness row; nothing generated reads it) - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Utp6CYHBS7P5hkUQrNHkHZ --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
1 parent 870ebce commit 38717d3

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
fix(spec): the liveness ledger's `query.searchFields` row cites `engine-find.ts#expandSearchOnAst`, where the hand-off lives, so `check:liveness` is green again
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
- The row cited `engine.ts#expandSearchOnAst`. The body has lived in `engine-find.ts` since the `engine.ts` codemod split, and the last mention of `searchFields` in `engine.ts`, a private docblock, moved out with the first slice of the hand-series docblock move, so the check found no mention of the key in the cited file.
11+
- Nothing to do on upgrade: only the shipped `liveness/query.json` evidence text changes.

‎packages/spec/liveness/query.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
"searchFields": {
3030
"status": "live",
3131
"verifiedAt": "2026-08-28",
32-
"note": "Formally declared by #3899 (ADR-0061 P1, 'formalize $searchFields'): the per-query narrowing override the executor has served since the ADR landed — server-intersected with the object's allowed searchable set, can only narrow, never widen. The schema-side declaration caught up with the executor when #3899's entry validation started rejecting bodies the schema did not describe. 2026-08-28: RE-ANCHORED (commit 8cb96ec41) and REPOINTED — `engine.ts:2893-2898` had rotted onto `const row = rows[index];`, and the `search-filter.ts` leg was PATH-ONLY. Both halves of a two-hop claim (`requestedFields hand-off` → `resolveSearchFields`) were unfalsifiable in different ways: one bounded to a line that had stopped meaning anything, the other bounded to nothing. Re-closed by hand against 93ea19bca.",
33-
"evidence": "packages/objectql/src/engine.ts#expandSearchOnAst (the hand-off — the requested fields ride into the expansion); packages/objectql/src/search-filter.ts#resolveSearchFields (the intersection with the object's allowed searchable set: narrows only, never widens); proof showcase-search.dogfood.test.ts + search-conformance.ledger.ts row search-fields-override"
32+
"note": "Formally declared by #3899 (ADR-0061 P1, 'formalize $searchFields'): the per-query narrowing override the executor has served since the ADR landed — server-intersected with the object's allowed searchable set, can only narrow, never widen. The schema-side declaration caught up with the executor when #3899's entry validation started rejecting bodies the schema did not describe. 2026-08-28: RE-ANCHORED (commit 8cb96ec41) and REPOINTED — `engine.ts:2893-2898` had rotted onto `const row = rows[index];`, and the `search-filter.ts` leg was PATH-ONLY. Both halves of a two-hop claim (`requestedFields hand-off` → `resolveSearchFields`) were unfalsifiable in different ways: one bounded to a line that had stopped meaning anything, the other bounded to nothing. Re-closed by hand against 93ea19bca. 2026-11-05: REPOINTED to `engine-find.ts#expandSearchOnAst`, where the body has lived since the engine.ts codemod split: the first slice of #30053 moved the private docblock that named `$searchFields` out of engine.ts, which no longer names the key.",
33+
"evidence": "packages/objectql/src/engine-find.ts#expandSearchOnAst (the hand-off — the requested fields ride into the expansion); packages/objectql/src/search-filter.ts#resolveSearchFields (the intersection with the object's allowed searchable set: narrows only, never widens); proof showcase-search.dogfood.test.ts + search-conformance.ledger.ts row search-fields-override"
3434
},
3535
"orderBy": {
3636
"status": "live",

0 commit comments

Comments
 (0)