Skip to content

docs(skills): the objectstack-query entry file becomes a router - #38821

Merged
os-zhuang merged 10 commits into
mainfrom
claude/project-thread-96llpb
Dec 1, 2026
Merged

os-zhuang merged 10 commits into
mainfrom
claude/project-thread-96llpb

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

Part of #34770

Clause-②: no
Metadata-protocol: none

Part of, not the closing form: the catalog-size line of the card's Done-when is not met by this PR. This is PR 6 of the per-skill split, under claim 7280537583 and its amendments 7280758590, 7288186602 and 7296541080.

维护者速读

  • 用户能看到什么变化:用户无感。发给 AI 的「查询」技能说明,入口文件从约 18 KB 缩到 9 KB:入口只留开工前四项检查、一段可照抄的查询写法、七个「写得通过、跑起来却答错或变慢」的坑、全文搜索的规则、已下线写法的替代表,以及其余内容去哪里查的指路表。
  • 为什么做:这是「技能目录瘦身」的第九份(界面、数据、自动化、平台、跨大版本升级、多语言翻译、表达式与公式、接口设计八份已完成)。入口文件每次都整份装进 AI 的上下文,越长越贵,也越容易漏读。
  • 出错会怎样:只动教 AI 的文字,没有产品行为变化;风险是 AI 少读一段后答错。评测已在定稿上整轮跑完(十道题,每题三遍,改动前后同一时段各一轮):改动后三十次对二十六次,改动前三十次对二十九次;没有哪道题在改动后三遍全错,按既有裁决不算退步。少对的几次集中在两道题:「按关键词搜任务并显示负责人」改动后三遍对一遍、改动前三遍对两遍(这道题另各加测六遍:改动后对三遍,改动前对四遍,两边都时对时错);「按台北时区分月统计」改动后三遍对一遍,错的两遍内容是对的,只是没用题目要求的原词。可整笔撤回。
  • 要你做什么:无。席位核对与合约审查都通过后,才会按治理规则请审批人批准。

Rulings this executes

  • Card Scope (decision record on the card, S3 = A): the entry file holds first checks, at most about 8 traps and a routing list; 6–9 KB, hard cap 500 lines; restated option lists and tables go behind a pointer; no trap is removed until a publish-time check covers it or it stays inline.
  • 7128031203 fork 4 = A: ratchet rows are pinned at the measurement with zero headroom, and the sum of ceilings does not rise. Here two rows fall, no row rises and none is added.
  • 7168461386 = A: text an eval shows the entry lost goes back into the entry, paid inside the entry. Used once: the first after-round showed case 4 lost (0 of 3 against 1 of 3 on main); three pieces of text went back and four cuts paid for them (see Eval parity).
  • Ruling record 7249189592, the parity rule: a case whose result flips between runs on both trees is unstable on both and does not block; a case that fails on every run of the head while main passes is a regression. Read below on full rounds of both trees in one window: no case fails on every run of the head.
  • Seat order for this PR (claim amendment 7296541080, PR 6 = objectstack-query): the same shape as PRs 3 to 5; no new file under skills/ (a new file needs a new ratchet row, which stays with a human). This skill has three hand-written rules files, each with its own row, so text could have moved into them under fork 4 = A. None did: every fact that left the entry was already in a rules file, in the contract or on the published page.

Review rounds

Second round (contract review 7300640479 on 410a7ed7: passed, with one should-fix), commit 25cf270b.

  • S1, fixed. The search section said a dotted path in searchFields "is refused". That holds at the protocol door, which judges every name, and on an engine call only when no listed name is searchable: the engine's refusal (refuseSearchOverrideNamingNoSearchableField) fires on an all-unknown list, and its test keeps the tolerance for a partly-known one ("a partly-known override still narrows to its known names"). So searchFields: ['title', 'project_id.name'] on the engine call the entry teaches is accepted and searches title alone: a wrong answer with no error. The bullet now reads: "a dotted path (project_id.name) is refused at the protocol door and when it stands alone; beside real fields the engine drops it silently." Paid inside the entry: the three schema names after the closed-set rule (first check 3 already routes to the file that holds them) and a few words of first check 4. The entry is 8,984 bytes; the row stays 2240 and the sum of ceilings does not move.
  • N1, not taken. The closed-set sentence still does not list find's six driver passthrough keys. The refusal prints them, the changeset says where they are declared, and listing them costs bytes this round had to find for S1.
  • N2, not taken. Trap 5's keyset example sorts by created_at alone, and the warning that a repeating sort key can skip or repeat rows at a page boundary stays in rules/pagination.md. Every recorded run of the paging case, on both trees, opened that file. Open to the seat: it is the same class as the traps kept inline, and adding it needs a paying cut.

