Skip to content

docs(skills): the ask skill teaches withheldFields, the database top-N cut and totalGroups - #35268

Merged
os-zhuang merged 2 commits into
mainfrom
claude/issue-35191-ask-skill-lines
Nov 19, 2026
Merged

os-zhuang merged 2 commits into
mainfrom
claude/issue-35191-ask-skill-lines

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread
Fixes #35191
Fixes #35203

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:问数技能 objectstack-ask 多教三件事:字段被字段级权限隐藏(withheldFields)时说「你看不到」而不是「为空」;排名(前 N / 后 N)让数据库用 orderBy + limit 排好再截;结果被截断时引用 totalGroups 作为截断前一共多少组;query_dataset 没有 totalGroups 时说总数未知(query_records 分页自带 total,不受影响)。
  • 为什么改:服务端已经返回 withheldFields、totalGroups 和数据库排名截断,但技能还没教,模型可能把隐藏字段说成空值,或把返回的行数当成总数。
  • 风险与回滚:只改技能文字和由它生成的 GET /mcp/skill 页面,不改任何代码路径;回滚即 revert 本 PR。技能 token 天花板 1779 → 1877(+98),按常设裁决先删重复、余额按实测提高。
  • 先看:skills/objectstack-ask/SKILL.md(第 4 步两条新句、第 6 步合并后的 truncated 句);scripts/check-skills-token-ratchet.mjs 的 ask 行注释;skills/objectstack-ask/evals/metric-selection-fallback.json 新增的 12、13 两例。
  • 两分钟验证:node scripts/check-skills-token-ratchet.mjs && node scripts/gen-mcp-ask-skill.mjs --check,预期 ask 行 1877 / 1877 且生成模块 current。
  • 需要你做的:本 PR 含 ratchet 行与 packages/mcp 生成模块,属 Tier H:需授权账号 APPROVED 审核,之后由席位落地。

What changes

