Skip to content

docs(skills): teach the grouping fields a grid refuses, the ungranted hook body call and updateById under api.write - #39031

Merged
os-zhuang merged 5 commits into
mainfrom
claude/issue-38655-skills-save-refusals
Dec 2, 2026
Merged

os-zhuang merged 5 commits into
mainfrom
claude/issue-38655-skills-save-refusals

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Part of #38655
Clause-②: no
Metadata-protocol: none

This PR lands the two pages that fit their token ceilings and the first actions.md item. Two actions.md items stay open on the card, because that file has no restatement left to pay for them: action-body-capability-undeclared, and the identity-assignment write an action body is refused. Their text is written and pushed on the backup branch claude/issue-38655-skills-save-refusals-wip (8b30ebeb, no PR); see Acceptance notes.

维护者速读

  • 用户能看到什么变化:照技能包让 AI 写应用的人,在列表分组、数据钩子和动作按钮三处,会先读到哪些写法在保存时被拒、该怎么改;此前技能包没写,要到保存被拒才知道。
  • 为什么做:平台新增了三条保存期拒绝,技能包教的比平台拒的少;这是替照技能包写配置的 AI 作者补上。
  • 出错会怎样:最坏是某句教学写错,AI 作者照着写出仍被拒的配置;只改文字,可直接撤回。
  • 要你做什么:审阅这三页的文字改动。

What changes

Text only, in three published skill pages. Each sentence follows the merged rule explanation in packages/lint/src/rule-explanations/ (list-view-field-refs.ts, record-writes.ts), read at 444dce61.

  • skills/objectstack-ui/rules/list-views.md, Grouping: on a grid (the default type) a grouping level's field is a stored single-valued field of the object. A multi-valued, JSON-stored or formula field is refused at validate and publish as list-view-group-field-ungroupable (show it as a column). Dotted grouping is on main, so the same sentence covers it: a dotted path is refused as list-view-field-dotted (group by the lookup itself).
  • skills/objectstack-data/references/data-hooks.md, Capabilities: a hook body call whose token is missing is refused at save as hook-body-capability-undeclared (an error from os validate, os build, os lint and a runtime save, 422 INVALID_METADATA); add the token the message names, or remove the call. The paragraph names the spellings the rule reads, and the token table under it is the list the rule judges. Its api.write row now lists every write leaf the sandbox gates, updateById(id, patch) included.
  • skills/objectstack-ui/rules/actions.md, opening paragraph: a body writes through ctx.api.object(X).update(...) or .updateById(id, patch) under api.write; without the grant the write is refused at save (action-body-write-capability-undeclared, which the page already named).
  • .changeset/38655-skills-save-refusals.md: @objectstack/skills patch, with the list of what was deleted to pay for each addition.

