Uh oh!
There was an error while loading. Please reload this page.
fix(console): make 8 more preview samples parse against @objectstack/spec - #3277
Merged
xuyushun441-sys merged 1 commit intoAug 3, 2026
Merged
Conversation
…spec (#3266) The preview gallery's samples are the worked EXAMPLE an author (usually a model) copies for each metadata type, so a stale one does not fail once — it propagates. objectui#3257 shipped the guard that measures this; this change empties the mechanically-fixable half of its KNOWN_STALE ledger. Four carried RETIRED keys, adjudicated exactly like #3257's: - action: `bulkEnabled` (objectstack#3896); `type: server` / `variant: default` / `locations: [record, list]` are pre-17 enum values. `script` needs a handler, so `target: 'closeOrder'` is declared. - agent: `tools` (objectstack#3894 — an agent reaches the tools its skills declare) and `knowledge` (objectstack#3896 — it never scoped retrieval). - skill: `triggerPhrases` (objectstack#3896); `triggerConditions` restated in the field/operator/value form that actually routes. - flow: `waitEventConfig.onTimeout` (objectstack#4158); `scheduled` → `schedule`; the strict FlowVariableSchema rejects `description`; every edge now carries the required `id`. Four were shape drift: - report: rewritten to the ADR-0021 single form (`dataset` + `values` grouped by `rows`). The pre-9.0 inline query it used was silently stripped by the non-strict schema, then rejected for having no dataset — column-name strings alone would not fix it. - validation: `events` is the write CONTEXT (`insert`/`update`), not a lifecycle-hook name. - datasource: `type`/`isDefault` are not datasource keys; `ssl` and `capabilities` are config objects; `interval` → `intervalMs` (and the unit is milliseconds). - app: navigation rewritten against the spec-17 discriminated union (`type` + the named metadata record, not a hand-written `path`); `landing` → `homePageId` (objectstack#4001). All eight move KNOWN_STALE → SPEC_CLEAN, as the ledger's reverse assertion demands. `object`, `page`, `dashboard` and `translation` stay quarantined with their reasons — each needs an adjudication that does not belong in this file. The guard itself is untouched in strictness: nothing was exempted, relaxed or moved into NO_AUTHORING_SCHEMA. The retired-key pin is widened instead, and now matches at any depth so a nested tombstone like `onTimeout` is covered. Refs #3257, #3269
The latest updates on your projects. Learn more about Vercel for GitHub. |
xuyushun441-sys
commented
Aug 3, 2026
ContributorAuthor
正文第三节里那句「在 Generated by Claude Code |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
xuyushun441-sys
marked this pull request as ready for review
August 3, 2026 10:04
Uh oh!
There was an error while loading. Please reload this page.
xuyushun441-sys
deleted the
claude/issue-3266-preview-samples-spec-conformance
branch
August 3, 2026 10:05
This was referenced Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#3266
预览画廊里的样例不是测试夹具,是每种元数据类型给作者(多数情况下是模型)照抄的那份范例。范例过期不会只错一次,它会扩散。objectui#3257 / PR #3269 建好了度量它的守卫;本 PR 把那份
KNOWN_STALE台账里机械可修的那一半清空。SPEC_CLEAN:8 个(action、agent、skill、flow、report、validation、datasource、app)object、page、dashboard、translation)NO_AUTHORING_SCHEMA、没有降低严格度。退役键的钉定测试反而被加强了(见下)。一、4 个带已退役键的(与 #3257 同性质、同裁决依据)
actionbulkEnabled;type: 'server'→'script'并补target: 'closeOrder';variant: 'default'→'primary';locations: ['record','list']→['record_header','list_toolbar']agenttools、knowledgeskilltriggerPhrases;triggerConditions改写成真正参与路由的field/operator/value形态flowwaitEventConfig.onTimeout;type: 'scheduled'→'schedule';删variables[].description(FlowVariableSchema是.strict());13 条 edge 补上必需的idaction补target不是自由发挥:ActionSchema有一条 refine ——type: 'script'而既无body又无target会被拒(那是 #2169 的「注册不上 handler、运行时才炸」)。原样例type: 'server'表达的就是服务端处理器,script+ 具名target是它在 17 里的写法。二、4 个形态漂移
report—— 本单原描述是「columns改成列名字符串」,实际不止:ADR-0021 单一形态下报表必须绑dataset+values。样例用的是 9.0 之前的内联查询(object+columns: [{field,label}]+groupBy),ReportSchema非.strict()会把object/groupBy静默剥掉,然后因为「没有 dataset」失败 —— 只改列名字符串修不好。已重写为dataset: 'sales_orders'/rows: ['status']/values: ['order_count','total_amount']/order。validation——events是写入上下文(insert/update),不是生命周期钩子名。datasource——type/isDefault不是 datasource 的键(路由在 stack 级的datasourceMapping);ssl、capabilities是配置对象;interval→intervalMs,且单位是毫秒(原来的60拼对键之后是 60ms,不是 60 秒)。app—— navigation 是按type的判别联合且每支.strict():app 不用手写path路由,而是点名要打开的元数据记录(objectName/pageName/dashboardName/url),路由由 shell 推导;id必填;landing已被 objectstack#4001 移除,替代是homePageId(它是 nav item 的 id,不是路由字符串)。顺带让样例互相引用起来(crm_welcome页、open_orders视图、sales_overview仪表盘)。三、⚠️ 画廊(共用浏览器验证台)的可见变化,逐条
以下都是在
preview-gallery.html?only=<type>上实测的改前 → 改后,不是推断。type: server/variant: default,Locations 显示recordlist,On click 显示 "No handler bound yet.",「WHERE IT APPEARS」标题下一片空白(placement mock 认不出record/list)type: script/variant: primary,Locations 显示record_headerlist_toolbar,On click 显示 "Run named script closeOrder",「WHERE IT APPEARS」真的画出 record_header 与 list_toolbar 两块占位模拟 —— 本 PR 里画廊变丰富的一处query_orders (OBJECTQL)/lookup_company (HTTP),并有KNOWLEDGE (RAG): sales_playbook区块TRIGGER PHRASES (2)区块("draft an email" / "follow up");trigger condition 一行显示record.status == 'Open'COND | sales_order(渲染器只读expression ?? value,看不见 field/operator —— 已另立单)Trigger: scheduledTrigger: schedule。画布节点/连线渲染完全不变(edge 的id只影响 React key,原本回落${source}-${target}-${i})report就一定会走到这条分支;换来的是验证台从此覆盖的是真实设计器走的那条路,而不是空态on beforeInsert, beforeUpdateon insert, updateenabled: true;Health Check 显示interval: 60;有CAPABILITIES: read / aggregate区块enabled: true+rejectUnauthorized;Health Check 显示intervalMs: 60000;CAPABILITIES 区块消失(渲染器Array.isArray(d.capabilities)只认数组,对象形态读不到 —— 已另立单)/apps/crm/accounts等);Dashboard的 kind 徽标是dashboard;顶部Landing: /apps/crm/homepath);Dashboard徽标退化成item;顶部Landing: /(渲染器不读homePageId)。层级、分组、外链项照常object/page/dashboard/translation/view/job/tool/permission/position/email_template/workflow/approval的样例一个字没动,画廊对应的卡片与 main 完全一致。其中 agent / skill / datasource / app 的「变少」不是本 PR 造成的退化,而是暴露出来的既有问题:那几块内容原本是靠不合规的样例喂出来的 —— 渲染器在读 spec 现在明确拒收的键。按 AGENTS.md #0.1(修生产者、不在消费者加宽容回退)和 objectui#3236 / PR #3258 的先例,该修的是渲染器,那在
packages/app-shell,不在本轮 scope fence(apps/console)内,已另立 #3275。四、守卫本体的改动(只增不减)
SPEC_CLEAN增加 8 项;KNOWN_STALE只剩 4 项,每项理由保留并写清「为什么需要先裁决」而不是「还没轮到」。NO_AUTHORING_SCHEMA,会把这个文件唯一的价值删掉。tool的 3 个键」扩成RETIRED_KEYS表(9 条,每条带裁决出处),并且改为任意深度匹配 ——waitEventConfig.onTimeout挂在 flow 节点上,原来的not.toHaveProperty够不着。这是加强,不是放宽。report是靠绑 dataset 才进的SPEC_CLEAN,它被剥掉的object/groupBy自己不会让任何断言失败 —— 这正是RETIRED_KEYS存在的理由。五、留在台账里的 4 个,以及理由
objectfields的数组形态是packages/app-shell/.../object-fields-io.ts的readFields()有意支持的分支(它按shape: 'array' | 'record'分流并原样保留)。改成 record 会让画廊不再覆盖 array 那条路,而真正该裁的是「设计器要不要继续编辑一个ObjectSchema拒收的形态」(AGENTS.md #0.1)—— 那是 app-shell 那头的决定pageprops,PageComponentSchema按 ADR-0089 D3a 拒收;改法会改变画廊渲染结果,需先裁决dashboarddataset/values、带已退役的value/format、chart不是合法 widget type;同样改变渲染结果translationObjectStackSchema.translations是Array< Record< locale, TranslationData > >,而样例是 console 实际在编辑的元数据记录形态。更像是映射选错而不是样例过期 —— 先定这个样例到底对应哪个契约,再动六、changeset
不需要,#3269 的判断依然成立并已复核:
apps/console/vite.config.ts没有rollupOptions.input,默认入口只有index.html,preview-gallery.html及其引用的preview-samples.ts不是生产构建输入(文件头也自述 DEV-ONLY)。另外 AGENTS.md 明确「纯 bug 修复不需要 changeset」,本 PR 两条都占。七、验证
pnpm --filter @object-ui/console type-check在本地 worktree 报 306 个Cannot find module '@object-ui/*'—— 这是工作区包未构建导致的既有状态,改动前后逐字一致(306 → 306),且没有一条落在本 PR 改的两个文件上(CI 先构建,不会命中)。浏览器验证走
verifyskill(自建 :5233 vite,收工按 PID 停,未碰 :3000/:5180),上表每一行都是实测。八、越界发现(Prime Directive #10,均未指派、不在本 PR 修)
AgentPreview/SkillPreview/AppPreview/DatasourcePreview仍在读 spec 已拒收的键(tools/knowledge/triggerPhrases/landing/path/capabilities数组形态),即上表里「变少」的那几处的根因。validation预览样例的condition语义写反了(spec 里 condition 为 TRUE 表示校验失败),另带两个会被静默剥掉的键 #3276 ——validation样例的condition: 'amount > 0'语义写反了(spec 契约是「condition 为 TRUE 表示校验失败」),另有expression/object(以及skill的type)是会被静默剥掉的键。本 PR 只按派发范围改了events,没有动这些。Generated by Claude Code