First round (contract review of b8182abb: one should-fix and two nits), commit d74dc1de.

  • S1, fixed. The operator list carried $like / $ilike bare. A pattern with no wildcard is accepted and compares exactly (the contract's own description: the pattern must cover the whole value, and a pattern with no wildcards is an exact comparison, not a substring search), which is a silent wrong answer, the class this entry keeps inline. Trap 2 now ends: "$like / $ilike match the WHOLE value and you write the %: { name: { $like: 'acme' } } is an exact match." Paid inside the entry by three cuts, each loud or already said elsewhere: the REST refusal of a search field outside the searchable set, "applied before counting or grouping" after the count / aggregate search sentence, and "Unsorted pages are not stable."
  • N3, fixed. First check 2 said a query names nothing beyond the object's declared fields, while the entry's own example uses created_at and owner_id. It now reads "the object's fields (declared or platform-injected; a query invents none)".
  • N1, fixed. The changeset pointed the six driver passthrough keys at data/data-engine.zod.ts, which does not hold them. It now names the driver options contract (data/driver.zod.ts) for the keys and says which method takes them is the engine's own list, printed by the refusal.

What changes

The entry file becomes a router. skills/objectstack-query/SKILL.md: 18,455 → 8,984 bytes, 429 → 154 lines, 4,607 → 2,240 tokens. Frontmatter (description, tags) is byte-identical. It now holds:

  • ## First checks, four: the installed contract wins over the compatibility line; read the object's fields (declared or platform-injected), which of them are relation fields, and its searchableFields; read the contract and never recall a key or an operator (references/_index.md for the query and filter schemas, data/data-engine.zod.ts for each engine method's option keys); os validate reads no query in code, so run the query, while query metadata (a list view's filter, a dashboard dataset) is judged by it.
  • ## Calling convention: one type-checked block (a find with where, fields, orderBy, limit and expand; a system read with context: { isSystem: true }; an aggregate with three measures, one carrying its own filter), then the closed-set rule (a key outside a method's set is refused by name with the legal list), what an aggregate bag does not take, what a literal carrying object is, and the operator names as one list with the four combination rules.
  • ## Traps, seven, each accepted and answering wrong or slow with no error: a read with no context returns fewer rows; four string operators compare case-sensitively, and $like / $ilike match the whole value; a column with no value fails every ordering test, and $null misses blank text where $empty does not; expand reads the foreign key off each row, skips a key that is not a relation field, and applies only fields, where and a further expand of a nested value; a page needs orderBy and a keyset must match its direction; where, having and a measure's filter scope three different things, with the rule for which side buckets a date under a non-UTC timezone; a date computed at module load freezes, with the tokens, the week key and the now-anchored comparand.
  • ## Full-Text Search: the bare-string form with searchFields, the matching rules, that count and aggregate take the same pair, that search never traverses (where a dotted path is refused and where the engine drops it silently; the stored mirror, with the searchFields to write), and the six knobs that validate and do nothing.
  • ## Removed keys: all six rows, each with what to write.
  • ## Where to go: six rows (the three rules files, the published query-syntax page, objectstack-ui, objectstack-data).

No text moved. What left the entry was cut, each behind what now answers it. rules/filters.md changes two pointers that named sections the entry no longer has (the line under its operator list, and the sibling-keys note): 10,382 → 10,361 bytes. rules/aggregation.md and rules/pagination.md are untouched; their pointers to "the removal table in SKILL.md" and "the calling convention in SKILL.md" still hold.

Old entry section Now
Calling Convention (the per-method key table, the passthrough six, the alias folding) ## Calling convention: the block and the closed-set rule; first check 3 names the contract file. Cut to the contract (data/data-engine.zod.ts): each method's key list and top / filter folding. Cut: the six driver passthrough keys and why count and aggregate refuse them; the driver options contract (data/driver.zod.ts) holds the keys, and which method takes them is the engine's own list. An unknown key is refused by name and the refusal prints the legal keys, the passthrough ones included.
Which filter dialect? The objectstack-ui routing row, which names VIEW_FILTER_OPERATORS.
Execution Context (context) Trap 1 and the block's system read. Cut: the 403 PERMISSION_DENIED refusal of a context with no user, position or permission set (loud when hit), and that a write takes its context only as the trailing argument (the contract, contracts/data-engine.ts).
Removed Keys → Live Replacement ## Removed keys, six rows. Cut: the second alternative for array_agg / string_agg (a stored roll-up field) and the sentence dating the removal; objectstack-upgrade, which the entry names, holds the register.
Quick Reference — Detailed Rules ## Where to go.
Filter Operators (six operator tables and their examples) The operator names as one list, linked to rules/filters.md § Operator Reference (one example each), and traps 2 and 3; trap 2 keeps that $like / $ilike match the whole value. Cut to the contract (data/filter.zod.ts, each operator's .describe() text) and the published page: purpose, SQL equivalent, value types; the view-filter is_empty lowering; the refusal of $empty on an undeclared column.
Filtering by a related record; Cross-field comparisons The query.joins row keeps the shape { customer: { country: 'US' } }; trap 7 keeps the now-anchored comparand. The rest was already whole in rules/filters.md § Relation Filters, § Field References and § Now-Anchored Comparands.
Sorting The block's two-key orderBy and trap 5. Cut: array order is sort priority and order defaults to 'asc' (the contract); index advice is the objectstack-data routing row.
Pagination Trap 5 (the keyset shape, the direction rule, what an offset still costs) and rules/pagination.md, whose § Sorting with Pagination says why an unsorted page is not stable.
Aggregation The block's aggregate call, the sentence under it, and trap 6.
Expand (Related Records) The block's expand with the foreign key kept in fields, and trap 4. Cut: the batched-read note and the nested example.
Full-Text Search Kept under the same heading, shorter. Cut to the published page and objectstack-data's Search Fields reference: the expanded-filter comment block, the protocol spelling of the narrowing key, the description of the default searchable set, the REST refusal of a name outside the set (400 INVALID_FIELD, loud when hit). Cut to the contract's docblocks: that count and aggregate apply the pair before counting or grouping.
Common Patterns: Cross-Object Queries Trap 4 (display; page or sort related records by querying the related object), the search section (the stored mirror), rules/filters.md § Relation Filters, the objectstack-ui routing row.
Common Patterns: Pagination Pattern for APIs; Dashboard Aggregation Pattern rules/pagination.md; the block's per-measure filter and trap 6 ("a total and a conditional count share one call"); dashboards are the objectstack-ui routing row.
Verify your work; References First checks 4 and 3.

Sizes (bytes · lines · ratchet tokens):

before (main at 13a0d3fe, merged in) after (head 655229c6)
SKILL.md (entry) 18,455 · 429 · 4,607 8,984 · 154 · 2,240
rules/filters.md 10,382 · 217 · 2,596 10,361 · 217 · 2,591
skills/objectstack-query/** (7 files) 55,118 · 1,318 45,626 · 1,043
all 14 SKILL.md together 152,901 · 2,769 143,430 · 2,494
whole skills/ tree (115 files) 1,193,953 1,184,461
whole tree without evals/ (73 files) 829,914 820,422
ratchet: authored tokens = sum of all ceilings 189,821 187,449
ratchet: bundle total, tokens 295,693 293,321

The head column is measured, and so are the byte and line figures of the main column (the files of main at 13a0d3fe). The two ratchet figures of the main column are the head's reading plus the fall of this skill's two rows: the entry and rules/filters.md are the only files under skills/ that differ (git diff --stat origin/main HEAD -- skills: 2 files). main raised another skill's row since the last round, which is why both columns are higher than in the earlier body.

Budget reading: the entry is 8,984 B, inside the card's 6–9 KB line, and 154 lines against the 500-line cap. The whole catalog is 9,492 bytes smaller, all of it cut.

Ratchet rows (scripts/check-skills-token-ratchet.mjs), each pinned AT its measurement, zero headroom. Two rows move, both down:

  • skills/objectstack-query/SKILL.md 4607 → 2240 (−2,367): ceil((8984 − 27) / 4) = ceil(8957 / 4) = 2240. Why: the entry became a router. The two review rounds moved the file from 8,984 to 8,987 bytes and back to 8,984; the row did not move (2240 is the measurement of each).
  • skills/objectstack-query/rules/filters.md 2596 → 2591 (−5): ceil(10361 / 4) = 2591. Why: the two pointer lines are 21 bytes shorter.

The rows of rules/aggregation.md (2346) and rules/pagination.md (1289) do not move. The sum of all ceilings goes 189,821 → 187,449 (−2,372). No row rises and none is added.

Tests

Eval parity

Command, every full round: pnpm --filter @objectstack/scenarios skill-evals --skills objectstack-query --repeats 3 --concurrency 4 --max-utilization 0.99, with the model and effort flags PR 3's rounds used; CLI 2.1.333, subscription login. 10 behaviour cases in evals/filters-pagination-search.json on both arms and 7 trigger cases in evals/triggers.json, both files untouched: 81 turns a round.

The reading the rule is judged on: one full round on each tree, run back to back in one window, on the pushed head and on the main it merged.

case subject main at 13a0d3fe (with-skill · no-skill) head 655229c6 (with-skill · no-skill)
1 filters, $in, case-blind match, two-key sort 3/3 · 0/3 3/3 · 0/3
2 keyset paging for an infinite scroll 3/3 · 0/3 3/3 · 0/3
3 grouped measures with count_distinct 3/3 · 0/3 3/3 · 0/3
4 search across a related record's title, with expand 2/3 · 0/3 1/3 · 0/3
5 a system read in a hook 3/3 · 0/3 3/3 · 0/3
6 now shifted by a field's days 3/3 · 0/3 3/3 · 0/3
7 blank text with $empty 3/3 · 0/3 3/3 · 0/3
8 a total and a conditional count in one call 3/3 · 0/3 3/3 · 0/3
9 month buckets under a timezone 3/3 · 0/3 1/3 · 0/3
10 the current-week tokens 3/3 · 0/3 3/3 · 0/3
all 29/30 · 0/30 26/30 · 0/30
triggers loaded when it should · left alone when it should not 15/15 · 3/6 15/15 · 3/6
case 4 again, 6 runs an arm, right after 4/6 · 0/6 3/6 · 0/6

Both full rounds ran 81 of 81 turns (4.2 and 4.3 minutes); the two case-4 reads ran 12 of 12 turns each.

Reading under the parity rule: no regression. No case fails on every run of the head. The head's total is three lower than main's in this window, all of it in two cases that flip on both trees:

  • Case 4: head 1 of 3 and then 3 of 6; main 2 of 3 and then 4 of 6. This is the case whose text the second review round changed, so it was read six more times on each tree. The head's failing answers put the keyword in a where $or with a relation condition on the project, repeat the entry's new sentence (the dotted path "is refused, or silently dropped next to real fields"), and offer the stored mirror with searchFields: ['title', 'project_name'] as the alternative; they miss the literal stored (they write "store the project name on the task"). main's failing answers miss the same literal, or owner_id and searchFields. Across every full or targeted read: main 9 of 15; the router's text between the restoration and this round 7 of 9; the text of this round 4 of 9. Unstable on both trees, and lower on this round's text than on the text before it, by a margin that nine runs cannot separate from chance. Open question for the seat (see the report): accept under the rule, or reword the bullet so the stored mirror comes before the where alternative.
  • Case 9: head 1 of 3; main 3 of 3. Both failing answers give the right table (the database buckets on PostgreSQL with Asia/Taipei; a fixed offset or SQLite stays in memory) and miss a literal by its form: one writes "the database does the bucketing", the other capitalises "In memory" in a table cell. The text the case draws on (trap 6) has not changed since the first router commit. Across all rounds: head 10 of 12, main 7 of 9.
  • Case 2: 3 of 3 on both. Its earlier failures on the router's text (a function parameter named cursor, which the case's forbidden literal cursor: catches) did not recur: 5 of 16 runs across all router rounds, 0 of 9 on main.
  • Triggers. Trigger 7 (a list view's filter) loads the skill on every run of both trees; trigger 6 was left alone on every run of both. The frontmatter that decides loading is byte-identical on both trees.

Earlier rounds, kept as the record of how the text got here:

reading tree with-skill no-skill with-skill cases below 3 of 3
before round, 81 of 81 turns 0fc9eab9 (the first branch point) 26/30 1/30 case 4, 1 of 3 (missed owner_id, stored); case 9, 1 of 3 (missed in the database, in memory)
after round 1, 81 of 81 turns local f9ed325e, the first router commit (11d8ae17 on this branch) 25/30 1/30 case 1, 2 of 3 (one answer used $ilike); case 2, 2 of 3; case 4, 0 of 3
after round 2, cases 1, 2, 4 and 5 only, 24 of 24 turns local a2ece3bf, after the restoration (0a4ed24d on this branch) 12/12 0/12 none
after round 3, stopped by the quota guard after 4 of 81 turns the same skill text case 1: 1 of 1; case 2: 0 of 1 0/2 case 2
after round 4, stopped on the seat's order after 76 of 81 turns (all 60 behaviour turns, 16 of 21 trigger turns): the first review fix had to land first tree cd045f3b, the head before the review rounds 27/30 0/30 case 2, 1 of 3; case 4, 2 of 3
after round 5, 81 of 81 turns, with a main round beside it (00f97b30: 28/30 · 1/30; case 4, 2 of 3; case 10, 2 of 3) 410a7ed7, the head after the first review round 28/30 0/30 case 2, 2 of 3; case 4, 2 of 3

The restoration (ruling 7168461386). After round 1, case 4 (search tasks by keyword across the title and the parent project's name, and show the assignee) failed all three runs: the answers put a relation condition in where and called the field assignee. Three pieces went back into the entry: the search bullet now says a relation condition in where is a filter, not a search, and gives searchFields: ['title', 'project_name']; the example's comment names owner_id as the record owner ("assignee"); trap 2 regains { email: { $icontains: '@company.com' } } (case 1). Paid inside the entry: the objectstack-ask routing row (the frontmatter description carries it), the relation-condition sentence under the operator list (its shape moved into the query.joins row), an inline example in trap 4, and half a sentence of trap 1. The entry went from 8,989 to 8,984 bytes.

Quota readings (the login's seven-day window, status allowed_warning, reset 2026-12-06 14:00 UTC; guard --max-utilization 0.99 by the maintainer's choice recorded in claim amendment 7296541080, never raised). Before the maintainer's reset: before round 0.96 → 0.97; after round 1 0.97 → 0.98; after round 2 0.98; after round 3 stopped at 0.99, exit 3. After the reset: after round 4 0.54 → 0.55; after round 5 0.56 → 0.57 and its main round 0.57; this round's head round 0.64, its main round 0.64 → 0.65, the two case-4 reads 0.65.

One check that calls no model, beside the rounds: of the 38 must_contain literals of the 10 cases, main's entry carries 28 and the head's entry 35. One is lost, engine.find('account' (case 1; the router's example object is task, and an answer composes the call from the prompt); 8 are gained (cases 6, 8, 9 and 10); 2 are in neither tree (timezone: 'Asia/Taipei', plan_week: '{current_iso_week}', both composed from the prompt). Of the must_not_contain literals, main's entry carries two (orderBy: of case 3, 'project_id.name' of case 4) and the head's entry one (orderBy:, in the find example; case 3 is an aggregate case and read 3 of 3 on both trees).

Other tests

On the pushed head 655229c6 (tree e1d917f5), under the verify lock (VERDICT command-exit 0):

  • pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 scripts/platform-catalog.test.ts scripts/skill-map-guards.test.ts scripts/query-pointer-row.test.ts (the suite that names the ratchet script, the skill-map guards, and the test that names this skill's pointer row): Test Files 3 passed (3), Tests 61 passed (61).
  • pnpm --filter create-objectstack exec vitest run --maxWorkers=2 src/created-summary.test.ts src/scaffold-skills-single-copy.test.ts (the two test files there that name this skill): Test Files 2 passed (2), Tests 34 passed (34).

Two more test files name the skill and were not run: packages/cli/test/skills-commands.test.ts uses the name with fixture strings, and a driver-sql test cites rules/aggregation.md in a comment; neither reads a file this PR changes.

No ablation: the diff changes prose and one ledger, no tested behaviour.

Acceptance notes

Held by a gate or by another file, recorded here as it stands:

  • rules/filters.md § Operator Reference stays where it is. scripts/check-skill-identifier-liveness.mjs registers that section as exhaustive for FILTER_OPERATORS; the entry's operator list links to it.
  • The heading ## Full-Text Search is kept. objectstack-ui's list-view rules send the reader to "objectstack-query → Full-Text Search" by name.
  • The removed-keys table stays inline, all six rows. Each is refused loudly, so the trap rule alone would let it go; but rules/aggregation.md and rules/pagination.md point at "the removal table in SKILL.md" four times, and the table is where a model that remembers an old key learns what to write.

Decided here (small, no shipped behaviour), each open to reversal in review:

  • "No trap is removed unless a publish-time check covers it or it stays inline" was read as: a query that is accepted and then answers wrong or slow with no error stays inline. Inline: the seven traps and the two search bullets. Cut to a pointer, each loud when hit: the per-method key lists (an unknown key is refused by name with the legal list), a context with no identity (403), a relation filter past its limits (INVALID_FILTER), $empty on a column with no declaration, a search field outside the searchable set (400).
  • Traps 3, 6 and 7 state inline what main's entry left to the rules files: the $or with $null beside an ordering test, which side buckets a date under a timezone, the tokens, the week key and the now-anchored comparand. Each is a silent wrong answer, and eval cases 6, 8, 9 and 10 ask for them; case 9 read 1 of 3 on main and 3 of 3 here. The rules files still hold the detail.
  • Trap 6 is scoped to where it is true. The database buckets a non-UTC date only on a driver that declares supports.zonedDateBucketing and only for an area/location zone name; a fixed offset, or any other driver, keeps the call in memory with the same buckets. The cost is speed, which is why the list's opening line says "wrong or slow".
  • Trap 4 says "the engine skips any other" key, not "returns nothing": the sentence is about the engine call the entry teaches.
  • Two statements of main's entry were corrected in passing, inside this file. Its count row listed context and where only, and the contract also takes search and searchFields (EngineCountOptionsSchema). It said an expand key must be a lookup or master_detail field, and the engine resolves user and tree fields too.
  • The example calls the assignee field owner_id: objectstack-data's rule is that owner_id is the platform-injected record owner, also when the request says "assignee", and eval case 4 asks for the name.
  • The operator names stay inline as one list (0.3 KB): first check 3 says never recall an operator, and the list is the vocabulary to choose from before the rules file is opened.
  • The docs link was checked by hand. check:published-readme-links does not read skills/ (a deliberately broken link in the entry still passed, and the file was restored), so its green says nothing about the entry's link. The page exists as content/docs/protocol/objectql/query-syntax.mdx and is listed in its meta.json.
  • Section anchors of the entry changed. The changeset lists every anchor that left SKILL.md (24) and the five new ones; the title's anchor and #full-text-search stay. No file in this repository links one of the old ones.
  • Four lines in the summary above, not six: the standing order for this card thread asks for six, and the agent file that binds the dev fixes four named lines and wins on conflict.
  • Footer form: this body ends with the single block AGENTS.md prescribes for a PR body.

Noted, not changed:

  • Three eval cases grade a literal that a correct answer can miss or carry: case 2 forbids cursor: and so fails an answer whose function takes a parameter of that name; case 1 fails an answer that uses $ilike; case 9 requires the phrases in the database and in memory in that casing. The parity rule treats the cases as fixed, so this PR does not touch them. Carrier: none; noted for whoever owns the case file.
  • Trigger case 7 (a list view's filter, which should not load this skill) loads it on every run of both trees, with this bundle the only one installed in the turn. Carrier: none; the eval seat's reading.
  • The contract's docblock on expand (data/data-engine.zod.ts) says keys are lookup or master_detail fields and that a nested value controls sort; the engine resolves four relation types and re-keys the related rows by id, so a nested orderBy has no visible effect. A reading of two files, not a measured failure through a public door. Carrier: none.
  • scripts/check-corpus-claim-drift.mjs carries a self-test fixture label that cites skills/objectstack-query/SKILL.md:154. It is a label, not a live reference; the file is outside this claim's surface.
  • main moved during the work, five times: PR 5 of this split (docs(skills): the objectstack-api entry file becomes a router #38802); a release-version commit that restamped every entry's version line (the same byte length, so no row moved); a commit that changed a gate script; a range that raised another skill's ratchet row (docs(skills): the record-page rule teaches pinOverview and object-level fieldTabs #38813, a different row, merged cleanly); and a range that changed a deploy workflow. Each was merged in as a plain merge commit; the textual merges were clean, the workspace was rebuilt after the last one and every gate below ran after it.

Verification

Read first, by risk:

  1. skills/objectstack-query/SKILL.md, the whole file: is anything a model needs before opening the contract or a rules file missing? The risk hunks are ## Traps (seven items replace most of the old file) and the one example block, which now carries the whole calling convention.
  2. .changeset/34770-query-skill-router.md: the "what left, and what answers it now" list is the record of every cut.
  3. scripts/check-skills-token-ratchet.mjs: the two objectstack-query rows.

Two-minute check: node scripts/check-skills-token-ratchet.mjs prints ratcheted (authored) 187449 / 187449 (+0) and skills/objectstack-query/SKILL.md 2240 / 2240 (+0); wc -c skills/objectstack-query/SKILL.md prints 8984.

Gates, local, each exit code captured before any pipe. The whole derived list ran on the pushed head 655229c6 (tree e1d917f5), after the merge of main at 13a0d3fe and a rebuild of the merged workspace.

Derived families on head `655229c6`: 69 derived, 69 run green, 0 NOT MEASURED
  • Reconciliation: ✓ dispatch-gates --ran: 69 derived famil(ies) accounted for — 69 run, 0 NOT-MEASURED (a DERIVED zero — all 69 recorded an exit code and none of them is 3). No STALE TREE warning against main at 13a0d3fe, the ref the list was derived on.
  • node scripts/check-skills-token-ratchet.mjs: ✓ check-skills-token-ratchet: 61 authored bundle file(s) within their ceilings; 11 generator-owned file(s) and 42 eval fixture(s) measured, not ratcheted. (ratcheted (authored) 187449 / 187449 (+0), bundle total 293321); its --self-test: 111 cases pass.
  • pnpm check:dual-build-cjs-loads: 127 published require entry point(s) across 75 package(s) load; 2594 emitted CommonJS file(s) parse. It reads every package's built dist/; pnpm build --concurrency=2 ran first on the merged tree under the verify lock (VERDICT command-exit 0, 124 successful, 124 total).
  • pnpm check:dts-closure: 124 built package(s) swept - 326/326 declared declaration file(s) present.
  • pnpm check:skill-links: 286 relative link(s) in 76 published skill file(s) resolve; 161 fragment(s) name a real heading under GitHub's slug rule.
  • pnpm check:skill-identifier-liveness: Leg 1: 494 citation(s) over 76 published file(s) ...; Leg 2: 11 registered exhaustive section(s), 0 ledgered gap(s).
  • pnpm --filter @objectstack/spec run check:skill-docs, pnpm --filter @objectstack/lint run check:doc-formula-expressions, pnpm check:skill-compatibility, check:skill-frame-sync, check:role-word, check:corpus-claim-drift, check:doc-authoring, check:published-files, check:nul-bytes, check:cross-package-test-inputs, check:ratchet-remedy-authority: exit 0.
  • The changeset gates (check-changeset-no-major, check-empty-changeset, check-adr-0087-registration, check:changeset-gate-self-tests): exit 0. pnpm check:pm-dispatch-gates: exit 0.
Beside the derived list, on head `655229c6`, all exit 0
  • pnpm --filter @objectstack/spec run check:skill-examples, under the verify lock: 341 prose examples type-check across 3 surface(s). The entry's one block is among them.
  • pnpm --filter @objectstack/spec run check:skill-refs: 10 generated files in sync with packages/spec.
  • pnpm --filter @objectstack/spec run check:skill-served-sections: 24 served section(s), each heading exactly once in its file.
  • pnpm check:doc-anchors: 1190 internal #fragment link(s) across 368 source file(s) all resolve to a real heading.
  • pnpm check:published-readme-links: 567 outbound link(s) across 169 published markdown file(s). It does not read skills/ (see Acceptance notes).
  • pnpm check:skill-top-level-keys, pnpm check:skill-frame-freshness, pnpm check:dev-prereqs: exit 0.
  • pnpm --filter @objectstack/spec run check:generated, under the verify lock, after the merge and the rebuild: All 14 generated artifacts are up to date.
  • node scripts/check-platform-checklist.mjs --changed-from origin/main: 0 anchored files in the change set — nothing judged.
  • node scripts/check-nul-bytes.mjs: exit 0; a control-byte scan of the four changed files finds none.

node scripts/pm/overlap-check.mjs before the push of 655229c6: VERDICT clean exit 0 (origin/main at 13a0d3fe merges cleanly; no open PR shares a changed file). Not run locally: test:repo (CI's).

Base: the four router commits were written on a local branch and cherry-picked onto the thread branch as 11d8ae17, 0a4ed24d, 5cc3f615, b8182abb (local f9ed325e, a2ece3bf, 17197139, 5b365fa9). The first review round added d74dc1de between two merges of main (c879b19a, 410a7ed7). The second added 25cf270b, then two more merges of main, each a plain merge commit taken when the gate tool reported a stale tree (d77374eb for 6f82fd05, 655229c6 for 13a0d3fe). A full gate pass ran on d77374eb and was repeated in full on 655229c6. main was still at 13a0d3fe when the head was pushed. CI on the pushed head is the seat's reading.


Generated by Claude Code

The entry keeps four first checks, the calling convention as one
type-checked block, the operator names, seven traps, full-text search,
the removal table and a routing table: 18455 -> 8989 bytes, 429 -> 156
lines. Nothing moved: what left is cut behind the three rules files,
the contract or the published query-syntax page.

rules/filters.md: two pointers named entry sections the router no
longer has; one now names the contract and the entry's trap, the other
is dropped.

Ratchet: the entry row 4607 -> 2241 and the filters row 2596 -> 2591,
both at the measurement. No row rises and none is added.

Claude-Session: https://claude.ai/code/session_01ADHkmSM46qymk97AyqPzoS
Co-authored-by: Claude <noreply@anthropic.com>
…$icontains example

The first round on the router read case 4 (a keyword search by a
related record's title) 0 of 3 against 1 of 3 on main, and case 1 lost
one run to a correct $ilike answer. Put back, paid inside the entry:
the stored-mirror prescription as an instruction with its searchFields
form, the record owner named on the example's expand key, and the
case-sensitivity trap's $icontains example. Paid by one routing row the
description already carries, the relation-filter sentence (now in the
joins row) and a parenthesis of the expand trap.

8989 -> 8984 bytes; the entry row 2241 -> 2240, at the measurement.

Claude-Session: https://claude.ai/code/session_01ADHkmSM46qymk97AyqPzoS
Co-authored-by: Claude <noreply@anthropic.com>
Names what the entry keeps, what left it and what answers each piece now,
the two pointers that changed in rules/filters.md, and every section
anchor that no longer exists in the entry.

Claude-Session: https://claude.ai/code/session_01ADHkmSM46qymk97AyqPzoS
Co-authored-by: Claude <noreply@anthropic.com>
The execution-context refusal and the write-context rule, the second
array_agg alternative, the old expand-key rule the entry corrects, and
where the build and validate spellings live now.

Claude-Session: https://claude.ai/code/session_01ADHkmSM46qymk97AyqPzoS
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Dec 1, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-steve · session_01ADHkmT9HTWLMN33WUVxVWB
L1-b, the seat's L1 thread · 2026-12-01T02:32Z · first review

席位核对

ACCEPT @ b8182ab (#34770, split PR 6: the objectstack-query entry becomes a router). Landing waits on one full after-round of the evals on this text. Round 3 on the final text was stopped by the quota guard after 4 of 81 turns. Under ruling 7249189592 the reading is owed, and this ACCEPT does not stand in for it. The PR is Tier H: it stays a draft.

The file surface. Against the merge base d97aaaea the diff is exactly four files:

  • skills/objectstack-query/SKILL.md;
  • rules/filters.md;
  • two ratchet rows;
  • .changeset/34770-query-skill-router.md.

No new file is added under skills/. rules/filters.md loses 21 bytes: two pointers into the old entry's sections now point at the contract and at trap 2, and one cross-reference is dropped.

The shape, measured at this head:

  • the entry is 8984 bytes and 154 lines;
  • seven traps, four first checks, one checked block and a seven-row routing table;
  • rules/filters.md is 10361 bytes.

Claims read against main. Most of the router's facts are in main's entry or rules files: the period-key and week-end tokens, the six inert search keys, and relation conditions up to three levels. The claims that are new to the entry hold against the code:

  • count takes the search pair. EngineCountOptionsSchema and EngineAggregateOptionsSchema both declare search and searchFields, so count and aggregate take the same pair. That corrects main's count row.
  • expand resolves user and tree fields. engine-summaries-and-expansion.ts expands every REFERENCE_VALUE_TYPES member, user and tree included, and skips any other. MAX_EXPAND_DEPTH = 3.
  • Trap 6's scoping is true. supports.zonedDateBucketing is this.isPostgres in driver-sql, and the PostgreSQL arm alone buckets a zone, which is an area/location name. Every other arm, and driver-mongodb, declines, and the engine buckets in memory.
  • The three restorations under 7168461386 are in the entry and paid inside it: the search bullet's relation-condition sentence with searchFields: ['title', 'project_name'], owner_id as the assignee, and trap 2's $icontains example.

Eval literals, recomputed from evals/filters-pagination-search.json:

  • 10 cases and 38 must_contain literals: 28 on main, 35 at the head;
  • one lost, engine.find('account' (case 1), and 8 gained;
  • one must_not_contain literal sits in the new entry (orderBy:, case 3, an aggregate case), against two in main's.
  • This matches the PR. Case 1 read 3/3 in round 2 and 1/1 in round 3.

Gates, measured in a scratchpad worktree at this head:

  • check-skills-token-ratchet: 61 within ceilings, the two rows 2240 and 2591 pinned.
  • check-skill-links: 286 resolve.
  • check-skill-identifier-liveness: OK.
  • check:skill-docs exit 0, and check:skill-served-sections exit 0.
  • check:skill-examples: 340 type-check.
  • spec platform-catalog, skill-map-guards and query-pointer-row: 61/61.

Ablations, each restored after:

  • main's two rows: the ratchet goes red on both ("above the measurement by 2367 / 5").
  • object: 'task' put into the find bag: check:skill-examples goes red at SKILL.md:48, so the calling-convention example is checked.
  • $empty dropped from rules/filters.md § Operator Reference: check-skill-identifier-liveness goes red with [leg2-missing-row], the gate the PR names as the reason that section stays where it is.

Against the current main ea6e312a: a trial merge is clean. main has moved past the base with other skills changes, so the ceilings sum is re-read on the merge.

CI at this head: 18 success, 18 skipped, 8 in progress. The L2 and the hand-over are the seat's, after the eval round.

Review round on the router. The operator list carried $like and $ilike
bare; a pattern with no wildcard is accepted and compares exactly, a
silent wrong answer, so trap 2 now says it. First check 2 no longer says
a query names declared fields only: the entry's own example uses
platform-injected ones. Paid inside the entry (8984 -> 8987 bytes, the
row stays 2240): the REST refusal of a search field outside the set,
"applied before counting or grouping", and the unsorted-page sentence.
The changeset names those cuts and points the six driver passthrough
keys at the driver options contract, which holds them.

Claude-Session: https://claude.ai/code/session_01ADHkmSM46qymk97AyqPzoS
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-steve · session_01ADHkmT9HTWLMN33WUVxVWB
L1-b, the seat's L1 thread · 2026-12-01T04:19Z · delta review

席位核对

ACCEPT @ 410a7ed (#34770 PR 6). This reviews the delta on my ACCEPT at b8182ab (7298730139), which no longer covers this head. The eval hold in that record is lifted: a full after-round now ran on this head's text (below).

The delta:

  • d74dc1de carries the contract-review fixes.
  • Two plain merges of main (47bfc944, 7625001f). In this skill they brought only main's release stamp: version: "19.0.0-next.3", written by the version script and not priced.
  • Against the merge base, the PR's own diff is still the same four files.

The fixes, read against the contract:

  • S1: trap 2 now says $like / $ilike match the WHOLE value and you write the %, so { name: { $like: 'acme' } } is an exact match. This is LIKE_DESCRIPTION / ILIKE_DESCRIPTION in data/filter.zod.ts ("Whole-string pattern match with CALLER-bound wildcards").
  • N3: first check 2 reads "the object's fields (declared or platform-injected; a query invents none)". That agrees with the example's owner_id.
  • N1: the changeset sentences follow the entry.

What paid for them. Three cuts inside the entry, none of them a rule:

  • "Unsorted pages are not stable". The trap's title still says a page needs orderBy.
  • The REST 400 INVALID_FIELD clause. That case is loud when hit.
  • "applied before counting or grouping".

The entry is 8987 bytes, 154 lines, and still 2240 tokens.

Measured in a scratchpad worktree at this head:

  • check-skills-token-ratchet: 61 within ceilings.
  • check-skill-links: 286 resolve.
  • check-skill-identifier-liveness: OK.
  • check:skill-docs, check:skill-served-sections and check:skill-examples all exit 0.
  • spec platform-catalog, skill-map-guards and query-pointer-row: 61/61.
  • The row has zero headroom: rewording trap 2's new sentence up by 8 bytes goes red, "2242 / 2240 (+2)".

Eval parity (ruling 7249189592), read from delta report 7300470521:

  • head 410a7ed7: 28/30 with the skill, 0/30 without, 81/81 turns;
  • main 00f97b30: 28/30 with the skill, 1/30 without, in the same quota window.
  • No case fails every run of the head while main passes. Case 2 is 2/3 on the head (a function parameter named cursor; the query carries no cursor key) and 3/3 on main, so it is unstable, not a loss.
  • Triggers: 15/15 load. Trigger 7 is 0/3 on both trees.

Against the current main 7d6742ae: a trial merge is clean.

CI at this head: 31 success, 20 skipped, 0 failed. The PR is Tier H: it stays a draft, and the L2 and the hand-over are the seat's.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 410a7ed734e14fbb60c9529c4d51611034724325
Local-runs: none
Scope: skills/objectstack-query/SKILL.md, skills/objectstack-query/rules/filters.md + scripts/check-skills-token-ratchet.mjs
Security-touching: yes
Rule-change-verified: none

PR #38821, card #34770 (split PR 6: the objectstack-query entry becomes a router). Judged from the card (body and all 67 comments), the PR body, the four-file net diff and the check-runs on this head. The local origin/main ref is stale (d97aaaea), so the net diff was read against the main commit the head merged, 7625001f: exactly four files, +170 / -387. Live main is 7d6742ae, seven commits later; it touches none of this skill's files and one unrelated ratchet row (below).

Security: yes. Trap 1 teaches the execution context: a read with no context runs as the caller and org-scoping returns fewer rows, and { isSystem: true } is the system read that passes that scoping. The diff also removes the sentence on the 403 PERMISSION_DENIED refusal of a context with no identity and the entry's line that a relation filter is read under the caller's permissions at every hop (both still stated in the contract docblock and rules/filters.md). The path name shows none of this.

① Derived judgments

  • Accept sets: none change. No schema, engine set or validator is in the diff. Right.
  • Published surface: the skill bundle text. SKILL.md 18,455 to 8,987 bytes, 429 to 154 lines; rules/filters.md 10,382 to 10,361 bytes. Measured from the two trees. Right.
  • Frontmatter: byte-identical between 7625001f and the head (name, description, compatibility, tags). Trigger behaviour is decided by unchanged text. Right.
  • Heading anchors: 24 leave, 5 arrive; #full-text-search stays, which skills/objectstack-ui/rules/list-views.md:186 names. rules/aggregation.md and rules/pagination.md point at "the removal table" and "the calling convention" in SKILL.md; both still exist. Right.
  • Two statements of main's entry are corrected, both toward the code. count takes search and searchFields (EngineCountOptionsSchema, ENGINE_COUNT_OPTION_KEYS). expand resolves lookup, master_detail, user and tree (REFERENCE_VALUE_TYPES, engine-summaries-and-expansion.ts) and skips any other key. Right.
  • Ratchet (implementing file). Two rows move, both down, none added, none raised: entry 4607 to 2240, rules/filters.md 2596 to 2591. Summed statically from the two trees: 61 rows on each, 189,567 to 187,195, delta -2,372. Each row is the measurement with zero headroom: ceil((8987 - 27) / 4) = 2240, ceil(10361 / 4) = 2591; the 27 bytes are the unpriced version line. The comment's history holds: 8,989 bytes would be 2241, 8,984 and 8,987 are both 2240. The comment states the fall relatively ("falls by 2372"), so it stays right after live main's unrelated +254 on skills/objectstack-ui/rules/record-page.md; the PR body's absolute sums are stated as of 7625001f. Right.
  • rules/filters.md: a shortening only. Two lines; the pointer under the operator list now names data/filter.zod.ts and the entry's trap 2 (which is the case-sensitivity trap), and the sibling-keys note drops its parenthesis. No teaching moved. Right.

② Semver level

Clause-②: no

@objectstack/skills: patch matches what the diff publishes: prose in one skill, no key, no accept set, no behaviour. The changeset's pointers were read on the head's tree: data/data-engine.zod.ts holds the three option schemas; data/driver.zod.ts holds all six passthrough keys (transaction, tenantId, tenantIds, timezone, bypassTenantAudit, preserveAudit) and the engine's own list (ENGINE_DRIVER_PASSTHROUGH_KEYS) decides which method takes them; data/filter.zod.ts describes each operator; contracts/data-engine.ts carries the trailing-argument rule; the published page content/docs/protocol/objectql/query-syntax.mdx has the operator tables and the Full-Text Search section; skills/objectstack-data/references/examples-objects.md has "Search Fields (searchableFields)" with the default set. The changeset is not otherwise reviewed.

③ Boundary flags

  • Dev question: re-review of the delta d74dc1de. Answered by this record, on the whole head.
  • Dev question: eval case 2's forbidden literal cursor:. For this PR, leave the case as it is (the parity ruling treats cases as fixed). Narrowing the literal is the eval seat's change; escalated to the seat as a follow-up, no carrier yet.
  • First report's question: is the parity reading enough without a full round on the final text? Closed by the full round on this head.
  • Four summary lines or six; background runs. Process questions for the seat; no contract effect.
  • Out-of-scope note: the expand docblock in data-engine.zod.ts says keys are lookup or master_detail fields and that a nested value controls sort. The engine forwards a nested orderBy and then re-keys by id, and never forwards limit / offset. The entry's trap 4 states the engine's behaviour, not the docblock's. Carrier: none; the seat files it or drops it.
  • SQL push-down: no code path in the diff; nothing to judge.

④ Design judgment

(1) Truth of what remains, read against the head's tree. Checked and holding: the three schema names and the per-method refusal with the legal list (rejectUnknownEngineOptions); aggregate takes no fields, orderBy or limit; the 19 operator names are exactly the contract's field operators, with $and / $or arrays and $not one condition; the four case-sensitive string operators and ASCII-only $icontains; $like / $ilike whole-value matching (LIKE_DESCRIPTION: "a pattern with no wildcards is an exact comparison, NOT a substring search"); the trailing { context } on a read winning over the bag (contracts/data-engine.ts); expand reading the key off each row, the four relation types, MAX_EXPAND_DEPTH = 3, nested fields / where / expand; supports.zonedDateBucketing (PostgreSQL) with an area/location zone and the in-memory path otherwise; the token spellings and the now-anchored comparand in rules/filters.md; label matching on select / status; count and aggregate taking the search pair; the six inert knobs ([EXPERIMENTAL — not enforced] in query.zod.ts); the six removed keys; VIEW_FILTER_OPERATORS holding equals, icontains, is_null; os data query exists. Both fragment links resolve to real headings.

S1 (should-fix) — ## Full-Text Search, first bullet: "a dotted path (project_id.name) is refused". On the in-process call this entry teaches, that holds only when the list names no searchable field. engine.find('task', { search, searchFields: ['title', 'project_id.name'] }) is accepted and searches title alone: the engine refuses an override only when none of its names is searchable (refuseSearchOverrideNamingNoSearchableField, engine-top-level.ts), has no dotted-path check on the search path, and a test pins the tolerance ("a partly-known override still narrows to its known names", engine-empty-search-fields-refusal.test.ts). The published page says the same ("Internal callers reaching engine.find() directly keep the tolerant intersection"). This is the shape of eval case 4 (title plus the parent project's name), and it is the class the trap list keeps inline: accepted, answers narrower, no error. Main's entry carried the claim with a lone-name example and the words "over the REST/protocol ingress"; the router generalised it and classed a search field outside the set as "loud when hit", which is true at the REST door and not on a partly-known engine override. The prescription beside it (mirror into a stored field) is right and unchanged, and the sentence is true at every protocol door, which is why the verdict below stands. Fix: say that a dotted path is refused at the door and on its own, and dropped silently beside a real field on an engine call; pay for the bytes inside the entry (the row has zero headroom).

N1 (nit) — the closed-set sentence names the three option schemas as the closed sets. The engine's legal set for find is the schema's keys minus the tombstones, plus the six driver passthrough keys, with top / filter folded first; so tenantId on a find is outside the named schema and accepted. The error runs in the safe direction and the changeset states it. Leave, or fix in a prose-only follow-up.

N2 (nit) — trap 5 inlines the keyset pattern on created_at alone. That duplicate sort-key values can skip or repeat rows at a page boundary is stated only in rules/pagination.md ("Prefer a unique (or near-unique) sort key"). Main's entry also left it there, so nothing was removed; noted because the inline pattern makes opening that file less likely. Accepted deviation or a follow-up card.

(2) What left, and its pointers. Every pointer target exists on the tree and says what the entry leaves to it: rules/filters.md (operator examples, $like reach, { $field }, relation filters and their limits, tokens), rules/aggregation.md (functions, date buckets, having, per-measure filter, ranking, running totals), rules/pagination.md (offset, keyset, stable sorting, top), the contract files, the published page, objectstack-ui (the view-filter operators in rules/list-views.md), objectstack-data (Search Fields, indexing), objectstack-upgrade, objectstack-platform ("Verify your work"). The cuts that are loud when hit are loud: unknown option key, context with no identity (403), relation filter past its limits (INVALID_FILTER), { $field } outside a comparison. One input that is accepted and answers wrong is not covered by the entry's own words: S1.

(3) The three restored passages. Present and right: the search bullet's "a relation condition in where is a filter, not a search" with searchFields: ['title', 'project_name'] (project_name is the mirror field of objectstack-data's own example); the example comment naming owner_id as the record owner ("assignee"), with owner_id kept in fields; trap 2's { email: { $icontains: '@company.com' } }. Static count of the 38 must_contain literals in the entry: 28 on main, 35 on the head. One lost: engine.find('account' (case 1; the entry still shows engine.find('task', and the object comes from the prompt). Eight gained: $field: 'grace_days_offset', $lte: 0, dateGranularity: 'month', zonedDateBucketing, in memory, in the database, {current_week_start}, {current_week_end}. Two in neither tree: timezone: 'Asia/Taipei', plan_week: '{current_iso_week}'. Of the must_not_contain literals the head's entry carries one (orderBy:, in the find example; case 3 is an aggregate case), main's carried two.

(4) Ratchet. As in ① above: only this skill's rows move, both down, each at the measured bytes, no row rises, the comment's arithmetic is right on this head.

(5) Changeset and frontmatter. As in ① and ②.

(7) Eval reading against ruling 7249189592. The ruling blocks one thing: a case that fails on every run of the head while main passes. The PR body reports no case at 0 of 3 on the head (28/30 on both trees, one window), so by the ruling's letter there is no regression. Case 2 is in neither class the ruling names: 3/3 on main, 2/3 on the head, and by the body's own count the same miss is more frequent on the router's text (5 of 13 runs against 0 of 6). The body says so plainly and does not call it "unstable on both". The miss is a graded literal in a correct keyset answer, not a lost fact, so nothing is owed back to the entry under ruling 7168461386. The round's records are the dev's; this review read the reading, not the runs.

(8) Check-runs on this head. 51 runs, all completed: 31 success, 20 skipped, none failing, none pending. Green among them: Check Changeset, Governed Surface Queue Guard, PR-body guards, Lint & Repo Gates and the lint legs (repo & tooling gates, docs & code guards, PM dispatch-gates, scoped tooling self-tests), the Type Check legs, Build Core, Test Core 1 to 3 of 12. The PR is a draft and GitHub reports it mergeable against live main.

Implemented-by: claude/project-thread-96llpb
Reviewed-by: session_01ADHkmSAjFEZHRpRq3WCj6z

VERDICT: PASS

…opped

Second review round. The search section said a dotted path in
searchFields is refused. That holds at the protocol door, and on an
engine call only when no listed name is searchable: beside real fields
the engine drops the dotted name silently and searches the rest, which
is a wrong answer with no error. The entry now says so. Paid inside the
entry (8987 -> 8984 bytes, the row stays 2240): the three schema names
after the closed-set rule, which first check 3 already routes to, and a
few words of first check 4. The changeset records both.

Claude-Session: https://claude.ai/code/session_01ADHkmSM46qymk97AyqPzoS
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 655229c62523a78192d55afb0a0e2d36a2425ac8
Local-runs: none
Scope: skills/objectstack-query/SKILL.md, skills/objectstack-query/rules/filters.md + scripts/check-skills-token-ratchet.mjs
Security-touching: yes
Rule-change-verified: none

Delta review of PR #38821 (card #34770, split PR 6) on the head after record 7300640479, which was rendered at 410a7ed7. Read: the delta 410a7ed7..655229c6 on this PR's four files, the net diff against the main commit the head merged (13a0d3fe, which is live main), the dev's delta report 7302489248, the PR body now on the PR, and the check-runs on this head.

finding S1 of 7300640479: closed

No must-fix, no should-fix.

Security: yes, unchanged from 7300640479 (trap 1 teaches the execution context and the isSystem: true system read). This delta adds no new security teaching.

① Derived judgments

  • The delta on this skill is one commit, 25cf270b, in three files: the entry (the search bullet, the closed-set sentence, first check 4), the changeset (two sentences that follow the entry) and the ratchet comment of the entry row. rules/filters.md is unchanged since 410a7ed7. Right.
  • The merges brought nothing into this skill. Outside this PR's four files the head's tree is identical to 13a0d3fe; inside skills/objectstack-query/** the evals, the references index and the two other rules files are identical to main. The net diff is the same four files, +172 / -387. Right.
  • Accept sets and frontmatter: unchanged. No schema or engine file is in the diff; the frontmatter is byte-identical to the previous head's. Right.
  • Ratchet (implementing file). Summed statically from both trees: 61 rows on each, main 189,821, head 187,449, delta -2,372. Two rows differ, both this skill's, both down: entry 4607 to 2240, rules/filters.md 2596 to 2591. The entry is 8,984 bytes: ceil((8984 - 27) / 4) = ceil(8957 / 4) = 2240, zero headroom; rules/filters.md is 10,361 bytes, ceil(10361 / 4) = 2591, zero headroom. The comment's new history line (8,987 to 8,984, the same 2240) and its formula line (ceil(8957 / 4)) are right. main's rise of another skill's row arrived through the merge and is not this PR's; no row of this PR rises and none is added. Right.

② Semver level

Clause-②: no

Unchanged: @objectstack/skills: patch, prose only. The changeset's two edited sentences match the entry: the search section's dotted-path wording, and "the entry states the closed-set rule without the three schema names; its first check 3 names the file" (first check 3 does name data/data-engine.zod.ts).

③ Boundary flags

  • Dev question: re-review of 25cf270b. Answered by this record.
  • Dev question: case 4 reads lower on this round's bullet; accept under the parity rule, or reword? Accept for this PR: the ruling does not block it (④ below). The reword is nit N3, open to the seat as a prose follow-up.
  • Dev question: should trap 5 carry the repeating-sort-key warning (N2 of 7300640479)? Left in rules/pagination.md for this PR, as an accepted deviation; the seat may card it.
  • Out-of-scope notes of the report (literal grading in cases 2, 4 and 9; trigger case 7; the engine's partly-known searchFields tolerance as recorded behaviour): carrier none; the eval seat's and the seat's to file or drop.
  • SQL push-down: no code path in the diff.

④ Design judgment

(1) The new sentence, against the code. "a dotted path (project_id.name) is refused at the protocol door and when it stands alone; beside real fields the engine drops it silently."

  • At the protocol door: assertSearchFieldsAreSearchable (packages/metadata-protocol/src/protocol-query-validation.ts) judges every name of the override, so a name the object does not declare is refused 400 INVALID_FIELD whatever stands beside it. True.
  • When it stands alone: refuseSearchOverrideNamingNoSearchableField (packages/objectql/src/engine-top-level.ts) refuses an override in which no name is searchable. True.
  • Beside real fields the engine drops it silently: the same function returns as soon as one name is in the allowed set, the search path has no dotted-path check, and the test "a partly-known override still narrows to its known names" pins it. True.

The sentence now states the accepted-and-narrower case inline, which is what the finding asked for. The bytes were paid inside the entry by cutting the three schema names from the closed-set sentence and a few words of first check 4; both remaining sentences are true (the closed-set rule is the engine's, rejectUnknownEngineOptions; os data query exists). The cut also removes most of N1 of 7300640479: the closed set is no longer named as the three schemas.

(2) Ratchet. As in ① above.

(3) Merges. As in ① above.

(4) Eval reading under ruling 7249189592. The ruling blocks a case that fails on every run of the head while main passes, and passes a case that flips on both trees. Reported in one window: with-skill head 26/30, main 29/30.

  • Case 4 (head 1/3 then 3/6; main 2/3 then 4/6): flips on both trees and fails no round entirely. Not the regression the ruling reads. It is the case whose text this round changed, and the body states the trend plainly (this round's text 4 of 9, the text before it 7 of 9, main 9 of 15); nine runs do not separate that from chance. The failing answers still offer the stored mirror with searchFields: ['title', 'project_name'] and miss the literal stored; the entry carries that literal, in bold.
  • Case 9 (head 1/3; main 3/3): not 0 of 3, so not the regression the ruling reads, and across the rounds on record it flips on both trees (main read 1/3 in the first before-round; the head read 3/3 one round ago on the same trap text). It traces to no sentence this PR removed: main's entry carries none of the case's five literals, the head's entry carries four (dateGranularity: 'month', zonedDateBucketing, in the database, in memory, all in trap 6), trap 6 is unchanged since the first router commit, and rules/aggregation.md is untouched. The two failing answers are reported as correct and missing a phrase by its form.
  • The head's total is three lower than main's in this window; the ruling judges per case, and by its letter the reading "no regression" holds. The static count is unchanged by this delta: 28 of the 38 must_contain literals in main's entry, 35 in the head's. The run records are the dev's; this review read the reading, not the runs.

N3 (nit) — in the search bullet the door-and-engine detail now stands before "a relation condition in where is a filter, not a search" and the mirror prescription, and the head's failing case 4 answers lead with a where relation condition. Cause is not established. Putting the stored mirror first is a prose-only follow-up if the seat wants it; a change here moves the head.

N1 and N2 of 7300640479 stand as accepted nits: first check 3 still says data/data-engine.zod.ts holds each method's option keys while find also takes six driver passthrough keys; trap 5's keyset sorts by created_at alone.

(5) Check-runs on this head, as read. 50 runs: 28 success, 20 skipped, none failing, 2 in progress (Check Changeset, of which one earlier run is already green, and Test Core (1/12)). Green among the completed: Governed Surface Queue Guard, PR-body guards, Lint & Repo Gates and every lint leg, the Type Check legs, Build Core, Test Core 2 and 3 of 12. The verdict below is on the contract; the two pending runs are the seat's to read before landing. The PR is a draft and GitHub reports it mergeable.

Implemented-by: claude/project-thread-96llpb
Reviewed-by: session_01ADHkmSAjFEZHRpRq3WCj6z

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-steve · session_01ADHkmT9HTWLMN33WUVxVWB
L1-b, the seat's L1 thread · 2026-12-01T06:19Z · delta review (410a7ed → 655229c)

席位核对

ACCEPT @ 655229c. This covers what changed since my delta ACCEPT 7300627886 at 410a7ed7: one content commit, 25cf270b (S1 of contract review 7300640479), and two plain merges of main (6f82fd05, then 13a0d3fe).

① The content commit touches 3 files, as the delta report 7302489248 says.

  • The S1 sentence is true to the code. The search bullet now says a dotted path is refused at the protocol door and when it stands alone, and that beside real fields the engine drops it silently.
  • Paying cuts. The three schema names leave the closed-set paragraph, and first check 4 is reworded. First check 3 still names data/data-engine.zod.ts as the file that holds each method's keys, so the pointer survives.
  • Ratchet and changeset.
    • Only the ratchet's comment block moves (8987 → 8984 bytes, ceil(8957 / 4)). The row stays 2240.
    • The changeset's search and closed-set sentences match the new text.
  • Entry size: 8984 B and 154 lines, with 7 traps.

② The two merges took main whole and kept the PR's side.

  • The head differs from main 13a0d3fe in exactly the PR's 4 files.
  • Three of them are byte-identical to 25cf270b.
  • The fourth, check-skills-token-ratchet.mjs, was touched by both sides. Its head-vs-main hunks equal the PR's own hunks against the merge base 7625001f, so main's new rows are kept and nothing was resolved by hand.
  • No file outside the PR's 4 differs from main.
  • A git merge-tree trial against the current main (13a0d3fe) is clean.

③ Measured in a scratchpad worktree at this head.

  • Gates:
    • check-skills-token-ratchet ✓ (61 files);
    • check-skill-links ✓ (286);
    • check-skill-identifier-liveness OK;
    • check:skill-docs 0;
    • check:skill-served-sections 0;
    • check:skill-examples 0 (340 examples, semantic pass);
    • the three spec guard files 61/61.
  • Ablations (each goes red, then is restored):
    • base ratchet rows → both rows red (-2367, -5);
    • an object key in the find bag → skill-examples 1 at SKILL.md:48;
    • $empty dropped from the operator reference → leg2-missing-row.
  • Eval literals. The entry holds 35/38 must_contain at both 410a7ed7 and this head, with the same three absent (case 1 engine.find('account', case 9 timezone: 'Asia/Taipei', case 10 plan_week: '{current_iso_week}'). The delta moved no literal.

④ Eval parity: the card thread measured it, I did not.

  • Its figures, from the same quota window: head 26/30, main 29/30.
  • They meet 7249189592. No case fails all three runs at the head while main passes it.
  • Case 4 (head 1/3, main 2/3) and case 9 (head 1/3, main 3/3) lose on literal wording. The seat accepts that under the rule.
  • Case 9's literal (timezone: 'Asia/Taipei') was already absent from the entry at 410a7ed7, where that case scored the same as main. So this run-to-run drop is not caused by the delta's text.

Not covered by this ACCEPT: the L2 / landing steps, which are the seat's, and CI at this head.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z

维护者速读

  • 用户能看到什么变化: 只改技能文字。objectstack-query 技能的入口从 18,455 字节削到 8,984 字节,改成「路由」:只留作者做决定要用的规则和陷阱,其余指向契约、技能自带的 rules 文件和公开文档。rules/filters.md 两行指路短了 21 字节。没有新文件,frontmatter 不变。
  • 为什么做: 卡 skills: SKILL.md becomes a router with a size budget, and points to the contract instead of restating it #34770 第 6 个 PR(技能瘦身,一次一个技能)。评测同窗:main 29/30,这个 head 26/30;没有「main 过、本 head 每遍都挂」的题,按评测规则不算回退。差的 3 遍都是答案没写某个字面词(case 4 的 stored、case 9 的措辞),正文里如实列出。
  • 出错会怎样: 不改代码行为,最坏是 AI 写查询时少了某条提示。撤销合并即可恢复。
  • 要你做什么: 动了 skills/**,属于受管路径,按 Tier H 需要你批准。不走低风险技能通道:有 security 相关句子(执行上下文、isSystem 系统读),还改了 scripts/ 的 ratchet 行。批准后由席位落地。

Seat opinion: land as is.

席位核对

ACCEPT at head 655229c62523a78192d55afb0a0e2d36a2425ac8 · Tier H (governed skills/**; low-risk skills arm refused: security-touching text, scripts/ path) · Part of #34770

  1. Shape: four files: skills/objectstack-query/SKILL.md cut to a router (18,455 → 8,984 bytes, 2240 tokens), skills/objectstack-query/rules/filters.md shortened 21 bytes, the skill's two CEILINGS rows lowered with zero headroom (4607 → 2240, 2596 → 2591; this PR's fall −2,372, no row rises), and .changeset/34770-query-skill-router.md (@objectstack/skills patch). Outside these four files the head's tree equals main.
  2. Premise: every sentence left is true on main. Two review rounds closed the two accepted-then-wrong cases the first cut left only behind pointers: $like / $ilike match the whole value (L2 7300640479 on the fixed head 410a7ed), and a dotted searchFields path is refused at the door and alone but dropped silently beside a real field on an engine call (L2 delta 7302589964, closing that record's finding S1).
  3. Gates: on this head 31 success, 20 skipped, 0 failed; mergeable clean. The dev's dispatch-gates run: 69/69, 0 NOT-MEASURED.
  4. Eval parity (ruling 7249189592), read by the seat: one window, with-skill main 29/30 → head 26/30. No case fails every run of the head while main passes. Case 4 (head 1/3 + targeted 3/6, main 2/3 + 4/6) and case 9 (head 1/3, main 3/3) miss wording literals; case 9 traces to no sentence this PR removed (its literals sit in trap 6, unchanged). Earlier rounds: 26/30 → 25/30 (three passages restored under ruling 7168461386), 28/30 vs 28/30.
  5. Accepted deviations: N1 (the closed-set sentence omits the six driver passthrough keys; the changeset states them), N2 (trap 5's keyset on created_at alone; the duplicate-key caveat stays in rules/pagination.md), N3 (the search bullet now leads with the door detail before the mirror prescription). Out of scope: the expand docblock in data-engine.zod.ts that disagrees with the engine, and eval case 2's cursor: literal; both named in the records, left uncarded under the no-new-cards order.
  6. Landing: L1-b delta ACCEPT 7302745699 and L2 delta PASS 7302589964 on this head (earlier: L1-b 7298730139, 7300627886; L2 7300640479). Lands after os-zhuang approves.

ACCEPT → comment 7302745699 · Contract review → comment 7302589964

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Dec 1, 2026
@objectstack-fleet
objectstack-fleet Bot requested a review from os-zhuang December 1, 2026 06:21
@os-zhuang
os-zhuang marked this pull request as ready for review December 1, 2026 06:21
@os-zhuang
os-zhuang added this pull request to the merge queue Dec 1, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z

security added: the contract reviews on this pull read Security-touching: yes (execution context, the isSystem system read), as on PR 5 #38802.

Merged via the queue into main with commit 5bd786e Dec 1, 2026
65 of 66 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-96llpb branch December 1, 2026 06:42
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-steve · session_01ADHkmSAjFEZHRpRq3WCj6z

Merged by os-zhuang (5bd786e492); pm:awaiting-merge removed. #34770 stays open for split PRs 7–8.

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 security size/l tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants