Repository navigation
feat(spec)!: action locations say what an action acts on - #37929
Conversation
…sion, codemod pass Claude-Session: https://claude.ai/code/session_01L9qic11optJUat6U8X67jY Co-authored-by: Claude <noreply@anthropic.com>
…amples, docs Claude-Session: https://claude.ai/code/session_01L9qic11optJUat6U8X67jY Co-authored-by: Claude <noreply@anthropic.com>
…xpectations Claude-Session: https://claude.ai/code/session_01L9qic11optJUat6U8X67jY Co-authored-by: Claude <noreply@anthropic.com>
… sentence, test fixes Claude-Session: https://claude.ai/code/session_01L9qic11optJUat6U8X67jY Co-authored-by: Claude <noreply@anthropic.com>
…dited test files Claude-Session: https://claude.ai/code/session_01L9qic11optJUat6U8X67jY Co-authored-by: Claude <noreply@anthropic.com>
… too Claude-Session: https://claude.ai/code/session_01L9qic11optJUat6U8X67jY Co-authored-by: Claude <noreply@anthropic.com>
Keeps both protocol-19 step sentences in registry.ts.template, moves the new main declarations and the liveness evidence to the acted-on words, and regenerates the references. Claude-Session: https://claude.ai/code/session_01L9qic11optJUat6U8X67jY Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 10 package(s): 39 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 11 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 191 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 66509204cdb4bd6bcc55e2a41782fee20cae2a68 && git checkout 66509204cdb4bd6bcc55e2a41782fee20cae2a68
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 8d34c4404f951410083a6caebd6ad8003ea3423d a0d5b846e3d1a362b8d30ed26b47f909e96291d8 && git checkout -B drift-repro 8d34c4404f951410083a6caebd6ad8003ea3423d && git merge --no-ff a0d5b846e3d1a362b8d30ed26b47f909e96291d8
node scripts/docs-audit/affected-docs.mjs --json 8d34c4404f951410083a6caebd6ad8003ea3423d
|
…n location labels The action inspector's location options are now Record · page and rows / Record · page; the action preview draws its ⋯ frame for a folded record page action, so the ⋯ wording is pinned on a folded fixture. Claude-Session: https://claude.ai/code/session_01L9qic11optJUat6U8X67jY Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract-review-claim: session_01L9qibwSEecrzDjKjbk24r1 · head 0ada605 · 2026-11-27T20:06Z L1-a (the seat's L1 thread) runs the isolated |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 Contract reviewServed-tier: ① Derived judgmentsInputs: card #36495 with its five comments, PR #37929 body and file list, the net diff
② Semver level
③ Boundary flags
④ Design judgmentThe narrowing itself holds: it is a respelling with a migration, not a capability taken away. A grep for each retired word over Break attempts that held, main readers against head readers:
S1 (should-fix) — A fourth non-lossless case is converted silently. On main S2 (should-fix) — N1 (nit) — At rest, two TODO shapes draw nothing on a 19 runtime until rewritten by hand: an action left as N2 (nit) — The toolbar TODO also fires when the action already carries N3 (nit) — Studio's N4 (nit) — Wording. The enum refusal on a block's N5 (nit) — Changeset prose. "The packages listed as N6 (nit) — Out of scope, N7 (nit) — Out of scope, HotCRM and N8 (nit) — Body staleness. The PR body still says two derived gates are red until #37895 PR 1 lands; PR 1 (#37947) is on main and both gates are green on this head. The size line reads 417 files, +2308/−1624; the head is 420 files, +2322/−1631. The body names only Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 The filled brief the record above (7227370865) was rendered from (L1-a, isolated Contract review brief — PR #37929 @
|
|
repo:objectstack#3 · os-tesla · session_01L9qibwSEecrzDjKjbk24r1 L1 REWORK at
Owed before ACCEPT.
Nits worth taking in the same push (prose faces only, unless you choose otherwise):
Follow-ups for the seat (not this PR).
Each needs a card. After the fix. If S1 goes by (a), I want a new green head, a same-reviewer delta on it, and the dogfood battery re-pinned to that head. If S1 goes by (b) and S2 is prose only, the head may still move for the changeset. Any new head owes the delta and a re-pinned dogfood reading. Tier H on landing (narrowing, class (c) size). |
…thored fold An action at `record_header` with `component: 'action:menu'` was folded into the record page header's ⋯ menu and drawn as a button by a `record:quick_actions` bar at `record_header`. At `record_page` the fold is one state for the whole page, so the conversion now leaves it as stored with a TODO, pinned with an ablation. A ⋯-only toolbar action that already carries `action:menu` is rewritten losslessly instead of reported. The changeset declares `Clause-②: yes (narrowing)` with the widened members, and the semantic entry, the location refusal and the `record_section` advice say what a site left as stored draws and how the fold is kept. Claude-Session: https://claude.ai/code/session_01L9qic11optJUat6U8X67jY Co-authored-by: Claude <noreply@anthropic.com>
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 46090930212 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Conflicts with #37929 (action locations say what an action acts on) resolved toward this PR's retirement of `ask_ai`: - conversions/registry.ts keeps both protocol-19 entries at order 3 (action-locations-acted-on, then action-type-ask-ai-removed, by id); - the pin test keeps both JOIN rows, one action.zod import; - dashboard.zod.ts keeps the `ask_ai` header refusal removed; - the showcase's AskAboutTaskAction, and the four ask_ai test files #37929 re-spelled (action-ask-ai, dashboard-header-ask-ai-37142, ActionRunner.askAi-37142, RelatedList.toolbarAskAi-37142), stay deleted. Claude-Session: https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK Co-authored-by: Claude <noreply@anthropic.com>
… new location words The merged tree's reference pages, regenerated. The conversion fixture and the changeset's FROM row spell `locations` in #37929's words (`record_page`, `record_row`), since the page-part words are refused now. Claude-Session: https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK Co-authored-by: Claude <noreply@anthropic.com>
…bjectstack-ai#37947) repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU <!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoEfAeSobHZgSLfHP3844ZfC)_ Part of objectstack-ai#37895 This is PR 1 of 2 on that card. It lands before objectstack-ai#36495 (draft PR objectstack-ai#37929), so that objectstack-ai#37929's `check:skill-examples` and `check:skill-served-sections` go green. PR 2, the teaching of the new words, stays behind objectstack-ai#36495. Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:写应用的 AI 助手读到的六个按钮示例,不再写明按钮放在哪里;说明文字和位置对照表一字未动,也没有教任何新词。 - 为什么做:这是「按钮位置改用新词」这项工作的前置一步。旧的位置词即将退役,这六个示例不先让路,那项改动的两道示例检查过不了。 - 出错会怎样:照抄示例的人会得到一个哪里都不显示的按钮,校验时有一条提醒告诉他补上位置;本改动只删了几行,可以直接撤回。 - 要你做什么:在「按钮位置改用新词」那项改动之前合并本改动(技能包属于要你亲手合并的范围)。 ## What changes Six checked examples in the published skills drop their `locations` key. Eight old words leave compiled text; no word is added. (A seventh, `ask_about_contract` in `skills/objectstack-ai/SKILL.md`, left with C1s objectstack-ai#37937, which deleted its whole Ask AI block; see the update below.) | File | Example | Line on the base | Words dropped | |:--|:--|:--|:--| | `skills/objectstack-ui/SKILL.md` | `mark_done`, § Actions, JSON fence 1 | 136 | `record_header` | | `skills/objectstack-ui/rules/actions.md` | `crm_reassign_lead` (os:check) | 69 | `record_header`, `list_item` | | `skills/objectstack-ui/rules/actions.md` | `crm_convert_lead` (os:check) | 96 | `record_header`, `list_item` | | `skills/objectstack-ui/rules/actions.md` | `crm_print_a3` (os:check) | 180 | `record_header` | | `skills/objectstack-ui/rules/actions.md` | `crm_open_invoice_pdf` (os:check) | 205 | `record_header` | | `skills/objectstack-ui/rules/actions.md` | `crm_add_invoice_line` (os:check) | 239 | `record_header` | Two more files move because the gates measure them as owed: - `scripts/check-skills-token-ratchet.mjs`: two rows follow their files down to the measurement (2264 to 2256, 3890 to 3844). The gate refuses a ceiling above its file's measurement. The `objectstack-ai` row is `main`'s own (6609) after the merges below. - `.changeset/37895-skills-action-examples-no-location-key.md`: a `patch` for `@objectstack/skills`, which ships the catalog. Not changed: every sentence, the location table (`actions.md` lines 17 to 26), the `actionLayout` paragraph, `actions.md` line 222, `skills/objectstack-formula/SKILL.md`, `skills/objectstack-ui/rules/record-page.md` and the eval fixtures. None of them is compiled, and they are PR 2's. ## Why On objectstack-ai#37929's branch the action location vocabulary is `list`, `record`, `record_page`, `record_row`, `record_related`, `record_section`. On main it is `list_toolbar`, `list_item`, `record_header`, `record_more`, `record_related`, `record_section`. The only words both accept are `record_related` and `record_section`, and neither means a record-header button. So each example drops the key instead of taking a word with a different meaning. ## Size of the published skills | Reading | Lines before | Lines after | Tokens before | Tokens after | |:--|--:|--:|--:|--:| | `skills/objectstack-ai/SKILL.md` | 487 | 486 | 6799 | 6791 | | `skills/objectstack-ui/SKILL.md` | 165 | 165 | 2264 | 2256 | | `skills/objectstack-ui/rules/actions.md` | 266 | 261 | 3890 | 3844 | | Bundle: all 14 `SKILL.md` files | 4959 | 4958 | 65451 | 65435 | | Authored files the ratchet prices | n/a | n/a | 199689 | 199627 | Net change under `skills/`: 1 line added, 7 removed. Tokens are the ratchet's own count, `ceil(utf8 bytes / 4)` with the release-stamp line left out. ## Tests **Update at head `78295ae3`.** Two real merges of `main` (`d7c3960e`, then `e5898ad9` on `4de4e3e9`) and one changeset commit. Net diff against `main`: 4 files, +18 / −8, `skills/` net −5. The two `objectstack-ui` rows measure 2256 and 3844 on the merged tree. `check:skill-examples` exits 0 with 351 examples (the one that left is Ask AI). `check:skill-served-sections`, the ratchet and its `--self-test` exit 0. Merge delta reports are on objectstack-ai#37895; the review records are on this PR. The size table and readings below are the first measurement and still count the `objectstack-ai` row. The readings below are at head `661e8e90`, on base `f926dfab` (origin/main when the worktree was made). <details> <summary>Main-based tree: the two spec gates and the token ratchet</summary> - `pnpm --filter @objectstack/spec run check:skill-examples`: exit 0. `352 prose examples type-check across 3 surface(s)`. - `pnpm --filter @objectstack/spec run check:skill-served-sections`: exit 0. `24 served section(s), each heading exactly once in its file (6 json, 2 json+ts, 16 neutral); 10 JSON fence(s) parse and pass their spec validators.` - `node scripts/check-skills-token-ratchet.mjs`: exit 0. `61 authored bundle file(s) within their ceilings`. Before the three rows moved it was exit 1, `3 of 114 published bundle file(s) failed their check`, each row above its measurement (by 8, 8 and 46). - `node scripts/check-skills-token-ratchet.mjs --self-test`: exit 0. `111 cases pass`. - `pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 scripts/platform-catalog.test.ts` (the one test file that names the ratchet script): `Test Files 1 passed (1)`, `Tests 20 passed (20)`. </details> <details> <summary>objectstack-ai#37929's branch at e3b2ea9: red before these edits, green with them</summary> Method: a second worktree, detached at `e3b2ea95`. `@objectstack/spec`, `@objectstack/client` and `@objectstack/client-react` were built there (turbo, 47 tasks). The gates ran once on the untouched tree, as the control. Then this PR's `skills/` diff was applied with `git apply`, and the gates ran again. The two `objectstack-ui` files were byte-identical to this PR's head after the apply. - Control, `check:skill-served-sections`: exit 1. `skills/objectstack-ui/SKILL.md § Actions: JSON fence 1 is refused as Action: locations.0`. - Control, `check:skill-examples`: exit 1. Eight `TS2322` errors, at `skills/objectstack-ai/SKILL.md:189:15` and `skills/objectstack-ui/rules/actions.md` 69:15, 69:32, 96:15, 96:32, 180:15, 205:15, 239:15. - With the edits, `check:skill-served-sections`: exit 0. `10 JSON fence(s) parse and pass their spec validators.` - With the edits, `check:skill-examples`: exit 0. `352 prose examples type-check across 3 surface(s)`. The token ratchet on that tree stays red on that branch's own three rows until main, with this PR in it, is merged there. That is not a reading about this PR. </details> <details> <summary>Derived gate families: 68 derived, 67 run, 1 not measured</summary> `node scripts/pm/dispatch-gates.mjs --commands` derived 68 commands for the 5 changed paths. Each was run with its exit code recorded before any pipe, and `--ran` answered: `68 derived famil(ies) accounted for — 67 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)`. - 67 commands: exit 0. - NOT MEASURED: `pnpm check:dual-build-cjs-loads`, reason: exit 3, `PREREQUISITE NOT MET`. It reads the `dist/` of every package and this tree built only the three packages above. The diff changes no package source, so this one is CI's. - `check:skill-examples` is outside the derived list; it was run because the order names it. </details> ## Acceptance notes - **The examples now show an action with no placement.** The text above them still says that an action with neither `locations` nor a list view naming it renders nowhere, and the Ask AI paragraph still says to declare the action in `locations`. An action copied from one of these seven examples as it stands draws the `action-no-placement` warning at `os validate` and no button. No sentence was added to say so: the order set a budget of zero added lines and no new word. PR 2 gives each of the six examples its placement again, in the new words. Carrier: PR 2 on this card. - **The token rows are banked.** The three ceilings are 62 tokens lower in total. When PR 2 writes `locations` back, those three files grow again. The ratchet's header gives one path for a row to go up: restatement cut from the same file first, then the measured remainder, with the standing ruling quoted in the PR body. - **The sibling branch landed first.** C1s objectstack-ai#37937 (`4de4e3e9`) deleted the whole Ask AI block. The merge `e5898ad9` keeps `main`'s `skills/objectstack-ai/SKILL.md` byte for byte, so this PR no longer touches that file, and the ratchet row stays `main`'s 6609. - **Old words that stay.** `git grep` for the four retired words under `skills/` still finds prose, the location table and eval fixtures. They are not compiled and they are PR 2's. - **Main moved after the base.** origin/main went from `f926dfab` to `a3c229ea` during the run. None of the five files changed there and `git merge-tree` reports a clean merge. The readings above were not repeated on the merged tree. ## Verification Read first, by risk: 1. `skills/objectstack-ui/SKILL.md`, the hunk at line 136. This JSON is served to clients by the hosted door, and it is the one example in a section whose headline is that a write button needs a placement. 2. `skills/objectstack-ui/rules/actions.md`, the hunks at lines 69 and 96. Each dropped two words, a header placement and a row placement. 3. `scripts/check-skills-token-ratchet.mjs`, the three rows. Each new number is the gate's own measurement. Two-minute check, no build needed: `pnpm --filter @objectstack/spec run check:skill-served-sections`. Expect the last line to end with `10 JSON fence(s) parse and pass their spec validators.` and exit 0. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (No schema changes.) - [x] 2. Every name I added uses the casing for its kind. (No name added.) - [x] 3. No formatter ran. `pnpm lint` is CI's on this PR. - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: not touched. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L9qibztwLPZEpzDMBn2GM6 --------- Co-authored-by: Claude <noreply@anthropic.com>
…entry; it binds to the deployment's store (objectstack-ai#38026) repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP Fixes objectstack-ai#37306 Clause-②: yes (widening) Metadata-protocol: added Skills-docs: follow-up objectstack-ai#37310 — `skills/**` teaches the optional `adapter` and the item mount after this lands ## 维护者速读 - 用户能看到什么变化:应用作者写知识源时不必再指定存储,也不必在应用里声明需要知识服务;在本机开发(SQLite)、PostgreSQL 和自带存储的部署上,同一个知识源无需修改即可建索引和检索。 - 为什么做:知识库检索专题(按调用者权限过滤的知识检索)中“知识源可移植”的一行,替写知识源的应用作者和 AI 解决“换个数据库就要改知识源”的问题。 - 出错会怎样:最坏是同时注册了两个以上存储、且都不是部署自带的那个时,未写存储的知识源在保存时被明确拒绝并列出可选项;改动可直接撤回。 - 要你做什么:无(“运行中首次保存、部署未装知识服务时怎么办”已拆成单独的待裁决卡)。 ## What changes **Mechanism (the deployment's-store mark).** It is a service option, not a contract member: `KnowledgeServicePlugin` / `KnowledgeService` take `deploymentAdapter?: string`, which the runtime sets to the adapter id of the store it mounted (`resolveCapabilityArgument('knowledge', …)` answers `{ deploymentAdapter: resolveKnowledgeStore(input).store.adapterId }`, the same resolution `resolveCapabilityExtras` mounts from). `IKnowledgeAdapter` and `registerAdapter` are unchanged, so an adapter that application code registers is never the deployment's by registering. 1. **`adapter` optional** (`@objectstack/spec`, ADR-0161 K4 / K8 item 11). `KnowledgeSourceSchema.adapter` is `z.string().optional()`. Omitted, the source is held by the marked store, else the only adapter registered. Several registered and none the deployment's ⇒ refused at registration on both doors (`registerSource`, the `knowledge_source` loader) and at save (`admitAuthoredSource`), `400 VALIDATION_ERROR`, naming the choices. A source registered first and left unplaceable by adapters that came later answers the same refusal at index and search, and `reportUnmountedAdapters` names it once at boot. No adapter at all ⇒ `503 SERVICE_UNAVAILABLE`, naming the marked store. 2. **Placement is resolved where it is used** (`adapterIdFor` / `adapterFor` / `boundAdapterId`), so a code-door source registered at init finds a store plugin that registers in `start()`. Every `getAdapter(source.adapter)` call site (reindex, index state, record sync, delete, search planning, reap guard, `dropMetadataSource`) now goes through it. `index_status` reports the adapter a source is placed on. 3. **An item mounts the service** (K8 item 12). `PlatformCapabilityProvider` gains optional `mountedBy: { collection }`; the `knowledge` row of `PLATFORM_CAPABILITY_PROVIDERS` carries `{ collection: 'knowledgeSources' }`. (Review S1, record 7224273377: the earlier `type` member had no reader and repeated what the spelling map owns, so it is dropped.) `@objectstack/core` adds `stackItemCapabilities(stack)` (top level, then each package body), and `resolveServedCapabilities(…, { itemTokens })` serves them as declared tokens, reported in a new `byItems` set. `os serve` / `os dev` / `os start` and verify's `bootStack` read it and pass `database` to the argument resolver. `os migrate plan` / `apply` compose the same set: `stackItemCapabilities` is a composition step of both boots in `boot-preparation-parity.test.ts`. This answers CI's Test Core red at aba523a and the review's N3. 4. **Item 4 is split to objectstack-ai#37983 (seat ruling).** The first `knowledge_source` saved at run time on a deployment with no knowledge service behaves exactly as on main: row 3a's boot line and behaviour are unchanged. The built item-4 code is kept on `claude/area-o1C-37306-item4` (fa2b538). 5. **Docs**: `content/docs/ai/knowledge-rag.mdx`, `content/docs/protocol/knowledge.mdx`; references regenerated (`gen:docs`). What a 19.0.0-next.1 stack sees: one that ships a source without `requires: ['knowledge']` held an inert item with a boot warning. It is now indexed: the service mounts, the boot pass builds the index, and the content fields are sent to the configured embedder (ADR-0161 K5: embedding is egress). The changeset says the same. Unchanged: a named adapter that is not mounted answers `SERVICE_UNAVAILABLE` as before (objectstack-ai#37102); a host that mounts `KnowledgeServicePlugin` itself gets no store and no mark from the runtime; without a source or the token nothing is mounted. Out of scope as fenced: `skills/**` (objectstack-ai#37310), the Studio form (objectstack-ai#37309), hosted/EE mounts, objectstack-ai#37479's unmounted-adapter reporting. ### Deviations (declared) - **`@objectstack/runtime`, MCP draft door** (`packages/runtime/src/domains/mcp-authoring.ts`, `itemSaveRefusal`): a finding from the dev of card objectstack-ai#37983, carried here. The door spelled every refusal that was not a 403 as `SERVICE_UNAVAILABLE`, so the new `400 VALIDATION_ERROR` from `admitAuthoredSource` arrived over MCP as `SERVICE_UNAVAILABLE` with status 400. Now a 403 stays `PERMISSION_DENIED` and any other verdict keeps its own code, as the REST door already does. It carries a pin in `mcp-authoring.test.ts` and a `@objectstack/runtime` patch entry in the changeset. Outside the claimed file surface. - **`@objectstack/cli`, the migrate boot** (`schema-migration-plugins.ts`, `composeServedPlatform`): it reads the item tokens as `serve` does. The step pin and a behaviour pin cover it: an item-only stack composes `KnowledgeServicePlugin`, and the control does not. - **Two semantic conflicts with main**: main's new readers of the `adapter` field this change makes optional. Both now read the store a source is placed on (`boundAdapterId`), each with a pin. - The boot build pass (main's first-build pass at boot), in 205f667. - The reconcile's no-`listDocuments` check (main's scheduled reconcile), in merge 635fb18. - **Accepted overlaps (seat ruling)**: - objectstack-ai#37963: one hunk in `knowledge-service.ts`. That PR absorbs the merge after this lands. - objectstack-ai#38015: the generated `content/docs/references/ai/knowledge-source.mdx`. objectstack-ai#38015 has landed. This head merges main and regenerates the page on the merged tree (`gen:schema` + `gen:docs`). File surface beyond the claim, declared: `packages/runtime/src/domains/mcp-authoring.ts` and its test, `packages/cli/src/utils/schema-migration-plugins.ts` and its test plus `boot-preparation-parity.test.ts` (above), the `knowledgeSources` describe in `packages/spec/src/stack.zod.ts`, `service-knowledge` plugin options, `knowledge-build-actions.ts`, `knowledge-reap-guard.ts`, `packages/verify/src/required-providers.ts`, `packages/core/src/capability-providers.ts` (comments only). Read first (by risk): 1. `packages/services/service-knowledge/src/knowledge-service.ts`: `adapterIdFor` and `refuseUnplacedSource`, where the refusal and placement rules live. 2. `packages/core/src/capability-composition.ts`: `stackItemCapabilities` and the `knowledge` branch of `resolveCapabilityArgument`. 3. `packages/spec/src/kernel/platform-capabilities.ts`: the `mountedBy` row field, the public surface this adds. Two-minute verification: `pnpm --filter @objectstack/verify exec vitest run src/harness.required-providers.test.ts -t "an item, no adapter, no token"` should print one passing case: a stack with a `knowledge_source` that names no adapter and no `requires: ['knowledge']` boots `KnowledgeServicePlugin` + `KnowledgeTursoPlugin`, places the source on `turso` beside an app adapter, and finds the Chinese row for `住宿标准 报销`. ## Tests Local, under the shared verify lock, at 633041b (the last commit, af27454, adds only module-top imports to one cli test file; that file was re-run, see below). <details><summary>Suites and typecheck</summary> - `@objectstack/spec` (whole package): 909 files / 28749 passed (+1 todo). - `@objectstack/core` `capability-composition.test.ts`: 25/25. - `@objectstack/service-knowledge`: 18 files / 563 tests. - `@objectstack/verify` `harness.required-providers.test.ts`: 16/16. - `@objectstack/cli` `boot-preparation-parity.test.ts` + `schema-migration-plugins.test.ts`: 2 files / 93 tests, at 633041b and again at af27454 (cli typecheck exit 0 at both). - `@objectstack/runtime` `mcp-authoring.test.ts`: 73/73, at aba523a; runtime is unchanged since. - Typecheck exit 0: spec, core, service-knowledge, verify, cli, runtime. </details> <details><summary>Ablations (each restored; blob == HEAD, `git diff HEAD` empty)</summary> | Pin | Mutation | Result | | --- | --- | --- | | A1 | the deployment's mark in `adapterIdFor` | 2 failed | | A2 | the registration refusal | 1 failed | | A3 | the item tokens in `resolveServedCapabilities` | 1 failed | | A4 | the `knowledge` capability argument | 1 failed | | A6 | `adapter` optional, redone as `z.string().min(0)` (the first try was a no-op) | 1 failed | | A7b | `stackItemCapabilities`, core dist | verify case fails: the knowledge service is not found | | A8 | the mark argument, core dist | verify case fails: source refused, then a TypeError | | A9 | boot pass reads the named adapter | the boot pin fails | | A10 | reconcile reads the named adapter | the reconcile pin fails | | A11 | MCP door respells non-403 as `SERVICE_UNAVAILABLE` | the pin fails: `SERVICE_UNAVAILABLE` where `VALIDATION_ERROR` was expected | | A12 | the migrate boot passes no item tokens | the behaviour pin fails: `KnowledgeServicePlugin` is not composed | A5 left with item 4. </details> ## Acceptance notes - PostgreSQL (pgvector) acceptance is NOT MEASURED end to end, locally or in CI. - CI's `capability-mount.live-postgres.test.ts` names `adapter: 'pgvector'` and `requires: ['knowledge']`, so it exercises neither the omitted adapter nor the item mount (review N2). - What pins the card's PostgreSQL line is two unit pins, composed: - `resolveCapabilityArgument('knowledge', postgres)` answers `{ deploymentAdapter: 'pgvector' }`, the store `resolveCapabilityExtras` mounts for the same database (core). - A source with no adapter binds to the marked store (service-knowledge). - Follow-up: objectstack-ai#38040 drops `adapter` and `requires` from the live case. - Known gap, both boots alike: `os serve --artifact-fallback` (no config, the stack synthesized from the artifact JSON) reads items from a config that carries no `knowledgeSources`. The artifact result surfaces `requires` but no item collection, so an artifact-only stack's sources do not mount the service there. Follow-up: objectstack-ai#38039; not built here. - Item 4 and its Acceptance line moved to objectstack-ai#37983 (seat ruling). ## Verification <details><summary>Container run (os dev, scratch app; at fa2b538, items 1-3 unchanged since)</summary> The scratch app held one `knowledge_source`, with no `adapter` and no `requires`. The embedder was a local bigram fake. 1. `os dev --fresh` booted `KnowledgeServicePlugin` and `KnowledgeTursoPlugin`. 2. Three Chinese rows were POSTed (201 ×3). 3. `os knowledge rebuild kbx-kbx_policies` ended `done`: 3 rows read, 3 written. 4. `os knowledge status` showed `adapter turso`, `index: current`. 5. MCP `search_knowledge '住宿标准 报销'` ranked `差旅住宿标准` first (score 0.436). </details> <details><summary>Gates</summary> - `dispatch-gates --commands` at 633041b derives 129 families. - NOT MEASURED locally: - `check:type-check-debt`: its closure build needs the shared lock (CI ran `Type Check · debt ledger` green at aba523a). - `check:skill-examples` and `check:dual-build-cjs-loads`: they exit 3 on prerequisites outside this diff (the client-react, studio and scenarios dists are not built). - Exit 0: every other family, the ones that read built output re-run after the build. That includes `check:generated` ("All 14 generated artifacts are up to date"), `check:api-surface`, `check:dts-closure`, `check:i18n*`, `check:docs-transcript-drift` and `check:nul-bytes`. - `check:test-source-alias` failed once, on the edited cli test file. The test now pays its dynamic imports at module top, and the gate exits 0. - overlap-check at af27454 exits 1 against objectstack-ai#37963 only (accepted). Clean: origin/main, objectstack-ai#38038, objectstack-ai#38037, objectstack-ai#38033, objectstack-ai#38013, objectstack-ai#37982, objectstack-ai#37929. </details> --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP --------- Co-authored-by: Claude <noreply@anthropic.com>
…ption badge (objectstack-ai#37986) <!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoAoNwrZVJoUEFfvMURpRPKJ)_ Fixes objectstack-ai#37435 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:搭建者(人或 AI)给下拉选项写了 teal、amber、大写的 Red 这类界面画不出来的颜色时,校验命令和保存时都会收到一条提示,说明这个颜色会显示成灰色、该怎么改;写九个色系名或十六进制色的不受影响。 - 为什么做:上一张卡已经定下"选项颜色只认作者声明、没配就灰",但写错的颜色也会静默变灰,作者不知道自己写错了。 - 出错会怎样:只是提示、从不拒绝保存,误报最多多一条警告;平台和示例里现有的选项颜色没有一条会触发,可直接撤回。 - 要你做的:无。 ## What changes - New advisory rule `field/option-color-renders-neutral` (`lintOptionColors` in `packages/lint/src/data-model-rules.ts`). It warns on a select option `color` the option badge does not paint: anything that is not one of the nine palette families (`gray red orange yellow green blue indigo purple pink`, lowercase, as `BADGE_COLOR_MAP` matches them) and not `#` + 3 or 6 hex digits. The warning names the option; the fix line names the spelling the value already points at (lowercase family, the hex with its `#`, the hex without alpha digits), otherwise the families and the hex form. It never maps a colour name to a family. - Route (a) as a warning, not (b) a name-to-family map: (b) is consumer-side tolerance that invents a colour the author did not pick, close to the value-derived colour ruling A on objectstack-ai#36882 removed (「A 全部去掉,没配就灰」). Not a refusal: `SelectOption.color` stays `z.string()`, and charts and gantt bars paint a CSS colour name. - Registered in `AUTHORING_RULES` as `tier: 'advisory'`, on `os validate` / `os build` / `os lint`, and on the runtime publish gate for `object` and `object_extension` writes, where findings ride back as 2xx `advisories` (the save door Studio, REST `/meta` and MCP authors share). Judges object fields, object-extension fields, picklists and picklist extensions; picklists are CLI-only because `picklist` is not runtime-creatable. - `os explain field/option-color-renders-neutral` entry in `rule-explanations.ts`, with the measured per-surface reading. - Root barrel publishes `FIELD_OPTION_COLOR_RENDERS_NEUTRAL`, `OPTION_COLOR_FAMILIES`, `isBadgePaintableOptionColor`, `lintOptionColors`, type `OptionColorPicklist`. - Object and object-extension door roster pins gain the rule (three test files), and the four docs CLI transcripts print 87 author-time rules (`check:docs-transcript-drift`). ## Tests - New pin `packages/lint/src/data-model-rules.option-color-37435.test.ts`: `teal` warned (rule, severity, path, where, fix names all nine families) and `amber`, `Red`, bare hex, alpha hex, `rgb()`, `hsl()`, leading-space hex all warned; every declared family and `#abc` / `#14b8a6` not warned; blank colour not judged; extension and picklist paths; all three commands; at the save door `teal` comes back as an advisory with zero errors, and `red` / a hex with none. ## Acceptance notes - Door crossing: this is an advisory-tier rule at the object door. The five fenced advisory rules (objectstack-ai#4716 adjudication, `RUNTIME_OBJECT_ADVISORY_VOLUME`) stay fenced and untouched; that fence prices advisory VOLUME. Measured volume for this rule: 0 firings. Census of option-level colour literals: objectstack at 6e11ff2 (`*.object.ts`, picklists, extensions; non-test) is every one a family name or a 6-digit hex; the only out-of-family names (`teal`, `amber`, 9 sites) are OBJECT-level `color`, which this rule does not read. hotcrm at 08a7451: 170 colour literals, all 6-digit hex. The one out-of-family option colour in the tree is a test fixture (`ui/e2e/list-condition-row-35549.spec.ts:87`, `amber`). - Single source of the family list: `@objectstack/lint` cannot import `@object-ui/fields` (lint depends on spec only and runs in the kernel's save door), and a lint test reading the renderer source would need a `scripts/cross-package-test-inputs.mjs` + `turbo.json` declaration outside this claim's file surface. The list is therefore spelled once in lint (`OPTION_COLOR_FAMILIES`) with a comment naming `BADGE_COLOR_MAP`; the shared home both sides could read is `@objectstack/spec`, left as an open question in the report rather than taken here. - Not judged: a form view's own option list, and an object extension's `fieldPatches`. - The runtime advisory has no localized `userMessage` (no `.user-text.ts` catalog); Studio renders the English `message`. ## Verification - Two-minute check: `pnpm --filter @objectstack/lint exec vitest run src/data-model-rules.option-color-37435.test.ts` → 9 passed. - Read first: `packages/lint/src/data-model-rules.ts` (`isBadgePaintableOptionColor`, must match the renderer's reading), `packages/lint/src/authoring-rules.ts` (the `lintOptionColors` entry and its door comment), `packages/lint/src/rule-explanations.ts` (the per-surface paragraph). <details><summary>Local readings (HEAD after the docs commit)</summary> - `pnpm --filter @objectstack/lint test` → Test Files 244 passed (244), Tests 9816 passed, 5 skipped; `pnpm --filter @objectstack/lint typecheck` (tsc + test layer) green. - Ablation: `isBadgePaintableOptionColor` forced to `true` on disk → 5 of 9 pins red (the out-of-family pin included); restored with `git checkout HEAD`. - `node scripts/pm/overlap-check.mjs --branch=claude/project-thread-ciejge` → `VERDICT clean exit 0`, objectstack-ai#37929 (shares `rule-explanations.ts`) merges cleanly. - Derived gate families run locally; `check:dual-build-cjs-loads` and `check-plugin-teardown-shape --self-test` are NOT MEASURED here (no full build; shallow clone) and are left to CI. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01L9qibx7DSQZnugnuX8CpCM)_ --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
…hat draws as money (objectstack-ai#38100) <!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoJgGMcVYe3tSvxAWdknWFST)_ Fixes objectstack-ai#37890 repo:objectstack#3 · os-tesla · session_01L9qibvqGhhENZcAuiMxqA7 Clause-②: no Metadata-protocol: none ## 维护者速读 - 手机上看订单行、报价行这类明细列表时,卡片右下角的金额现在显示这一行的总额,不再错显示单价;电脑上的表格不变。 - 属于手机端列表卡片的体验线,替 HotCRM 等有明细行的应用解决金额读错的问题。 - 只改卡片挑哪一列当金额,数据和接口都不变;若挑错,最多是卡片上金额位置显示另一列,可以直接撤回。 - 无 ## What changes - `ui/packages/plugin-grid/src/ObjectGrid.tsx`, `buildMobileCardRenderer`: the amount slot now takes the first shown body column whose value draws as money. That is a `currency` column, or a `formula` / `summary` column for which `resolveFormulaValueType(fieldDef, number)` (the exported `@object-ui/fields` rule the formula cell draws by) answers `currency`: a formula declaring `returnType: 'currency'`, or a summary declaring its currency (`currencyConfig`). The slot is still chosen once for the list, so every card keeps one shape. - Unchanged: a masked column is not promoted; a view that presents the field as another type (column `type`) keeps it a plain value; a number-returning formula is not an amount; view order still picks among several money columns; desktop table untouched. - No new export (seat ruling: option A). `patch` changeset for `@object-ui/plugin-grid`. ## Why On a phone, an order line (2 × 6,000.00, 10% off) showed its unit price 6,000.00 in the amount slot; the line total 10,800.00 is a formula returning currency, which the slot never considered. Reordering columns did not help: the total moved into the subtitle. ## Tests `ui/packages/plugin-grid/src/__tests__/phoneCardAmount-34615.test.tsx`, a new top-level `describe` in the existing harness (390 px): - currency formula shown before the unit price → amount `CN¥10,800.00`, subtitle `2 · CN¥6,000.00`; - currency formula as the only money column → amount `CN¥10,800.00`; - summary declaring its currency → amount `CN¥777.00`; - unit price shown first stays the amount (view order unchanged); - CONTROL: number-returning formula → no amount line; - CONTROL: the currency formula presented as `type: 'text'` → no amount line. <details><summary>Readings (head f800825 = b4dd4f2 + merge of origin/main 815e882..f72f335)</summary> - New describe at b4dd4f2: `Tests 11 passed (11)` for the harness file. - Ablation on the committed fix (ObjectGrid.tsx restored from base 815e882, tree only, then restored from HEAD; `drawsAsMoney` count 0 → 2 on disk): `Tests 3 failed | 8 passed (11)`. The three red are exactly the predicted RED directions; both CONTROLs and all five objectstack-ai#34615 cases stay green. - After merging origin/main (which brought objectstack-ai#37929, also in plugin-grid) and rebuilding the closure (`turbo run build --filter='@object-ui/plugin-grid^...'`, 57/57): `pnpm --filter @object-ui/plugin-grid type-check` exit 0; `pnpm --dir ui exec vitest run packages/plugin-grid/`: `Test Files 319 passed (319)`, `Tests 2805 passed (2805)`. - eslint on the two changed files: 0 errors (155 warnings, none on the changed hunk). - `dispatch-gates --ran` at b4dd4f2: 39 derived, 39 run, all exit 0, 0 NOT MEASURED, 0 unrun. </details> ## Acceptance notes - Premise measured on origin/main 815e882 before writing (390 px probe, readings on the card's pre-claim report): unit price first → slot `CN¥6,000.00`; total first → slot still `CN¥6,000.00`, total in subtitle; formula-only or summary-only → no slot, though the cell already drew currency. - `objectstack-ai#37929` and `objectstack-ai#37924` also touch `ObjectGrid.tsx`, in hunks far from this one; whichever lands later merges main. ## Verification Read first (by risk): 1. `ObjectGrid.tsx`: `drawsAsMoney` and the `amountCol` line under it. 2. The new `describe` in `phoneCardAmount-34615.test.tsx`, especially the two CONTROL cases. Two-minute check: `pnpm --dir ui exec vitest run packages/plugin-grid/src/__tests__/phoneCardAmount-34615.test.tsx` shows 11 passing; replace `drawsAsMoney(c)` with `c.type === 'currency'` and the same command shows 3 failing. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (not touched) - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. (eslint on the two changed files: 0 errors) - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: n/a. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. - [x] The *Before Submitting* list in CONTRIBUTING.md is done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- _Generated by [Claude Code](https://claude.ai/code/session_01L9qibvqGhhENZcAuiMxqA7)_ Co-authored-by: Claude <noreply@anthropic.com>
…ings its write raised, and the console toast shows them (objectstack-ai#38076) <!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6Jao3VQSGvy9zYGn6FpGEZRCnJ)_ Fixes objectstack-ai#37867 repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU Clause-②: yes (widening) Metadata-protocol: none ## 维护者速读 - 用户点「确认订单」这类改状态的按钮时,如果这次写入触发了警告型校验规则,现在会弹出一条警告样式的提示,规则作者写的话就在提示里,撤销按钮照样在;以前只弹成功提示。 - 替用按钮改状态的应用解决:警告规则以前只在编辑表单里生效,最常用的按钮路径静默通过(HotCRM 订单超出框架合同额度就是实例)。 - 写入本身不变,只是应答多带警告、提示换样式;如果有问题,最多是提示样式不对,可以直接撤回。 - 无 ## What changes - `packages/runtime/src/action-execution.ts`: `executeDeclarativeUpdateAction` copies the `warnings` the data-plane update answered (`protocol.updateData`, the data door's own `ValidateDataIssue` elements) onto its result. `DeclarativeUpdateResult` gains an optional `warnings`, present only when the write raised an advisory rule hit, so a write that trips nothing answers byte-for-byte as before. Both action doors (REST `POST /api/v1/actions/...` and MCP `run_action`) go through this executor. The stale roll-up path (`ERR_SUMMARY_RECOMPUTE`) composes from the same `written` answer, so it carries them too. - `ui/packages/core/src/actions/ActionRunner.ts`: for an `operation: 'update'` action only, the runner reads the answer's `warnings` (distinct messages, in answer order). When there are any, the success toast takes the `warning` variant, with the messages as its `description` and the Undo affordance kept. This is one toast, the way a record save raises one (`toastRecordSave`). When the author turned the success toast off (`toast.showOnSuccess: false`, or a result dialog), the warning is still shown, in the rule's own words, so no new runner text is needed. `ToastHandler` options gain an optional `description`. - `ui/packages/app-shell/src/hooks/useConsoleActionRuntime.tsx`, `ui/packages/app-shell/src/views/RecordDetailView.tsx`: both console toast handlers used to send every non-error toast to `toast.success`. They now honour `type: 'warning'` and call `toast.warning(message, { description, duration, action })` with the same Undo action. - Changeset: `@objectstack/runtime`, `@object-ui/core`, `@object-ui/app-shell` patch. Not changed: `packages/spec` (the action answer has no zod declaration, it is the runtime's TS interface), locale packs (no new text), HotCRM (its `confirm_sales_order` and `framework_quota_exceeded` work as authored). ## Tests - `packages/runtime/src/action-declarative-update.test.ts`, a new top-level `describe` in the shared harness. It puts a `protocol` slot in front of the caller-honouring rig. REST: the 200 answer carries the write's warnings, element for element, beside the record and the undo anchor. MCP `run_action`: the same write gives the same warnings. Control: a write that trips no rule has no `warnings` key. The file gains a module-top `import '@objectstack/metadata'` so the dispatcher's lazy load is paid at collection (`check:test-source-alias`). - `ui/packages/core/src/actions/__tests__/ActionRunner.updateOperation.test.ts`, a new `describe` through the real `createServerActionHandler`: one warning toast with the success message as title and the rule's words as description; repeated messages said once and distinct ones one per line; Undo kept on an undoable action; control with no warnings is a plain success toast with no description; success toast off still warns; reverse pin: a script action without `operation` never reads a `warnings` key. - `ui/packages/app-shell/src/hooks/__tests__/useConsoleActionRuntime.undoLookupId-11122.test.tsx` and `ui/packages/app-shell/src/views/RecordDetailView.undoLookupId-11122.test.tsx`, a new `describe` in each, down to `sonner`. On a grid row and on the record page, the update's warnings raise `toast.warning` once with the description and the Undo action, no success toast, and Undo restores the stored value. Both harnesses' route stubs gained an optional answer body. These two test files are a surface amendment to the claim, reported to the seat. ## Acceptance notes - Premise measured on `origin/main` `815e882b` before any edit. Through the real `HttpDispatcher.handleActions` → `executeDeclarativeUpdateAction` → `callData`, the protocol's `updateData` answered `["object","id","record","warnings"]` and the action's 200 body carried `warnings` 0 times. - The same executor also drops the data door's `notice` (a hook's message for the person) and `droppedFields`. Out of scope here; the seat files them. - `ToastHandler` and the action answer each gain one optional member. Nothing is refused or narrowed. ## Verification - Two-minute check: `pnpm --dir ui exec vitest run packages/core/src/actions/__tests__/ActionRunner.updateOperation.test.ts` shows 19 passed, 6 of them the new block. - Read first: `executeDeclarativeUpdateAction`'s result block (`action-execution.ts`), then the success-toast arm of `handlePostExecution` (`ActionRunner.ts`). <details><summary>Local readings at 40c5c82</summary> - New and edited suites: `action-declarative-update.test.ts` 37 passed; `ActionRunner.updateOperation.test.ts` 19 passed; `useConsoleActionRuntime.undoLookupId-11122` 6 passed; `RecordDetailView.undoLookupId-11122` 4 passed. - Full: `pnpm --filter @objectstack/runtime test` Test Files 655 passed, Tests 12316 passed, 25 skipped. ui vitest `packages/core/src/actions`: 58 files, 810 passed. app-shell `useConsoleActionRuntime*` + `RecordDetailView*`: 128 files, 1104 passed. - Typecheck exit 0: `@objectstack/runtime` (test layer 27 files / 183 errors held in the ledger, unchanged), `@object-ui/core` `type-check`, `@object-ui/app-shell` `type-check`. - Ablations through `scripts/ablation-replace.mjs`, each restore blob == HEAD: runtime `warnings` spread removed, 2 failed (REST, MCP); the runner's warnings read emptied, 6 failed (4 core, 2 hosts); each host's warning arm disabled, 1 failed each. - `dispatch-gates --ran` with recorded exit codes: 73 derived, 71 exit 0, 2 NOT MEASURED (exit 3: `check-plugin-teardown-shape --self-test`, fixture commit outside the shallow clone; `check:dual-build-cjs-loads`, needs a full `pnpm build`), 0 unrun. `check:test-source-alias` exit 0 at 40c5c82. - `overlap-check.mjs` VERDICT clean exit 0 against main and objectstack-ai#37929, objectstack-ai#37924, objectstack-ai#37896. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01L9qiby3dfNfCgpXwPkB2Hf)_ <!-- signed: repo:objectstack#3 · os-tesla · session_01L9qiby3dfNfCgpXwPkB2Hf --> --------- Co-authored-by: Claude <noreply@anthropic.com>
… on (objectstack-ai#38104) repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU <!-- claude-projects-attribution: {"github_login":"os-tesla"} --> _Requested by **Tesla** · [project thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoEfAeSobHZgSLfHP3844ZfC)_ Fixes objectstack-ai#37895 This is PR 2 of 2 on that card. PR 1 was objectstack-ai#37947 (merged as `b4921982`); objectstack-ai#37929 put the new words on `main` as `58b513a6`. **Ordering: this must land before the next `next` prerelease is cut** (serial note 7227457027 on the card). `main` has refused the four retired location words since `58b513a6`, and the published skills still teach them. A prerelease cut before this lands ships skills that teach words its own save door refuses. Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:写应用的 AI 助手读到的「按钮放在哪里」说明换成了新词,只说按钮作用在列表上还是一条记录上;六个按钮示例重新写明了位置。 - 为什么做:「按钮位置改用新词」这项工作已经合入主线,旧的四个位置词保存时会被拒绝,而技能包还在教旧词。 - 出错会怎样:照技能包写按钮的 AI 助手会写出保存不了、或者哪里都不显示的按钮;本改动只动说明文字和示例,可以直接撤回。 - 要你做什么:在下一个预发布版本切出之前合并本改动(技能包属于要你亲手合并的范围)。 ## What changes The published skills teach the action `locations` vocabulary that `@objectstack/spec` 19 accepts: `list` (acts on no record) and `record` (acts on one record: the record page and each list row), with the narrow words `record_page`, `record_row`, `record_related` and `record_section`. Vocabulary ruling on objectstack-ai#36495, verbatim: 「照卡上这套」 (7213827153). | File | Change | |:--|:--| | `skills/objectstack-ui/rules/actions.md` | The location table's four page-part rows become `list`, `record`, `record_page`, `record_row`. One line under the table names what replaced each old word. The `actionLayout` paragraph says the `record` arm takes `record` / `record_page` actions and the `list` arm takes `list` actions, which is what `validateObjectActionLayout` enforces. The `defaultFromRow` sentence names `record` / `record_row`. Five checked examples declare `locations` again. The opening sentence is cut (see the token rows). | | `skills/objectstack-ui/SKILL.md` | The "Mark as done" JSON in Actions declares `"locations": ["record"]`. Nothing else changes: against `main` the file differs by that key alone. | | `skills/objectstack-ui/rules/record-page.md` | A `record_section` action that must show on the standard page also lists `record_page`. | | `skills/objectstack-formula/SKILL.md` | "a list row" in place of the retired word in the sparse-row paragraph. | | `skills/objectstack-ui/evals/views-apps-actions-pages.json` | Cases 3, 14, 24 and 26 expect the new words. Case 3's `must_contain` token is `'record'`. | | `skills/objectstack-ui/evals/record-page.json` | Case 3: `placedActions: true` draws the actions placed at `record` or `record_page`. | | `scripts/check-skills-token-ratchet.mjs` | Three rows move to their measurements (below). | | `.changeset/37895-skills-action-locations-acted-on.md` | `patch` for `@objectstack/skills`. | `skills/objectstack-ai` is not touched: no Ask AI example and no placement is written back there. ### The word each example takes | Example | Before PR 1 | Now | Drawn | |:--|:--|:--|:--| | `crm_reassign_lead` | `record_header`, `list_item` | `record` | as before | | `crm_convert_lead` | `record_header`, `list_item` | `record` | as before | | `crm_print_a3` | `record_header` | `record_page` | as before | | `mark_done` (SKILL.md JSON) | `record_header` | `record` | also on each list row | | `crm_open_invoice_pdf` | `record_header` | `record` | also on each list row | | `crm_add_invoice_line` | `record_header` | `record` | also on each list row | The first three are the lossless conversion (`action-locations-acted-on`). The last three were header-only and now take `record`. This is a judgement, and the alternative is `record_page` on those three lines: - The spec's docblock calls `record` "the word an action that acts on a record writes by default", and the ruled vocabulary treats the other four as exception words. Nothing in these three examples, or in eval case 14's prompt (a "button on `task` records"), limits the action to the record page. - An agent copies the placement it sees. With `record_page` on four of six examples, agent-written apps would use an exception word as the norm. - None of the three carries a `visible` or `disabled` predicate, so the sparse list row adds no risk to them. - `crm_print_a3` keeps `record_page`: N1 asks for its placement back, and it gives the file one checked example of a narrow word in the `record` arm. Eval cases 24 and 26 use `record_page`: case 24 describes existing header actions, and case 26's prompt asks for a button "on the record page". ## Why objectstack-ai#37929 retired `list_toolbar`, `list_item`, `record_header` and `record_more` on `main`. The skills are what an agent reads before it writes an action, so an agent following them wrote a word that validate and save refuse. PR 1 had also left six examples with no placement at all, which made the `actionLayout` example beside them an error (N1). ## Acceptance checklist - [x] Card: `git grep -nE "record_header|record_more|list_item|list_toolbar" -- skills/` returns one line, `skills/objectstack-ui/rules/actions.md:28`, the line that names the conversion. - [x] Card: eval expected outputs use the new words; the token rows follow the measurement; the skills checks pass (Tests). - [x] N1 (7218905729): `crm_convert_lead` and `crm_print_a3` are placed in the `record` arm's scope again. A probe that runs `@objectstack/lint`'s two rules over the examples as written reports 2 `object-action-layout-not-placed` on `main` and 0 at this head. - [x] N2 as corrected in 7221834136: six examples declare a placement again, and the eval cases that expected the old words moved with them. Nothing is written back into `skills/objectstack-ai`; its eval case 10 still refuses `locations:`. - [x] Ordering (7227457027): stated at the top of this body. ## Size of the published skills | Reading | Lines before | Lines after | Tokens before | Tokens after | |:--|--:|--:|--:|--:| | `skills/objectstack-ui/rules/actions.md` | 262 | 268 | 3844 | 3918 | | `skills/objectstack-ui/SKILL.md` | 165 | 165 | 2256 | 2262 | | `skills/objectstack-ui/rules/record-page.md` | 64 | 64 | 990 | 990 | | `skills/objectstack-formula/SKILL.md` | 485 | 485 | 6090 | 6088 | | `skills/objectstack-ui/evals/views-apps-actions-pages.json` | 275 | 275 | not ratcheted | not ratcheted | | `skills/objectstack-ui/evals/record-page.json` | 119 | 119 | not ratcheted | not ratcheted | | Bundle: all 14 `SKILL.md` files | 4936 | 4936 | 65337 | 65341 | | Authored files the ratchet prices | n/a | n/a | 199591 | 199669 | | Eval fixtures (measured, not ratcheted) | n/a | n/a | 88563 | 88550 | Net change under `skills/`: 26 lines added, 20 removed, **+6** against a budget of +6. Tokens are the ratchet's own count, `ceil(utf8 bytes / 4)` with the release-stamp line left out. ### Token rows - `skills/objectstack-ui/rules/actions.md` **3844 to 3918 (+74)**, by the standing maintainer ruling of 2026-10-27, verbatim: 「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B). Restatement cut first, in the same file: the opening "Actions are user-triggered operations on an object or a view." (62 bytes; the paragraph under it says how `objectName` binds an action to an object and how a view names one). The new text adds 359 bytes, of which 130 are the five `locations` lines PR 1 took out as 186. The file is 15373 to 15670 bytes, and the row is pinned at the measurement. It is 28 above the 3890 the row held before PR 1. - `skills/objectstack-ui/SKILL.md` **2256 to 2262 (+6)**, by the same standing ruling, verbatim: 「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B). Nothing is paid down: the file has no restatement to cut, and the seat ruled at 2026-11-28T02:42Z that the gallery phrase " over an image, avatar or file field" teaches and stays (ruling on the card). The +25 bytes are the `"locations": ["record"],` key PR 1 removed as 32 bytes; the file is 9050 to 9075 bytes (9048 priced), and the row ends 2 under the 2264 it held before this card. - `skills/objectstack-formula/SKILL.md` 6090 to 6088: 7 bytes shorter; the row follows it down. - `skills/objectstack-ui/rules/record-page.md`: 990, unchanged (the two words have the same length). ## Tests The gates below were re-run at head `a7aee8ef` (the seat's 02:42Z rework, which restored one phrase in `skills/objectstack-ui/SKILL.md` and moved its row); the branch's diff against `main` (`f72f3353`) was empty before the first edit. The placement probe, the `platform-catalog` test and the eval dry run were read at `27cb6e21`; the rework touches no example, fixture or script logic. <details> <summary>Skills gates: all exit 0</summary> `@objectstack/spec`, `@objectstack/client` and `@objectstack/client-react` were built first (turbo, 47 tasks, 0 cached, `VERDICT command-exit 0`). - `pnpm --filter @objectstack/spec run check:skill-examples`: exit 0. `351 prose examples type-check across 3 surface(s)`. - `pnpm --filter @objectstack/spec run check:skill-served-sections`: exit 0. `24 served section(s), each heading exactly once in its file (6 json, 2 json+ts, 16 neutral); 10 JSON fence(s) parse and pass their spec validators.` - `pnpm --filter @objectstack/spec run check:skill-docs`: exit 0. `Skill docs in sync`. - `pnpm --filter @objectstack/spec run check:skill-refs`: exit 0. `10 generated files in sync with packages/spec`. - `node scripts/check-skills-token-ratchet.mjs`: exit 0. `61 authored bundle file(s) within their ceilings`. On the first commit, before the rows moved, it was exit 1, `3 of 114 published bundle file(s) failed their check`; at this head the three rows sit at their measurement (3918, 2262, 6088). - `node scripts/check-skills-token-ratchet.mjs --self-test`: exit 0. `111 cases pass`. - `pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 scripts/platform-catalog.test.ts` (the one test file that names the ratchet script): `Test Files 1 passed (1)`, `Tests 21 passed (21)`. - `pnpm --filter @objectstack/scenarios skill-evals --dry-run --skills objectstack-ui` (the strict reader of the eval fixtures; no model call): exit 0, `objectstack-ui: 51 case(s)`. - `pnpm check:nul-bytes`: exit 0. </details> <details> <summary>Derived gate families: 68 derived, 67 run, 1 not measured</summary> `node scripts/pm/dispatch-gates.mjs --commands` derived 68 commands for the 8 changed paths. Each ran with its exit code recorded before any pipe, and `--ran` answered: `68 derived famil(ies) accounted for — 67 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)`. - 67 commands: exit 0. - NOT MEASURED: `pnpm check:dual-build-cjs-loads`, reason: exit 3, `PREREQUISITE NOT MET`. It reads the `dist/` of every package, and this tree built only the three packages above. The diff changes no package source, so this one is CI's. - Outside the derived list, run because the order names them: `check:skill-examples`, `check:skill-refs`, the `platform-catalog` test and the eval reader's dry run. - `pnpm --dir ui run check:skill-eval-tokens` exits 0, but it scans the `skills/objectui` bundle only. It is no reading about the fixtures this PR edits. - `pnpm check:dev-prereqs` (local-only family) exits 1: 63 of 110 packages have no `dist/` here, which is the targeted build above and nothing about this diff. </details> <details> <summary>Does any gate check the examples for a missing or misplaced placement? No.</summary> - `check:skill-examples` type-checks the marked TypeScript blocks. An action with no `locations` compiles. - `check:skill-served-sections` parses the JSON fences with the spec schema. `locations` is optional there. - `action-no-placement` and `object-action-layout-not-placed` are `@objectstack/lint` rules. They run in `os validate`, `os build` and `os lint` over a whole stack, and no gate feeds them the skill examples. One-off probe (not committed): it reads the `defineAction` blocks of `rules/actions.md`, the Actions JSON fence of `SKILL.md` and the `actionLayout` example at a git ref, builds a stack from them, and calls `validateActionLocations` and `validateObjectActionLayout` from the built `@objectstack/lint`. | Ref | `action-no-placement` | `object-action-layout-not-placed` | |:--|:--|:--| | `origin/main` (`f72f3353`) | 7 | 2 (`record.pinned[0]`, `record.more[0]`) | | `27cb6e21` (examples unchanged at `a7aee8ef`) | 1 (`crm_create_campaign`) | 0 | `crm_create_campaign` has never carried `locations`: a list view's `bulkActions` places it by name, and the probe's stack has no view. </details> ## Acceptance notes - **PR 1's changeset is not edited.** It says an action copied from one of the six examples needs its `locations` added. This PR's changeset says that it replaces that note. Both ship in the same release. - **The branch.** The remote branch was absent when this run started: `git ls-remote` listed no such head, and `refs/pull/37947/head` still held `78295ae3`. The work starts from `78295ae3` plus a real merge of `main` (`b8b31cca`), and the first push created the branch again, with no force. - **NOT MEASURED: a skill-evals round** (the with-skill and no-skill pass rates), reason: it needs a Claude Code login and model calls, and it is not a merge gate. - **Case 3's token.** `'record'` is single-quoted, as the file's other code tokens are. An answer that writes `['record_page', 'record_row']` is valid metadata and fails the token. The old token, `record_header`, had the same limit. - **Not changed, outside this card:** `rules/actions.md` line 3 says "the six types", and the Action Types table it links to has seven rows. `content/docs/protocol/objectui/actions.mdx` says the console does not draw `record_related` yet, while `RelatedRecordActionsBridge.tsx` reads it; this is a reading of the source and was not exercised. - **Main moved after the merge.** `origin/main` went from `f72f3353` to `93fa9118` during the run (two commits: `packages/runtime`, a changeset, and the lockfile and workspace files). Neither touches a file of this PR, and the branch was not merged again. At `a7aee8ef`, `origin/main` is `6e06729a`; `git merge-tree` with it is clean and the PR reads `mergeable_state: clean`. ## Verification Read first, by risk: 1. `skills/objectstack-ui/rules/actions.md`: the location table hunk, and the `locations` line of each of the five examples (the word chosen for the three header-only ones). 2. `scripts/check-skills-token-ratchet.mjs`: the two raises, the `rules/actions.md` row (3844 to 3918) and the `skills/objectstack-ui/SKILL.md` row (2256 to 2262). 3. `skills/objectstack-ui/evals/views-apps-actions-pages.json`: case 3's `must_contain`. Two-minute check: run `git grep -nE "record_header|record_more|list_item|list_toolbar" -- skills/`. Expect exactly one line, `skills/objectstack-ui/rules/actions.md:28`, which begins "Until protocol 19:". ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. (No schema is touched.) - [x] 2. Every name I added uses the casing for its kind. (No name is added.) - [ ] 3. No formatter ran; `pnpm lint` passes. (No formatter ran. `pnpm lint` is CI's run and was not run locally.) - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. (Not touched; `check:skill-docs` and `check:skill-refs` are in sync.) - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. (The maintainer's rulings are quoted in their own words, and the quick-read section is the house form.) - [ ] The *Before Submitting* list in CONTRIBUTING.md is done. (All but `pnpm lint`, as item 3.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01L9qibztwLPZEpzDMBn2GM6 --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Tesla · project thread
Part of #36495
What changes
An action's
locationsnow say what the action acts on, not the part of the page it sits in.ACTION_LOCATIONSislist,record,record_page,record_row,record_related,record_section. The page-part wordslist_toolbar,list_item,record_headerandrecord_moreare retired.recordis new: the action acts on one record, so it is drawn on the record page's header and in each list row's menu.record_moreused to say, is the action'scomponent: 'action:menu'.actionLayout.Clause-②: yes (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up #37895
A replacement with a registered conversion, so
yes (narrowing)as on main's precedents (.changeset/pre/37086-define-metadata-form-rename.md,.changeset/pre/37304-knowledge-source-governed-type.md). Narrowed: the four retired words are refused wherever a location is read. Widened in the same change:list,record,record_pageandrecord_row, at the same positions;@object-ui/typesexportactionFoldedIntoMenu;@object-ui/i18nStudio keys for the location labels (en, zh), replacing the eight keys of the retired words.ADR-0087 conversion
action-locations-acted-on(lossless)FROM → TO. Each action is drawn in exactly the places it was drawn before:
list_toolbar→listlist_item→record_rowrecord_header/record_more→record_pagerecord_headerorrecord_morebesidelist_item→recordrecord_morewithoutrecord_header→record_page+component: 'action:menu'location(record:quick_actions,action:group,action:bar) is mapped the same way.The conversion is retired from the load path from day one, as every protocol-19 entry is. An old word is refused at authoring, and the refusal names the word to write instead. Stored items, built artifacts and
os migrate meta --from 18replay the conversion. It leaves a TODO and changes nothing in four cases that have no lossless rewrite:record_more-only action that is also onlist_toolbar, withoutcomponent: 'action:menu'already (with it, the rewrite is lossless); there are 0 in this reporecord_headerwith an authoredcomponent: 'action:menu': the header folded it into its ⋯ while arecord:quick_actionsbar atrecord_headerdrew it as a button, andrecord_pagehas one state for both; 0 in objectstack and HotCRM. Pinned inpackages/spec/src/conversions/action-locations-acted-on.test.ts; removing the TODO turns 3 of its cases redlocationisrecord_moreaction:groupatrecord_headerwith arecord_more-only memberA site left as stored keeps its old word, which a protocol-19 runtime matches to no surface: that action or block is drawn nowhere until it is rewritten by hand.
The semantic entry
action-locations-page-parts-retiredcarries the step into the protocol-19 upgrade guide.Readers
@object-ui/types:actionRendersAtreadsrecordas coveringrecord_pageandrecord_row.actionFoldedIntoMenutells whether an action is folded into the ⋯.arrangedHeaderActionspins and unpins throughcomponent.page:headersends every folded action to its ⋯. Every otherrecord_pageaction takes the inline budget.record:quick_actionsatrecord_pageleaves folded actions out.recordas a row action.isRecordScopedAction,requiresRecord) acceptrecord.record:quick_actionslocation dropdown offerrecord.packages/**,examples/**andui/**, pluscontent/docs/**, use the new words. The generated references,sdui.manifest.jsonand the component reference pages are regenerated.Not moved
skills/**teaching. It is Blocked-by this card.check:skill-examplesandcheck:skill-served-sectionsare green.docs/qa/**keeps the old words; it is outside the card's file surface. The recorded buildsdocs/qa/scenarios/builds/travel_expense.jsonandorder_to_cash.jsondeclareengines.protocol: ^19and are replayed through the conversion. The checklist's scratch bodies sent to the save door are refused now; the seat files that follow-up.Size
421 files, +2478/−1631 (4109 changed lines). This is over 3000, so it is a class (c) landing.
🤖 Generated with Claude Code
https://claude.ai/code/session_01L9qic11optJUat6U8X67jY