Skills size, both readings (tokens are the ratchet's own count):

File Lines before Lines after Bytes before Bytes after Tokens before Tokens after
rules/list-views.md 407 409 18035 18035 4509 4509
rules/actions.md 271 270 15669 15669 3918 3918
references/data-hooks.md 851 847 40480 40477 10120 10120
Every SKILL.md, summed 2144 2144
Every .md under skills/ 17093 17090
Ratcheted bundle 182270 182270

No ceiling row moves. Each addition is paid for by deletion in its own file; the changeset lists every cut.

Read first, by risk:

  1. skills/objectstack-data/references/data-hooks.md, the Capabilities hunk: the reworded paragraph is the one place an existing sentence changed meaning order (the save refusal now comes before the sandbox throw). The cuts in this file are the "What Are Hooks?" heading with its one sentence, and the Status row of the body / handler table.
  2. skills/objectstack-ui/rules/list-views.md, the Grouping hunk, then the userFilters hunk: it drops "and the validate list-view-mode lint reports it" after the parse rejection.
  3. skills/objectstack-ui/rules/actions.md, the new-tab warning: it no longer names the ActionParam[] type.

Two-minute verification: node scripts/check-skills-token-ratchet.mjs prints the three files at 4509, 10120 and 3918 tokens with headroom 0 and ends on its ✓ line.

Tests

No package source changes, so no package test or typecheck is owed. No behaviour a test pins changed, so no ablation.

Acceptance notes

  • Held, not in this PR: the two remaining actions.md items. With them the file measures 16206 bytes, 4052 tokens, against a ceiling of 3918 (+134), after the one cut the file offers. The ratchet's earlier notes on this row say the same ("Nothing else in the file restates another passage"). Moving the row is outside this card's claimed file surface, so the text waits on the backup branch named above.
  • data-hooks.md: the method table under "the cross-object repo" still lists update and not updateById; the api.write token row now names it. Not widened here.
  • check:closed-ceremony-text crashes locally in its self-test with spawnSync git ENOBUFS (the tracked-file listing overflows the default buffer in this container). Not measured locally; CI reads it.

Verification

Local run at e284151c, the derived list of node scripts/pm/dispatch-gates.mjs --commands (51 commands).

Gate readings
  • Exit 0 (46 of 51): check-skills-token-ratchet and its self-test, check:skill-refs, check:skill-served-sections, check:skill-links, check:skill-identifier-liveness, check:skill-compatibility, check:skill-frame-sync, check:doc-authoring, check:doc-formula-expressions (after building its closure), check:pm-skill-id-lint, check:role-word, check:nul-bytes, check:published-files, check-empty-changeset, check-changeset-no-major, check-adr-0087-registration, check:changeset-gate-self-tests, check-comment-mask-corpus (24733 files, 0 disagree; a second run with a longer limit after the first timed out), and the remaining whole-tree and self-test commands on the list.
  • NOT MEASURED, prerequisite not met (exit 3, no full build in this worktree): check:dts-closure, check:dual-build-cjs-loads, check:lean-entry-closure, check:sourcemap-no-sources-content. Reason: they read built output of every package; this diff touches no package. CI runs them.
  • NOT MEASURED: check:closed-ceremony-text (the crash above), and check:skill-examples (outside the derived list; needs the client SDK built; no checked example block changed).

Generated by Claude Code

The Grouping section names list-view-group-field-ungroupable (a multi-valued,
JSON-stored or formula field as a grid grouping level) and the dotted path a
grid grouping level refuses (list-view-field-dotted), each with its fix.
Paid by deletion in the same file; the token count stays 4509.

Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ
Co-authored-by: Claude <noreply@anthropic.com>
…k body call

The Capabilities section names hook-body-capability-undeclared, the doors that
refuse it, the calls the rule reads and the fix; the api.write row lists every
write leaf the sandbox gates, updateById included. Paid by deletion in the
same file; the token count stays 10120.

Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ
Co-authored-by: Claude <noreply@anthropic.com>
An action body may write through ctx.api.object(X).updateById(id, patch); it
takes the api.write grant like update, and without it the write is refused at
save. Paid by deletion in the same file; the token count stays 3918.

Claude-Session: https://claude.ai/code/session_01WGufzhKEbEnW8pwZRgK2gJ
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m 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 2, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ

2026-12-02T04:22Z · Lint · repo & tooling gates is red at e284151c on pnpm check:closed-ceremony-text: spawnSync git ENOBUFS at scripts/check-closed-ceremony-text.mjs:82 (trackedFiles, in --self-test). Not this PR's: the tracked-file listing under packages, content/docs and .changeset passes Node's 1 MiB default buffer once any PR adds a path there (this one adds its changeset). Fleet-wide, fix in flight as #39025 / PR #39027. Held: origin/main is merged in after #39027 lands, then CI re-runs. No re-arm before that.

…ills-save-refusals

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhKEbEnW8pwZRgK2gJ

Final green head · 2026-12-02T05:13Z · zone osa-data
Head-sha: 7fb152b

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

Contract-review-claim: session_01WGufzhGA3zoCFquQgku4pm · head 7fb152b · 2026-12-02T05:17Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 7fb152bd6bc380743f5f214963cec89499bd4fab
Local-runs: none
Scope: skills/objectstack-data/references/data-hooks.md, skills/objectstack-ui/rules/actions.md, skills/objectstack-ui/rules/list-views.md + none
Security-touching: yes

Inputs: card #38655 (body and its four comments, through dev report 7334623230), PR #39031 (body, 4-file list, net diff against main), and the check-runs on this head (28 success, 18 skipped, 0 failure). The diff holds no implementing file: three skill pages and one changeset. The rules the pages teach are on main and were read there, not reviewed. Security-touching reads yes because the data-hooks.md and actions.md hunks teach the sandbox capability grant (body.capabilities, the api.write token and the save refusal of an ungranted call), which is permission behaviour the path names do not show.

① Derived judgments

  • No accept-set changes: no schema, rule, validator or runtime file is in the diff. Right for a card that asks for skill text only.
  • Public surface: three files of the published @objectstack/skills bundle change wording. Each file pays for its addition by deletion in the same file (+20/−18, +6/−7, +12/−16 lines), and no ratchet row moves; Lint · repo & tooling gates and Lint · docs & code guards are green on this head, so the token ratchet, skill-refs, skill-links and identifier-liveness verdicts stand as CI gave them.
  • list-view-group-field-ungroupable, list-view-field-dotted, hook-body-capability-undeclared and action-body-write-capability-undeclared are all live rule ids on main. Right.
  • The PR is partial by declaration: Part of #38655, so a merge leaves the card open. Right, since two actions.md items of the card are not in this head.

② Semver level

.changeset/38655-skills-save-refusals.md declares @objectstack/skills: patch. The diff publishes reworded skill text and nothing else, so patch is the level. Check Changeset is green.
Clause-②: no — agreed. No authorable key, rule or runtime answer changes; the refusals the pages now name shipped in PRs #38651, #38643 and #38650.

③ Boundary flags

  • Open question 1 (the two remaining actions.md items exceed that file's token ceiling): answered for this head by option C in effect, held and disclosed. The body's account is truthful as far as it can be read without a run: actions.md at this head names updateById under api.write and does not name action-body-capability-undeclared or the identity-assignment write; the backup branch claude/issue-38655-skills-save-refusals-wip exists at 8b30ebeb with no PR. The +134-token figure is the dev's measurement, not re-measured here. How the remainder lands (a ratchet row raise or a cut) is ESCALATED to the seat and maintainer; it is not this head's to settle, and the card must stay open until it does.
  • Open question 2 (Part of in place of the closing keyword): answered, option A. A closing keyword would close a card with two items open; PR-body guards is green on the Part of form.
  • Dev flag, data-hooks.md method table lists update and no updateById: see N1 below.
  • Dev flag, check:closed-ceremony-text ENOBUFS: closed outside this PR (the fix from repo gates: check-closed-ceremony-text dies with ENOBUFS (git ls-files output past the 1 MiB default buffer) — every PR that adds a path under packages/, content/docs/ or .changeset/ now fails Lint & Repo Gates #39025 is merged into this head, and the gate family is green).
  • SQL push-down: not applicable, no query code in the diff.

④ Design judgment

No must-fix, no should-fix.

skills/objectstack-ui/rules/list-views.md, read against packages/lint/src/rule-explanations/list-view-field-refs.ts on main:

  • Grouping hunk holds. Grid-only scoping ("On a grid (the default type)") matches "a list view whose type is grid or absent". The three refused classes and their examples (multiselect, checkboxes, tags, multiple: true; json, address; formula) match the explanation's list. "Refused at validate and publish" matches "the publish is refused and os validate and os build fail". The fix (show it as a column) is the explanation's first fix. The dotted-path clause matches the list-view-field-dotted entry's aggregate paragraph (account.name refused whatever its head or leaf on a grid) and its way out (group by the single-valued relation itself). Tried to break it on kanban and gallery: the sentence does not claim them, which is what the rule does.
  • The deletions remove no rule. The dropped "still ANDed" is carried by "elements must all match"; the two dropped cross-skill pointers each survive a few lines above (line 182, line 396); the dropped lint mention leaves the parse rejection, which is the refusal an author meets first.

skills/objectstack-data/references/data-hooks.md, read against rule-explanations/record-writes.ts, validate-action-body-capabilities.ts, authoring-rules.ts and packages/runtime/src/sandbox/quickjs-runner.ts on main:

  • Capabilities paragraph holds. Severity error; the rule is registered commands: ALL, surfaces: CLI_AND_RUNTIME, runtimeTypes including hook, so "os validate, os build, os lint and a runtime save" is right, and 422 INVALID_METADATA is the code the migration entry for the rule states for the hook door. The fix sentence is the explanation's. The fallback (a spelling the rule does not read still throws in the VM, with capability 'TOKEN' not granted to hook 'NAME') matches the runner's message and the explanation's "leaves the author where the sandbox would".
  • api.write row holds: insert, update, updateById, delete, updateMany, deleteMany, upsert is the runner's WRITE list and the rule's SANDBOX_API_WRITE_METHODS, in order. The table under the paragraph agrees with SANDBOX_CAPABILITY_GATES token by token, ctx.title with an argument under api.read included, and the email.send row already says a hook body is never granted it.
  • Deleting the Status row is safe: the table header still marks handler "(deprecated)".
  • N1 (nit) — the api.write row now names updateById(id, patch), updateMany, deleteMany and upsert, and the method table under "the cross-object repo" still teaches only insert, update and delete, so four leaves are named with no call shape (three with no signature at all). True as a token list, which is what the card asked for; thin as teaching. The PR body discloses it. Left as a follow-up, not a fix on this head.
  • N2 (nit) — "a call on ctx, on a local bound once to it (const log = ctx.log)": "it" reads as ctx, while the example binds a ctx member. The explanation says "the ctx member itself … a local bound once to it". Both bindings are read by the rule, so nothing false is taught.

skills/objectstack-ui/rules/actions.md, read against the action-body-write-capability-undeclared entry and the runner:

  • Opening paragraph holds. updateById is installed on the action face behind api.write, and the rule finds it as a write leaf, so ".update(...) or .updateById(id, patch) … with capabilities: ['api.write']; without it, a write is refused at save" is right, id included.
  • The new-tab warning keeps its instruction; only the ActionParam[] type name is gone.
  • Not in this head, and not judged: action-body-capability-undeclared and the identity-assignment write. The card's actions.md line is two-thirds open (see ③).

Implemented-by: claude/issue-38655-skills-save-refusals
Reviewed-by: session_01WGufzhGA3zoCFquQgku4pm

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm

L1 review · PR #39031 (#38655) · head 7fb152b · 2026-12-02T05:21Z

ACCEPT, on head 7fb152bd6bc380743f5f214963cec89499bd4fab. This is a governed skills PR, so the hand-off is Tier H through the seat.

  • Contract review. The CONTRACT_REVIEW_TIER review on this head is a PASS with no must-fix and no should-fix, and two nits (comment 7335848734). It records Security-touching: yes, because the data-hooks.md and actions.md hunks teach the sandbox capability grant. Labels are the seat's call.
  • Face. l1-face is CLEAN: checks 28 success, 18 expected skips, 0 failed, 0 pending, and mergeable_state is clean. The PR is governed (3 of 4 paths, skills) at 101 lines. Part of #38655 is right: two actions.md items are held back over the skills token ceiling on a wip branch (8b30ebeb, no PR), and the body says so. The card stays open.
  • Changeset, read sentence by sentence. It is true to the tree: @objectstack/skills patch, Clause-②: no, Metadata-protocol: none, text only. Each addition is paid for by deletions in its own file, so the token counts hold. The three refusal rules it names (list-view-group-field-ungroupable / list-view-field-dotted, hook-body-capability-undeclared, action-body-write-capability-undeclared) exist on main with the doors stated, as the contract review confirms.
  • Nits, no action. N1: the api.write row names leaves the method table does not show; the body discloses this as follow-up. N2: one loose antecedent.

Landing rule B: Part of card #38655 keeps pm:dispatched after the merge. The held-back remainder needs a ratchet raise or a cut, which is the seat's or the maintainer's call.

Next: the seat's Tier H hand-off.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS

席位核对

ACCEPT — PR #39031 @ 7fb152bd6b (Part of #38655; zone osa-data). Checked 2026-12-02T05:24Z against GitHub.

  • Shape: draft, mergeable_state clean; text only in three published skill pages (list-views.md, data-hooks.md, actions.md's updateById line), +60/−41; token rows unchanged.
  • Read myself: each sentence follows the merged rule explanations in packages/lint/src/rule-explanations/, with the rule ids the platform refuses on (list-view-group-field-ungroupable, list-view-field-dotted, hook-body-capability-undeclared).
  • Part of: two actions.md items stay on the card: that file has no headroom left under its token ceiling. Their text is on claude/issue-38655-skills-save-refusals-wip (8b30ebeb) and joins through the ratchet's standing raise path (ruling record 6513306068) or a cut; skills: teach three new save-time refusals — an ungroupable list-view grouping field, updateById in a body without api.write, and a hook or action body calling an ungranted capability #38655 stays open and claimed.
  • Reviews: contract review PASS at CONTRACT_REVIEW_TIER on this head, 7335848734 (nits only); L1 ACCEPT 7335861830. The record reads Security-touching: yes, because the page teaches the sandbox capability grant. The seat adds no security label; the maintainer decides.
  • Gates: 28 success · 18 expected skip · 0 failed; landing-k K = 0; l1-face CLEAN.
  • Landing: Tier H (skills/**, low-risk skills arm). Handed off.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS

维护者速读

@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 2, 2026
@objectstack-fleet
objectstack-fleet Bot requested a review from os-zhuang December 2, 2026 05:25
@os-zhuang
os-zhuang marked this pull request as ready for review December 2, 2026 05:26
@os-zhuang
os-zhuang added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit f2ca884 Dec 2, 2026
54 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-38655-skills-save-refusals branch December 2, 2026 05:49
@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 Dec 2, 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

Development

Successfully merging this pull request may close these issues.

3 participants