Skip to content

docs(skills): the objectstack-ui router names action refusals - #35279

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-35178-actions-router-refusals
Nov 19, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/issue-35178-actions-router-refusals

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

Fixes #35178

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:objectstack-ui 技能入口路由表的 Actions 行加上「refusing by code (refusals)」,与 rules/actions.md 该节标题同词;同文件 First checks 第 3 条删去一处复述(": it decides what to write"),token 棘轮该行 2277 → 2279。
  • 为什么改:规则文件已教授动作的 refusals 声明(按码拒绝并返回翻译后的消息),但路由表没提,找「动作被拒时的提示」的模型不会被导向该规则。
  • 风险与回滚:只动发布技能的一行路由文字、一处删句、棘轮一行与 changeset;无运行时影响。回滚 = revert 本 PR。
  • 先看:① skills/objectstack-ui/SKILL.md 路由表 Actions 行与 First checks 第 3 条(被删的从句是否确属复述);② scripts/check-skills-token-ratchet.mjs 的 objectstack-ui SKILL.md 行注释与 +2 上调。
  • 两分钟验证:node scripts/check-skills-token-ratchet.mjs,预期 skills/objectstack-ui/SKILL.md is 2279 tokens (ceiling 2279; headroom 0) 且末行 ✓。
  • 需要你做的:审阅并合并(skills/** 属 Tier H 受管面)。

What changes

  • skills/objectstack-ui/SKILL.md, routing table: the Actions row ("A button or operation: locations, visibility, dialog and toast copy, params, new tab, the body's ctx") gains ", refusing by code (refusals)" — the words of rules/actions.md's heading "Refusing by code (refusals)" — so a model looking for a refused action's message is routed to that rule (+31 bytes).
  • Same file, paid down first: First checks 3 drops ": it decides what to write" (-26 bytes), which restates First checks 1's "where they differ, the installed contract is right". The paragraph is reflowed over the same four lines (a re-wrap moves no bytes and pays nothing).
  • scripts/check-skills-token-ratchet.mjs: the skills/objectstack-ui/SKILL.md row moves by the measured remainder, 2277 -> 2279, pinned AT the measurement (zero headroom), with its row note.
  • .changeset/35178-ui-router-names-refusals.md: @objectstack/skills patch, carrying both declaration lines.

Raise authority, quoted verbatim and untranslated — the standing ruling of 2026-10-27 「A:先削重复,余额按实测提高」, made the gate-recognised path by ruling record 6513306068 (letter B): restatement in the same file is cut first, the remainder moves by measurement.

Ratchet row: 9128 bytes (9108 priced) / 2277 tokens -> 9133 bytes (9113 priced) / 2279 tokens; measured remainder +2, ceil((9133 - 20) / 4) == 2279.

Skill size readings (tree objectstack-ai/objectstack, base f4dbcc21 -> head 8254c29b):

Reading Before After
skills/objectstack-ui/SKILL.md lines 169 169
skills/objectstack-ui/SKILL.md bytes / priced tokens 9128 / 2277 9133 / 2279
All published skills/*/SKILL.md lines (sum) 4830 4830
All published skills/*/SKILL.md bytes (sum) 253765 253770

Tests

Text-only change to served skill text and one ratchet row; no tested behaviour changed, so no ablation.

Token ratchet, gate and self-test (head 8254c29)
node scripts/check-skills-token-ratchet.mjs                -> exit 0
✓ check-skills-token-ratchet: skills/objectstack-ui/SKILL.md is 2279 tokens (ceiling 2279; headroom 0).
✓ check-skills-token-ratchet: 59 authored bundle file(s) within their ceilings; 10 generator-owned file(s) and 38 eval fixture(s) measured, not ratcheted.
node scripts/check-skills-token-ratchet.mjs --self-test    -> exit 0
✓ check-skills-token-ratchet self-test: 104 cases pass.

Before re-pinning the row, the same gate read 2279 / 2277 (+2) and exited 1 — the remainder this PR carries.

Acceptance notes

  • Most traps below pass it. (First checks 4) sits next to the Traps heading "each parses, then fails at run time"; not cut, because passing os validate is a wider claim than parsing.
  • The frontmatter description lists *.action.ts while the routing table's In column says src/actions/*.actions.ts; examples/ uses both spellings (2 vs 1). Noted only.

Verification

Local gate union derived by node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack at head 8254c29b (3 paths, 67 commands); every family CI runs is read from this PR's check-runs.

Local run, reconciled with --ran (head 8254c29)
Run reconciliation — 67 derived, 65 run, 2 NOT-MEASURED, 0 UNRUN.
✓ dispatch-gates --ran: 67 derived famil(ies) accounted for — 65 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3).
  • 65 run, exit 0, including check:skill-docs, check:skill-served-sections (24 served sections, 10 JSON fences pass), check:skill-identifier-liveness, check:skill-links (267 links, 138 fragments), check:doc-authoring, check:pm-skill-id-lint, check:nul-bytes, check:doc-formula-expressions (after building the @objectstack/lint closure), check:pm-dispatch-gates (fast tier, 2249 cases).
  • pnpm --filter @objectstack/spec run check:skill-refs -> exit 0, "9 generated files in sync with packages/spec": no skill generator output changes.
  • NOT MEASURED: check:dual-build-cjs-loads, check:lean-entry-closure, reason: PREREQUISITE NOT MET (exit 3) — they load every package's built dist/, which this docs-only diff does not build; CI runs them.
  • No package test / typecheck owed: the diff touches no package source.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CazXu8zyYD5PC6J2u7

The Actions row of the routing table names `refusals` in the words of
rules/actions.md's heading, so a refused action's message routes there.
Paid down first by one restatement cut in the same file; the +2 token
remainder is pinned at the measurement in the ratchet row.

Claude-Session: https://claude.ai/code/session_01Utp6CazXu8zyYD5PC6J2u7
Co-authored-by: Claude <noreply@anthropic.com>
@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
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 8254c29be93b43702e91c9d5a23473679547fbfb
Local-runs: none
Scope: skills/objectstack-ui/SKILL.md + scripts/check-skills-token-ratchet.mjs
Security-touching: no

PR #35279 for card #35178, read as the net diff against main at merge-base f4dbcc2153566226f283c79c73255369c2c97587 (3 files, +25 −6). Inputs: the card body and both of its comments (claim 6996390706, dev report 6996784487), ruling record 6513306068, the PR body and file list, the diff, the check-runs on the head, and the cited code read in the tree at the head. main has moved one commit since the merge-base (d6d9645056, #35269); it touches no path read here. Byte counts below were taken with wc -c over the two git blobs; nothing was built or run against the head.

① Derived judgments

  • Accept set: unchanged. No schema, validator or runtime file is in the diff. The key the new row text names already parses at the base: ActionSchema.refusals, packages/spec/src/ui/action.zod.ts:1535.
  • Public surface: text only. @objectstack/skills ships the skills/** tree as a catalogue (packages/skills/package.json; its only export is ./package.json). The shipped entry file changes in two places: the Actions row of the routing table gains the words ", refusing by code (refusals)" (+31 bytes), and First checks 3 loses ": it decides what to write" (−26 bytes). 169 lines before and after.
  • What the shipped agent is taught: nothing new to write, nothing withdrawn. It is routed to a rule that already teaches a key that already parses. The declared Clause-②: no is right, and so is the declared Metadata-protocol: none: what a metadata author can write is identical at base and head.
  • One gate constant moves: the ceiling of skills/objectstack-ui/SKILL.md goes 2277 → 2279 in an unpublished script. Judged under ④.

② Semver level

  • .changeset/35178-ui-router-names-refusals.md bumps @objectstack/skills by patch. That is the level AGENTS.md Post-Task Checklist step 3 gives a none kind on a package the diff moves, and @objectstack/skills is the one package that publishes skills/**. scripts/** publishes nothing, so no second package is owed a bump.
  • Both declaration lines are line-initial in the changeset body and in the PR body, and they agree. No BREAKING banner, migration mapping or ADR-0087 disposition is owed: nothing an author can write is removed or renamed.
  • The changeset's three sentences agree with the diff (the row names refusals in the heading's words; the agent is sent to rules/actions.md; First checks 3 loses one clause). The changeset is a prose face and stays with the lane seat's ACCEPT; the one loose phrase in it is N1 below.
  • Check Changeset is green on the head.

③ Boundary flags

  • open_questions: empty in the dev report. Nothing to answer.
  • Deviation 1 (commit trailer): the head commit carries Claude-Session plus the model-free Co-authored-by: Claude pair, which is the pair AGENTS.md lines 448–449 require. Holds.
  • Deviation 2 (PR-body footer form) and deviation 3 (the local gate loop ran in the background): neither touches a file in scope or a published byte. The footer is PR-body prose and stays with the seat's ACCEPT; PR-body guards is green.
  • Out-of-scope finding (*.action.ts in the frontmatter, src/actions/*.actions.ts in the routing table's In column): confirmed, pre-existing at the base (the table came with docs(skills): objectstack-ui SKILL.md becomes a router #35077, ab1c734a72), and outside the card's Done-when; the diff re-ships the cell unchanged. I read it as more than the "observation only" the report gives it. First checks 2 (SKILL.md:34-36) tells the agent to read the project's own files by "the globs under Where to go", and the plural glob does not match what the platform itself writes: the type registry declares **/*.action.ts (packages/spec/src/kernel/metadata-plugin.zod.ts:969), and os generate action takes its file name from that registry (packages/cli/src/commands/generate.ts:473 and :1993-1996; content/docs/deployment/cli.mdx:2742, written as NAME.action.ts). An agent that globs src/actions/*.actions.ts misses a generator-written action and may add a duplicate beside it. Loading is not affected (stacks register actions by import). Escalated to the seat: one follow-up card through the filing gate, to settle the In column's spelling against the registry; not a change to this head.
  • Author: the PR's user.login is objectstack-fleet[bot], so no off-relay note is owed.
  • SQL push-down: the diff holds no data-access code, so there is no new id materialisation or in-app join to judge.
  • Why the security line reads no: no hunk teaches permission, sharing, credential, authentication or other security behaviour. The row hunk adds a routing phrase that names the catalogue of declared error codes and their user-facing sentences; that catalogue shapes what a thrown business refusal is answered with and gates no access, and the section it routes to (unchanged by this PR) presents it that way. The First checks hunk removes an authority clause about the Zod contract. The script hunk is one ceiling number and its comment, where "token" is the unit of context size.
  • Check-runs on the head: 45 runs, all completed: 29 success, 16 skipped, none red, none pending. The skipped ones are 18.x upgrade harness (opt-in), Packed-tarball smoke (opt-in), Queue verdict, Borrowed queue verdict, Schedule gate, Temporal Conformance (live PG + MySQL), Dogfood Verify CLI, the UI and docs families a diff with no ui/ or docs path does not start (Build & E2E UI, Build UI Deps, Build Docs, Lint UI, Type Check UI, Plan Test UI shards, UI Published Artifacts), and the two unexpanded matrix rows of Dogfood Regression Gate and Test UI, whose aggregate runs are green. Whether each skip is an expected one is the seat's pre-landing check. Green among the rest: Lint & Repo Gates, Lint · docs & code guards, Lint · scoped · tooling self-tests, Lint · PM dispatch-gates, Governed Surface Queue Guard, Check Changeset, PR-body guards, the four Type Check runs, Test Core and its shards, Live E2E UI.

④ Design judgment

No must-fix, no should-fix.

skills/objectstack-ui/SKILL.md — the routing row (line 85)

  • True against the code. The key is declared at packages/spec/src/ui/action.zod.ts:1535 (refusals: z.record(…, ActionRefusalSchema); the entry schema at :2637). It is answered only for a type: 'script' action with a js body: the refinement at :2696-2712 puts an issue at refusals on any other action, and it is wired at :3246. At run time the action body runner catches the body's throw and answers it from the catalogue (packages/runtime/src/sandbox/body-runner.ts:714-721, calling resolveActionRefusal at packages/runtime/src/sandbox/hook-refusal-catalogue.ts:441); the declared sentence leaves as userMessage with the entry's status (:478), translated at objects.OBJECT._actions.ACTION.refusals.CODE.message (:193, actionRefusalMessageKey). The console shows that sentence in the action's failure toast (ui/packages/core/src/actions/ActionRunner.ts:2251-2262, where an authored errorMessage still wins; ui/packages/core/src/actions/actionKeys.ts:341-348). "Refusing by code" is an accurate name for this.
  • The row routes to text that exists and says what it promises. The row links ./rules/actions.md; that file's line 134 is the heading "Refusing by code (refusals)", the row's own words but for the capital. Lines 136–142 teach the declaration, the throw, userMessage, the translation address and the errorMessage override, and the worked example declares and throws a code at lines 226 and 231. Its onward pointer resolves too: skills/objectstack-data/references/data-hooks.md:830, "Declared refusals (refusals)". The card's Done-when line ("in the same few words as the rule file's heading") is met literally.
  • Against the accepted scenario. The bundle's own case for this is skills/objectstack-ui/evals/views-apps-actions-pages.json, id 20 (lines 194–203): "Make it refuse in the caller's language, with the code NOT_DRAFT and a 409." At the base the Actions row met that request only through "toast copy" and the word "operation"; at the head it also carries the request's own terms, "refusing" and "code", beside the key the answer must contain, and it opens the file that holds the answer.
  • Nothing else is made false, duplicated or contradictory. skills/objectstack-i18n/SKILL.md:171 already sends its reader to "objectstack-ui → Actions" for this catalogue, which the router now names. The word appears twice in the entry file in two senses, plain prose at line 39 (what a schema refuses) and the code-formatted key at line 85; the formatting keeps them apart and neither sentence contradicts the other. No generated file derives from the lines changed: the frontmatter is untouched, references/_index.md is generated from the spec, and the two sections served by exact heading (### List Views, ## Actions) are unchanged.

skills/objectstack-ui/SKILL.md — the cut in First checks 3 (lines 37–42)

  • The step still gives its whole instruction: references/_index.md points at each type's Zod source, and the agent is to "Read it for exact keys, enum members and refusals, never from memory". The clause removed gave no action of its own; it asserted that the installed contract is the authority for what gets written. That assertion is still made in this file: by First checks 1 ("where they differ, the installed contract is right", lines 32–33) and by the step's own lead and imperative. The sentence about the served JSON Schema that follows keeps its own two warnings (a defaulted key reads as required, a bare-string predicate as {}), so the Zod source and the served shape are still told apart. I find no instruction lost.
  • No other file leans on the removed words: the only other occurrence of "decides what to write" in the tree is released history in packages/skills/CHANGELOG.md:216, and no eval asserts on it.

scripts/check-skills-token-ratchet.mjs — the row and its note (lines 962–971), against ruling record 6513306068, letter B

  • The ruling's conditions, one by one. (a) Teaching text: the file is a SKILL.md. (b) A deletion of restatement in the same file is visible in the diff: the 26-byte clause above. (c) The PR body quotes the 2026-10-27 ruling verbatim; I compared the quoted span in the PR body, in the row note and in the script header against the span in record 6513306068, and all three are byte-identical. (d) The row moves by the measured remainder and is pinned at the measurement: the base blob is 9128 bytes, 9108 priced after the 20-byte stamp line, 2277; the head blob is 9133 bytes, 9113 priced, 2279; the row reads 2279, zero headroom. (e) The 10402 principle: the net growth is 5 bytes. The ruling permits this raise without a per-card ruling, and the card's own Done-when names the same path.
  • The note, sentence by sentence. "+31 bytes" and "-26 bytes" are the measured lengths of the added and removed spans; its byte and unit figures (9128 bytes and 9108 priced at the base, 9133 and 9113 priced at the head, 2279) are what the blobs measure; the hand-audit line resolves to 2279. The note follows the row history's existing form (card, what changed, what paid, the ruling, the measurement). The self-test pins no number of this row. The gate and its self-test run in the Type Check · source gates lane (.github/workflows/lint.yml:5481-5487, closed by that job's lane-verdict step), which is green on the head.
  • Why 5 bytes cost 2. The base sat exactly on a multiple of four (9108 = 2277 × 4), so any net growth of 1 to 4 bytes costs one unit and 5 costs two. I looked for a further same-file restatement that would have paid the last 5 bytes and found none cleaner than the one taken; the candidate the PR body names and declines ("Most traps below pass it" beside the Traps heading) is rightly kept, since passing os validate is a wider claim than parsing.

Nits (no effect on correctness or the contract; none asks for a change to this head)

  • N1 (nit) — the row note and the changeset say the cut clause restated First checks 1. That sentence is conditional on a version mismatch ("where they differ"); the nearer twin is the imperative the clause trailed, in the same step. Both hold and the outcome is the same, so the attribution is only loose. Accepted as written.
  • N2 (nit) — the entry file is now 9133 bytes, at the top of the "6–9 KB" router target that the row history quotes from decision record 6943107981; it was 9128 at the base, and no gate reads that target. Recorded so that the next addition to this file is paid in full.

Implemented-by: claude/issue-35178-actions-router-refusals
Reviewed-by: session_01Utp6CbUb7TcZK1XUAddUmQ

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ

维护者速读

  • 改了什么:objectstack-ui 技能入口路由表的 Actions 行加上「按码拒绝 (refusals)」,与 rules/actions.md 该节同词;同文件 First checks 第 3 条删去一处复述从句;token 棘轮该行 2277 → 2279。
  • 为什么改:规则文件早已教动作的 refusals 声明(按码拒绝、返回翻译后的消息),路由表没提,找「动作被拒提示」的模型到不了该规则(ui skill router: name action refusals on the Actions row #35178)。
  • 风险与回滚:只动发布技能一行路由文字、一处删句、棘轮一行与 changeset;无运行时影响。回滚 = revert。
  • 先看:skills/objectstack-ui/SKILL.md 路由表 Actions 行;scripts/check-skills-token-ratchet.mjs 该行注释与 +2。
  • 两分钟验证:node scripts/check-skills-token-ratchet.mjs,预期 skills/objectstack-ui/SKILL.md is 2279 tokens (ceiling 2279; headroom 0),末行 ✓。
  • 需要你做的:审阅并合并或批准(Tier H:动了棘轮脚本,不在低风险技能臂内)。达档合同审查 PASS comment 6997263802,Head-sha 8254c29be93b43702e91c9d5a23473679547fbfb。席位意见:路由文字属实、删句无损、+2 在裁决 B 内,可合。

席位核对 — ACCEPT · repo:objectstack#5 · head 8254c29be93b43702e91c9d5a23473679547fbfb · 2026-11-19T01:54Z

  • 形态: 3 files, +25/−6; check-governed-merges --pr 35279: skills/objectstack-ui/SKILL.md governed (skills/**); low-risk skills arm refused because scripts/check-skills-token-ratchet.mjs is outside skills wording → Tier H. 31 lines ≤ 3000. Fixes #35178. Clause-②: no, Metadata-protocol: none, changeset patch. Claim 6996390706, report 6996784487.
  • 前提实测: L2 read the row text against packages/spec/src/ui/action.zod.ts:1535 and packages/runtime/src/sandbox/body-runner.ts:714-721; the row routes to rules/actions.md:134, which teaches it.
  • 差异由席位读过: one router-row phrase, one restatement clause cut (no instruction lost), ratchet row 2277 → 2279 with its note, changeset.
  • 合同审查: L2 at CONTRACT_REVIEW_TIER, PASS, comment 6997263802, same head. Ratchet +2 permitted by ruling 6513306068 letter B (blobs 9128 → 9133 bytes). Security-touching: no.
  • 门禁: check-runs on head: 45 = 29 success, 16 skipped, none red.
  • 接受的偏差: L2 nits N1 (the row note credits the restatement to First checks 1, nearer twin is step 3) and N2 (file at 9133 bytes vs the 6–9 KB router target); no head change asked.
  • 范围外去向: pre-existing: the router's In column src/actions/*.actions.ts misses the NAME.action.ts files the generator writes → follow-up card from this record.
  • 落地条款: Tier H. K = 2 first-parent commits on main since merge base f4dbcc21 (< 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 ui skill router: name action refusals on the Actions row #35178.

@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 9e4eabb Nov 19, 2026
51 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-35178-actions-router-refusals 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/s 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.

ui skill router: name action refusals on the Actions row

3 participants