Repository navigation
Commit 0d40aa1
skills(data, query, ui): with no searchableFields declared, a field marked searchable: true joins the default search set (#29912)
domain:skills#1 · huangyiirene · session_01J8VVAnMUWA9rufXzFaEh4J
<!-- claude-projects-attribution: {"github_login":"huangyiirene"} -->
_Requested by **Irene** · [project
thread](https://claude.ai/code/project/chan_01TJXtQ1tVD26ecLDZxFS67x?thread=cmsg_01TJXtQ1tVD26ecLDZxFS67xPvrQ6rqAoXn7MahmXvdwUf)_
Fixes #29395
Clause-②: no
Metadata-protocol: none
Model: claude-fable-5-1 mandate waived by the maintainer (Fable quota
exhausted); developed on Opus; contract review by triage.
## 维护者速读
- 改了什么:三个 skills 文件不再把"未声明 `searchableFields` 时的默认搜索集"讲成只按类型。现在写明:类型默认集
+ 每个标了 `searchable: true` 的字段(`secret` / `password` / `vector` 与虚拟
`formula` 除外);`$searchFields` 白名单是同一集合。每处另加一句不变的事:`searchable:
false`(默认值)不会移除类型默认集已扫描的字段;要自己选集合就声明 `searchableFields`。
- 为什么改:#29385(#29008)已按裁决 6573569376 字母 A 落地,技能文本仍是旧说法。
- 风险与回滚:只改 `skills/**` 文本,另加一个 `@objectstack/skills` patch
changeset;无代码、无棘轮行变动。回滚即 revert。
- 先看:`objectstack-data/SKILL.md` Search Fields
段;`objectstack-query/SKILL.md` L319–327;`list-views.md` 允许集表格 L186–191。
- 两分钟验证:`node scripts/check-skills-token-ratchet.mjs`,预期 exit 0。
- 需要你做的:Tier H,分诊契约复审后由你审批落地。
## What changes
The rule is read from the merged code, not the card:
`packages/spec/src/data/search-fields.ts` (`autoDefaultFields`,
`admittedBySearchableFlag`, `SEARCH_FLAG_EXCLUDED_TYPES = {secret,
password, vector}`) and the `FieldSchema.searchable` describe in
`packages/spec/src/data/field.zod.ts`.
1. **`skills/objectstack-data/SKILL.md` § Search Fields.** The
auto-default sentence now adds "plus every field marked `searchable:
true`, of any type except `secret` / `password` / `vector` or a virtual
`formula`", then the unchanged-behaviour line: `searchable: false`, the
default, never removes a field the type default scans; declare
`searchableFields` to choose the set.
2. **`skills/objectstack-query/SKILL.md` (the "Omit it to search…"
paragraph).** The parenthesised auto-default gains the same clause, and
the paragraph gains the same unchanged-behaviour line.
3. **`skills/objectstack-ui/rules/list-views.md`, the allowed-set
table.** The "declares nothing" row gains "+ every field marked
`searchable: true`, of any type except `secret` / `password` / `vector`
or a virtual `formula`", and one line under the table carries the
unchanged-behaviour sentence. The "declares `searchableFields`" row now
reads "any stored field type" (it said "whatever the field types are"),
so the table no longer contradicts the refusal row below it, which
refuses a virtual `formula`.
5. **Changeset.** `.changeset/29395-skills-search-auto-default.md`
releases `@objectstack/skills` as a `patch`, with `Clause-②: no` and
`Metadata-protocol: none`: a `skills/**` change publishes that package,
so it never takes `skip-changeset`.
4. **The enum half of the type default** is now spelled `select` alone
in the data skill and the list-views table. Both said `select` /
`status`. `status` is not a `FieldType` member, and
`SEARCHABLE_ENUM_TYPES` is `{select}`.
No eval covers the edited lines. The only search evals are a
mirror-field prompt in
`objectstack-data/evals/hooks-security-seeds-datasources.json` and a
`searchFields` prompt in
`objectstack-query/evals/filters-pagination-search.json`. Neither
asserts on the auto-default, so no eval changed.
### Token budget, paid in place (no ceiling row moved)
| file | tokens before → after / ceiling | lines before → after |
|:--|:--|:--|
| `objectstack-data/SKILL.md` | 6123 → 6119 / 6123 | 466 → 464 |
| `objectstack-query/SKILL.md` | 4166 → 4234 / 5547 | 403 → 407 |
| `objectstack-ui/rules/list-views.md` | 3110 → 3126 / 3129 | 308 → 308
|
What paid:
- **objectstack-data** (at its ceiling, headroom 0): the duplicate `→
Moved verbatim … § Field Groups (MVP)` pointer stub and its `---`
separator are removed. The `fieldGroups` row of the optional-properties
table already links the same anchor. Three phrases are also tightened:
the Quick Reference lead-in, "computed and stored on write" in the
`nameField` row (a stored computed field already says it), and "by a
path that bypasses hooks" becomes "past the hooks". The `formula` clause
(b89c05d) is paid by two restatement cuts: "no traversal" leaves the
`?search=apollo` line, and its home is the section's opening ("the
search axis does not resolve traversal"); the `// ← the mirror` code
comment goes, and its home is the block's first comment ("`project_name`
is a stored, denormalized mirror of the parent's title").
- **objectstack-query**: 68 tokens fit inside the existing 1381
headroom, so nothing else was cut.
- **list-views**: the refusal table's two `searchable-field-unknown`
rows (mistyped column, dotted path) become one row, and so do its two
`searchable-field-unsearchable` rows (column outside the set, virtual
`formula`). "at all three layers" is dropped from the `searchableFields:
[]` row. For the `formula` clause, the refusal row drops its "(nothing
stored to scan)", whose home is now the allowed-set table's "any stored
field type", and that row is itself shorter than the "whatever the field
types are" it replaces.
### Acceptance notes
- **Contract review FAIL on c5f8165 (6606434667).** M1 (changeset)
and S1 (virtual `formula` exception) are fixed on b89c05d as above; the
`skip-changeset` label is removed. The new clauses lengthen their lines
in place (data L118 is 100 bytes, query L321 102), with no re-wrap.
- **Re-wrap.** The order said no re-wrap. The query paragraph's later
sentences ("resolved server-side. It can only **narrow**…" through
"…Tier-2 knobs below.") were re-flowed, because the insertion lands
mid-paragraph. The data paragraph's last line ("Views may narrow it,
never widen it.") also moved. The words are unchanged. No other
paragraph was touched. The reviewer may rule this a breach; the fix
would be a line-preserving rewrite of those two paragraphs.
- The new list-views line under the table is 153 bytes, on one line so
as not to wrap.
- At dispatch, no open PR edited these lines. #29190 and #28903 touch
`objectstack-data/SKILL.md`, at the mirror-field block (L147–169) and
after L378 only.
- The branch is based on c76c0e0. No commit on `main` since then
touches the three files, the token ratchet or `search-fields.ts`.
## Why
#29385 (#29008) landed ruling 6573569376 letter A: with no
`searchableFields` declared, the effective search set is the type-based
auto-default plus every field marked `searchable: true` of any type
except `secret`, `password` and `vector`, and the `$searchFields`
allow-list is the same set. These three skills still taught the default
as type-only. An agent following them would tell an author that
`searchable: true` on a `code` or `lookup` field does nothing, and would
treat a `$searchFields` override naming such a field as a 400.
## Verification
<details><summary>Local gates on b89c05d: 44 derived, 43 exit 0, 1 not
measured (`dispatch-gates --ran`)</summary>
- On head b89c05d, `node scripts/pm/dispatch-gates.mjs --commands`
derived 44 commands. The changeset adds 10 families, including
`check-empty-changeset`, `check-changeset-no-major` and
`check-adr-0087-registration`. Each ran with a 900 s timeout, in a tree
with `pnpm install --frozen-lockfile` done and `@objectstack/formula`,
`@objectstack/lint` and `@objectstack/objectql` built. Exit codes were
recorded before any pipe.
- 43 exited 0. These include `node
scripts/check-skills-token-ratchet.mjs` and its `--self-test`, `pnpm
check:pm-skill-id-lint`, `node scripts/check-empty-changeset.mjs --base
origin/main`, `pnpm --filter @objectstack/spec run check:skill-docs`,
`pnpm check:skill-frame-sync`, `pnpm check:skill-identifier-liveness`,
`pnpm check:doc-authoring` and `pnpm check:lean-entry-closure`.
- `pnpm check:dual-build-cjs-loads` exited 3 (PREREQUISITE NOT MET: no
`dist/` for most packages). It needs a full `pnpm build`, and this diff
touches no `packages/**`. It is reported as not measured, and CI's run
on this head is the measurement.
- `dispatch-gates --ran` printed: `44 derived famil(ies) accounted for —
43 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)`.
- `node scripts/check-commit-card-trailers.mjs --range
origin/main..HEAD` exited 0 over both commits.
- On the first head c5f8165, 34 commands were derived: 33 exited 0,
and `dual-build-cjs-loads` was not measured. CI there had 28 success, 18
skipped and no failure, until the label was removed and `Check
Changeset` correctly failed on that head (M1).
</details>
## Human Minimum
- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(No `packages/**` change.)
- [x] 2. Every name I added uses the casing for its kind. (No names
added.)
- [x] 3. No formatter ran; `pnpm lint` passes. (Markdown only.)
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
(`@objectstack/skills`: patch.)
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (Not touched.)
- [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, except the 维护者速读 block
that governed surfaces require.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01J8VVAjjRmCZgXRP1FNQS2n
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 8aa2e91 commit 0d40aa1
4 files changed
Lines changed: 37 additions & 23 deletions
File tree
- .changeset
- skills
- objectstack-data
- objectstack-query
- objectstack-ui/rules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
| |||
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
140 | | - | |
| 142 | + | |
141 | 143 | | |
142 | 144 | | |
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
146 | 148 | | |
147 | | - | |
| 149 | + | |
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
| |||
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
157 | | - | |
| 159 | + | |
158 | 160 | | |
159 | 161 | | |
160 | 162 | | |
161 | 163 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | 164 | | |
167 | 165 | | |
168 | 166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
324 | 328 | | |
325 | 329 | | |
326 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
189 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
190 | 192 | | |
191 | 193 | | |
192 | 194 | | |
| |||
201 | 203 | | |
202 | 204 | | |
203 | 205 | | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| |||
0 commit comments