Repository navigation
docs(skills): teach the approvals inbox nav entry gated on the approvals service, not requiresObject - #33283
Conversation
…als service, not requiresObject The objectstack-ui navigation rule and its eval taught the approvals entry as an object item gated by requiresObject: 'sys_approval_request', which hides it from non-admin approvers until a request involves them. Teach the Account app's shape instead: type 'component', componentRef 'approvals:inbox', requiresService 'approvals'. Claude-Session: https://claude.ai/code/session_01FEkQ5kCq2ZxdEfiiXADAhS Co-Authored-By: Claude <noreply@anthropic.com>
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb Contract reviewServed-tier: Inputs read: card #33235 (body and all 3 comments: triage 6874756402, claim 6879488025, dev report 6879770686; no ruling and no earlier record on it), PR #33283 (body, the 3-file list, the net diff against ① Derived judgments
② Semver level
Clause-②: no — agrees on the card claim, the PR body and the changeset. Correct: nothing a consumer could author yesterday is refused today, and nothing new is accepted. ③ Boundary flags
④ Design judgmentJudged from the seat of a customer agent that loads the whole
Findings:
No must-fix and no should-fix. Nits alone end the round; no delta review is owed. Implemented-by: VERDICT: PASS Adopted by the seat 2026-11-14T15:44Z · isolated sub-agent at CONTRACT_REVIEW_TIER · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z |
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb 维护者速读
席位核对Verdict: ACCEPT, held for the maintainer · head
|
Requested by Leehom · project thread
Fixes #33235
domain:skills#1 · os-project-manager · session_01FEkQ5kCq2ZxdEfiiXADAhS
Clause-②: no
Metadata-protocol: none
维护者速读
objectstack-ui技能的导航规则示例里,审批入口从「type: 'object'指向sys_approval_request+requiresObject门」改为平台 Account 应用同款写法:type: 'component'、componentRef: 'approvals:inbox'、requiresService: 'approvals',并用一句注释说明为何不能用requiresObject;对应 eval 的期望输出与断言同步改。sys_approval_request的对象元数据得 404,控制台据此把入口裁掉,于是新环境里没有一个审批人看得见审批收件箱。skills/**两个文件各改 3 行、净增 0 行;不动 schema、不动运行时;回滚即还原本 PR。skills/objectstack-ui/rules/navigation.md第 37–39 行,再看 eval 第 17、20–21 行。git diff origin/main -- skills/,预期只见审批那一项换成 component +requiresService: 'approvals',eval 断言改为要求approvals:inbox、requiresService,并禁止requiresObject: 'sys_approval_request'。skills/**):请批准或合并。What changes
skills/objectstack-ui/rules/navigation.mdlines 37–39, inside theos:checkapp example. The approvals item{ id: 'nav_approval_requests', type: 'object', objectName: 'sys_approval_request', label: 'Approval Requests', icon: 'inbox', requiresObject: 'sys_approval_request' }becomes
{ id: 'nav_approvals', type: 'component', componentRef: 'approvals:inbox', label: 'Approvals', icon: 'inbox', requiresService: 'approvals' }and the comment that taught "Reference system objects via
requiresObjectso the menu auto-hides" now reads "The inbox component, gated on the approvals service. NotrequiresObject: the object read answers 404 to approvers until a request involves them."skills/objectstack-ui/evals/views-apps-actions-pages.jsoneval 2.expected_outputdescribes the approvals inbox astype: 'component', componentRef: 'approvals:inbox'gated byrequiresService: 'approvals', neverrequiresObject: 'sys_approval_request'.must_containswapsrequiresObjectforapprovals:inboxandrequiresService;must_not_containaddsrequiresObject: 'sys_approval_request'..changeset/33235-skills-approvals-inbox-nav-gate.md:'@objectstack/skills': patch, carrying both declaration lines.Why
The shape taught is the platform's own, quoted from
packages/platform-objects/src/apps/account.app.tslines 114–128 onorigin/maind4fbb4d (comment lines trimmed):The same file (lines 100–109) also explains why the destination is the component and not the
sys_approval_requestgrid: the decision actions need theviewerblock that only the approvals REST path attaches, so the object route renders rows an approver cannot act on. The new example teaches both halves.How each gate is applied, read on
origin/maind4fbb4d:requiresServiceis enforced server-side.packages/rest/src/meta-item-read-gate.ts:1098(the app) and:1110(each navigation entry, insidefilterNav) drop an entry whose service the kernel does not hold;resolveRegisteredServices(:1304) probes everyrequiresServicenamed undernavigation,areas,childrenandwidgets, and fails open when the kernel cannot be probed. plugin-approvals registers the service atpackages/plugins/plugin-approvals/src/approvals-plugin.ts:414(ctx.registerService('approvals', this.service)).requiresServicethrough and prunesrequiresObject.ui/packages/app-shell/src/views/nav-menu-renderer.tsx:336-337askscheckCap('object', …)andcheckCap('service', …);checkCap(:251-264) judges objects against the served object scope and returnstruefor every service, so the console relies on the server having already stripped an unavailable one. This refines the order's mechanism assumption ("the console really prunesrequiresServiceitems"): the server prunes, the console does not re-check. It agrees with the card, which says only that the console prunes against the served objects, and with the Account app's own comment.componentRef: 'approvals:inbox'resolves through the console's component registry:ui/apps/console/src/registerApprovalsComponents.tsx:59registersref: 'approvals:inbox'to the Approvals Inbox page, mounted at/apps/{app}/component/approvals/inbox.packages/spec/src/ui/app.zod.ts:451declaresrequiresServiceon every navigation item and:741declarescomponentRefon the component item. The example sits in anos:checkblock and type-checks (Verification below).The card's measurement on 18.4.0 (a non-administrator approver reads
GET /api/v1/meta/object/sys_approval_requestas 404 until a request involves them) was not re-measured here; the fix does not depend on it, because the taught item no longer names the object at all.Acceptance notes
git greponorigin/maind4fbb4d overskills/forrequiresObject,requiresService,sys_approval_requestandapprovals:inbox: the navigation rule and its eval are the only places that teach the approvals nav entry.skills/objectstack-ui/SKILL.md:166-168states the general rule (userequiresObject/requiresServiceon an item that depends on an optional object or service) and stays correct;SKILL.md:192's blueprint row listsrequiresObjectas a navigation pattern and names no approvals entry, so it is untouched. Thesys_approval_requestmentions underskills/objectstack-automation/describe the approval state table, not navigation.Verification
Head
77236122, baseorigin/maind4fbb4d.Line and token budget (skills/**)
skills/**: +6 / -6, net 0, inside the order's +4 budget.skills/objectstack-ui/rules/navigation.md: 163 to 163 lines, 8713 to 8727 bytes; token ratchet 2179 to 2182 (ceiling 2184, headroom 2). The first wording measured 2185 (over by 1); the comment was shortened, no ceiling moved.skills/objectstack-ui/evals/views-apps-actions-pages.json: 175 to 175 lines; 3992 to 4052 tokens (eval fixture, measured, not ratcheted).skills/*/SKILL.md: 4601 to 4601 lines, 235620 to 235620 bytes (no SKILL.md touched). Bundle total (whole shipped tree): 244205 to 244268 tokens.node scripts/pm/check-skill-line-ratchet.mjs: exit 0 before and after.node scripts/check-skills-token-ratchet.mjs: exit 0.Derived gates: 44 derived, 40 run green, 4 NOT MEASURED
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackderived 44 families for the three paths. Each was run with its exit code captured before any pipe:check-adr-0087-registration(scan and--self-test),check-changeset-no-major,check-empty-changeset(scan and--self-test),check-skills-token-ratchet(scan and--self-test),check:changeset-gate-self-tests,check:doc-authoring,check:nul-bytes,check:pm-governed-merges,check:published-files,check:skill-compatibility,check:skill-frame-sync,check:skill-identifier-liveness,check:skill-links.@objectstack/lint check:doc-formula-expressions: first exit 3 (no lint dist); after building@objectstack/formulaand@objectstack/lintunder the verify lock (VERDICT command-exit 0, 95s) it exits 0.dist/:check:dts-closure,check:dual-build-cjs-loads,check:lean-entry-closure,check:sourcemap-no-sources-content. No package source is touched, so no full build was paid locally; CI builds and runs them.--ranreconciliation: "44 derived famil(ies) accounted for — 40 run, 4 NOT-MEASURED (4 DERIVED from a recorded exit 3)".pnpm --filter @objectstack/spec check:skill-examplesexit 0 after building the@objectstack/client-reactclosure under the verify lock (VERDICT command-exit 0, 210s): "344 prose examples type-check across 3 surface(s) — every marked block parsed, so tsc ran the SEMANTIC pass on all of them". That covers the editedos:checkblock.Tier and governed readings
dispatch-gates --tier: MANDATORY contract-review tier, bothskills/**paths under clause ① (the published catalog); no one-line exit for this surface.node scripts/pm/check-governed-merges.mjs --branch claude/project-thread-dk76uo: exit 3, GOVERNED, landing tier H (人合). 2 of 3 paths hit the register (skills/**x2); the changeset is not on it. Size +16 / -6, under the 3000 threshold.🤖 Generated with Claude Code
https://claude.ai/code/session_01FEkQ5kCq2ZxdEfiiXADAhS