skills/objectstack-ask/SKILL.md, and packages/mcp/src/ask-skill.generated.ts regenerated from it:

  • Step 4, withheldFields (Ask skill: teach withheldFields and top-N aggregate (orderBy, limit, totalGroups) #35191, line 1, card wording verbatim): "withheldFields on a query_records or get_record answer names fields that exist but are hidden from you: say they are not visible to you, never that they are empty." It stays inside mcp: query_records and get_record say which fields field-level security withheld, so an answer says "not visible to you", not "blank" #35137's ruling A (comment 6977609191): the bullet speaks only of a field the answer names, and the server names only a field the caller's own served schema shows.
  • Step 4, top or bottom N (Ask skill: teach withheldFields and top-N aggregate (orderBy, limit, totalGroups) #35191, line 2): "For a top or bottom N, pass orderBy (an aggregation alias or a group key) and limit: N, so the database ranks and cuts the groups." The card's closing clause ("cite totalGroups as how many groups existed before the cut") moved, in those words, into the shared sentence below, as objectstack-ask skill: teach query_dataset's totalGroups next to truncated #35203 asks ("use one shared sentence for both").
  • Step 6, one shared truncated bullet (objectstack-ask skill: teach query_dataset's totalGroups next to truncated #35203): "truncated: true: more rows or groups existed than came back; say the result is partial, and cite totalGroups as how many groups existed before the cut. Without it, say a query_dataset total is unknown, not rowCount." Source text: scope note 6982266158 and the totalGroups describe in packages/spec/src/ai/dataset-tools.zod.ts (present on both the pushed-down and the in-memory window, absent only where the count is not provable). It covers query_dataset and aggregate_records in one place, because step 6 is read on both the governed path (step 3) and the fallback (step 4). "Unknown" is scoped to query_dataset: aggregate_records always answers totalGroups, and a capped query_records page or get_record related list states its own total (contract review 6997032414, M1).
  • Cut, the restatements the shared bullet replaces: step 3's "truncated: true: more rows existed than came back. Say the result is partial." and step 4's "truncated: true on its answer means groups were cut off: say so." Step 3 keeps its warning sentence.
  • Evals: four cases in skills/objectstack-ask/evals/metric-selection-fallback.json: Add comprehensive test suite for Zod schema validation #12 (a query_records answer with withheldFields: ['probability'] → "not visible", never "is empty" or "is blank"), [WIP] Add Chinese version of the documentation #13 (a top-5 query_dataset answer with truncated: true and no totalGroups → "partial", total "unknown", never 5), feat: Comprehensive CRM example demonstrating all ObjectStack protocol features #14 (an aggregate_records top-3 with totalGroups: 41 → cites 41, never "unknown") and Add missing Field.phone() helper and factory methods for Action/Dashboard/Report #15 (a capped query_records page with total: 240 → says 240, never "unknown"). Evals are unpriced by the ratchet (ruling record 6513306068, part 1).
  • Ratchet: the skills/objectstack-ask/SKILL.md row moves 1779 → 1873 → 1877, each measurement written into its note. The raise path is the standing maintainer ruling 「A:先削重复,余额按实测提高」 (2026-10-27), which ruling record 6513306068 (letter B) made the gate-recognised path: the restatements above are cut in the same file first (-151 bytes), and the row moves by the measured remainder only. Text net +377 bytes: 7135 → 7512, less the 20-byte stamp line, ceil(7492 / 4) = 1873 (+94); the M1 fix then took the step-6 bullet from 215 to 230 bytes: 7512 → 7527, ceil(7507 / 4) = 1877 (+4). Pinned AT the measurement with zero headroom. No other row moves.
  • Changeset: .changeset/35191-ask-skill-withheld-totalgroups.md, patch on @objectstack/skills and @objectstack/mcp (the generated module ships in @objectstack/mcp).

content/docs/ai/skills-reference.mdx and skills/README.md were regenerated (gen:skill-docs) and came out byte-identical: they render the frontmatter only, which is unchanged.

Skills size readings (skills/** touched)

Reading Before (origin/main e8a78c4) After (this head)
skills/objectstack-ask/SKILL.md lines 120 125 (+5)
skills/objectstack-ask/SKILL.md ratchet tokens 1779 1877 (+98)
Bundle, all 13 skills/*/SKILL.md, lines 4830 4835 (+5)
Bundle, all 13 skills/*/SKILL.md, bytes 253765 254157 (+392)

No re-wrap is counted as payment: the one re-flowed line (step 3's warning sentence, now on one line) moves 2 bytes and is inside the net figure.

Tests

Ask-skill single source and the mcp package
  • pnpm --filter @objectstack/mcp exec vitest run --maxWorkers=2 src/skill-single-source-34686.test.ts → Tests 3 passed (3) (the generated module and the served /mcp/skill section equal the skill's data loop).
  • pnpm --filter @objectstack/mcp exec vitest run --maxWorkers=2 → Test Files 77 passed (77), Tests 1400 passed (1400).
  • pnpm --filter @objectstack/mcp typecheck → exit 0; check:test-typecheck: OK.
  • Built first: pnpm --workspace-concurrency=2 --filter '@objectstack/mcp...' build → lock VERDICT command-exit 0.
  • All of the above re-run on head f7e199c4 with the same results (one lock run, VERDICT command-exit 0).

No ablation: the diff changes served text and a ratchet row, no tested behaviour.

Acceptance notes

  • The dispatch asked the lines to pay for themselves in the file. Cutting restatement covered 151 of 528 added bytes; the rest of the file outside step 1/2 (held by Ask skill and ADR-0149 D3: scope the ask-back to words with a measure candidate #35158) carries no further restatement, so the row moves by the measured remainder under ruling 6513306068 letter B, quoted above. The seat's contract review checks the deletion and the quote.
  • The shared sentence's "say the result is partial" half is general to truncated: true and true on all four answers that carry it. Its count half reaches only the analytics answers: it cites totalGroups where the answer has one, and says the total is unknown only for a query_dataset answer without it. A capped query_records page and a get_record related list carry no totalGroups and state their own total, which the bullet leaves alone (eval Add missing Field.phone() helper and factory methods for Action/Dashboard/Report #15 pins it).

Verification

Local gate subset (dispatch-gates --commands, narrowed to this diff)

Derived by node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack at ef142a1 and again at f7e199c (the same 88 commands); the readings below are from f7e199c. 85 exit 0, including node scripts/check-skills-token-ratchet.mjs (skills/objectstack-ask/SKILL.md is 1877 tokens (ceiling 1877; headroom 0)), pnpm --filter @objectstack/spec run check:skill-docs, pnpm check:nul-bytes, pnpm check:doc-authoring, node scripts/check-adr-0087-registration.mjs --base origin/main, node scripts/check-empty-changeset.mjs --base origin/main. node scripts/gen-mcp-ask-skill.mjs --check → current.

NOT MEASURED locally (exit 3, PREREQUISITE NOT MET, CI runs them): node scripts/check-plugin-teardown-shape.mjs --self-test (shallow clone cannot reach its pinned fixture commit) and pnpm check:dual-build-cjs-loads (needs every package's dist/; only the mcp closure was built).

pnpm check:pm-dispatch-gates (run outside the 88 above, in the background with a foreground wait): ✓ dispatch-gates self-test (fast tier): 2249 cases pass, exit 0.

Reconciliation: node scripts/pm/dispatch-gates.mjs --ran with exit codes recorded → 88 derived famil(ies) accounted for — 86 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3).

The gate union ran on head f7e199c4.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CazXu8zyYD5PC6J2u7

…N cut and totalGroups

Step 4 says a field named in withheldFields exists but is hidden from the
caller (never empty) and how to ask aggregate_records for a top or bottom N.
One shared truncated bullet in step 6 answers "how many" from totalGroups for
query_dataset and aggregate_records, and says the total is unknown without
it; the two per-tool truncated sentences it replaces are cut. Two eval cases
pin the new teaching. The ratchet row moves by the measured remainder.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CazXu8zyYD5PC6J2u7
@github-actions github-actions Bot added size/s 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 Nov 19, 2026
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see

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

Which tree this was computed on

This run read content/docs from a19faa0327db713561ae56c30b63bf2dc8761a72 — the merge of head f7e199c44de17985794c5b58f7204a4aa43d8402 into base d6d96450568965867c50ef6c306657f0bf7e9bf0, which is what actions/checkout gives a pull_request run. Not the PR head.

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

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin a19faa0327db713561ae56c30b63bf2dc8761a72 && git checkout a19faa0327db713561ae56c30b63bf2dc8761a72
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin d6d96450568965867c50ef6c306657f0bf7e9bf0 f7e199c44de17985794c5b58f7204a4aa43d8402 && git checkout -B drift-repro d6d96450568965867c50ef6c306657f0bf7e9bf0 && git merge --no-ff f7e199c44de17985794c5b58f7204a4aa43d8402

node scripts/docs-audit/affected-docs.mjs --json d6d96450568965867c50ef6c306657f0bf7e9bf0

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

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: ef142a1cd9e497ca9fd088a6c4e59c04ca4c1ae4
Local-runs: none
Scope: skills/objectstack-ask/SKILL.md, skills/objectstack-ask/evals/metric-selection-fallback.json + packages/mcp/src/ask-skill.generated.ts, scripts/check-skills-token-ratchet.mjs
Security-touching: yes

PR #35268 (draft, Fixes #35191, Fixes #35203), rules face: the governed paths are the objectstack-ask skill and its eval file. Read for this record: both cards with every comment (dev report 6996357235, scope note 6982266158), ruling record 6513306068 on #27847 (letter B), #35137 with its ruling A (6977609191), the PR's five files and their diff against merge-base e8a78c4b at this head, the head's check-runs, and the server code the new text describes, at this head (the diff touches none of it). Nothing was built or run; byte counts and the module comparison below were read off the two blobs.

The security line above is a meant yes, not the template's default. The step-4 withheldFields hunk teaches what the agent says about a field that field-level security hides from the caller. That is permission and data-exposure behaviour, and it is the client half of #35137, which was itself declared security-touching and whose bound the maintainer ruled. The hunk stays inside that bound (①) and describes no vulnerability. The line does not change this PR's tier, which its file list already fixes (③).

① Derived judgments

  • Ratchet arithmetic: right. skills/objectstack-ask/SKILL.md is 7135 bytes and 120 lines at e8a78c4b, 7512 bytes and 125 lines at the head; the stamp line version: "18.6.0" is 20 bytes on both. (7512 − 20) / 4 = 1873 exactly, against ceil(7115 / 4) = 1779 before: +94, pinned at the measurement, headroom 0. Hunk by hunk: step 3's last bullet goes from 162 to 78 bytes (−84); the step-4 aggregate_records bullet from 200 to 270 (+70: the 69-byte truncated sentence out, the 139-byte top or bottom N sentence in); the withheldFields bullet adds 176 and the step-6 bullet 215. Net +377. The note's split (151 cut, 528 added) differs from this one by 2 bytes of line-break whitespace on each side and gives the same net. The only change to scripts/check-skills-token-ratchet.mjs is that row and its note; no other row moves.
  • Ruling 6513306068, letter B, part 2: permits the raise. Its conditions, each read: the diff shows deletion of restatement in the same file (one truncated rule stated once per tool in steps 3 and 4 becomes one statement); the PR body quotes the 2026-10-27 words 「A:先削重复,余额按实测提高」 and names the record; the row moves by the measured remainder and no more. The 10402 principle holds: five lines and 5.3% of one file for three shipped tool members is not a small feature written long. Card Ask skill: teach withheldFields and top-N aggregate (orderBy, limit, totalGroups) #35191's "pays for itself in the same file" names the same letter B, whose path is cut first, then the measured remainder; the dev's reading is the ruling's. Restatement does remain in step 2 (table rows 2 and 4, and the paragraph under the table); that is Ask skill and ADR-0149 D3: scope the ask-back to words with a measure candidate #35158's surface, and the ruling does not ask one PR to exhaust the file.
  • The cut lost no instruction: right, and it gained reach. Both cut sentences said "the answer was cut; say so". The step-6 bullet says it for rows and groups, and step 6 is read on both paths. Step 3 keeps its warning sentence whole. The new reach is the source of M1 (④).
  • withheldFields bullet: the card's wording verbatim, inside ruling A. SKILL.md:101-103 equals Ask skill: teach withheldFields and top-N aggregate (orderBy, limit, totalGroups) #35191's quoted bullet character for character, line breaks aside. The server names a field only when the caller's served schema shows it (packages/mcp/src/mcp-http-tools.ts:2541-2551, the served.has test at :2547) and attaches the member to query_records (:3823) and get_record (:4108) answers only. The bullet asks the agent to repeat what the answer names and to infer nothing, so it discloses nothing the ruling withheld. Eval Add comprehensive test suite for Zod schema validation #12's persona (the field is in describe_object, its value withheld) is the one ruling A says is reachable.
  • Top or bottom N sentence: true. With orderBy or limit, aggregate_records goes through bridge.aggregateGroups and the driver's own statement orders, cuts and counts (mcp-http-tools.ts:3963-4001); a server that cannot do that refuses with 501 and never sorts in the application (:3970-3977). "An aggregation alias or a group key" is the input schema's own describe (:3926-3933).
  • Step-6 bullet: true for query_dataset and aggregate_records. query_dataset answers rowCount as the rows served, truncated, and totalGroups only where the count is provable (packages/services/service-analytics/src/dataset-tools.ts:582-610; packages/spec/src/ai/dataset-tools.zod.ts:430-449). aggregate_records answers totalGroups on both of its paths (mcp-http-tools.ts:3997, :4017). False for the record tools: M1.
  • Generated module: equals the skill. The 99 string lines of ASK_SKILL_DATA_LOOP, unescaped, are identical to SKILL.md from the line after its H1 to the end, which is the generator's rule (scripts/gen-mcp-ask-skill.mjs, dataLoopText). The header is the generator's and is unchanged.
  • content/docs/ai/skills-reference.mdx and skills/README.md unchanged: consistent. Both are built from the frontmatter alone (packages/spec/scripts/build-skill-docs.ts:148-195), and the diff touches no frontmatter line.
  • The PR body's second acceptance note: wrong. It says a capped query_records page supports only "the total is unknown". The page states its total (M1).
  • Check-runs on this head: 53 runs, 37 success, 16 skipped, none failed or pending.

② Semver level

patch on @objectstack/skills and @objectstack/mcp is right: Metadata-protocol: none takes patch, and both packages ship the changed text (the catalog, and the generated module behind GET /mcp/skill, packages/mcp/src/skill-md.ts:306). Clause-②: no holds: no accepted set widens or narrows and no public surface grows; the members the text names already ship. Metadata-protocol: none holds: nothing a metadata author can write changes. What does change is what a connected agent says, which is ④'s subject, not a declaration arm. The changeset's sentence that the bullet covers "every answer" is accurate about the text and inherits M1.

③ Boundary flags

  • Deviation 1, overlap-check exit 1 resolved by merging main: accepted. The head is one commit on e8a78c4b, both ratchet rows are kept, and the one commit main has gained since (feat(lint): five publish-time checks for metadata the runtime ignores, and four build probes over what landed #35244) touches none of the five paths or the cited producers.
  • Deviation 2, commit trailer rewritten: the head commit carries the model-free co-author pair and the session line; no model identifier in the commit, the title or the body.
  • Deviation 3, partial self-pay: inside ruling B (①).
  • Deviation 4, the card's closing totalGroups clause moved to step 6: accepted, objectstack-ask skill: teach query_dataset's totalGroups next to truncated #35203 asks for one shared sentence. See nit N3.
  • open_questions: none in the report.
  • SQL push-down: no code hunk, no new id materialisation or in-app join. The new step-4 sentence teaches the database-side order and cut.
  • Author: objectstack-fleet[bot]; no relay note is owed.
  • Landing tier, for the seat (prose face): the body's line 「需要你做的:无,席位落地」 does not match the register as read. The low-risk arm allows skills wording, evals, a changeset releasing @objectstack/skills only, and docs prose (scripts/pm/check-governed-merges.mjs:2311, :2639); a ratchet ceiling or a packages/** path beside the skill stays Tier H (the pin at :7399). This PR carries scripts/check-skills-token-ratchet.mjs, packages/mcp/src/ask-skill.generated.ts and an @objectstack/mcp release, so it waits for an authorized approval whatever this record's security line reads.
  • Outside the diff, read and not reviewed, for the seat to file if it holds: on the HTTP door a count that throws is replaced by the page's own size (packages/metadata-protocol/src/protocol-data-crud.ts:868-874). With the tool's probe row that page can answer truncated: true beside a total of the offset plus the rows read. The stdio bridge leaves total out in the same case (packages/mcp/src/stdio-data-bridge.ts:1526-1530).

④ Design judgment

skills/objectstack-ask/SKILL.md. Two of the three new sentences hold against the code and the cards (①). The third does not.

  • M1, must-fix: the step-6 bullet tells the agent a stated total is unknown. SKILL.md:122-124 (served copy packages/mcp/src/ask-skill.generated.ts:107-109): on truncated: true, answer "how many" from totalGroups; "Without it, say the total is unknown". The two cut sentences were scoped, one under query_dataset, one to aggregate_records ("on its answer"). Step 6 is read for every answer, so the bullet now also governs the record tools. A capped query_records page has no totalGroups and does state its total: servedQueryPage adds truncated: true and keeps every other member of the bridge's answer (mcp-http-tools.ts:2484-2496), and that answer's total is the count of all matching records on the HTTP door (protocol-data-crud.ts:825-886) and on stdio (stdio-data-bridge.ts:1516-1531). main pins it on both doors: packages/mcp/src/query-records-truncated.test.ts:119-125 expects truncated: true beside total: 5. A get_record related list has the same shape (mcp-http-tools.ts:4044-4045; packages/mcp/src/mcp-relation-reads.test.ts:197). A list question over an object larger than one page is the ordinary fallback read, so the agent would say "the total is unknown" on the skill's main list path while the answer in hand gives the number. Neither card asks for this reach: objectstack-ask skill: teach query_dataset's totalGroups next to truncated #35203's scope is a line "beside the truncated lines", shared by aggregate_records and query_dataset.
    What the fix must hold: the "how many" half applies only where totalGroups is the answer's count, or the bullet names the record page's own total. The "say the result is partial" half may stay general; it is true on all four answers. The row is then re-measured, the module regenerated, and the acceptance note and the changeset sentence corrected. If the fix teaches total, read ③'s last bullet first.

skills/objectstack-ask/evals/metric-selection-fallback.json. Both prompts are answer shapes the server produces and both expected_output texts state the teaching correctly. The assertions are weaker than the texts:

  • N1, nit: [WIP] Add Chinese version of the documentation #13 does not bind what it describes. Grading is literal and case-sensitive (packages/qa/scenarios/src/skill-evals/grade.ts). must_contain is two row names; must_not_contain is two lower-case phrases. "There are 5 industries: Software, ... Health" passes, and so does an answer that never says partial or unknown. unknown and partial, the bullet's own words, would bind it. No case covers the arm where totalGroups is present, the aggregate_records top or bottom N sentence, or (after M1) a capped query_records page.
  • N2, nit: Add comprehensive test suite for Zod schema validation #12 can fail a right answer. must_not_contain: ["empty", "blank"] rejects "not visible, which is not the same as empty", the server's own sentence (mcp-http-tools.ts:2529-2531). The prompt also gives no opportunity names, while expected_output lists them by name.

packages/mcp/src/ask-skill.generated.ts. Agrees with the skill line for line (①); it carries M1 with it.

scripts/check-skills-token-ratchet.mjs. The row equals the measurement and the note quotes the two cut sentences as they stood. Agrees with ruling B.

Findings: one must-fix (M1), no should-fix, four nits (N1 to N4). M1 keeps this head from landing; the delta returns to this reviewer.

Implemented-by: claude/issue-35191-ask-skill-lines
Reviewed-by: session_01Utp6CbUb7TcZK1XUAddUmQ

VERDICT: FAIL

…al to query_dataset

Contract review M1: the shared step-6 bullet told the agent the total is
unknown on a capped query_records page, which states its own total. It now
cites totalGroups as the pre-cut count and says the total is unknown only
for a query_dataset answer without it. Eval assertions tightened; two cases
pin the totalGroups arm and a capped query_records page. Ratchet row
re-measured, 1873 -> 1877.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CazXu8zyYD5PC6J2u7
@github-actions github-actions Bot added size/m and removed size/s labels Nov 19, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: f7e199c44de17985794c5b58f7204a4aa43d8402
Local-runs: none
Scope: skills/objectstack-ask/SKILL.md, skills/objectstack-ask/evals/metric-selection-fallback.json + packages/mcp/src/ask-skill.generated.ts, scripts/check-skills-token-ratchet.mjs
Security-touching: yes

Delta round on PR #35268, after record 6997032414 (FAIL at ef142a1c, one must-fix, M1). Read for this record: the dev's delta report (6997500521 on #35191), the diff ef142a1c..f7e199c4 (one commit, a child of the old head, same five files), the whole diff against merge-base e8a78c4b at this head, the PR body as it stands now, and this head's check-runs. Nothing was built or run; byte counts and the module comparison were read off the blobs. In SKILL.md the delta changes the step-6 bullet and nothing else, so what the first record judged about the withheldFields bullet, the top or bottom N sentence and the two cut sentences stands at this head unchanged.

The security line is a meant yes, for the first record's reason: the step-4 withheldFields hunk is still in this head's diff and teaches what the agent says about a field that field-level security hides. It stays inside #35137's ruling A.

① Derived judgments

  • M1 is closed. SKILL.md:122-124 now reads: "truncated: true: more rows or groups existed than came back; say the result is partial, and cite totalGroups as how many groups existed before the cut. Without it, say a query_dataset total is unknown, not rowCount." Read against each answer that carries truncated: true:
    • query_dataset with totalGroups: cite it. Without: the total is unknown, never rowCount. Both true (packages/services/service-analytics/src/dataset-tools.ts:582-610).
    • aggregate_records: always answers totalGroups (packages/mcp/src/mcp-http-tools.ts:3997, :4017), so it is always cited.
    • A capped query_records page and a get_record related list: the "partial" half applies and is true; there is no totalGroups to cite; the "unknown" sentence names query_dataset and so does not reach them. The answer's own total is left alone. With latestPer (no total) the agent is told only that the result is partial, which is all the answer supports.
  • Ratchet arithmetic: right. The file is 7527 bytes and 125 lines at this head (7512 at ef142a1c, 7135 at e8a78c4b); the stamp line is 20 bytes. (7527 − 20) / 4 = 1876.75, ceiling 1877. The bullet went from 215 to 230 bytes, which is the whole +15. Against main the ask row is the only row that moves: 1779 to 1877.
  • Ruling 6513306068, letter B: still holds. The ruling's unit is the PR's diff and body: the diff against main still shows the two restatements deleted in the same file, the body still quotes 「A:先削重复,余额按实测提高」 and names the record, and the row sits at the measurement with no headroom. The row note says what the second measurement is for and names record 6997032414. The +4 tokens come from restoring Ask skill: teach withheldFields and top-N aggregate (orderBy, limit, totalGroups) #35191's own words (N3), not from the M1 scoping, which is shorter than the sentence it replaced. Nothing in the file restates the new bullet.
  • Generated module: equals the skill. The 99 string lines of ASK_SKILL_DATA_LOOP, unescaped, are identical to SKILL.md after its H1 at this head. The old bullet's wording is gone from the tree.
  • Frontmatter untouched, so content/docs/ai/skills-reference.mdx and skills/README.md stay as they are.
  • PR body, read fresh: the step-6 quote, the ratchet figures (1779, 1873, 1877), the size table (+392 bytes, which is 377 + 15), the landing line (Tier H, an authorized APPROVED review, then the seat) and acceptance note 2 now agree with the head and with the code.
  • Check-runs on this head: 57 runs, 39 success, 18 skipped, none failed or pending. The second Check Changeset run, started by the body edit, finished green at 02:12Z.

② Semver level

Unchanged: patch on @objectstack/skills and @objectstack/mcp, Clause-②: no, Metadata-protocol: none. The changeset's step-6 sentence now says what the bullet says, and says the query_records page's total is left alone.

③ Boundary flags

  • Delta report: no deviations and no open_questions. The fix commit carries the model-free co-author pair and the session line.
  • SQL push-down: no code hunk.
  • Author: objectstack-fleet[bot].
  • Landing tier: unchanged. The file list keeps the PR at Tier H, and the body now says so.
  • Carried, outside the diff, for the seat: the HTTP door's count-failure arm (packages/metadata-protocol/src/protocol-data-crud.ts:868-874) can state a page-local total beside truncated: true. The fix does not teach total, so the skill takes no position on it; eval Add missing Field.phone() helper and factory methods for Action/Dashboard/Report #15 reads the count from total on the counted arm, which is right there.

④ Design judgment

skills/objectstack-ask/SKILL.md. The bullet holds against the code for all four answers (①) and against both cards: it is #35203's one shared sentence for query_dataset and aggregate_records, and it carries #35191's closing clause in the card's words. N3 is closed. No new defect found in the text.

skills/objectstack-ask/evals/metric-selection-fallback.json. Ids 1 to 15, unique; each new prompt is an answer shape the server produces.

packages/mcp/src/ask-skill.generated.ts. Agrees with the skill line for line.

scripts/check-skills-token-ratchet.mjs. The row equals the measurement; the appended note is accurate, including "aggregate_records always answers it".

Nits at this head, none affecting correctness or the contract:

  • D1, nit, prose face, the seat's: the body's 先看 line still says two new eval cases (12, 13); four were added. Acceptance note 1's "151 of 528 added bytes" is round one's figure; the additions are 543 bytes at this head.
  • N4, carried, no action: the first record's note on text the server already serves beside the tool or the answer.

Findings: no must-fix, no should-fix. M1, N1, N2 and N3 of record 6997032414 are closed; N4 was recorded as no action. This is the final round for this head. Landing still waits for the Tier H approval.

Implemented-by: claude/issue-35191-ask-skill-lines
Reviewed-by: session_01Utp6CbUb7TcZK1XUAddUmQ

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

维护者速读

  • 改了什么:问数技能 objectstack-ask 多教三件事:字段被字段级权限隐藏(withheldFields)时说「你看不到」而不是「为空」;排名(前 N / 后 N)让数据库用 orderBy + limit 排好再截;结果被截断时引用 totalGroups 作为截断前共多少组,query_dataset 没有它时说总数未知(query_records 分页自带 total,不受影响)。
  • 为什么改:服务端已返回 withheldFields、totalGroups 和数据库排名截断,技能没教,模型可能把隐藏字段说成空值,或把返回行数当总数(Ask skill: teach withheldFields and top-N aggregate (orderBy, limit, totalGroups) #35191、objectstack-ask skill: teach query_dataset's totalGroups next to truncated #35203)。
  • 风险与回滚:只改技能文字与由它生成的 GET /mcp/skill 模块,无代码路径;回滚 = revert。技能 token 天花板 1779 → 1877(+98),按裁决 B 先删复述、余额按实测提高。
  • 先看:skills/objectstack-ask/SKILL.md 第 4 步两句新增、第 6 步 truncated 句;scripts/check-skills-token-ratchet.mjs ask 行;evals 新增 Add comprehensive test suite for Zod schema validation #12–Add missing Field.phone() helper and factory methods for Action/Dashboard/Report #15 四例。
  • 两分钟验证:node scripts/check-skills-token-ratchet.mjs && node scripts/gen-mcp-ask-skill.mjs --check,预期 ask 行 1877 / 1877、生成模块 current。
  • 需要你做的:审阅并合并或批准(Tier H)。达档合同审查:首轮 FAIL 6997032414(M1 已修),delta PASS 6997596097,Head-sha f7e199c44de17985794c5b58f7204a4aa43d8402。席位意见:三句教法与服务端一致,M1 已收窄到 query_dataset,可合。

席位核对 — ACCEPT · repo:objectstack#5 · head f7e199c44de17985794c5b58f7204a4aa43d8402 · 2026-11-19T02:14Z

  • 形态: 5 files, +100/−11; governed skills/**, plus the ratchet script and the packages/mcp generated module → Tier H. ≤ 3000 lines. Fixes #35191, Fixes #35203. Clause-②: no, Metadata-protocol: none, changeset patch. Claim 6995750538, reports 6996357235 and delta 6997500521.
  • 前提实测: L2 read withheldFields / totalGroups against the producers, and query_records / get_record truncated + total (mcp-http-tools.ts servedQueryPage, pinned in query-records-truncated.test.ts), which is what M1 corrected.
  • 合同审查: first round FAIL 6997032414 at ef142a1c (M1 must-fix: the shared truncated bullet reached the record tools); delta PASS 6997596097 at this head, by the same reviewer: M1 closed, N1–N3 taken, N4 left, no new defect. Ratchet 7527 bytes → 1877, ruling 6513306068 letter B; generated module equals the skill. Security-touching: yes (field-level withholding wording), no finding.
  • 门禁: check-runs on head: 57 = 39 success, 18 skipped, none red.
  • 接受的偏差: N4 (some added bytes restate server-served text) left as recorded; the PR body's 先看 line says two new evals, there are four (this record's 速读 is the corrected one).
  • 范围外去向: none new.
  • 落地条款: Tier H. K = 9 first-parent commits on main since merge base e8a78c4b (< 15); mergeable_state clean. This stroke: pm:awaiting-merge + reviewers os-zhuang, hotlong. After a maintainer merge or an authorized APPROVED review the seat lands; on MERGED close-out on Ask skill: teach withheldFields and top-N aggregate (orderBy, limit, totalGroups) #35191 and objectstack-ask skill: teach query_dataset's totalGroups next to truncated #35203.

@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 Nov 19, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 19, 2026 02:16
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit abb40ae Nov 19, 2026
63 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-35191-ask-skill-lines branch November 19, 2026 02:38
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 19, 2026
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 size/m tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

3 participants